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> | |
9 | |
8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/bind.h" | |
12 | |
Bernhard Bauer
2015/11/04 09:08:57
No empty line.
Alexander Agulenko
2015/11/04 09:42:29
Done.
| |
9 #include "components/variations/service/variations_service_client.h" | 13 #include "components/variations/service/variations_service_client.h" |
14 #include "components/variations/variations_seed_store.h" | |
15 | |
16 #if defined(OS_ANDROID) | |
17 #include "chrome/browser/android/preferences/pref_service_bridge.h" | |
18 #endif // OS_ANDROID | |
10 | 19 |
11 #if defined(OS_WIN) | 20 #if defined(OS_WIN) |
12 #include "chrome/browser/metrics/variations/variations_registry_syncer_win.h" | 21 #include "chrome/browser/metrics/variations/variations_registry_syncer_win.h" |
13 #endif | 22 #endif |
14 | 23 |
15 // ChromeVariationsServiceClient provides an implementation of | 24 // ChromeVariationsServiceClient provides an implementation of |
16 // VariationsServiceClient that depends on chrome/. | 25 // VariationsServiceClient that depends on chrome/. |
17 class ChromeVariationsServiceClient | 26 class ChromeVariationsServiceClient |
18 : public variations::VariationsServiceClient { | 27 : public variations::VariationsServiceClient { |
19 public: | 28 public: |
20 ChromeVariationsServiceClient(); | 29 ChromeVariationsServiceClient(); |
21 ~ChromeVariationsServiceClient() override; | 30 ~ChromeVariationsServiceClient() override; |
22 | 31 |
23 // variations::VariationsServiceClient: | 32 // variations::VariationsServiceClient: |
24 std::string GetApplicationLocale() override; | 33 std::string GetApplicationLocale() override; |
25 base::SequencedWorkerPool* GetBlockingPool() override; | 34 base::SequencedWorkerPool* GetBlockingPool() override; |
26 base::Callback<base::Version(void)> GetVersionForSimulationCallback() | 35 base::Callback<base::Version(void)> GetVersionForSimulationCallback() |
27 override; | 36 override; |
28 net::URLRequestContextGetter* GetURLRequestContext() override; | 37 net::URLRequestContextGetter* GetURLRequestContext() override; |
29 network_time::NetworkTimeTracker* GetNetworkTimeTracker() override; | 38 network_time::NetworkTimeTracker* GetNetworkTimeTracker() override; |
30 version_info::Channel GetChannel() override; | 39 version_info::Channel GetChannel() override; |
31 bool OverridesRestrictParameter(std::string* parameter) override; | 40 bool OverridesRestrictParameter(std::string* parameter) override; |
32 void OnInitialStartup() override; | 41 void OnInitialStartup() override; |
33 | 42 |
43 #if defined(OS_ANDROID) | |
44 base::Callback<void(std::string*, std::string*, std::string*)> | |
45 GetVariationsFirstRunSeedCallback() override; | |
46 #endif // OS_ANDROID | |
47 | |
34 private: | 48 private: |
35 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
36 // Starts syncing Google Update Variation IDs with the registry. | 50 // Starts syncing Google Update Variation IDs with the registry. |
37 void StartGoogleUpdateRegistrySync(); | 51 void StartGoogleUpdateRegistrySync(); |
38 | 52 |
39 // Helper that handles synchronizing Variations with the Registry. | 53 // Helper that handles synchronizing Variations with the Registry. |
40 chrome_variations::VariationsRegistrySyncer registry_syncer_; | 54 chrome_variations::VariationsRegistrySyncer registry_syncer_; |
41 #endif | 55 #endif |
42 | 56 |
43 DISALLOW_COPY_AND_ASSIGN(ChromeVariationsServiceClient); | 57 DISALLOW_COPY_AND_ASSIGN(ChromeVariationsServiceClient); |
44 }; | 58 }; |
45 | 59 |
46 #endif // CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_ | 60 #endif // CHROME_BROWSER_METRICS_VARIATIONS_CHROME_VARIATIONS_SERVICE_CLIENT_H_ |
OLD | NEW |