diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 12:11:28 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 12:11:28 +0000 |
commit | 58c321dd57a1fc00c2c51b0a8b6e547fdf32aa74 (patch) | |
tree | cdd273a38ba1b449952d5701e6ceb6f46142c073 /chrome/browser/geolocation/network_location_provider.cc | |
parent | 2375d294b30e5d0b0bc63d26a417203959ef32af (diff) | |
download | chromium_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_provider.cc')
-rw-r--r-- | chrome/browser/geolocation/network_location_provider.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/geolocation/network_location_provider.cc b/chrome/browser/geolocation/network_location_provider.cc index 8d0c69e..1b05018 100644 --- a/chrome/browser/geolocation/network_location_provider.cc +++ b/chrome/browser/geolocation/network_location_provider.cc @@ -32,7 +32,7 @@ class NetworkLocationProvider::PositionCache { // WiFi data. Returns true on success, false otherwise. bool CachePosition(const RadioData& radio_data, const WifiData& wifi_data, - const Position& position) { + const Geoposition& position) { // Check that we can generate a valid key for the device data. string16 key; if (!MakeKey(radio_data, wifi_data, &key)) { @@ -57,8 +57,8 @@ class NetworkLocationProvider::PositionCache { // Searches for a cached position response for the current set of cell ID and // WiFi data. Returns the cached position if available, NULL otherwise. - const Position *FindPosition(const RadioData &radio_data, - const WifiData &wifi_data) { + const Geoposition *FindPosition(const RadioData &radio_data, + const WifiData &wifi_data) { string16 key; if (!MakeKey(radio_data, wifi_data, &key)) { return NULL; @@ -96,7 +96,7 @@ class NetworkLocationProvider::PositionCache { // The cache of positions. This is stored using two maps. One map is keyed on // a string that represents a set of device data, the other is keyed on the // timestamp of the position. - typedef std::map<string16, Position> CacheMap; + typedef std::map<string16, Geoposition> CacheMap; CacheMap cache_; typedef std::map<int64, CacheMap::iterator> CacheTimesMap; CacheTimesMap cache_times_; @@ -141,7 +141,7 @@ NetworkLocationProvider::~NetworkLocationProvider() { } // LocationProviderBase implementation -void NetworkLocationProvider::GetPosition(Position *position) { +void NetworkLocationProvider::GetPosition(Geoposition *position) { DCHECK(position); AutoLock lock(position_mutex_); *position = position_; @@ -176,7 +176,7 @@ void NetworkLocationProvider::DeviceDataUpdateAvailable( // NetworkLocationRequest::ListenerInterface implementation. void NetworkLocationProvider::LocationResponseAvailable( - const Position& position, + const Geoposition& position, bool server_error, const string16& access_token) { DCHECK(CalledOnValidThread()); @@ -238,7 +238,7 @@ void NetworkLocationProvider::RequestPosition() { DCHECK(CalledOnValidThread()); delayed_start_task_.RevokeAll(); - const Position* cached_position; + const Geoposition* cached_position; { AutoLock lock(data_mutex_); cached_position = position_cache_->FindPosition(radio_data_, wifi_data_); |