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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context_android.cc

Issue 815343005: Clean up geolocation code now that it's all upstream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: renamed IsSystemLocationEnabled -> IsLocationEnabled Created 5 years, 11 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/browser/geolocation/geolocation_permission_context_android.cc
diff --git a/chrome/browser/geolocation/geolocation_permission_context_android.cc b/chrome/browser/geolocation/geolocation_permission_context_android.cc
index aaca7ebbb694941c880fef9e3663ad8ea2d7cbed..dbf865d1d19fae08de696a5739674f7cc6dcb0ff 100644
--- a/chrome/browser/geolocation/geolocation_permission_context_android.cc
+++ b/chrome/browser/geolocation/geolocation_permission_context_android.cc
@@ -4,8 +4,8 @@
#include "chrome/browser/geolocation/geolocation_permission_context_android.h"
-#include "chrome/browser/android/app_google_location_settings_helper.h"
-#include "chrome/browser/android/google_location_settings_helper.h"
+#include "chrome/browser/android/location_settings.h"
+#include "chrome/browser/android/location_settings_impl.h"
#include "components/content_settings/core/common/permission_request_id.h"
#include "content/public/browser/web_contents.h"
#include "url/gurl.h"
@@ -13,7 +13,7 @@
GeolocationPermissionContextAndroid::
GeolocationPermissionContextAndroid(Profile* profile)
: GeolocationPermissionContext(profile),
- google_location_settings_helper_(new AppGoogleLocationSettingsHelper()) {
+ location_settings_(new LocationSettingsImpl()) {
}
GeolocationPermissionContextAndroid::~GeolocationPermissionContextAndroid() {
@@ -25,7 +25,7 @@ void GeolocationPermissionContextAndroid::RequestPermission(
const GURL& requesting_frame_origin,
bool user_gesture,
const BrowserPermissionCallback& callback) {
- if (!google_location_settings_helper_->IsSystemLocationEnabled()) {
+ if (!location_settings_->IsLocationEnabled()) {
PermissionDecided(id, requesting_frame_origin,
web_contents->GetLastCommittedURL().GetOrigin(),
callback, false /* persist */, false /* granted */);
@@ -36,8 +36,7 @@ void GeolocationPermissionContextAndroid::RequestPermission(
web_contents, id, requesting_frame_origin, user_gesture, callback);
}
-void GeolocationPermissionContextAndroid::
- SetGoogleLocationSettingsHelperForTesting(
- scoped_ptr<GoogleLocationSettingsHelper> helper) {
- google_location_settings_helper_ = helper.Pass();
+void GeolocationPermissionContextAndroid::SetLocationSettingsForTesting(
+ scoped_ptr<LocationSettings> settings) {
+ location_settings_ = settings.Pass();
}

Powered by Google App Engine
This is Rietveld 408576698