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

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

Issue 238443008: Make VariationsService simulate received seeds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 8 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.cc
===================================================================
--- chrome/browser/metrics/variations/variations_seed_store.cc (revision 265923)
+++ chrome/browser/metrics/variations/variations_seed_store.cc (working copy)
@@ -162,15 +162,15 @@
bool VariationsSeedStore::StoreSeedData(
const std::string& seed_data,
const std::string& base64_seed_signature,
- const base::Time& date_fetched) {
+ const base::Time& date_fetched,
+ VariationsSeed* seed) {
jwd 2014/04/25 14:30:34 Should you check that seed isn't null?
Alexei Svitkine (slow) 2014/04/25 15:21:46 Changed logic to allow passing NULL and only filli
if (seed_data.empty()) {
VLOG(1) << "Variations seed data is empty, rejecting the seed.";
return false;
}
// Only store the seed data if it parses correctly.
- VariationsSeed seed;
- if (!seed.ParseFromString(seed_data)) {
+ if (!seed->ParseFromString(seed_data)) {
jwd 2014/04/25 14:30:34 What's in seed when it fails to parse? Should it b
Alexei Svitkine (slow) 2014/04/25 15:21:46 Ditto.
VLOG(1) << "Variations seed data is not in valid proto format, "
<< "rejecting the seed.";
return false;
@@ -199,7 +199,7 @@
UpdateSeedDateAndLogDayChange(date_fetched);
local_state_->SetString(prefs::kVariationsSeedSignature,
base64_seed_signature);
- variations_serial_number_ = seed.serial_number();
+ variations_serial_number_ = seed->serial_number();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698