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

Side by Side Diff: content/browser/geolocation/device_data_provider.h

Issue 8956019: base::Bind: Remove includes of base.bind in header files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac fix. Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/custom_sync_call_context.cc ('k') | media/base/download_rate_monitor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A device data provider provides data from the device that is used by a 5 // A device data provider provides data from the device that is used by a
6 // NetworkLocationProvider to obtain a position fix. This data may be either 6 // NetworkLocationProvider to obtain a position fix. This data may be either
7 // cell radio data or wifi data. For a given type of data, we use a singleton 7 // cell radio data or wifi data. For a given type of data, we use a singleton
8 // instance of the device data provider, which is used by multiple 8 // instance of the device data provider, which is used by multiple
9 // NetworkLocationProvider objects. 9 // NetworkLocationProvider objects.
10 // 10 //
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 187
188 protected: 188 protected:
189 virtual ~DeviceDataProviderImplBase() { 189 virtual ~DeviceDataProviderImplBase() {
190 DCHECK(CalledOnClientThread()); 190 DCHECK(CalledOnClientThread());
191 } 191 }
192 192
193 // Calls DeviceDataUpdateAvailable() on all registered listeners. 193 // Calls DeviceDataUpdateAvailable() on all registered listeners.
194 typedef std::set<ListenerInterface*> ListenersSet; 194 typedef std::set<ListenerInterface*> ListenersSet;
195 void NotifyListeners() { 195 void NotifyListeners() {
196 // Always make the nitofy callback via a posted task, se we can unwind 196 // Always make the notify callback via a posted task, so we can unwind
197 // callstack here and make callback without causing client re-entrancy. 197 // callstack here and make callback without causing client re-entrancy.
198 client_loop_->PostTask(FROM_HERE, base::Bind( 198 client_loop_->PostTask(FROM_HERE, base::Bind(
199 &DeviceDataProviderImplBase<DataType>::NotifyListenersInClientLoop, 199 &DeviceDataProviderImplBase<DataType>::NotifyListenersInClientLoop,
200 this)); 200 this));
201 } 201 }
202 202
203 bool CalledOnClientThread() const { 203 bool CalledOnClientThread() const {
204 return MessageLoop::current() == this->client_loop_; 204 return MessageLoop::current() == this->client_loop_;
205 } 205 }
206 206
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 // The internal implementation. 361 // The internal implementation.
362 scoped_refptr<DeviceDataProviderImplBase<DataType> > impl_; 362 scoped_refptr<DeviceDataProviderImplBase<DataType> > impl_;
363 363
364 DISALLOW_COPY_AND_ASSIGN(DeviceDataProvider); 364 DISALLOW_COPY_AND_ASSIGN(DeviceDataProvider);
365 }; 365 };
366 366
367 typedef DeviceDataProvider<RadioData> RadioDataProvider; 367 typedef DeviceDataProvider<RadioData> RadioDataProvider;
368 typedef DeviceDataProvider<WifiData> WifiDataProvider; 368 typedef DeviceDataProvider<WifiData> WifiDataProvider;
369 369
370 #endif // CONTENT_BROWSER_GEOLOCATION_DEVICE_DATA_PROVIDER_H_ 370 #endif // CONTENT_BROWSER_GEOLOCATION_DEVICE_DATA_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome_frame/custom_sync_call_context.cc ('k') | media/base/download_rate_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698