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

Unified Diff: device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java

Issue 2847523002: Android: Remove GetApplicationContext part 4 (Closed)
Patch Set: Rebase and fix build Created 3 years, 7 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: device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
diff --git a/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java b/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
index 33809e99f5b029103da2e8b3a8fb8645aac03e06..40b12fffcfe6c6e12951a8f426ff82920ec67a35 100644
--- a/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
+++ b/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
@@ -4,8 +4,7 @@
package org.chromium.device.geolocation;
-import android.content.Context;
-
+import org.chromium.base.ContextUtils;
import org.chromium.base.VisibleForTesting;
/**
@@ -48,14 +47,15 @@ public class LocationProviderFactory {
sUseGmsCoreLocationProvider = true;
}
- public static LocationProvider create(Context context) {
+ public static LocationProvider create() {
if (sProviderImpl != null) return sProviderImpl;
if (sUseGmsCoreLocationProvider
- && LocationProviderGmsCore.isGooglePlayServicesAvailable(context)) {
- sProviderImpl = new LocationProviderGmsCore(context);
+ && LocationProviderGmsCore.isGooglePlayServicesAvailable(
+ ContextUtils.getApplicationContext())) {
+ sProviderImpl = new LocationProviderGmsCore(ContextUtils.getApplicationContext());
} else {
- sProviderImpl = new LocationProviderAndroid(context);
+ sProviderImpl = new LocationProviderAndroid();
}
return sProviderImpl;
}

Powered by Google App Engine
This is Rietveld 408576698