summaryrefslogtreecommitdiffstats
path: root/content/browser/geolocation
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-24 18:18:34 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-24 18:18:34 +0000
commitc530c85aa67a10aac9a77d10970951633ff686d9 (patch)
tree5b0943bd7369f48053075a75db9cf6e5a0d1514d /content/browser/geolocation
parentb4c95f61571c24ea1fc15fed0eda1269fe75d94b (diff)
downloadchromium_src-c530c85aa67a10aac9a77d10970951633ff686d9.zip
chromium_src-c530c85aa67a10aac9a77d10970951633ff686d9.tar.gz
chromium_src-c530c85aa67a10aac9a77d10970951633ff686d9.tar.bz2
Convert URLFetcher::Delegates to use an interface in content/public/common. Also remove the old URLFetcher delegate callback while I'm touching all of them.BUG=98716,83592
Review URL: http://codereview.chromium.org/8373021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/geolocation')
-rw-r--r--content/browser/geolocation/network_location_request.cc5
-rw-r--r--content/browser/geolocation/network_location_request.h6
2 files changed, 7 insertions, 4 deletions
diff --git a/content/browser/geolocation/network_location_request.cc b/content/browser/geolocation/network_location_request.cc
index d345192..7284b7f 100644
--- a/content/browser/geolocation/network_location_request.cc
+++ b/content/browser/geolocation/network_location_request.cc
@@ -12,6 +12,7 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "content/common/geoposition.h"
+#include "content/common/net/url_fetcher.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
#include "net/url_request/url_request_context_getter.h"
@@ -106,9 +107,11 @@ void NetworkLocationRequest::OnURLFetchComplete(const URLFetcher* source) {
Geoposition position;
string16 access_token;
+ std::string data;
+ source->GetResponseAsString(&data);
GetLocationFromResponse(status.is_success(),
response_code,
- source->GetResponseStringRef(),
+ data,
timestamp_,
source->url(),
&position,
diff --git a/content/browser/geolocation/network_location_request.h b/content/browser/geolocation/network_location_request.h
index 45f6806..649d4ff 100644
--- a/content/browser/geolocation/network_location_request.h
+++ b/content/browser/geolocation/network_location_request.h
@@ -13,7 +13,7 @@
#include "base/memory/scoped_ptr.h"
#include "content/browser/geolocation/device_data_provider.h"
#include "content/common/content_export.h"
-#include "content/common/net/url_fetcher.h"
+#include "content/public/common/url_fetcher_delegate.h"
#include "googleurl/src/gurl.h"
class URLFetcher;
@@ -27,7 +27,7 @@ struct Position;
// Takes a set of device data and sends it to a server to get a position fix.
// It performs formatting of the request and interpretation of the response.
-class NetworkLocationRequest : private URLFetcher::Delegate {
+class NetworkLocationRequest : private content::URLFetcherDelegate {
public:
// ID passed to URLFetcher::Create(). Used for testing.
CONTENT_EXPORT static int url_fetcher_id_for_tests;
@@ -65,7 +65,7 @@ class NetworkLocationRequest : private URLFetcher::Delegate {
const GURL& url() const { return url_; }
private:
- // URLFetcher::Delegate
+ // content::URLFetcherDelegate
virtual void OnURLFetchComplete(const URLFetcher* source) OVERRIDE;
scoped_refptr<net::URLRequestContextGetter> url_context_;