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

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: Remove some methods from LocationSettings. 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..d8070b6d7147d32e75f31d6325d5cfc17de56c38 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,6 +9,8 @@ import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
+import org.chromium.base.ContextUtils;
+import org.chromium.base.LocationUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ContentSettingsType;
import org.chromium.chrome.browser.preferences.LocationSettings;
@@ -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