| OLD | NEW |
| 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 "chrome/browser/geolocation/wifi_data_provider_common.h" | 5 #include "content/browser/geolocation/wifi_data_provider_common.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 | 8 |
| 9 string16 MacAddressAsString16(const uint8 mac_as_int[6]) { | 9 string16 MacAddressAsString16(const uint8 mac_as_int[6]) { |
| 10 // mac_as_int is big-endian. Write in byte chunks. | 10 // mac_as_int is big-endian. Write in byte chunks. |
| 11 // Format is XX-XX-XX-XX-XX-XX. | 11 // Format is XX-XX-XX-XX-XX-XX. |
| 12 static const wchar_t* const kMacFormatString = | 12 static const wchar_t* const kMacFormatString = |
| 13 L"%02x-%02x-%02x-%02x-%02x-%02x"; | 13 L"%02x-%02x-%02x-%02x-%02x-%02x"; |
| 14 return WideToUTF16(StringPrintf(kMacFormatString, | 14 return WideToUTF16(StringPrintf(kMacFormatString, |
| 15 mac_as_int[0], mac_as_int[1], mac_as_int[2], | 15 mac_as_int[0], mac_as_int[1], mac_as_int[2], |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 NotifyListeners(); | 93 NotifyListeners(); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 void WifiDataProviderCommon::ScheduleNextScan(int interval) { | 97 void WifiDataProviderCommon::ScheduleNextScan(int interval) { |
| 98 message_loop()->PostDelayedTask( | 98 message_loop()->PostDelayedTask( |
| 99 FROM_HERE, | 99 FROM_HERE, |
| 100 task_factory_.NewRunnableMethod(&WifiDataProviderCommon::DoWifiScanTask), | 100 task_factory_.NewRunnableMethod(&WifiDataProviderCommon::DoWifiScanTask), |
| 101 interval); | 101 interval); |
| 102 } | 102 } |
| OLD | NEW |