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

Unified Diff: components/variations/variations_seed_store.cc

Issue 1437833004: Implemented clearing Java prefs after pulling variations first run seed from Java to C++ side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fixes according to codereview comments. Created 5 years, 1 month 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
« no previous file with comments | « components/variations/android/variations_seed_bridge.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..94fdc73afdb061ad573a2cebae6bd42c8bef9bcb 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"
#include "components/variations/pref_names.h"
#include "components/variations/proto/variations_seed.pb.h"
#include "crypto/signature_verifier.h"
@@ -464,6 +465,12 @@ bool VariationsSeedStore::StoreSeedDataNoDelta(
// in M45+.
local_state_->ClearPref(prefs::kVariationsSeed);
+ // If currently we do not have any stored pref then we clear prefs on the
Alexei Svitkine (slow) 2015/11/12 17:42:17 Add an ifdef around this block
Alexander Agulenko 2015/11/12 18:55:04 Done.
+ // Java side of Chrome for Android.
+ if (local_state_->GetString(prefs::kVariationsCompressedSeed).empty()) {
Alexei Svitkine (slow) 2015/11/12 17:42:17 Nit: No {}'s
Alexander Agulenko 2015/11/12 18:55:04 Added another function call to this block, so {}'s
+ android::ClearJavaFirstRunPrefs();
+ }
+
// 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).
« no previous file with comments | « components/variations/android/variations_seed_bridge.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698