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

Unified Diff: chrome/common/crash_keys.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: fix posix compile? 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
Index: chrome/common/crash_keys.cc
diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc
index edb6cac4edd35110539c9d57dea893c34620498a..a5e9145e33b1b3993fb72f42c83703ba39d1de74 100644
--- a/chrome/common/crash_keys.cc
+++ b/chrome/common/crash_keys.cc
@@ -11,7 +11,6 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/installer/util/google_update_settings.h"
#if defined(OS_MACOSX)
#include "breakpad/src/common/simple_string_dictionary.h"
@@ -225,15 +224,14 @@ size_t RegisterChromeCrashKeys() {
kSingleChunkLength);
}
-void SetClientID(const std::string& client_id) {
- std::string guid(client_id);
+void SetCrashClientIdFromGUID(const std::string& client_guid) {
+ std::string stripped_guid(client_guid);
// Remove all instance of '-' char from the GUID. So BCD-WXY becomes BCDWXY.
- ReplaceSubstringsAfterOffset(&guid, 0, "-", "");
- if (guid.empty())
+ ReplaceSubstringsAfterOffset(&stripped_guid, 0, "-", "");
+ if (stripped_guid.empty())
return;
- base::debug::SetCrashKeyValue(kClientID, guid);
- GoogleUpdateSettings::SetMetricsId(guid);
+ base::debug::SetCrashKeyValue(kClientID, stripped_guid);
}
static bool IsBoringSwitch(const std::string& flag) {

Powered by Google App Engine
This is Rietveld 408576698