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

Unified Diff: components/variations/variations_seed_store.h

Issue 1417503010: Variations seed is pulled from the Java application on the first launch of Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes according to code review and lint comments Created 5 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 side-by-side diff with in-line comments
Download patch
Index: components/variations/variations_seed_store.h
diff --git a/components/variations/variations_seed_store.h b/components/variations/variations_seed_store.h
index cc743d88cd29fdb5caa17e71b38d414d046fec49..53959a8926367d2d770b3a84846843f0e90203f7 100644
--- a/components/variations/variations_seed_store.h
+++ b/components/variations/variations_seed_store.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/time/time.h"
@@ -75,6 +76,14 @@ class VariationsSeedStore {
// Registers Local State prefs used by this class.
static void RegisterPrefs(PrefRegistrySimple* registry);
+#if defined(OS_ANDROID)
+ void SetVariationsFirstRunSeedCallback(
+ const base::Callback<void(std::string*, std::string*, std::string*)>&
Bernhard Bauer 2015/10/30 09:56:08 Hm... instead of a single callback that returns th
Steven Holte 2015/11/02 19:05:40 They are not really independent, since they all co
Bernhard Bauer 2015/11/02 19:10:07 What I meant was that it looks like doing this wit
Alexei Svitkine (slow) 2015/11/02 20:39:21 They are meant to be used together. I think a stru
+ callback) {
+ get_variations_first_run_seed_ = callback;
+ }
+#endif // OS_ANDROID
+
protected:
// Note: UMA histogram enum - don't re-order or remove entries.
enum VerifySignatureResult {
@@ -103,6 +112,10 @@ class VariationsSeedStore {
// Clears all prefs related to variations seed storage.
void ClearPrefs();
+ // Imports the variations seed data from Java side during the first
+ // Chrome for Android run.
+ void ImportFirstRunJavaSeed();
+
// Reads the variations seed data from prefs; returns true on success.
bool ReadSeedData(std::string* seed_data);
@@ -134,6 +147,9 @@ class VariationsSeedStore {
// Keeps track of an invalid signature.
std::string invalid_base64_signature_;
+ base::Callback<void(std::string*, std::string*, std::string*)>
+ get_variations_first_run_seed_;
+
DISALLOW_COPY_AND_ASSIGN(VariationsSeedStore);
};

Powered by Google App Engine
This is Rietveld 408576698