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

Unified Diff: chrome/browser/metrics/variations/variations_seed_store.h

Issue 646733002: Added incident report for variations seed signature mismatch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/browser/metrics/variations/variations_seed_store.h
diff --git a/chrome/browser/metrics/variations/variations_seed_store.h b/chrome/browser/metrics/variations/variations_seed_store.h
index c81b15e3e0967def607055df822dd13cd7ed7371..8082d12a20a99edf78163e65656cf2c2f51175b3 100644
--- a/chrome/browser/metrics/variations/variations_seed_store.h
+++ b/chrome/browser/metrics/variations/variations_seed_store.h
@@ -10,6 +10,7 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/time/time.h"
+#include "chrome/browser/safe_browsing/incident_reporting/add_incident_callback.h"
grt (UTC plus 2) 2014/10/14 01:28:30 unused
Georges Khalil 2014/10/14 13:51:09 Done.
class PrefService;
class PrefRegistrySimple;
@@ -55,6 +56,11 @@ class VariationsSeedStore {
// Registers Local State prefs used by this class.
static void RegisterPrefs(PrefRegistrySimple* registry);
+ // Returns the bad signature that was loaded from the config or an empty
grt (UTC plus 2) 2014/10/14 01:28:30 please document return value as well as whether or
Georges Khalil 2014/10/14 13:51:09 Done.
+ // string if not the case.
+ bool GetInvalidSignature(std::string* invalid_signature) const;
+ // std::string GetInvalidSignature() const { return invalid_signature_; }
grt (UTC plus 2) 2014/10/14 01:28:30 remove
Georges Khalil 2014/10/14 13:51:09 Done.
+
protected:
// Note: UMA histogram enum - don't re-order or remove entries.
enum VerifySignatureResult {
@@ -82,6 +88,10 @@ class VariationsSeedStore {
// Clears all prefs related to variations seed storage.
void ClearPrefs();
+ // Keeps track of an invalid signature.
+ bool is_invalid_signature_;
+ std::string invalid_signature_;
+
// The pref service used to persist the variations seed.
PrefService* local_state_;

Powered by Google App Engine
This is Rietveld 408576698