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

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

Issue 365133005: Refactor SetClientID such that metrics rather than crash backs up the client id in Google Update set (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits:grt Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.h ('k') | chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/chrome_metrics_service_client.cc
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc
index 6a2c51bbf97bdfb94b599535b29a1895a32a71bc..f10cc159d9b69fc06b362aad945ca0a33cf1ff8c 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
@@ -35,6 +35,7 @@
#include "chrome/common/crash_keys.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
+#include "chrome/installer/util/google_update_settings.h"
#include "components/metrics/metrics_service.h"
#include "components/metrics/net/net_metrics_log_uploader.h"
#include "content/public/browser/browser_thread.h"
@@ -161,8 +162,12 @@ void ChromeMetricsServiceClient::RegisterPrefs(PrefRegistrySimple* registry) {
#endif // defined(ENABLE_PLUGINS)
}
-void ChromeMetricsServiceClient::SetClientID(const std::string& client_id) {
- crash_keys::SetClientID(client_id);
+void ChromeMetricsServiceClient::SetMetricsClientId(
+ const std::string& client_id) {
+ crash_keys::SetCrashClientIdFromGUID(client_id);
+
+ // Store a backup of the client id in Google Update settings.
+ GoogleUpdateSettings::StoreMetricsClientId(client_id);
}
bool ChromeMetricsServiceClient::IsOffTheRecordSessionActive() {
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.h ('k') | chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698