summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-09 18:53:22 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-09 18:53:22 +0000
commit9d1b0158bcf46195412d15b9d1be9d479caab740 (patch)
tree76bf98efe1a3981e300f1ce02b499ee7113839d9 /chrome/installer
parentb8da79f3624019a2bcd3916fc573f5f861840fb5 (diff)
downloadchromium_src-9d1b0158bcf46195412d15b9d1be9d479caab740.zip
chromium_src-9d1b0158bcf46195412d15b9d1be9d479caab740.tar.gz
chromium_src-9d1b0158bcf46195412d15b9d1be9d479caab740.tar.bz2
Refactor SetClientID such that metrics rather than crash backs up the client id
in Google Update settings. Consequentially, the backed up client_id now keeps its dashes and crash_keys strips them at runtime rather than when backing it up (https://codereview.chromium.org/372473004/ will add support for stripped client_id backups for some time). Also rename a lot of methods involved in setting the client id; having all of them named "SetClientID" makes this series of calls very hard to follow! BUG=391338 TBR=thestig Review URL: https://codereview.chromium.org/365133005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282093 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/util/google_update_settings.cc4
-rw-r--r--chrome/installer/util/google_update_settings.h10
2 files changed, 7 insertions, 7 deletions
diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc
index 81e33ed..4d53eca 100644
--- a/chrome/installer/util/google_update_settings.cc
+++ b/chrome/installer/util/google_update_settings.cc
@@ -296,14 +296,14 @@ bool GoogleUpdateSettings::SetCollectStatsConsentAtLevel(bool system_install,
return (result == ERROR_SUCCESS);
}
-bool GoogleUpdateSettings::GetMetricsId(std::string* metrics_id) {
+bool GoogleUpdateSettings::LoadMetricsClientId(std::string* metrics_id) {
base::string16 metrics_id16;
bool rv = ReadGoogleUpdateStrKey(google_update::kRegMetricsId, &metrics_id16);
*metrics_id = base::UTF16ToUTF8(metrics_id16);
return rv;
}
-bool GoogleUpdateSettings::SetMetricsId(const std::string& metrics_id) {
+bool GoogleUpdateSettings::StoreMetricsClientId(const std::string& metrics_id) {
base::string16 metrics_id16 = base::UTF8ToUTF16(metrics_id);
return WriteGoogleUpdateStrKey(google_update::kRegMetricsId, metrics_id16);
}
diff --git a/chrome/installer/util/google_update_settings.h b/chrome/installer/util/google_update_settings.h
index b7bf612..a8e43c4 100644
--- a/chrome/installer/util/google_update_settings.h
+++ b/chrome/installer/util/google_update_settings.h
@@ -86,12 +86,12 @@ class GoogleUpdateSettings {
bool consented);
#endif
- // Returns the metrics id set in the registry (that can be used in crash
- // reports). If none found, returns empty string.
- static bool GetMetricsId(std::string* metrics_id);
+ // Returns the metrics client id backed up in the registry. If none found,
+ // returns empty string.
+ static bool LoadMetricsClientId(std::string* metrics_id);
- // Sets the metrics id to be used in crash reports.
- static bool SetMetricsId(const std::string& metrics_id);
+ // Stores a backup of the metrics client id in the registry.
+ static bool StoreMetricsClientId(const std::string& metrics_id);
// Sets the machine-wide EULA consented flag required on OEM installs.
// Returns false if the setting could not be recorded.