Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: chrome/browser/metrics/metrics_services_manager.cc

Issue 1309843005: Remove more //chrome dependencies from VariationsService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@variations_service_get_channel
Patch Set: Response to review Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/metrics/variations/chrome_variations_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698