#include "base/threading/thread.h"
#include "content/browser/geolocation/location_provider_base.h"
#include "content/browser/geolocation/network_location_request.h"
-#include "content/browser/geolocation/wifi_data_provider.h"
+#include "content/browser/geolocation/wifi_data_provider_manager.h"
#include "content/common/content_export.h"
#include "content/public/common/geoposition.h"
// Makes the key for the map of cached positions, using a set of
// data. Returns true if a good key was generated, false otherwise.
static bool MakeKey(const WifiData& wifi_data,
- string16* key);
+ base::string16* key);
// The cache of positions. This is stored as a map keyed on a string that
// represents a set of data, and a list to provide
// least-recently-added eviction.
- typedef std::map<string16, Geoposition> CacheMap;
+ typedef std::map<base::string16, Geoposition> CacheMap;
CacheMap cache_;
typedef std::list<CacheMap::iterator> CacheAgeList;
CacheAgeList cache_age_list_; // Oldest first.
NetworkLocationProvider(AccessTokenStore* access_token_store,
net::URLRequestContextGetter* context,
const GURL& url,
- const string16& access_token);
+ const base::string16& access_token);
virtual ~NetworkLocationProvider();
// LocationProvider implementation
// Satisfies a position request from cache or network.
void RequestPosition();
- // Called from a callback when new wifi data is available.
- void WifiDataUpdateAvailable(WifiDataProvider* provider);
+ // Gets called when new wifi data is available.
+ void OnWifiDataUpdate();
- // Internal helper used by WifiDataUpdateAvailable.
+ // Internal helper used by OnWifiDataUpdate.
void OnWifiDataUpdated();
bool IsStarted() const;
- void LocationResponseAvailable(const Geoposition& position,
- bool server_error,
- const string16& access_token,
- const WifiData& wifi_data);
+ void OnLocationResponse(const Geoposition& position,
+ bool server_error,
+ const base::string16& access_token,
+ const WifiData& wifi_data);
scoped_refptr<AccessTokenStore> access_token_store_;
// The wifi data provider, acquired via global factories.
- WifiDataProvider* wifi_data_provider_;
+ WifiDataProviderManager* wifi_data_provider_manager_;
- WifiDataProvider::WifiDataUpdateCallback wifi_data_update_callback_;
+ WifiDataProviderManager::WifiDataUpdateCallback wifi_data_update_callback_;
// The wifi data and a flag to indicate if the data set is complete.
WifiData wifi_data_;
// Cached value loaded from the token store or set by a previous server
// response, and sent in each subsequent network request.
- string16 access_token_;
+ base::string16 access_token_;
// The current best position estimate.
Geoposition position_;
AccessTokenStore* access_token_store,
net::URLRequestContextGetter* context,
const GURL& url,
- const string16& access_token);
+ const base::string16& access_token);
} // namespace content