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

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: 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/common/crash_keys.h ('k') | chrome/installer/util/google_update_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/crash_keys.cc
diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc
index edb6cac4edd35110539c9d57dea893c34620498a..84a83ef41ae42ba525d4070b4e3ed21e21a0dfcf 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"
@@ -56,7 +55,7 @@ COMPILE_ASSERT(kMediumSize <= kSingleChunkLength,
mac_has_medium_size_crash_key_chunks);
#endif
-const char kClientID[] = "guid";
+const char kClientId[] = "guid";
const char kChannel[] = "channel";
@@ -119,7 +118,7 @@ size_t RegisterChromeCrashKeys() {
// The following keys may be chunked by the underlying crash logging system,
// but ultimately constitute a single key-value pair.
base::debug::CrashKey fixed_keys[] = {
- { kClientID, kSmallSize },
+ { kClientId, kSmallSize },
{ kChannel, kSmallSize },
{ kActiveURL, kLargeSize },
{ kNumSwitches, kSmallSize },
@@ -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) {
« no previous file with comments | « chrome/common/crash_keys.h ('k') | chrome/installer/util/google_update_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698