Home | History | Annotate | Download | only in metrics
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #include "chrome/browser/metrics/metrics_service_accessor.h"
      6 
      7 #include "components/metrics/metrics_service.h"
      8 
      9 // TODO(asvitkine): Remove when this class is moved to metrics namespace.
     10 using metrics::MetricsService;
     11 using metrics::SyntheticTrialGroup;
     12 
     13 // static
     14 bool MetricsServiceAccessor::RegisterSyntheticFieldTrial(
     15     MetricsService* metrics_service,
     16     uint32_t trial_name_hash,
     17     uint32_t group_name_hash) {
     18   if (!metrics_service)
     19     return false;
     20 
     21   SyntheticTrialGroup trial_group(trial_name_hash, group_name_hash);
     22   metrics_service->RegisterSyntheticFieldTrial(trial_group);
     23   return true;
     24 }
     25