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

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

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 #include "content/browser/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/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 base::string16 MacAddressAsString16(const uint8 mac_as_int[6]) { 13 base::string16 MacAddressAsString16(const uint8 mac_as_int[6]) {
14 // mac_as_int is big-endian. Write in byte chunks. 14 // mac_as_int is big-endian. Write in byte chunks.
15 // Format is XX-XX-XX-XX-XX-XX. 15 // Format is XX-XX-XX-XX-XX-XX.
16 static const char* const kMacFormatString = 16 static const char* const kMacFormatString =
17 "%02x-%02x-%02x-%02x-%02x-%02x"; 17 "%02x-%02x-%02x-%02x-%02x-%02x";
18 return ASCIIToUTF16(base::StringPrintf(kMacFormatString, 18 return base::ASCIIToUTF16(base::StringPrintf(kMacFormatString,
19 mac_as_int[0], 19 mac_as_int[0],
20 mac_as_int[1], 20 mac_as_int[1],
21 mac_as_int[2], 21 mac_as_int[2],
22 mac_as_int[3], 22 mac_as_int[3],
23 mac_as_int[4], 23 mac_as_int[4],
24 mac_as_int[5])); 24 mac_as_int[5]));
25 } 25 }
26 26
27 WifiDataProviderCommon::WifiDataProviderCommon() 27 WifiDataProviderCommon::WifiDataProviderCommon()
28 : is_first_scan_complete_(false), 28 : is_first_scan_complete_(false),
29 weak_factory_(this) { 29 weak_factory_(this) {
30 } 30 }
31 31
32 WifiDataProviderCommon::~WifiDataProviderCommon() { 32 WifiDataProviderCommon::~WifiDataProviderCommon() {
33 } 33 }
34 34
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 void WifiDataProviderCommon::ScheduleNextScan(int interval) { 82 void WifiDataProviderCommon::ScheduleNextScan(int interval) {
83 client_loop()->PostDelayedTask( 83 client_loop()->PostDelayedTask(
84 FROM_HERE, 84 FROM_HERE,
85 base::Bind(&WifiDataProviderCommon::DoWifiScanTask, 85 base::Bind(&WifiDataProviderCommon::DoWifiScanTask,
86 weak_factory_.GetWeakPtr()), 86 weak_factory_.GetWeakPtr()),
87 base::TimeDelta::FromMilliseconds(interval)); 87 base::TimeDelta::FromMilliseconds(interval));
88 } 88 }
89 89
90 } // namespace content 90 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698