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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java

Issue 2039803002: Unregister Images, Plugins and Mouselock content settings on android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@only_register_platform_used_contentsettingtypes
Patch Set: address review comments, minor change Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/android/preferences/pref_service_bridge.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.preferences; 5 package org.chromium.chrome.browser.preferences;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.SharedPreferences; 8 import android.content.SharedPreferences;
9 import android.util.Log; 9 import android.util.Log;
10 10
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if (currentVersion == MIGRATION_CURRENT_VERSION) return; 152 if (currentVersion == MIGRATION_CURRENT_VERSION) return;
153 if (currentVersion > MIGRATION_CURRENT_VERSION) { 153 if (currentVersion > MIGRATION_CURRENT_VERSION) {
154 Log.e(LOG_TAG, "Saved preferences version is newer than supported. Attempting to " 154 Log.e(LOG_TAG, "Saved preferences version is newer than supported. Attempting to "
155 + "run an older version of Chrome without clearing data is u nsupported and " 155 + "run an older version of Chrome without clearing data is u nsupported and "
156 + "the results may be unpredictable."); 156 + "the results may be unpredictable.");
157 } 157 }
158 158
159 if (currentVersion < 1) { 159 if (currentVersion < 1) {
160 nativeMigrateJavascriptPreference(); 160 nativeMigrateJavascriptPreference();
161 } 161 }
162 // Steps 2,3 intentionally skipped. 162 // Steps 2,3,4 intentionally skipped.
163 if (currentVersion < 4) {
164 // For a brief period (M44 Beta), it was possible for users to disab le images via Site
165 // Settings. Now that this option has been removed, ensure that user s are not stuck with
166 // images disabled.
167 setContentSettingEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_I MAGES, true);
168 }
169 preferences.edit().putInt(MIGRATION_PREF_KEY, MIGRATION_CURRENT_VERSION) .apply(); 163 preferences.edit().putInt(MIGRATION_PREF_KEY, MIGRATION_CURRENT_VERSION) .apply();
170 } 164 }
171 165
172 /** 166 /**
173 * Add a permission entry for Location for the default search engine. 167 * Add a permission entry for Location for the default search engine.
174 * @param allowed Whether to create an Allowed permission or a Denied permis sion. 168 * @param allowed Whether to create an Allowed permission or a Denied permis sion.
175 * @param context The current context to use. 169 * @param context The current context to use.
176 */ 170 */
177 public static void maybeCreatePermissionForDefaultSearchEngine( 171 public static void maybeCreatePermissionForDefaultSearchEngine(
178 boolean allowed, Context context) { 172 boolean allowed, Context context) {
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( ); 1219 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( );
1226 private native boolean nativeGetMetricsReportingEnabled(); 1220 private native boolean nativeGetMetricsReportingEnabled();
1227 private native void nativeSetMetricsReportingEnabled(boolean enabled); 1221 private native void nativeSetMetricsReportingEnabled(boolean enabled);
1228 private native boolean nativeHasSetMetricsReporting(); 1222 private native boolean nativeHasSetMetricsReporting();
1229 private native void nativeSetClickedUpdateMenuItem(boolean clicked); 1223 private native void nativeSetClickedUpdateMenuItem(boolean clicked);
1230 private native boolean nativeGetClickedUpdateMenuItem(); 1224 private native boolean nativeGetClickedUpdateMenuItem();
1231 private native void nativeSetLatestVersionWhenClickedUpdateMenuItem(String v ersion); 1225 private native void nativeSetLatestVersionWhenClickedUpdateMenuItem(String v ersion);
1232 private native String nativeGetLatestVersionWhenClickedUpdateMenuItem(); 1226 private native String nativeGetLatestVersionWhenClickedUpdateMenuItem();
1233 private native void nativeSetSupervisedUserId(String supervisedUserId); 1227 private native void nativeSetSupervisedUserId(String supervisedUserId);
1234 } 1228 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/preferences/pref_service_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698