Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / content / browser / geolocation / network_location_provider.h
index d5f3e99..1040887 100644 (file)
@@ -17,7 +17,7 @@
 #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"
 
@@ -54,12 +54,12 @@ class NetworkLocationProvider
     // 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.
@@ -68,7 +68,7 @@ class NetworkLocationProvider
   NetworkLocationProvider(AccessTokenStore* access_token_store,
                           net::URLRequestContextGetter* context,
                           const GURL& url,
-                          const string16& access_token);
+                          const base::string16& access_token);
   virtual ~NetworkLocationProvider();
 
   // LocationProvider implementation
@@ -82,25 +82,25 @@ class NetworkLocationProvider
   // 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_;
@@ -111,7 +111,7 @@ class NetworkLocationProvider
 
   // 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_;
@@ -138,7 +138,7 @@ CONTENT_EXPORT LocationProviderBase* NewNetworkLocationProvider(
     AccessTokenStore* access_token_store,
     net::URLRequestContextGetter* context,
     const GURL& url,
-    const string16& access_token);
+    const base::string16& access_token);
 
 }  // namespace content