OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_ |
6 #define CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_ | 6 #define CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/bind.h" | |
12 #include "components/variations/service/variations_service_client.h" | 11 #include "components/variations/service/variations_service_client.h" |
13 #include "components/variations/variations_seed_store.h" | |
14 | 12 |
15 #if defined(OS_WIN) | 13 #if defined(OS_WIN) |
16 #include "chrome/browser/metrics/variations/variations_registry_syncer_win.h" | 14 #include "chrome/browser/metrics/variations/variations_registry_syncer_win.h" |
17 #endif | 15 #endif |
18 | 16 |
19 // ChromeVariationsServiceClient provides an implementation of | 17 // ChromeVariationsServiceClient provides an implementation of |
20 // VariationsServiceClient that depends on chrome/. | 18 // VariationsServiceClient that depends on chrome/. |
21 class ChromeVariationsServiceClient | 19 class ChromeVariationsServiceClient |
22 : public variations::VariationsServiceClient { | 20 : public variations::VariationsServiceClient { |
23 public: | 21 public: |
24 ChromeVariationsServiceClient(); | 22 ChromeVariationsServiceClient(); |
25 ~ChromeVariationsServiceClient() override; | 23 ~ChromeVariationsServiceClient() override; |
26 | 24 |
27 // variations::VariationsServiceClient: | 25 // variations::VariationsServiceClient: |
28 std::string GetApplicationLocale() override; | 26 std::string GetApplicationLocale() override; |
29 base::SequencedWorkerPool* GetBlockingPool() override; | 27 base::SequencedWorkerPool* GetBlockingPool() override; |
30 base::Callback<base::Version(void)> GetVersionForSimulationCallback() | 28 base::Callback<base::Version(void)> GetVersionForSimulationCallback() |
31 override; | 29 override; |
32 net::URLRequestContextGetter* GetURLRequestContext() override; | 30 net::URLRequestContextGetter* GetURLRequestContext() override; |
33 network_time::NetworkTimeTracker* GetNetworkTimeTracker() override; | 31 network_time::NetworkTimeTracker* GetNetworkTimeTracker() override; |
34 version_info::Channel GetChannel() override; | 32 version_info::Channel GetChannel() override; |
35 bool OverridesRestrictParameter(std::string* parameter) override; | 33 bool OverridesRestrictParameter(std::string* parameter) override; |
36 void OnInitialStartup() override; | 34 void OnInitialStartup() override; |
37 variations::VariationsFirstRunSeedCallback GetVariationsFirstRunSeedCallback() | |
38 override; | |
39 | 35 |
40 private: | 36 private: |
41 #if defined(OS_WIN) | 37 #if defined(OS_WIN) |
42 // Starts syncing Google Update Variation IDs with the registry. | 38 // Starts syncing Google Update Variation IDs with the registry. |
43 void StartGoogleUpdateRegistrySync(); | 39 void StartGoogleUpdateRegistrySync(); |
44 | 40 |
45 // Helper that handles synchronizing Variations with the Registry. | 41 // Helper that handles synchronizing Variations with the Registry. |
46 chrome_variations::VariationsRegistrySyncer registry_syncer_; | 42 chrome_variations::VariationsRegistrySyncer registry_syncer_; |
47 #endif | 43 #endif |
48 | 44 |
49 DISALLOW_COPY_AND_ASSIGN(ChromeVariationsServiceClient); | 45 DISALLOW_COPY_AND_ASSIGN(ChromeVariationsServiceClient); |
50 }; | 46 }; |
51 | 47 |
52 #endif // CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_ | 48 #endif // CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_ |
OLD | NEW |