Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(837)

Unified Diff: content/browser/geolocation/wifi_data_provider.cc

Issue 486203004: Clean up WifiDataProvider(Manager) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't delete the DCHECK Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/geolocation/wifi_data_provider.cc
diff --git a/content/browser/geolocation/wifi_data_provider.cc b/content/browser/geolocation/wifi_data_provider.cc
index 497747db5bf5a039027df0595a6d85bc59efcd4c..cd739e7fb7cb7037df167d1291d9d172bcab0696 100644
--- a/content/browser/geolocation/wifi_data_provider.cc
+++ b/content/browser/geolocation/wifi_data_provider.cc
@@ -7,17 +7,13 @@
namespace content {
WifiDataProvider::WifiDataProvider()
- : container_(NULL), client_loop_(base::MessageLoop::current()) {
+ : client_loop_(base::MessageLoop::current()) {
DCHECK(client_loop_);
}
WifiDataProvider::~WifiDataProvider() {
}
-void WifiDataProvider::SetContainer(WifiDataProviderManager* container) {
- container_ = container;
-}
-
void WifiDataProvider::AddCallback(WifiDataUpdateCallback* callback) {
callbacks_.insert(callback);
}
@@ -44,13 +40,13 @@ base::MessageLoop* WifiDataProvider::client_loop() const {
}
void WifiDataProvider::DoRunCallbacks() {
- // It's possible that all the callbacks (and the container) went away
- // whilst this task was pending. This is fine; the loop will be a no-op.
+ // It's possible that all the callbacks went away whilst this task was
+ // pending. This is fine; the loop will be a no-op.
CallbackSet::const_iterator iter = callbacks_.begin();
while (iter != callbacks_.end()) {
WifiDataUpdateCallback* callback = *iter;
++iter; // Advance iter before running, in case callback unregisters.
- callback->Run(container_);
+ callback->Run();
}
}
« no previous file with comments | « content/browser/geolocation/wifi_data_provider.h ('k') | content/browser/geolocation/wifi_data_provider_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698