summaryrefslogtreecommitdiffstats
path: root/chrome/browser/geolocation
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-22 17:24:44 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-22 17:24:44 +0000
commit5b19952e27008d9cca170c1a517987795d145928 (patch)
tree34fea6a6f74a0388c68c4ba8cd8846f3ac879027 /chrome/browser/geolocation
parent96828ec57f67f91b3b1b2269963680501a6de4b9 (diff)
downloadchromium_src-5b19952e27008d9cca170c1a517987795d145928.zip
chromium_src-5b19952e27008d9cca170c1a517987795d145928.tar.gz
chromium_src-5b19952e27008d9cca170c1a517987795d145928.tar.bz2
Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable.
The first two (PrefServiceSimple is a subclass of PrefService) know nothing about sync or any Chrome or content concepts. The third (PrefServiceSyncable, a separate subclass of PrefService) knows about sync and requires users to choose whether each individual preference is syncable or not when it is registered. BrowserProcess::local_state() is a PrefServiceSimple after this change, and Profile::prefs() is a PrefServiceSyncable. COLLABORATOR=kaiwang@chromium.org TBR=ben@chromium.org BUG=155525 Review URL: https://chromiumcodereview.appspot.com/11570009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation')
-rw-r--r--chrome/browser/geolocation/chrome_access_token_store.cc2
-rw-r--r--chrome/browser/geolocation/chrome_access_token_store.h4
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc4
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h2
-rw-r--r--chrome/browser/geolocation/geolocation_prefs.cc4
-rw-r--r--chrome/browser/geolocation/geolocation_prefs.h7
6 files changed, 12 insertions, 11 deletions
diff --git a/chrome/browser/geolocation/chrome_access_token_store.cc b/chrome/browser/geolocation/chrome_access_token_store.cc
index 891fe14..b895ee7 100644
--- a/chrome/browser/geolocation/chrome_access_token_store.cc
+++ b/chrome/browser/geolocation/chrome_access_token_store.cc
@@ -98,7 +98,7 @@ class TokenLoadingJob : public base::RefCountedThreadSafe<TokenLoadingJob> {
} // namespace
-void ChromeAccessTokenStore::RegisterPrefs(PrefService* prefs) {
+void ChromeAccessTokenStore::RegisterPrefs(PrefServiceSimple* prefs) {
prefs->RegisterDictionaryPref(prefs::kGeolocationAccessToken);
}
diff --git a/chrome/browser/geolocation/chrome_access_token_store.h b/chrome/browser/geolocation/chrome_access_token_store.h
index 117eec5..b1ecd56 100644
--- a/chrome/browser/geolocation/chrome_access_token_store.h
+++ b/chrome/browser/geolocation/chrome_access_token_store.h
@@ -8,12 +8,12 @@
#include "base/memory/ref_counted.h"
#include "content/public/browser/access_token_store.h"
-class PrefService;
+class PrefServiceSimple;
// Creates a new access token store backed by the global chome prefs.
class ChromeAccessTokenStore : public content::AccessTokenStore {
public:
- static void RegisterPrefs(PrefService* prefs);
+ static void RegisterPrefs(PrefServiceSimple* prefs);
ChromeAccessTokenStore();
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc
index 83e274f..c7ada62c 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.cc
@@ -21,10 +21,10 @@ ChromeGeolocationPermissionContext*
}
void ChromeGeolocationPermissionContextFactory::RegisterUserPrefs(
- PrefService* user_prefs) {
+ PrefServiceSyncable* user_prefs) {
#if defined(OS_ANDROID)
user_prefs->RegisterBooleanPref(prefs::kGeolocationEnabled,
true,
- PrefService::UNSYNCABLE_PREF);
+ PrefServiceSyncable::UNSYNCABLE_PREF);
#endif
}
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h
index 8e598b2..64ff446 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h
@@ -16,7 +16,7 @@ class ChromeGeolocationPermissionContextFactory {
ChromeGeolocationPermissionContextFactory() {}
~ChromeGeolocationPermissionContextFactory() {}
static ChromeGeolocationPermissionContext* Create(Profile* profile);
- static void RegisterUserPrefs(PrefService* user_prefs);
+ static void RegisterUserPrefs(PrefServiceSyncable* user_prefs);
private:
diff --git a/chrome/browser/geolocation/geolocation_prefs.cc b/chrome/browser/geolocation/geolocation_prefs.cc
index 4f2826e..92fd06e 100644
--- a/chrome/browser/geolocation/geolocation_prefs.cc
+++ b/chrome/browser/geolocation/geolocation_prefs.cc
@@ -8,12 +8,12 @@
#include "chrome/browser/geolocation/chrome_geolocation_permission_context_factory.h"
namespace geolocation {
-void RegisterPrefs(PrefService* prefs) {
+void RegisterPrefs(PrefServiceSimple* prefs) {
// Fan out to all geolocation sub-components that use prefs.
ChromeAccessTokenStore::RegisterPrefs(prefs);
}
-void RegisterUserPrefs(PrefService* user_prefs) {
+void RegisterUserPrefs(PrefServiceSyncable* user_prefs) {
ChromeGeolocationPermissionContextFactory::RegisterUserPrefs(user_prefs);
}
diff --git a/chrome/browser/geolocation/geolocation_prefs.h b/chrome/browser/geolocation/geolocation_prefs.h
index f838057..735e511 100644
--- a/chrome/browser/geolocation/geolocation_prefs.h
+++ b/chrome/browser/geolocation/geolocation_prefs.h
@@ -5,11 +5,12 @@
#ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PREFS_H_
#define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PREFS_H_
-class PrefService;
+class PrefServiceSimple;
+class PrefServiceSyncable;
namespace geolocation {
-void RegisterPrefs(PrefService* prefs);
-void RegisterUserPrefs(PrefService* user_prefs);
+void RegisterPrefs(PrefServiceSimple* prefs);
+void RegisterUserPrefs(PrefServiceSyncable* user_prefs);
}
#endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_PREFS_H_