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

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

Issue 2810973003: Remove maybeCreatePermissionForDefaultSearchEngine and related code (Closed)
Patch Set: Remove strign Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
index 1f98d61ac6a5a1be9058d8de111242abe1b7b782..29e545e2ee2abdf8575eb88137b6ce3e7f161b55 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java
@@ -15,8 +15,6 @@ import org.chromium.base.annotations.CalledByNative;
import org.chromium.chrome.browser.ContentSettingsType;
import org.chromium.chrome.browser.preferences.website.ContentSetting;
import org.chromium.chrome.browser.preferences.website.ContentSettingException;
-import org.chromium.chrome.browser.preferences.website.GeolocationInfo;
-import org.chromium.chrome.browser.preferences.website.WebsitePreferenceBridge;
import org.chromium.chrome.browser.search_engines.TemplateUrlService;
import java.util.ArrayList;
@@ -56,10 +54,6 @@ public final class PrefServiceBridge {
private static final String CONTEXTUAL_SEARCH_DISABLED = "false";
private static final String CONTEXTUAL_SEARCH_ENABLED = "true";
- // The key to store whether the Location Permission was automatically added for the search
- // engine set as default.
- public static final String LOCATION_AUTO_ALLOWED = "search_engine_location_auto_allowed";
-
/**
* Structure that holds all the version information about the current Chrome browser.
*/
@@ -130,28 +124,6 @@ public final class PrefServiceBridge {
}
/**
- * Add a permission entry for Location for the default search engine.
- * @param allowed Whether to create an Allowed permission or a Denied permission.
- * @param context The current context to use.
- */
- public static void maybeCreatePermissionForDefaultSearchEngine(
- boolean allowed, Context context) {
- TemplateUrlService templateUrlService = TemplateUrlService.getInstance();
- String url = templateUrlService.getSearchEngineUrlFromTemplateUrl(
- templateUrlService.getDefaultSearchEngineTemplateUrl().getKeyword());
- if (allowed && !url.startsWith("https:")) return;
- GeolocationInfo locationSettings = new GeolocationInfo(url, null, false);
- ContentSetting locationPermission = locationSettings.getContentSetting();
- if (locationPermission == null || locationPermission == ContentSetting.ASK) {
- WebsitePreferenceBridge.nativeSetGeolocationSettingForOrigin(url, url,
- allowed ? ContentSetting.ALLOW.toInt() : ContentSetting.BLOCK.toInt(), false);
- SharedPreferences sharedPreferences =
- ContextUtils.getAppSharedPreferences();
- sharedPreferences.edit().putBoolean(LOCATION_AUTO_ALLOWED, true).apply();
- }
- }
-
- /**
* Returns whether a particular content setting type is enabled.
* @param contentSettingsType The content setting type to check.
*/
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698