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

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

Issue 1089543004: Ensure geolocation permission is only automatically given to search engines that are accessed over … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 727703efb60d106d3574def55a8cf03ddee4548d..6e6ab9094173f69934bdf39655705e456166fe74 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
@@ -173,23 +173,20 @@ public final class PrefServiceBridge {
return;
}
- maybeCreatePermissionForDefaultSearchEngine(true, // Allowed permission.
- true, // We are migrating prefs.
- context);
+ maybeCreatePermissionForDefaultSearchEngine(true, context);
}
/**
* Add a permission entry for Location for the default search engine.
* @param allowed Whether to create an Allowed permission or a Denied permission.
- * @param forMigration Whether this is being done as part of a one-time migration effort.
* @param context The current context to use.
*/
public static void maybeCreatePermissionForDefaultSearchEngine(
- boolean allowed, boolean forMigration, Context context) {
+ boolean allowed, Context context) {
TemplateUrlService templateUrlService = TemplateUrlService.getInstance();
String url = templateUrlService.getSearchEngineUrlFromTemplateUrl(
templateUrlService.getDefaultSearchEngineIndex());
- if (forMigration && !url.startsWith("https:")) return;
+ if (allowed && !url.startsWith("https:")) return;
GeolocationInfo locationSettings = new GeolocationInfo(url, null);
ContentSetting locationPermission = locationSettings.getContentSetting();
if (locationPermission == null || locationPermission == ContentSetting.ASK) {
« 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