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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java

Issue 2105573002: Revert of 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: 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/physicalweb/PhysicalWebUma.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
index eb672dd9cdfb42e33ac4a6ef171502f18cb43458..c28da2d48c38181833c13acf0f0ec66aefbfde4a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/physicalweb/PhysicalWebUma.java
@@ -12,7 +12,6 @@
import org.chromium.base.Log;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.RecordUserAction;
-import org.chromium.components.location.LocationUtils;
import org.json.JSONArray;
import org.json.JSONException;
@@ -227,11 +226,10 @@
* - The Physical Web preference status
*/
public static void recordPhysicalWebState(Context context, String actionName) {
- LocationUtils locationUtils = LocationUtils.getInstance();
handleEnum(context, createStateString(LOCATION_SERVICES, actionName),
- locationUtils.isSystemLocationSettingEnabled(context) ? 1 : 0, BOOLEAN_BOUNDARY);
+ Utils.isLocationServicesEnabled(context) ? 1 : 0, BOOLEAN_BOUNDARY);
handleEnum(context, createStateString(LOCATION_PERMISSION, actionName),
- locationUtils.hasAndroidLocationPermission(context) ? 1 : 0, BOOLEAN_BOUNDARY);
+ Utils.isLocationPermissionGranted(context) ? 1 : 0, BOOLEAN_BOUNDARY);
handleEnum(context, createStateString(BLUETOOTH, actionName),
Utils.getBluetoothEnabledStatus(context), TRISTATE_BOUNDARY);
handleEnum(context, createStateString(DATA_CONNECTION, actionName),

Powered by Google App Engine
This is Rietveld 408576698