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

Unified Diff: chrome/installer/util/google_update_settings.cc

Issue 2222903004: Clear client id prefs when opting out of UMA. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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/installer/util/google_update_settings.cc
diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc
index 5f68f938ae734dae3d690d599bec4e51177b441e..519c433244e33185eeedf001a562455e80956cd5 100644
--- a/chrome/installer/util/google_update_settings.cc
+++ b/chrome/installer/util/google_update_settings.cc
@@ -329,6 +329,11 @@ bool GoogleUpdateSettings::SetCollectStatsConsentAtLevel(bool system_install,
<< google_update::kRegUsageStatsField << " in key " << reg_path
<< "; result: " << result;
}
+
+ // When opting out, clear registry backup of client id and related values.
+ if (result == ERROR_SUCCESS && !consented)
+ StoreMetricsClientInfo(metrics::ClientInfo());
+
return (result == ERROR_SUCCESS);
}
« no previous file with comments | « chrome/browser/metrics/metrics_reporting_state.cc ('k') | chrome/installer/util/google_update_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698