| 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/browser/metrics/variations/generated_resources_map.h" |
| 9 #include "chrome/common/channel_info.h" | 10 #include "chrome/common/channel_info.h" |
| 10 #include "components/version_info/version_info.h" | 11 #include "components/version_info/version_info.h" |
| 11 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 12 | 13 |
| 13 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) | 14 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) |
| 14 #include "chrome/browser/upgrade_detector_impl.h" | 15 #include "chrome/browser/upgrade_detector_impl.h" |
| 15 #endif | 16 #endif |
| 16 | 17 |
| 17 namespace { | 18 namespace { |
| 18 | 19 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 58 |
| 58 network_time::NetworkTimeTracker* | 59 network_time::NetworkTimeTracker* |
| 59 ChromeVariationsServiceClient::GetNetworkTimeTracker() { | 60 ChromeVariationsServiceClient::GetNetworkTimeTracker() { |
| 60 return g_browser_process->network_time_tracker(); | 61 return g_browser_process->network_time_tracker(); |
| 61 } | 62 } |
| 62 | 63 |
| 63 version_info::Channel ChromeVariationsServiceClient::GetChannel() { | 64 version_info::Channel ChromeVariationsServiceClient::GetChannel() { |
| 64 return chrome::GetChannel(); | 65 return chrome::GetChannel(); |
| 65 } | 66 } |
| 66 | 67 |
| 68 int ChromeVariationsServiceClient::GetIndexForResource(uint32_t hash) { |
| 69 return chrome_variations::GetResourceIndex(hash); |
| 70 } |
| 71 |
| 67 void ChromeVariationsServiceClient::OnInitialStartup() { | 72 void ChromeVariationsServiceClient::OnInitialStartup() { |
| 68 #if defined(OS_WIN) | 73 #if defined(OS_WIN) |
| 69 StartGoogleUpdateRegistrySync(); | 74 StartGoogleUpdateRegistrySync(); |
| 70 #endif | 75 #endif |
| 71 } | 76 } |
| 72 | 77 |
| 73 #if defined(OS_WIN) | 78 #if defined(OS_WIN) |
| 74 void ChromeVariationsServiceClient::StartGoogleUpdateRegistrySync() { | 79 void ChromeVariationsServiceClient::StartGoogleUpdateRegistrySync() { |
| 75 registry_syncer_.RequestRegistrySync(); | 80 registry_syncer_.RequestRegistrySync(); |
| 76 } | 81 } |
| 77 #endif | 82 #endif |
| OLD | NEW |