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

Side by Side Diff: components/proximity_auth/ble/proximity_auth_ble_system.cc

Issue 1169923009: Remove remaining use of the deprecated MessageLoopProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo. 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/proximity_auth/ble/proximity_auth_ble_system.h" 5 #include "components/proximity_auth/ble/proximity_auth_ble_system.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/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/thread_task_runner_handle.h"
11 #include "components/proximity_auth/ble/bluetooth_low_energy_connection.h" 11 #include "components/proximity_auth/ble/bluetooth_low_energy_connection.h"
12 #include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h " 12 #include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h "
13 #include "components/proximity_auth/ble/fake_wire_message.h" 13 #include "components/proximity_auth/ble/fake_wire_message.h"
14 #include "components/proximity_auth/connection.h" 14 #include "components/proximity_auth/connection.h"
15 #include "components/proximity_auth/remote_device.h" 15 #include "components/proximity_auth/remote_device.h"
16 #include "device/bluetooth/bluetooth_device.h" 16 #include "device/bluetooth/bluetooth_device.h"
17 #include "device/bluetooth/bluetooth_gatt_connection.h" 17 #include "device/bluetooth/bluetooth_gatt_connection.h"
18 18
19 namespace proximity_auth { 19 namespace proximity_auth {
20 20
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 VLOG(1) << "Polling stopped"; 176 VLOG(1) << "Polling stopped";
177 is_polling_screen_state_ = false; 177 is_polling_screen_state_ = false;
178 return; 178 return;
179 } 179 }
180 180
181 // Sends message requesting screen state. 181 // Sends message requesting screen state.
182 connection_->SendMessage( 182 connection_->SendMessage(
183 make_scoped_ptr(new FakeWireMessage(kPollScreenState))); 183 make_scoped_ptr(new FakeWireMessage(kPollScreenState)));
184 184
185 // Schedules the next message in |kPollingIntervalSeconds| ms. 185 // Schedules the next message in |kPollingIntervalSeconds| ms.
186 base::MessageLoopProxy::current()->PostDelayedTask( 186 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
187 FROM_HERE, base::Bind(&ProximityAuthBleSystem::StartPollingScreenState, 187 FROM_HERE, base::Bind(&ProximityAuthBleSystem::StartPollingScreenState,
188 weak_ptr_factory_.GetWeakPtr()), 188 weak_ptr_factory_.GetWeakPtr()),
189 base::TimeDelta::FromSeconds(kPollingIntervalSeconds)); 189 base::TimeDelta::FromSeconds(kPollingIntervalSeconds));
190 } 190 }
191 } 191 }
192 192
193 void ProximityAuthBleSystem::StopPollingScreenState() { 193 void ProximityAuthBleSystem::StopPollingScreenState() {
194 is_polling_screen_state_ = false; 194 is_polling_screen_state_ = false;
195 } 195 }
196 196
197 } // namespace proximity_auth 197 } // namespace proximity_auth
OLDNEW
« no previous file with comments | « chromecast/base/metrics/cast_metrics_helper.h ('k') | components/safe_json_parser/safe_json_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698