diff options
author | knn <knn@chromium.org> | 2015-01-23 02:24:37 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-23 10:25:27 +0000 |
commit | 2e967383f690a8c4f5c90d632513146ab5ccde1f (patch) | |
tree | 0ce80e134ead6cfd257222ee720159341d717620 | |
parent | afbdb312f5aa6221b7f94dc78873fdf5ba5fb797 (diff) | |
download | chromium_src-2e967383f690a8c4f5c90d632513146ab5ccde1f.zip chromium_src-2e967383f690a8c4f5c90d632513146ab5ccde1f.tar.gz chromium_src-2e967383f690a8c4f5c90d632513146ab5ccde1f.tar.bz2 |
Remove migration of content settings from HostContentSettingsMap to PrefStore.
The migration does not handle the multiple privledge layers of the 2
sources. Further this is not required as the 2 sources are both checked now.
BUG=443990
Review URL: https://codereview.chromium.org/856363002
Cr-Commit-Position: refs/heads/master@{#312810}
-rw-r--r-- | chrome/browser/android/preferences/pref_service_bridge.cc | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc index aa37726..b284fc1 100644 --- a/chrome/browser/android/preferences/pref_service_bridge.cc +++ b/chrome/browser/android/preferences/pref_service_bridge.cc @@ -132,57 +132,6 @@ PrefService* GetPrefService() { return GetOriginalProfile()->GetPrefs(); } -static void EnsureConsistentGeolocationPreferences(Profile* profile) { - // On Android, we use the kGeolocationEnabled flag to control geolocation on a - // global basis, rather than the default geolocation host content setting, - // which is only used if no previously stored more specific host exception - // cannot be found. - // - // On Android, there is currently no UI to change this default setting, so it - // needs to default to ASK. Additionally, for users that have previously set - // the default to BLOCK, we set the preference to disable geolocation - // globally. - - ContentSetting defaultSetting = profile->GetHostContentSettingsMap()-> - GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_GEOLOCATION, NULL); - - if (defaultSetting == CONTENT_SETTING_ASK) - return; - - profile->GetHostContentSettingsMap()->SetDefaultContentSetting( - CONTENT_SETTINGS_TYPE_GEOLOCATION, CONTENT_SETTING_ASK); - - if (defaultSetting == CONTENT_SETTING_BLOCK) { - profile->GetPrefs()->SetBoolean(prefs::kGeolocationEnabled, false); - } -} - -static void EnsureConsistentProtectedMediaIdentifierPreferences( - Profile* profile) { - // We use the kProtectedMediaIdentifierEnabled flag to control protected media - // identifier on a global basis. - // - // On Android, there is currently no UI to change this default setting, so it - // needs to default to ASK. Additionally, for users that have previously set - // the default to BLOCK, we set the preference to disable protected media - // identifier globally. - ContentSetting defaultSetting = - profile->GetHostContentSettingsMap()-> - GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, - NULL); - - if (defaultSetting == CONTENT_SETTING_ASK) - return; - - profile->GetHostContentSettingsMap()->SetDefaultContentSetting( - CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER, CONTENT_SETTING_ASK); - - if (defaultSetting == CONTENT_SETTING_BLOCK) { - profile->GetPrefs()->SetBoolean(prefs::kProtectedMediaIdentifierEnabled, - false); - } -} - } // namespace // ---------------------------------------------------------------------------- @@ -262,7 +211,6 @@ static jboolean GetSearchSuggestManaged(JNIEnv* env, jobject obj) { static jboolean GetProtectedMediaIdentifierEnabled(JNIEnv* env, jobject obj) { Profile* profile = GetOriginalProfile(); - EnsureConsistentProtectedMediaIdentifierPreferences(profile); HostContentSettingsMap* content_settings = profile->GetHostContentSettingsMap(); return GetBooleanForContentSetting( @@ -280,7 +228,6 @@ static jboolean GetPushNotificationsEnabled(JNIEnv* env, jobject obj) { static jboolean GetAllowLocationEnabled(JNIEnv* env, jobject obj) { Profile* profile = GetOriginalProfile(); - EnsureConsistentGeolocationPreferences(profile); HostContentSettingsMap* content_settings = profile->GetHostContentSettingsMap(); return GetBooleanForContentSetting(content_settings, |