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; |
} |