summaryrefslogtreecommitdiffstats
path: root/chrome/browser/geolocation/network_location_request.cc
diff options
context:
space:
mode:
authorbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 12:11:28 +0000
committerbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 12:11:28 +0000
commit58c321dd57a1fc00c2c51b0a8b6e547fdf32aa74 (patch)
treecdd273a38ba1b449952d5701e6ceb6f46142c073 /chrome/browser/geolocation/network_location_request.cc
parent2375d294b30e5d0b0bc63d26a417203959ef32af (diff)
downloadchromium_src-58c321dd57a1fc00c2c51b0a8b6e547fdf32aa74.zip
chromium_src-58c321dd57a1fc00c2c51b0a8b6e547fdf32aa74.tar.gz
chromium_src-58c321dd57a1fc00c2c51b0a8b6e547fdf32aa74.tar.bz2
Second try for:
http://src.chromium.org/viewvc/chrome?view=rev&revision=39374 Initial Geolocation implementation Adds IPC plumbing. Adds Infobar buttons for requesting permission This change specifically: ui_test_utils::WaitForAppModalDialog registers for listening to notifications too late, i.e., after the dialog had been triggered. Exposes AppModalDialogObserver so that we can register, trigger the dialog, then wait for it. Review URL: http://codereview.chromium.org/647048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation/network_location_request.cc')
-rw-r--r--chrome/browser/geolocation/network_location_request.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/geolocation/network_location_request.cc b/chrome/browser/geolocation/network_location_request.cc
index 65e3f37..ecf41d9 100644
--- a/chrome/browser/geolocation/network_location_request.cc
+++ b/chrome/browser/geolocation/network_location_request.cc
@@ -8,8 +8,8 @@
#include "base/json/json_writer.h"
#include "base/string_util.h"
#include "base/values.h"
-#include "chrome/browser/geolocation/geoposition.h"
#include "chrome/browser/net/url_request_context_getter.h"
+#include "chrome/common/geoposition.h"
#include "net/url_request/url_request_status.h"
namespace {
@@ -39,7 +39,7 @@ void GetLocationFromResponse(bool http_post_result,
const std::string& response_body,
int64 timestamp,
const GURL& server_url,
- Position* position,
+ Geoposition* position,
string16* access_token);
const char* RadioTypeToString(RadioType type);
@@ -54,7 +54,7 @@ void AddInteger(const std::wstring& property_name,
// Parses the server response body. Returns true if parsing was successful.
bool ParseServerResponse(const std::string& response_body,
int64 timestamp,
- Position* position,
+ Geoposition* position,
string16* access_token);
void AddRadioData(const RadioData& radio_data, DictionaryValue* body_object);
void AddWifiData(const WifiData& wifi_data, DictionaryValue* body_object);
@@ -105,7 +105,7 @@ void NetworkLocationRequest::OnURLFetchComplete(const URLFetcher* source,
DCHECK_EQ(url_fetcher_.get(), source);
DCHECK(url_.possibly_invalid_spec() == url.possibly_invalid_spec());
- Position position;
+ Geoposition position;
string16 access_token;
GetLocationFromResponse(status.is_success(), response_code, data,
timestamp_, url, &position, &access_token);
@@ -162,8 +162,8 @@ bool FormRequestBody(const string16& host_name,
void FormatPositionError(const GURL& server_url,
const std::wstring& message,
- Position* position) {
- position->error_code = Position::ERROR_CODE_POSITION_UNAVAILABLE;
+ Geoposition* position) {
+ position->error_code = Geoposition::ERROR_CODE_POSITION_UNAVAILABLE;
position->error_message = L"Network location provider at '";
position->error_message += ASCIIToWide(server_url.possibly_invalid_spec());
position->error_message += L"' : ";
@@ -178,7 +178,7 @@ void GetLocationFromResponse(bool http_post_result,
const std::string& response_body,
int64 timestamp,
const GURL& server_url,
- Position* position,
+ Geoposition* position,
string16* access_token) {
DCHECK(position);
DCHECK(access_token);
@@ -268,7 +268,7 @@ bool GetAsDouble(const DictionaryValue& object,
bool ParseServerResponse(const std::string& response_body,
int64 timestamp,
- Position* position,
+ Geoposition* position,
string16* access_token) {
DCHECK(position);
DCHECK(access_token);