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

Side by Side 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: Disabled testing of signature verification on mobile. 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/metrics/variations/variations_seed_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SEED_STORE_H_ 5 #ifndef CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SEED_STORE_H_
6 #define CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SEED_STORE_H_ 6 #define CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SEED_STORE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void UpdateSeedDateAndLogDayChange(const base::Time& server_date_fetched); 48 void UpdateSeedDateAndLogDayChange(const base::Time& server_date_fetched);
49 49
50 // Returns the serial number of the last loaded or stored seed. 50 // Returns the serial number of the last loaded or stored seed.
51 const std::string& variations_serial_number() const { 51 const std::string& variations_serial_number() const {
52 return variations_serial_number_; 52 return variations_serial_number_;
53 } 53 }
54 54
55 // Registers Local State prefs used by this class. 55 // Registers Local State prefs used by this class.
56 static void RegisterPrefs(PrefRegistrySimple* registry); 56 static void RegisterPrefs(PrefRegistrySimple* registry);
57 57
58 // Returns the invalid signature in base64 format, or an empty string if the
59 // signature was valid, missing, or if signature verification is disabled.
60 std::string GetInvalidSignature() const;
61
58 protected: 62 protected:
59 // Note: UMA histogram enum - don't re-order or remove entries. 63 // Note: UMA histogram enum - don't re-order or remove entries.
60 enum VerifySignatureResult { 64 enum VerifySignatureResult {
61 VARIATIONS_SEED_SIGNATURE_MISSING, 65 VARIATIONS_SEED_SIGNATURE_MISSING,
62 VARIATIONS_SEED_SIGNATURE_DECODE_FAILED, 66 VARIATIONS_SEED_SIGNATURE_DECODE_FAILED,
63 VARIATIONS_SEED_SIGNATURE_INVALID_SIGNATURE, 67 VARIATIONS_SEED_SIGNATURE_INVALID_SIGNATURE,
64 VARIATIONS_SEED_SIGNATURE_INVALID_SEED, 68 VARIATIONS_SEED_SIGNATURE_INVALID_SEED,
65 VARIATIONS_SEED_SIGNATURE_VALID, 69 VARIATIONS_SEED_SIGNATURE_VALID,
66 VARIATIONS_SEED_SIGNATURE_ENUM_SIZE, 70 VARIATIONS_SEED_SIGNATURE_ENUM_SIZE,
67 }; 71 };
(...skipping 13 matching lines...) Expand all
81 85
82 // Clears all prefs related to variations seed storage. 86 // Clears all prefs related to variations seed storage.
83 void ClearPrefs(); 87 void ClearPrefs();
84 88
85 // The pref service used to persist the variations seed. 89 // The pref service used to persist the variations seed.
86 PrefService* local_state_; 90 PrefService* local_state_;
87 91
88 // Cached serial number from the most recently fetched variations seed. 92 // Cached serial number from the most recently fetched variations seed.
89 std::string variations_serial_number_; 93 std::string variations_serial_number_;
90 94
95 // Keeps track of an invalid signature.
96 std::string invalid_base64_signature_;
97
91 DISALLOW_COPY_AND_ASSIGN(VariationsSeedStore); 98 DISALLOW_COPY_AND_ASSIGN(VariationsSeedStore);
92 }; 99 };
93 100
94 } // namespace chrome_variations 101 } // namespace chrome_variations
95 102
96 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SEED_STORE_H_ 103 #endif // CHROME_BROWSER_METRICS_VARIATIONS_VARIATIONS_SEED_STORE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/variations/variations_seed_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698