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

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

Issue 49753002: RAPPOR implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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 98bbf813d3fbd502246f3f93efcab4dea037196a..36986ba5e8d2f226b113b52309a379f17048c545 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -199,6 +199,7 @@
#include "chrome/common/net/test_server_locations.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
+#include "components/user_prefs/pref_registry_syncable.h"
#include "components/variations/entropy_provider.h"
#include "content/public/browser/child_process_data.h"
#include "content/public/browser/histogram_fetcher.h"
@@ -397,6 +398,9 @@ class MetricsMemoryDetails : public MemoryDetails {
void MetricsService::RegisterPrefs(PrefRegistrySimple* registry) {
DCHECK(IsSingleThreaded());
registry->RegisterStringPref(prefs::kMetricsClientID, std::string());
+ // TODO make sure this doesn't get uploaded anywhere.
Steven Holte 2013/10/28 21:02:44 Can anyone confirm that the prefs in this registry
Ilya Sherman 2013/10/29 00:32:31 I'm fairly confident that the difference between P
+ registry->RegisterStringPref(prefs::kMetricsSecretClientID,
+ std::string());
registry->RegisterIntegerPref(prefs::kMetricsLowEntropySource,
kLowEntropySourceNotSet);
registry->RegisterInt64Pref(prefs::kMetricsClientIDTimestamp, 0);
@@ -577,6 +581,7 @@ void MetricsService::ForceClientIdCreation() {
client_id_ = GenerateClientID();
pref->SetString(prefs::kMetricsClientID, client_id_);
+ pref->SetString(prefs::kMetricsSecretClientID, GenerateClientID());
// Might as well make a note of how long this ID has existed
pref->SetString(prefs::kMetricsClientIDTimestamp,

Powered by Google App Engine
This is Rietveld 408576698