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

Unified Diff: content/browser/geolocation/device_data_provider.h

Issue 6696022: Refactor WifiDataProviderChromeOs to implement WifiDataProviderImplBase directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use the geolocation thread Created 9 years, 9 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/device_data_provider.h
diff --git a/content/browser/geolocation/device_data_provider.h b/content/browser/geolocation/device_data_provider.h
index 1d1315192f3f586f69b8340c3059e28c34865d9d..514f377daad6039c50f92bd14b1198ffe3dd475a 100644
--- a/content/browser/geolocation/device_data_provider.h
+++ b/content/browser/geolocation/device_data_provider.h
@@ -180,7 +180,7 @@ template<typename DataType>
class DeviceDataProviderImplBase : public DeviceDataProviderImplBaseHack {
public:
DeviceDataProviderImplBase()
- : container_(NULL), client_loop_(MessageLoop::current()) {
+ : client_loop_(MessageLoop::current()), container_(NULL) {
DCHECK(client_loop_);
}
@@ -230,6 +230,10 @@ class DeviceDataProviderImplBase : public DeviceDataProviderImplBaseHack {
return MessageLoop::current() == this->client_loop_;
}
+ // Reference to the client's message loop, all callbacks and access to
+ // the listeners_ member should happen in this context.
+ MessageLoop* client_loop_;
stevenjb 2011/03/16 17:46:56 We shouldn't expose this publicly if we only need
John Knottenbelt 2011/03/16 18:20:14 Done.
+
private:
void NotifyListenersInClientLoop() {
DCHECK(CalledOnClientThread());
@@ -245,10 +249,6 @@ class DeviceDataProviderImplBase : public DeviceDataProviderImplBaseHack {
DeviceDataProvider<DataType>* container_;
- // Reference to the client's message loop, all callbacks and access to
- // the listeners_ member should happen in this context.
- MessageLoop* client_loop_;
-
ListenersSet listeners_;
DISALLOW_COPY_AND_ASSIGN(DeviceDataProviderImplBase);

Powered by Google App Engine
This is Rietveld 408576698