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

Unified Diff: chrome/browser/metrics/variations/variations_service.h

Issue 136003008: [Variations] Read the policy from profile prefs if on Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing logging Created 6 years, 10 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_service.h
diff --git a/chrome/browser/metrics/variations/variations_service.h b/chrome/browser/metrics/variations/variations_service.h
index 2ad70265263a69d70d7e0fe23fbbd4ab14478ade..da453c2268639f3a27f85b42f0720b7b8d890c1b 100644
--- a/chrome/browser/metrics/variations/variations_service.h
+++ b/chrome/browser/metrics/variations/variations_service.h
@@ -26,6 +26,10 @@
class PrefService;
class PrefRegistrySimple;
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
+
namespace chrome_variations {
class VariationsSeed;
@@ -67,9 +71,16 @@ class VariationsService
// Register Variations related prefs in Local State.
static void RegisterPrefs(PrefRegistrySimple* registry);
+ // Register Variations related prefs in the Profile prefs.
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
+
// Factory method for creating a VariationsService.
static VariationsService* Create(PrefService* local_state);
+ void set_policy_pref_service(PrefService* service) {
Alexei Svitkine (slow) 2014/02/10 22:12:48 Add a comment.
Mathieu 2014/02/10 22:41:34 Done.
+ policy_pref_service_ = service;
+ }
+
protected:
// Starts the fetching process once, where |OnURLFetchComplete| is called with
// the response.
@@ -110,6 +121,10 @@ class VariationsService
// The pref service used to store persist the variations seed.
PrefService* local_state_;
+ // Used to obtain policy-related preferences. Depending on the platform, may
+ // end up being Local State or Profile prefs.
Alexei Svitkine (slow) 2014/02/10 22:12:48 Nit: "may end up being" -> "will be either"
Mathieu 2014/02/10 22:41:34 Done.
+ PrefService* policy_pref_service_;
+
VariationsSeedStore seed_store_;
// Contains the scheduler instance that handles timing for requests to the

Powered by Google App Engine
This is Rietveld 408576698