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

Unified Diff: chrome/browser/metrics/metrics_service.cc

Issue 10830241: Inform GetEntropySource of whether or not metrics reporting will be enabled. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/metrics/metrics_service.cc
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 0916dcbb6f3f4a7a3fc19500772cbefae1db1d15..409d76f1f652b702964d939d652c8a1cfe56696b 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -538,7 +538,7 @@ std::string MetricsService::GetClientId() {
return client_id_;
}
-std::string MetricsService::GetEntropySource() {
+std::string MetricsService::GetEntropySource(bool reporting_will_be_enabled) {
Ilya Sherman 2012/08/09 16:47:29 Optional nit: Perhaps add a comment mentioning why
SteveT 2012/08/09 17:18:30 Good call. I did this in the header.
// For metrics reporting-enabled users, we combine the client ID and low
// entropy source to get the final entropy source. Otherwise, only use the low
// entropy source.
@@ -547,7 +547,7 @@ std::string MetricsService::GetEntropySource() {
// know the low entropy source.
// 2) It makes the final entropy source resettable.
std::string low_entropy_source = base::IntToString(GetLowEntropySource());
- if (reporting_active())
+ if (reporting_will_be_enabled)
return client_id_ + low_entropy_source;
return low_entropy_source;
}
« chrome/browser/metrics/metrics_service.h ('K') | « chrome/browser/metrics/metrics_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698