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

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

Issue 22866005: Remove threading from WifiDataProviderCommon. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CONTENT_BROWSER_GEOLOCATION_EMPTY_DEVICE_DATA_PROVIDER_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_EMPTY_DEVICE_DATA_PROVIDER_H_
6 #define CONTENT_BROWSER_GEOLOCATION_EMPTY_DEVICE_DATA_PROVIDER_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_EMPTY_DEVICE_DATA_PROVIDER_H_
7 7
8 #include "content/browser/geolocation/device_data_provider.h" 8 #include "content/browser/geolocation/device_data_provider.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 // An implementation of DeviceDataProviderImplBase that does not provide any 12 // An implementation of DeviceDataProviderImplBase that does not provide any
13 // data. Used on platforms where a given data type is not available. 13 // data. Used on platforms where a given data type is not available.
14 14
15 template<typename DataType> 15 template<typename DataType>
16 class EmptyDeviceDataProvider : public DeviceDataProviderImplBase<DataType> { 16 class EmptyDeviceDataProvider : public DeviceDataProviderImplBase<DataType> {
17 public: 17 public:
18 EmptyDeviceDataProvider() {} 18 EmptyDeviceDataProvider() {}
19 virtual ~EmptyDeviceDataProvider() {} 19 virtual ~EmptyDeviceDataProvider() {}
20 20
21 // DeviceDataProviderImplBase implementation 21 // DeviceDataProviderImplBase implementation
22 virtual bool StartDataProvider() { return true; } 22 virtual void StartDataProvider() { }
23 virtual void StopDataProvider() { } 23 virtual void StopDataProvider() { }
24 virtual bool GetData(DataType *data) { 24 virtual bool GetData(DataType *data) {
25 DCHECK(data); 25 DCHECK(data);
26 // This is all the data we can get - nothing. 26 // This is all the data we can get - nothing.
27 return true; 27 return true;
28 } 28 }
29 29
30 private: 30 private:
31 DISALLOW_COPY_AND_ASSIGN(EmptyDeviceDataProvider); 31 DISALLOW_COPY_AND_ASSIGN(EmptyDeviceDataProvider);
32 }; 32 };
33 33
34 } // namespace content 34 } // namespace content
35 35
36 #endif // CONTENT_BROWSER_GEOLOCATION_EMPTY_DEVICE_DATA_PROVIDER_H_ 36 #endif // CONTENT_BROWSER_GEOLOCATION_EMPTY_DEVICE_DATA_PROVIDER_H_
OLDNEW
« no previous file with comments | « content/browser/geolocation/device_data_provider.h ('k') | content/browser/geolocation/network_location_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698