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

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

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test build fix. Created 5 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
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/location.h"
9 #include "base/single_thread_task_runner.h"
8 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
10 12
11 namespace content { 13 namespace content {
12 14
13 base::string16 MacAddressAsString16(const uint8 mac_as_int[6]) { 15 base::string16 MacAddressAsString16(const uint8 mac_as_int[6]) {
14 // mac_as_int is big-endian. Write in byte chunks. 16 // mac_as_int is big-endian. Write in byte chunks.
15 // Format is XX-XX-XX-XX-XX-XX. 17 // Format is XX-XX-XX-XX-XX-XX.
16 static const char* const kMacFormatString = 18 static const char* const kMacFormatString =
17 "%02x-%02x-%02x-%02x-%02x-%02x"; 19 "%02x-%02x-%02x-%02x-%02x-%02x";
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 polling_policy_->UpdatePollingInterval(update_available); 75 polling_policy_->UpdatePollingInterval(update_available);
74 ScheduleNextScan(polling_policy_->PollingInterval()); 76 ScheduleNextScan(polling_policy_->PollingInterval());
75 } 77 }
76 if (update_available || !is_first_scan_complete_) { 78 if (update_available || !is_first_scan_complete_) {
77 is_first_scan_complete_ = true; 79 is_first_scan_complete_ = true;
78 RunCallbacks(); 80 RunCallbacks();
79 } 81 }
80 } 82 }
81 83
82 void WifiDataProviderCommon::ScheduleNextScan(int interval) { 84 void WifiDataProviderCommon::ScheduleNextScan(int interval) {
83 client_loop()->PostDelayedTask( 85 client_loop()->task_runner()->PostDelayedTask(
84 FROM_HERE, 86 FROM_HERE, base::Bind(&WifiDataProviderCommon::DoWifiScanTask,
85 base::Bind(&WifiDataProviderCommon::DoWifiScanTask, 87 weak_factory_.GetWeakPtr()),
86 weak_factory_.GetWeakPtr()),
87 base::TimeDelta::FromMilliseconds(interval)); 88 base::TimeDelta::FromMilliseconds(interval));
88 } 89 }
89 90
90 } // namespace content 91 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/wifi_data_provider.cc ('k') | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698