Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / metrics / variations / chrome_variations_service_client.h
blobb3b7846679b7ff08265a98942ada9527e8715565
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"
11 #if defined(OS_WIN)
12 #include "chrome/browser/metrics/variations/variations_registry_syncer_win.h"
13 #endif
15 // ChromeVariationsServiceClient provides an implementation of
16 // VariationsServiceClient that depends on chrome/.
17 class ChromeVariationsServiceClient
18 : public variations::VariationsServiceClient {
19 public:
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()
27 override;
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;
35 private:
36 #if defined(OS_WIN)
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_;
42 #endif
44 DISALLOW_COPY_AND_ASSIGN(ChromeVariationsServiceClient);
47 #endif // CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_