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

Side by Side Diff: components/metrics_services_manager/metrics_services_manager.cc

Issue 1951553002: Enabled client side sampling for user metrics reporting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 "components/metrics_services_manager/metrics_services_manager.h" 5 #include "components/metrics_services_manager/metrics_services_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "components/metrics/metrics_service.h" 10 #include "components/metrics/metrics_service.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 // instance. 109 // instance.
110 base::Closure on_safe_browsing_update_callback = base::Bind( 110 base::Closure on_safe_browsing_update_callback = base::Bind(
111 &MetricsServicesManager::UpdateRunningServices, base::Unretained(this)); 111 &MetricsServicesManager::UpdateRunningServices, base::Unretained(this));
112 if (client_->IsSafeBrowsingEnabled(on_safe_browsing_update_callback)) 112 if (client_->IsSafeBrowsingEnabled(on_safe_browsing_update_callback))
113 recording_groups |= rappor::SAFEBROWSING_RAPPOR_GROUP; 113 recording_groups |= rappor::SAFEBROWSING_RAPPOR_GROUP;
114 #endif // defined(GOOGLE_CHROME_BUILD) 114 #endif // defined(GOOGLE_CHROME_BUILD)
115 GetRapporService()->Update(recording_groups, may_upload_); 115 GetRapporService()->Update(recording_groups, may_upload_);
116 } 116 }
117 117
118 void MetricsServicesManager::UpdateUploadPermissions(bool may_upload) { 118 void MetricsServicesManager::UpdateUploadPermissions(bool may_upload) {
119 return UpdatePermissions(client_->IsMetricsReportingEnabled(), may_upload); 119 UpdatePermissions(client_->IsMetricsReportingEnabled(), may_upload);
120 } 120 }
121 121
122 } // namespace metrics_services_manager 122 } // namespace metrics_services_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698