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

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

Issue 7046114: Remove content dependency on chrome/browser/accessibility/browser_accessibility_state.h and chrom... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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) 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 #include "content/browser/geolocation/gateway_data_provider_win.h" 5 #include "content/browser/geolocation/gateway_data_provider_win.h"
6 6
7 #include <iphlpapi.h> 7 #include <iphlpapi.h>
8 #include <winsock2.h> 8 #include <winsock2.h>
9 9
10 #include <set> 10 #include <set>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/common/chrome_switches.h"
15 #include "content/browser/geolocation/empty_device_data_provider.h" 14 #include "content/browser/geolocation/empty_device_data_provider.h"
15 #include "content/common/content_switches.h"
16 16
17 namespace { 17 namespace {
18 18
19 string16 MacAsString16(const uint8 mac_as_int[6]) { 19 string16 MacAsString16(const uint8 mac_as_int[6]) {
20 // mac_as_int is big-endian. Write in byte chunks. 20 // mac_as_int is big-endian. Write in byte chunks.
21 // Format is XX-XX-XX-XX-XX-XX. 21 // Format is XX-XX-XX-XX-XX-XX.
22 static const wchar_t* const kMacFormatString = 22 static const wchar_t* const kMacFormatString =
23 L"%02x-%02x-%02x-%02x-%02x-%02x"; 23 L"%02x-%02x-%02x-%02x-%02x-%02x";
24 return WideToUTF16(StringPrintf(kMacFormatString, 24 return WideToUTF16(StringPrintf(kMacFormatString,
25 mac_as_int[0], mac_as_int[1], 25 mac_as_int[0], mac_as_int[1],
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 WinGatewayDataProvider::~WinGatewayDataProvider() { 107 WinGatewayDataProvider::~WinGatewayDataProvider() {
108 } 108 }
109 109
110 template<> 110 template<>
111 GatewayDataProviderImplBase* GatewayDataProvider::DefaultFactoryFunction() { 111 GatewayDataProviderImplBase* GatewayDataProvider::DefaultFactoryFunction() {
112 if (!CommandLine::ForCurrentProcess() 112 if (!CommandLine::ForCurrentProcess()
113 ->HasSwitch(switches::kExperimentalLocationFeatures)) 113 ->HasSwitch(switches::kExperimentalLocationFeatures))
114 return new EmptyDeviceDataProvider<GatewayData>(); 114 return new EmptyDeviceDataProvider<GatewayData>();
115 return new WinGatewayDataProvider(); 115 return new WinGatewayDataProvider();
116 } 116 }
OLDNEW
« no previous file with comments | « content/browser/geolocation/gateway_data_provider_linux.cc ('k') | content/browser/geolocation/win7_location_api_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698