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

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

Issue 2953853002: [Android Site Settings] Disable fetching important sites when not needed (Closed)
Patch Set: comments Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.website; 5 package org.chromium.chrome.browser.preferences.website;
6 6
7 import org.chromium.base.Callback; 7 import org.chromium.base.Callback;
8 import org.chromium.base.annotations.CalledByNative; 8 import org.chromium.base.annotations.CalledByNative;
9 import org.chromium.chrome.browser.preferences.PrefServiceBridge; 9 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
10 10
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 List<ContentSettingException> managedExceptions = 180 List<ContentSettingException> managedExceptions =
181 new ArrayList<ContentSettingException>(); 181 new ArrayList<ContentSettingException>();
182 for (ContentSettingException exception : exceptions) { 182 for (ContentSettingException exception : exceptions) {
183 if (exception.getSource().equals("policy")) { 183 if (exception.getSource().equals("policy")) {
184 managedExceptions.add(exception); 184 managedExceptions.add(exception);
185 } 185 }
186 } 186 }
187 return managedExceptions; 187 return managedExceptions;
188 } 188 }
189 189
190 public static void fetchLocalStorageInfo(Callback<HashMap> callback) { 190 public static void fetchLocalStorageInfo(Callback<HashMap> callback, boolean fetchImportant) {
191 nativeFetchLocalStorageInfo(callback); 191 nativeFetchLocalStorageInfo(callback, fetchImportant);
192 } 192 }
193 193
194 public static void fetchStorageInfo(Callback<ArrayList> callback) { 194 public static void fetchStorageInfo(Callback<ArrayList> callback) {
195 nativeFetchStorageInfo(callback); 195 nativeFetchStorageInfo(callback);
196 } 196 }
197 197
198 /** 198 /**
199 * Returns the list of all USB device permissions. 199 * Returns the list of all USB device permissions.
200 * 200 *
201 * There will be one UsbInfo instance for each granted permission. That 201 * There will be one UsbInfo instance for each granted permission. That
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 String origin, String embedder, boolean isIncognito); 274 String origin, String embedder, boolean isIncognito);
275 static native int nativeGetCameraSettingForOrigin( 275 static native int nativeGetCameraSettingForOrigin(
276 String origin, String embedder, boolean isIncognito); 276 String origin, String embedder, boolean isIncognito);
277 static native void nativeSetMicrophoneSettingForOrigin( 277 static native void nativeSetMicrophoneSettingForOrigin(
278 String origin, int value, boolean isIncognito); 278 String origin, int value, boolean isIncognito);
279 static native void nativeSetCameraSettingForOrigin( 279 static native void nativeSetCameraSettingForOrigin(
280 String origin, int value, boolean isIncognito); 280 String origin, int value, boolean isIncognito);
281 static native void nativeClearCookieData(String path); 281 static native void nativeClearCookieData(String path);
282 static native void nativeClearLocalStorageData(String path); 282 static native void nativeClearLocalStorageData(String path);
283 static native void nativeClearStorageData(String origin, int type, Object ca llback); 283 static native void nativeClearStorageData(String origin, int type, Object ca llback);
284 private static native void nativeFetchLocalStorageInfo(Object callback); 284 private static native void nativeFetchLocalStorageInfo(
285 Object callback, boolean includeImportant);
285 private static native void nativeFetchStorageInfo(Object callback); 286 private static native void nativeFetchStorageInfo(Object callback);
286 static native boolean nativeIsContentSettingsPatternValid(String pattern); 287 static native boolean nativeIsContentSettingsPatternValid(String pattern);
287 static native boolean nativeUrlMatchesContentSettingsPattern(String url, Str ing pattern); 288 static native boolean nativeUrlMatchesContentSettingsPattern(String url, Str ing pattern);
288 static native void nativeGetUsbOrigins(Object list); 289 static native void nativeGetUsbOrigins(Object list);
289 static native void nativeRevokeUsbPermission(String origin, String embedder, String object); 290 static native void nativeRevokeUsbPermission(String origin, String embedder, String object);
290 static native void nativeClearBannerData(String origin); 291 static native void nativeClearBannerData(String origin);
291 private static native boolean nativeShouldUseDSEGeolocationSetting( 292 private static native boolean nativeShouldUseDSEGeolocationSetting(
292 String origin, boolean isIncognito); 293 String origin, boolean isIncognito);
293 private static native boolean nativeGetDSEGeolocationSetting(); 294 private static native boolean nativeGetDSEGeolocationSetting();
294 private static native void nativeSetDSEGeolocationSetting(boolean setting); 295 private static native void nativeSetDSEGeolocationSetting(boolean setting);
295 private static native boolean nativeGetAdBlockingActivated(String origin); 296 private static native boolean nativeGetAdBlockingActivated(String origin);
296 } 297 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698