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

Side by Side Diff: device/serial/serial_io_handler.cc

Issue 2031743005: Remove use of deprecated MessageLoop methods in device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « device/serial/data_source_sender.cc ('k') | device/test/usb_test_gadget_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/serial/serial_io_handler.h" 5 #include "device/serial/serial_io_handler.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/location.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 15
16 #if defined(OS_CHROMEOS) 16 #if defined(OS_CHROMEOS)
17 #include "chromeos/dbus/dbus_thread_manager.h" 17 #include "chromeos/dbus/dbus_thread_manager.h"
18 #include "chromeos/dbus/permission_broker_client.h" 18 #include "chromeos/dbus/permission_broker_client.h"
19 #include "dbus/file_descriptor.h" // nogncheck 19 #include "dbus/file_descriptor.h" // nogncheck
20 #endif // defined(OS_CHROMEOS) 20 #endif // defined(OS_CHROMEOS)
21 21
22 namespace device { 22 namespace device {
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 } 275 }
276 276
277 bool SerialIoHandler::ConfigurePort(const serial::ConnectionOptions& options) { 277 bool SerialIoHandler::ConfigurePort(const serial::ConnectionOptions& options) {
278 MergeConnectionOptions(options); 278 MergeConnectionOptions(options);
279 return ConfigurePortImpl(); 279 return ConfigurePortImpl();
280 } 280 }
281 281
282 void SerialIoHandler::QueueReadCompleted(int bytes_read, 282 void SerialIoHandler::QueueReadCompleted(int bytes_read,
283 serial::ReceiveError error) { 283 serial::ReceiveError error) {
284 base::MessageLoop::current()->PostTask( 284 base::ThreadTaskRunnerHandle::Get()->PostTask(
285 FROM_HERE, 285 FROM_HERE,
286 base::Bind(&SerialIoHandler::ReadCompleted, this, bytes_read, error)); 286 base::Bind(&SerialIoHandler::ReadCompleted, this, bytes_read, error));
287 } 287 }
288 288
289 void SerialIoHandler::QueueWriteCompleted(int bytes_written, 289 void SerialIoHandler::QueueWriteCompleted(int bytes_written,
290 serial::SendError error) { 290 serial::SendError error) {
291 base::MessageLoop::current()->PostTask( 291 base::ThreadTaskRunnerHandle::Get()->PostTask(
292 FROM_HERE, 292 FROM_HERE,
293 base::Bind(&SerialIoHandler::WriteCompleted, this, bytes_written, error)); 293 base::Bind(&SerialIoHandler::WriteCompleted, this, bytes_written, error));
294 } 294 }
295 295
296 } // namespace device 296 } // namespace device
OLDNEW
« no previous file with comments | « device/serial/data_source_sender.cc ('k') | device/test/usb_test_gadget_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698