OLD | NEW |
---|---|
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
150 if (currentVersion == MIGRATION_CURRENT_VERSION) return; | 150 if (currentVersion == MIGRATION_CURRENT_VERSION) return; |
151 if (currentVersion > MIGRATION_CURRENT_VERSION) { | 151 if (currentVersion > MIGRATION_CURRENT_VERSION) { |
152 Log.e(LOG_TAG, "Saved preferences version is newer than supported. Attempting to " | 152 Log.e(LOG_TAG, "Saved preferences version is newer than supported. Attempting to " |
153 + "run an older version of Chrome without clearing data is u nsupported and " | 153 + "run an older version of Chrome without clearing data is u nsupported and " |
154 + "the results may be unpredictable."); | 154 + "the results may be unpredictable."); |
155 } | 155 } |
156 | 156 |
157 if (currentVersion < 1) { | 157 if (currentVersion < 1) { |
158 nativeMigrateJavascriptPreference(); | 158 nativeMigrateJavascriptPreference(); |
159 } | 159 } |
160 // Steps 2,3 intentionally skipped. | |
Bernhard Bauer
2016/06/09 08:55:45
Keep this comment and include step 4?
| |
161 if (currentVersion < 4) { | |
162 // For a brief period (M44 Beta), it was possible for users to disab le images via Site | |
163 // Settings. Now that this option has been removed, ensure that user s are not stuck with | |
164 // images disabled. | |
165 setContentSettingEnabled(ContentSettingsType.CONTENT_SETTINGS_TYPE_I MAGES, true); | |
166 } | |
167 preferences.edit().putInt(MIGRATION_PREF_KEY, MIGRATION_CURRENT_VERSION) .apply(); | 160 preferences.edit().putInt(MIGRATION_PREF_KEY, MIGRATION_CURRENT_VERSION) .apply(); |
168 } | 161 } |
169 | 162 |
170 /** | 163 /** |
171 * Add a permission entry for Location for the default search engine. | 164 * Add a permission entry for Location for the default search engine. |
172 * @param allowed Whether to create an Allowed permission or a Denied permis sion. | 165 * @param allowed Whether to create an Allowed permission or a Denied permis sion. |
173 * @param context The current context to use. | 166 * @param context The current context to use. |
174 */ | 167 */ |
175 public static void maybeCreatePermissionForDefaultSearchEngine( | 168 public static void maybeCreatePermissionForDefaultSearchEngine( |
176 boolean allowed, Context context) { | 169 boolean allowed, Context context) { |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1197 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( ); | 1190 private native String nativeGetSupervisedUserSecondCustodianProfileImageURL( ); |
1198 private native boolean nativeGetMetricsReportingEnabled(); | 1191 private native boolean nativeGetMetricsReportingEnabled(); |
1199 private native void nativeSetMetricsReportingEnabled(boolean enabled); | 1192 private native void nativeSetMetricsReportingEnabled(boolean enabled); |
1200 private native boolean nativeHasSetMetricsReporting(); | 1193 private native boolean nativeHasSetMetricsReporting(); |
1201 private native void nativeSetClickedUpdateMenuItem(boolean clicked); | 1194 private native void nativeSetClickedUpdateMenuItem(boolean clicked); |
1202 private native boolean nativeGetClickedUpdateMenuItem(); | 1195 private native boolean nativeGetClickedUpdateMenuItem(); |
1203 private native void nativeSetLatestVersionWhenClickedUpdateMenuItem(String v ersion); | 1196 private native void nativeSetLatestVersionWhenClickedUpdateMenuItem(String v ersion); |
1204 private native String nativeGetLatestVersionWhenClickedUpdateMenuItem(); | 1197 private native String nativeGetLatestVersionWhenClickedUpdateMenuItem(); |
1205 private native void nativeSetSupervisedUserId(String supervisedUserId); | 1198 private native void nativeSetSupervisedUserId(String supervisedUserId); |
1206 } | 1199 } |
OLD | NEW |