1 // Copyright 2015 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.
5 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_
6 #define CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_
8 #include "base/basictypes.h"
9 #include "components/variations/service/variations_service_client.h"
12 #include "chrome/browser/metrics/variations/variations_registry_syncer_win.h"
15 // ChromeVariationsServiceClient provides an implementation of
16 // VariationsServiceClient that depends on chrome/.
17 class ChromeVariationsServiceClient
18 : public variations::VariationsServiceClient
{
20 ChromeVariationsServiceClient();
21 ~ChromeVariationsServiceClient() override
;
23 // variations::VariationsServiceClient:
24 std::string
GetApplicationLocale() override
;
25 base::SequencedWorkerPool
* GetBlockingPool() override
;
26 base::Callback
<base::Version(void)> GetVersionForSimulationCallback()
28 net::URLRequestContextGetter
* GetURLRequestContext() override
;
29 network_time::NetworkTimeTracker
* GetNetworkTimeTracker() override
;
30 version_info::Channel
GetChannel() override
;
31 bool OverridesRestrictParameter(std::string
* parameter
) override
;
32 void OverrideUIString(uint32_t hash
, const base::string16
& string
) override
;
33 void OnInitialStartup() override
;
37 // Starts syncing Google Update Variation IDs with the registry.
38 void StartGoogleUpdateRegistrySync();
40 // Helper that handles synchronizing Variations with the Registry.
41 chrome_variations::VariationsRegistrySyncer registry_syncer_
;
44 DISALLOW_COPY_AND_ASSIGN(ChromeVariationsServiceClient
);
47 #endif // CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_