| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/metrics_services_manager.h" | 5 #include "chrome/browser/metrics/metrics_services_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 return rappor_service_.get(); | 62 return rappor_service_.get(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 chrome_variations::VariationsService* | 65 chrome_variations::VariationsService* |
| 66 MetricsServicesManager::GetVariationsService() { | 66 MetricsServicesManager::GetVariationsService() { |
| 67 DCHECK(thread_checker_.CalledOnValidThread()); | 67 DCHECK(thread_checker_.CalledOnValidThread()); |
| 68 if (!variations_service_) { | 68 if (!variations_service_) { |
| 69 variations_service_ = chrome_variations::VariationsService::Create( | 69 variations_service_ = chrome_variations::VariationsService::Create( |
| 70 make_scoped_ptr(new ChromeVariationsServiceClient()), local_state_, | 70 make_scoped_ptr(new ChromeVariationsServiceClient()), local_state_, |
| 71 GetMetricsStateManager()); | 71 GetMetricsStateManager(), switches::kDisableBackgroundNetworking); |
| 72 } | 72 } |
| 73 return variations_service_.get(); | 73 return variations_service_.get(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void MetricsServicesManager::OnPluginLoadingError( | 76 void MetricsServicesManager::OnPluginLoadingError( |
| 77 const base::FilePath& plugin_path) { | 77 const base::FilePath& plugin_path) { |
| 78 GetChromeMetricsServiceClient()->LogPluginLoadingError(plugin_path); | 78 GetChromeMetricsServiceClient()->LogPluginLoadingError(plugin_path); |
| 79 } | 79 } |
| 80 | 80 |
| 81 ChromeMetricsServiceClient* | 81 ChromeMetricsServiceClient* |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 if (GetSafeBrowsingState()) | 165 if (GetSafeBrowsingState()) |
| 166 recording_groups |= rappor::SAFEBROWSING_RAPPOR_GROUP; | 166 recording_groups |= rappor::SAFEBROWSING_RAPPOR_GROUP; |
| 167 #endif // defined(GOOGLE_CHROME_BUILD) | 167 #endif // defined(GOOGLE_CHROME_BUILD) |
| 168 GetRapporService()->Update(recording_groups, may_upload_); | 168 GetRapporService()->Update(recording_groups, may_upload_); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void MetricsServicesManager::UpdateUploadPermissions(bool may_upload) { | 171 void MetricsServicesManager::UpdateUploadPermissions(bool may_upload) { |
| 172 return UpdatePermissions( | 172 return UpdatePermissions( |
| 173 ChromeMetricsServiceAccessor::IsMetricsReportingEnabled(), may_upload); | 173 ChromeMetricsServiceAccessor::IsMetricsReportingEnabled(), may_upload); |
| 174 } | 174 } |
| OLD | NEW |