diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 03:01:49 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-29 03:01:49 +0000 |
commit | 6bd4083b2fbaa7eb92a549aa2c78950adee2ae9e (patch) | |
tree | 107491ca0b140e596c9e7d5ceb4b200d31f8d607 /content/browser/geolocation/network_location_request.cc | |
parent | 95e8108cbc0c398b9499c54974d49ebabeb3be00 (diff) | |
download | chromium_src-6bd4083b2fbaa7eb92a549aa2c78950adee2ae9e.zip chromium_src-6bd4083b2fbaa7eb92a549aa2c78950adee2ae9e.tar.gz chromium_src-6bd4083b2fbaa7eb92a549aa2c78950adee2ae9e.tar.bz2 |
Move geolocation code to content namespace.
TBR=scottmg
Review URL: https://codereview.chromium.org/11276058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164586 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/geolocation/network_location_request.cc')
-rw-r--r-- | content/browser/geolocation/network_location_request.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/content/browser/geolocation/network_location_request.cc b/content/browser/geolocation/network_location_request.cc index 9333fba..75868d8 100644 --- a/content/browser/geolocation/network_location_request.cc +++ b/content/browser/geolocation/network_location_request.cc @@ -21,6 +21,7 @@ #include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_status.h" +namespace content { namespace { const size_t kMaxRequestLength = 2048; @@ -48,7 +49,7 @@ void GetLocationFromResponse(bool http_post_result, const std::string& response_body, const base::Time& timestamp, const GURL& server_url, - content::Geoposition* position, + Geoposition* position, string16* access_token); // Parses the server response body. Returns true if parsing was successful. @@ -56,7 +57,7 @@ void GetLocationFromResponse(bool http_post_result, // otherwise leaves it unchanged. bool ParseServerResponse(const std::string& response_body, const base::Time& timestamp, - content::Geoposition* position, + Geoposition* position, string16* access_token); void AddWifiData(const WifiData& wifi_data, int age_milliseconds, @@ -110,7 +111,7 @@ void NetworkLocationRequest::OnURLFetchComplete( net::URLRequestStatus status = source->GetStatus(); int response_code = source->GetResponseCode(); - content::Geoposition position; + Geoposition position; string16 access_token; std::string data; source->GetResponseAsString(&data); @@ -226,9 +227,8 @@ void AddWifiData(const WifiData& wifi_data, void FormatPositionError(const GURL& server_url, const std::string& message, - content::Geoposition* position) { - position->error_code = - content::Geoposition::ERROR_CODE_POSITION_UNAVAILABLE; + Geoposition* position) { + position->error_code = Geoposition::ERROR_CODE_POSITION_UNAVAILABLE; position->error_message = "Network location provider at '"; position->error_message += server_url.GetOrigin().spec(); position->error_message += "' : "; @@ -243,7 +243,7 @@ void GetLocationFromResponse(bool http_post_result, const std::string& response_body, const base::Time& timestamp, const GURL& server_url, - content::Geoposition* position, + Geoposition* position, string16* access_token) { DCHECK(position); DCHECK(access_token); @@ -298,11 +298,11 @@ bool GetAsDouble(const base::DictionaryValue& object, bool ParseServerResponse(const std::string& response_body, const base::Time& timestamp, - content::Geoposition* position, + Geoposition* position, string16* access_token) { DCHECK(position); DCHECK(!position->Validate()); - DCHECK(position->error_code == content::Geoposition::ERROR_CODE_NONE); + DCHECK(position->error_code == Geoposition::ERROR_CODE_NONE); DCHECK(access_token); DCHECK(!timestamp.is_null()); @@ -376,3 +376,4 @@ bool ParseServerResponse(const std::string& response_body, } // namespace +} // namespace content |