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

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

Issue 2038753004: Add a LocationUtils class to give all Chromium Android code access to location helpers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Adjust DEPS. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/LocationCategory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/LocationCategory.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/LocationCategory.java
index 8ccbc4e849fb934eab6a7af3fe6535280a60b260..9c83cc9889f3c09a2e70557a1ebeedf95d69123b 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/LocationCategory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/LocationCategory.java
@@ -9,10 +9,12 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
+import org.chromium.base.ContextUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ContentSettingsType;
import org.chromium.chrome.browser.preferences.LocationSettings;
import org.chromium.chrome.browser.preferences.PrefServiceBridge;
+import org.chromium.components.location.LocationUtils;
/**
* A class for dealing with the Geolocation category.
@@ -26,7 +28,8 @@ public class LocationCategory extends SiteSettingsCategory {
@Override
protected boolean enabledGlobally() {
- return LocationSettings.getInstance().isSystemLocationSettingEnabled();
+ return LocationUtils.getInstance().isSystemLocationSettingEnabled(
+ ContextUtils.getApplicationContext());
}
@Override
@@ -50,7 +53,7 @@ public class LocationCategory extends SiteSettingsCategory {
@Override
protected Intent getIntentToEnableOsGlobalPermission(Context context) {
if (enabledGlobally()) return null;
- return LocationSettings.getInstance().getSystemLocationSettingsIntent();
+ return LocationUtils.getInstance().getSystemLocationSettingsIntent();
}
@Override

Powered by Google App Engine
This is Rietveld 408576698