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

Side by Side Diff: content/browser/geolocation/wifi_data_provider_cast.cc

Issue 223583003: Exclude wifi_data_provider_linux.cc for chromecast build as chromecast uses wpa_supplicant instead … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add chromecast-specific content port implementation. Created 6 years, 8 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/geolocation/wifi_data_provider_cast.h"
6
7 namespace content {
8
9 namespace {
10
11 // The time periods between successive polls of the wifi data.
12 const int kDefaultPollingIntervalMS = 10 * 1000; // 10 secs.
13 const int kNoChangePollingIntervalMS = 2 * 60 * 1000; // 2 mins.
14 const int kTwoNoChangePollingIntervalMS = 60 * 60 * 1000; // 1 hours.
15 const int kNoWifiPollingIntervalMS = 20 * 1000; // 20 secs.
16
17 // TODO(lcwu): A place holder for the actual implementation on Chromecast that
18 // uses wpa_supplicant.
19 class WpaSupplicantWlanApi
20 : public WifiDataProviderCommon::WlanApiInterface {
21 public:
22 WpaSupplicantWlanApi();
23 virtual ~WpaSupplicantWlanApi();
24
25 // WifiDataProviderCommon::WlanApiInterface
26 virtual bool GetAccessPointData(
27 WifiData::AccessPointDataSet* data) OVERRIDE;
28
29 private:
30 DISALLOW_COPY_AND_ASSIGN(WpaSupplicantWlanApi);
31 };
32
33 WpaSupplicantWlanApi::WpaSupplicantWlanApi() {
34 }
35
36 WpaSupplicantWlanApi::~WpaSupplicantWlanApi() {
37 }
38
39 bool WpaSupplicantWlanApi::GetAccessPointData(
40 WifiData::AccessPointDataSet* data) {
41 return true;
42 }
43
44 } // namespace
45
46 // static
47 WifiDataProviderImplBase* WifiDataProvider::DefaultFactoryFunction() {
48 return new WifiDataProviderCast();
49 }
50
51 WifiDataProviderCast::WifiDataProviderCast() {
52 }
53
54 WifiDataProviderCast::~WifiDataProviderCast() {
55 }
56
57 WifiDataProviderCommon::WlanApiInterface*
58 WifiDataProviderCast::NewWlanApi() {
59 return new WpaSupplicantWlanApi();
60 }
61
62 WifiPollingPolicy* WifiDataProviderCast::NewPollingPolicy() {
63 return new GenericWifiPollingPolicy<kDefaultPollingIntervalMS,
64 kNoChangePollingIntervalMS,
65 kTwoNoChangePollingIntervalMS,
66 kNoWifiPollingIntervalMS>;
67 }
68
69 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698