Chromium Code Reviews| Index: components/variations/variations_seed_store.cc |
| diff --git a/components/variations/variations_seed_store.cc b/components/variations/variations_seed_store.cc |
| index 84dca7e3ce91341fab819cdd6a711b0d122de543..173579d26c76c0e8d1f7351d9424dadb951eb762 100644 |
| --- a/components/variations/variations_seed_store.cc |
| +++ b/components/variations/variations_seed_store.cc |
| @@ -12,6 +12,7 @@ |
| #include "base/sha1.h" |
| #include "base/strings/string_number_conversions.h" |
| #include "components/compression/compression_utils.h" |
| +#include "components/variations/android/variations_seed_bridge.h" |
|
Alexei Svitkine (slow)
2015/11/12 22:27:31
Put the header in an ifdef below since it won't bu
Alexander Agulenko
2015/11/12 23:43:39
Done.
|
| #include "components/variations/pref_names.h" |
| #include "components/variations/proto/variations_seed.pb.h" |
| #include "crypto/signature_verifier.h" |
| @@ -464,6 +465,16 @@ bool VariationsSeedStore::StoreSeedDataNoDelta( |
| // in M45+. |
| local_state_->ClearPref(prefs::kVariationsSeed); |
| +#if defined(OS_ANDROID) |
| + // If currently we do not have any stored pref then we mark seed storing as |
| + // successful on the Java side of Chrome for Android to avoid repeated seed |
| + // fetches and clear preferences on the Java side. |
| + if (local_state_->GetString(prefs::kVariationsCompressedSeed).empty()) { |
| + android::MarkVariationsSeedAsStored(); |
| + android::ClearJavaFirstRunPrefs(); |
| + } |
| +#endif |
| + |
| // Update the saved country code only if one was returned from the server. |
| // Prefer the country code that was transmitted in the header over the one in |
| // the seed (which is deprecated). |