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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.device.geolocation; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.location.Criteria; 8 import android.location.Criteria;
9 import android.location.Location; 9 import android.location.Location;
10 import android.location.LocationListener; 10 import android.location.LocationListener;
11 import android.location.LocationManager; 11 import android.location.LocationManager;
12 import android.os.Bundle; 12 import android.os.Bundle;
13 13
14 import org.chromium.base.Log; 14 import org.chromium.base.Log;
15 import org.chromium.base.ThreadUtils; 15 import org.chromium.base.ThreadUtils;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 /** 52 /**
53 * This is the core of android location provider. It is a separate class for clarity 53 * This is the core of android location provider. It is a separate class for clarity
54 * so that it can manage all processing completely in the UI thread. The con tainer class 54 * so that it can manage all processing completely in the UI thread. The con tainer class
55 * ensures that the start/stop calls into this class are done in the UI thre ad. 55 * ensures that the start/stop calls into this class are done in the UI thre ad.
56 */ 56 */
57 private static class LocationProviderImpl 57 private static class LocationProviderImpl
58 implements LocationListener, LocationProviderFactory.LocationProvide r { 58 implements LocationListener, LocationProviderFactory.LocationProvide r {
59 59
60 // Log tag 60 // Log tag
61 private static final String TAG = "cr_LocationProvider"; 61 private static final String TAG = "cr.LocationProvider";
62 62
63 private Context mContext; 63 private Context mContext;
64 private LocationManager mLocationManager; 64 private LocationManager mLocationManager;
65 private boolean mIsRunning; 65 private boolean mIsRunning;
66 66
67 LocationProviderImpl(Context context) { 67 LocationProviderImpl(Context context) {
68 mContext = context; 68 mContext = context;
69 } 69 }
70 70
71 /** 71 /**
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 */ 203 */
204 private boolean isOnlyPassiveLocationProviderEnabled() { 204 private boolean isOnlyPassiveLocationProviderEnabled() {
205 List<String> providers = mLocationManager.getProviders(true); 205 List<String> providers = mLocationManager.getProviders(true);
206 return providers != null && providers.size() == 1 206 return providers != null && providers.size() == 1
207 && providers.get(0).equals(LocationManager.PASSIVE_PROVIDER) ; 207 && providers.get(0).equals(LocationManager.PASSIVE_PROVIDER) ;
208 } 208 }
209 } 209 }
210 } 210 }
211 211
212 212
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698