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

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

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: Created 4 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 #include "device/geolocation/wifi_data_provider_common.h" 5 #include "content/browser/geolocation/wifi_data_provider_common.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 12
13 namespace device { 13 namespace content {
14 14
15 base::string16 MacAddressAsString16(const uint8_t mac_as_int[6]) { 15 base::string16 MacAddressAsString16(const uint8_t mac_as_int[6]) {
16 // mac_as_int is big-endian. Write in byte chunks. 16 // mac_as_int is big-endian. Write in byte chunks.
17 // Format is XX-XX-XX-XX-XX-XX. 17 // Format is XX-XX-XX-XX-XX-XX.
18 static const char* const kMacFormatString = 18 static const char* const kMacFormatString =
19 "%02x-%02x-%02x-%02x-%02x-%02x"; 19 "%02x-%02x-%02x-%02x-%02x-%02x";
20 return base::ASCIIToUTF16(base::StringPrintf(kMacFormatString, 20 return base::ASCIIToUTF16(base::StringPrintf(kMacFormatString,
21 mac_as_int[0], 21 mac_as_int[0],
22 mac_as_int[1], 22 mac_as_int[1],
23 mac_as_int[2], 23 mac_as_int[2],
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 } 82 }
83 83
84 void WifiDataProviderCommon::ScheduleNextScan(int interval) { 84 void WifiDataProviderCommon::ScheduleNextScan(int interval) {
85 client_task_runner()->PostDelayedTask( 85 client_task_runner()->PostDelayedTask(
86 FROM_HERE, base::Bind(&WifiDataProviderCommon::DoWifiScanTask, 86 FROM_HERE, base::Bind(&WifiDataProviderCommon::DoWifiScanTask,
87 weak_factory_.GetWeakPtr()), 87 weak_factory_.GetWeakPtr()),
88 base::TimeDelta::FromMilliseconds(interval)); 88 base::TimeDelta::FromMilliseconds(interval));
89 } 89 }
90 90
91 } // namespace device 91 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698