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 #include "chrome/browser/metrics/variations/chrome_variations_service_client.h" | 5 #include "chrome/browser/metrics/variations/chrome_variations_service_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/common/channel_info.h" |
9 #include "components/version_info/version_info.h" | 10 #include "components/version_info/version_info.h" |
10 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
11 | 12 |
12 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) | 13 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) |
13 #include "chrome/browser/upgrade_detector_impl.h" | 14 #include "chrome/browser/upgrade_detector_impl.h" |
14 #endif | 15 #endif |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 // Gets the version number to use for variations seed simulation. Must be called | 19 // Gets the version number to use for variations seed simulation. Must be called |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 net::URLRequestContextGetter* | 53 net::URLRequestContextGetter* |
53 ChromeVariationsServiceClient::GetURLRequestContext() { | 54 ChromeVariationsServiceClient::GetURLRequestContext() { |
54 return g_browser_process->system_request_context(); | 55 return g_browser_process->system_request_context(); |
55 } | 56 } |
56 | 57 |
57 network_time::NetworkTimeTracker* | 58 network_time::NetworkTimeTracker* |
58 ChromeVariationsServiceClient::GetNetworkTimeTracker() { | 59 ChromeVariationsServiceClient::GetNetworkTimeTracker() { |
59 return g_browser_process->network_time_tracker(); | 60 return g_browser_process->network_time_tracker(); |
60 } | 61 } |
61 | 62 |
| 63 version_info::Channel ChromeVariationsServiceClient::GetChannel() { |
| 64 return chrome::GetChannel(); |
| 65 } |
| 66 |
62 void ChromeVariationsServiceClient::OnInitialStartup() { | 67 void ChromeVariationsServiceClient::OnInitialStartup() { |
63 #if defined(OS_WIN) | 68 #if defined(OS_WIN) |
64 StartGoogleUpdateRegistrySync(); | 69 StartGoogleUpdateRegistrySync(); |
65 #endif | 70 #endif |
66 } | 71 } |
67 | 72 |
68 #if defined(OS_WIN) | 73 #if defined(OS_WIN) |
69 void ChromeVariationsServiceClient::StartGoogleUpdateRegistrySync() { | 74 void ChromeVariationsServiceClient::StartGoogleUpdateRegistrySync() { |
70 registry_syncer_.RequestRegistrySync(); | 75 registry_syncer_.RequestRegistrySync(); |
71 } | 76 } |
72 #endif | 77 #endif |
OLD | NEW |