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

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

Issue 24041003: Geolocation: move polling policy to its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix whitespace. Created 7 years, 3 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Windows Vista uses the Native Wifi (WLAN) API for accessing WiFi cards. See 5 // Windows Vista uses the Native Wifi (WLAN) API for accessing WiFi cards. See
6 // http://msdn.microsoft.com/en-us/library/ms705945(VS.85).aspx. Windows XP 6 // http://msdn.microsoft.com/en-us/library/ms705945(VS.85).aspx. Windows XP
7 // Service Pack 3 (and Windows XP Service Pack 2, if upgraded with a hot fix) 7 // Service Pack 3 (and Windows XP Service Pack 2, if upgraded with a hot fix)
8 // also support a limited version of the WLAN API. See 8 // also support a limited version of the WLAN API. See
9 // http://msdn.microsoft.com/en-us/library/bb204766.aspx. The WLAN API uses 9 // http://msdn.microsoft.com/en-us/library/bb204766.aspx. The WLAN API uses
10 // wlanapi.h, which is not part of the SDK used by Gears, so is replicated 10 // wlanapi.h, which is not part of the SDK used by Gears, so is replicated
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 WifiDataProviderCommon::WlanApiInterface* Win32WifiDataProvider::NewWlanApi() { 171 WifiDataProviderCommon::WlanApiInterface* Win32WifiDataProvider::NewWlanApi() {
172 // Use the WLAN interface if we're on Vista and if it's available. Otherwise, 172 // Use the WLAN interface if we're on Vista and if it's available. Otherwise,
173 // use NDIS. 173 // use NDIS.
174 WlanApiInterface* api = WindowsWlanApi::Create(); 174 WlanApiInterface* api = WindowsWlanApi::Create();
175 if (api) { 175 if (api) {
176 return api; 176 return api;
177 } 177 }
178 return WindowsNdisApi::Create(); 178 return WindowsNdisApi::Create();
179 } 179 }
180 180
181 PollingPolicyInterface* Win32WifiDataProvider::NewPollingPolicy() { 181 WifiPollingPolicy* Win32WifiDataProvider::NewPollingPolicy() {
182 return new GenericPollingPolicy<kDefaultPollingInterval, 182 return new GenericWifiPollingPolicy<kDefaultPollingInterval,
183 kNoChangePollingInterval, 183 kNoChangePollingInterval,
184 kTwoNoChangePollingInterval, 184 kTwoNoChangePollingInterval,
185 kNoWifiPollingIntervalMilliseconds>; 185 kNoWifiPollingIntervalMilliseconds>;
186 } 186 }
187 187
188 // Local classes and functions 188 // Local classes and functions
189 namespace { 189 namespace {
190 190
191 // WindowsWlanApi 191 // WindowsWlanApi
192 WindowsWlanApi::WindowsWlanApi(HINSTANCE library) 192 WindowsWlanApi::WindowsWlanApi(HINSTANCE library)
193 : library_(library) { 193 : library_(library) {
194 GetWLANFunctions(library_); 194 GetWLANFunctions(library_);
195 } 195 }
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 630
631 if (*path->rbegin() != L'\\') { 631 if (*path->rbegin() != L'\\') {
632 path->append(L"\\"); 632 path->append(L"\\");
633 } 633 }
634 DCHECK_EQ(L'\\', *path->rbegin()); 634 DCHECK_EQ(L'\\', *path->rbegin());
635 return true; 635 return true;
636 } 636 }
637 } // namespace 637 } // namespace
638 638
639 } // namespace content 639 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/wifi_data_provider_win.h ('k') | content/browser/geolocation/wifi_polling_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698