summaryrefslogtreecommitdiffstats
path: root/content/browser/geolocation/network_location_request.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/geolocation/network_location_request.cc')
-rw-r--r--content/browser/geolocation/network_location_request.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/content/browser/geolocation/network_location_request.cc b/content/browser/geolocation/network_location_request.cc
index 74a77e1..d11a474 100644
--- a/content/browser/geolocation/network_location_request.cc
+++ b/content/browser/geolocation/network_location_request.cc
@@ -70,10 +70,10 @@ int NetworkLocationRequest::url_fetcher_id_for_tests = 0;
NetworkLocationRequest::NetworkLocationRequest(
net::URLRequestContextGetter* context,
const GURL& url,
- ListenerInterface* listener)
- : url_context_(context), listener_(listener),
+ LocationResponseCallback callback)
+ : url_context_(context),
+ callback_(callback),
url_(url) {
- DCHECK(listener);
}
NetworkLocationRequest::~NetworkLocationRequest() {
@@ -139,10 +139,8 @@ void NetworkLocationRequest::OnURLFetchComplete(
100);
}
- DCHECK(listener_);
- DVLOG(1) << "NetworkLocationRequest::Run() : Calling listener with position.";
- listener_->LocationResponseAvailable(position, server_error, access_token,
- wifi_data_);
+ DVLOG(1) << "NetworkLocationRequest::OnURLFetchComplete() : run callback.";
+ callback_.Run(position, server_error, access_token, wifi_data_);
}
// Local functions.