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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java

Issue 2729493004: Update Android site settings to display BLOCK for embargoed permissions. (Closed)
Patch Set: Fix PreferencesTest Created 3 years, 10 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/javatests/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeaderTest.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/omnibox/geo/GeolocationHeader.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java
index 2fbe51851dde63b3a0adf2c6a074d7d76dd4f876..d403e348a2829c513e30d162e9d396c85e4bd9a2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java
@@ -355,8 +355,7 @@ public class GeolocationHeader {
/**
* Returns true if the user has disabled sharing their location with url (e.g. via the
- * geolocation infobar). If the user has not chosen a preference for url and url uses the https
- * scheme, this considers the user's preference for url with the http scheme instead.
+ * geolocation infobar).
*/
static boolean isLocationDisabledForUrl(Uri uri, boolean isIncognito) {
if (ChromeFeatureList.isEnabled(ChromeFeatureList.CONSISTENT_OMNIBOX_GEOLOCATION)) {
@@ -371,25 +370,11 @@ public class GeolocationHeader {
/**
* Returns the location permission for sharing their location with url (e.g. via the
- * geolocation infobar). If the user has not chosen a preference for url and url uses the https
- * scheme, this returns the user's preference for url with the http scheme instead.
+ * geolocation infobar).
*/
static ContentSetting locationContentSettingForUrl(Uri uri, boolean isIncognito) {
GeolocationInfo locationSettings = new GeolocationInfo(uri.toString(), null, isIncognito);
ContentSetting locationPermission = locationSettings.getContentSetting();
-
- // If no preference has been chosen and the scheme is https, fall back to the preference for
- // this same host over http with no explicit port number.
- if (locationPermission == null || locationPermission == ContentSetting.ASK) {
- String scheme = uri.getScheme();
- if (scheme != null && scheme.toLowerCase(Locale.US).equals("https")
- && uri.getAuthority() != null && uri.getUserInfo() == null) {
- String urlWithHttp = "http://" + uri.getHost();
- locationSettings = new GeolocationInfo(urlWithHttp, null, isIncognito);
- locationPermission = locationSettings.getContentSetting();
- }
- }
-
return locationPermission;
}
@@ -442,8 +427,7 @@ public class GeolocationHeader {
/**
* Returns the domain permission as either granted, blocked or prompt.
* This is based upon the location permission for sharing their location with url (e.g. via the
- * geolocation infobar). If the user has not chosen a preference for url and url uses the https
- * scheme, this returns the user's preference for url with the http scheme instead.
+ * geolocation infobar).
*/
@Permission
private static int getDomainPermission(String url, boolean isIncognito) {
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeaderTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698