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

Unified Diff: content/browser/geolocation/geolocation_provider.cc

Issue 10107017: Remove requesting_frame parameters from Geolocation stack (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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: content/browser/geolocation/geolocation_provider.cc
diff --git a/content/browser/geolocation/geolocation_provider.cc b/content/browser/geolocation/geolocation_provider.cc
index 8090ddf7c7ce840db4a8f2ecf31d8b9f60352f4c..6665bd9c725897d7f6a25b835a64b2680c2e495a 100644
--- a/content/browser/geolocation/geolocation_provider.cc
+++ b/content/browser/geolocation/geolocation_provider.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -53,7 +53,7 @@ void GeolocationProvider::OnObserversChanged() {
if (!IsRunning()) {
Start();
if (HasPermissionBeenGranted())
- InformProvidersPermissionGranted(most_recent_authorized_frame_);
+ InformProvidersPermissionGranted();
}
// The high accuracy requirement may have changed.
@@ -91,27 +91,25 @@ void GeolocationProvider::StopProviders() {
arbitrator_->StopProviders();
}
-void GeolocationProvider::OnPermissionGranted(const GURL& requesting_frame) {
+void GeolocationProvider::OnPermissionGranted() {
DCHECK(OnClientThread());
- most_recent_authorized_frame_ = requesting_frame;
+ is_permission_granted_ = true;
John Knottenbelt 2012/04/20 09:40:37 is_permission_granted_ needs to be initialised to
bartfab (slow) 2012/04/20 09:44:29 Done.
if (IsRunning())
- InformProvidersPermissionGranted(requesting_frame);
+ InformProvidersPermissionGranted();
}
-void GeolocationProvider::InformProvidersPermissionGranted(
- const GURL& requesting_frame) {
+void GeolocationProvider::InformProvidersPermissionGranted() {
DCHECK(IsRunning());
- DCHECK(requesting_frame.is_valid());
if (!OnGeolocationThread()) {
message_loop()->PostTask(
FROM_HERE,
base::Bind(&GeolocationProvider::InformProvidersPermissionGranted,
- base::Unretained(this), requesting_frame));
+ base::Unretained(this)));
return;
}
DCHECK(OnGeolocationThread());
DCHECK(arbitrator_);
- arbitrator_->OnPermissionGranted(requesting_frame);
+ arbitrator_->OnPermissionGranted();
}
void GeolocationProvider::Init() {
@@ -136,7 +134,7 @@ void GeolocationProvider::OnLocationUpdate(const Geoposition& position) {
bool GeolocationProvider::HasPermissionBeenGranted() const {
DCHECK(OnClientThread());
- return most_recent_authorized_frame_.is_valid();
+ return is_permission_granted_;
}
bool GeolocationProvider::OnClientThread() const {
« no previous file with comments | « content/browser/geolocation/geolocation_provider.h ('k') | content/browser/geolocation/geolocation_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698