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

Side by Side Diff: chrome/browser/geolocation/wifi_data_provider_chromeos.cc

Issue 11887008: Deprecate ShillNetworkClient and add GeolocationHandler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
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 // Provides wifi scan API binding for chromeos, using proprietary APIs. 5 // Provides wifi scan API binding for chromeos, using proprietary APIs.
6 6
7 #include "chrome/browser/geolocation/wifi_data_provider_chromeos.h" 7 #include "chrome/browser/geolocation/wifi_data_provider_chromeos.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 : network_library_(lib) { 69 : network_library_(lib) {
70 DCHECK(network_library_ != NULL); 70 DCHECK(network_library_ != NULL);
71 } 71 }
72 72
73 NetworkLibraryWlanApi::~NetworkLibraryWlanApi() { 73 NetworkLibraryWlanApi::~NetworkLibraryWlanApi() {
74 } 74 }
75 75
76 bool NetworkLibraryWlanApi::GetAccessPointData( 76 bool NetworkLibraryWlanApi::GetAccessPointData(
77 WifiData::AccessPointDataSet* result) { 77 WifiData::AccessPointDataSet* result) {
78 WifiAccessPointVector access_points; 78 WifiAccessPointVector access_points;
79 if (!network_library_->GetWifiAccessPoints(&access_points)) 79 // TODO(stevenjb): Re-implement this with ne network handlers.
Greg Spencer (Chromium) 2013/01/12 00:52:37 ne->new Also, what ultimately depends on this inf
stevenjb 2013/01/12 01:55:59 This is part 1/2 of the fix. I added the issue to
80 return false; 80 // (This code has been broken since switching to Shill).
81 for (WifiAccessPointVector::const_iterator i = access_points.begin(); 81 return false;
82 i != access_points.end(); ++i) {
83 AccessPointData ap_data;
84 ap_data.mac_address = ASCIIToUTF16(i->mac_address);
85 ap_data.radio_signal_strength = i->signal_strength;
86 ap_data.channel = i->channel;
87 ap_data.signal_to_noise = i->signal_to_noise;
88 ap_data.ssid = UTF8ToUTF16(i->name);
89 result->insert(ap_data);
90 }
91 return !result->empty() || network_library_->wifi_enabled();
92 } 82 }
93 83
94 } // namespace 84 } // namespace
95 } // namespace chromeos 85 } // namespace chromeos
96 86
97 WifiDataProviderChromeOs::WifiDataProviderChromeOs() : started_(false) { 87 WifiDataProviderChromeOs::WifiDataProviderChromeOs() : started_(false) {
98 } 88 }
99 89
100 WifiDataProviderChromeOs::~WifiDataProviderChromeOs() { 90 WifiDataProviderChromeOs::~WifiDataProviderChromeOs() {
101 } 91 }
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 DCHECK(CalledOnClientThread()); 229 DCHECK(CalledOnClientThread());
240 DCHECK(!started_); 230 DCHECK(!started_);
241 started_ = true; 231 started_ = true;
242 // Perform first scan ASAP regardless of the polling policy. If this scan 232 // Perform first scan ASAP regardless of the polling policy. If this scan
243 // fails we'll retry at a rate in line with the polling policy. 233 // fails we'll retry at a rate in line with the polling policy.
244 BrowserThread::PostTask( 234 BrowserThread::PostTask(
245 BrowserThread::UI, 235 BrowserThread::UI,
246 FROM_HERE, 236 FROM_HERE,
247 base::Bind(&WifiDataProviderChromeOs::DoStartTaskOnUIThread, this)); 237 base::Bind(&WifiDataProviderChromeOs::DoStartTaskOnUIThread, this));
248 } 238 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698