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

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

Issue 372473004: Retrieve client_id from GoogleUpdateSettings when its missing from Local State. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment + extra test 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/installer/util/google_update_settings.h
diff --git a/chrome/installer/util/google_update_settings.h b/chrome/installer/util/google_update_settings.h
index a8e43c426d9ef33a0b3fcd337a72cd5f78678f25..ca7fd7f3d3054034d8cd884442fe04209f3e3b9d 100644
--- a/chrome/installer/util/google_update_settings.h
+++ b/chrome/installer/util/google_update_settings.h
@@ -8,10 +8,12 @@
#include <string>
#include "base/basictypes.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "base/version.h"
#include "chrome/installer/util/util_constants.h"
+#include "components/metrics/client_info.h"
class AppRegistrationData;
class BrowserDistribution;
@@ -86,12 +88,15 @@ class GoogleUpdateSettings {
bool consented);
#endif
- // Returns the metrics client id backed up in the registry. If none found,
- // returns empty string.
- static bool LoadMetricsClientId(std::string* metrics_id);
+ // Returns the metrics client info backed up in the registry. NULL
+ // if-and-only-if the client_id couldn't be retrieved (failure to retrieve
+ // other fields only makes them keep their default value). A non-null return
+ // will NEVER contain an empty client_id field.
+ static scoped_ptr<metrics::ClientInfo> LoadMetricsClientInfo();
- // Stores a backup of the metrics client id in the registry.
- static bool StoreMetricsClientId(const std::string& metrics_id);
+ // Stores a backup of the metrics client info in the registry. Storing a
+ // |client_info| with an empty client id will effectively void the backup.
+ static void StoreMetricsClientInfo(const metrics::ClientInfo& client_info);
// Sets the machine-wide EULA consented flag required on OEM installs.
// Returns false if the setting could not be recorded.

Powered by Google App Engine
This is Rietveld 408576698