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

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: Minor styling fixes. 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..64de29738928d528dcac58387c593a208ab9ee3b 100644
--- a/chrome/browser/metrics/variations/variations_seed_store.h
+++ b/chrome/browser/metrics/variations/variations_seed_store.h
@@ -10,6 +10,8 @@
#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/10 17:45:42 remove these
Georges Khalil 2014/10/10 20:19:31 Done.
+#include "chrome/browser/safe_browsing/safe_browsing_service.h"
class PrefService;
class PrefRegistrySimple;
@@ -55,6 +57,10 @@ 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/10 17:45:42 using the empty string like this overloads these c
Georges Khalil 2014/10/10 20:19:31 This is by design. We only want a report if the si
grt (UTC plus 2) 2014/10/14 01:28:29 Acknowledged.
+ // string if not the case. Used to send an incident report.
grt (UTC plus 2) 2014/10/10 17:45:42 omit " Used to send an incident report." since thi
Georges Khalil 2014/10/10 20:19:31 Done.
+ std::string GetBadSignature() const { return bad_signature_; }
grt (UTC plus 2) 2014/10/10 17:45:42 imo, "invalid" is better than "bad" for the functi
Georges Khalil 2014/10/10 20:19:31 Done.
+
protected:
// Note: UMA histogram enum - don't re-order or remove entries.
enum VerifySignatureResult {
@@ -82,6 +88,9 @@ class VariationsSeedStore {
// Clears all prefs related to variations seed storage.
void ClearPrefs();
+ // Keeps track of a bad signature.
+ std::string bad_signature_;
+
// The pref service used to persist the variations seed.
PrefService* local_state_;

Powered by Google App Engine
This is Rietveld 408576698