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

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

Issue 2417043002: Move device/core files to device/base directory. (Closed)
Patch Set: Fix ChromeOS build Created 4 years, 2 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/BUILD.gn ('k') | device/test/test_device_client.h » ('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_win.h" 5 #include "device/serial/serial_io_handler_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <setupapi.h> 8 #include <setupapi.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/scoped_observer.h" 12 #include "base/scoped_observer.h"
13 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
14 #include "device/core/device_info_query_win.h" 14 #include "device/base/device_info_query_win.h"
15 #include "device/core/device_monitor_win.h" 15 #include "device/base/device_monitor_win.h"
16 #include "third_party/re2/src/re2/re2.h" 16 #include "third_party/re2/src/re2/re2.h"
17 17
18 namespace device { 18 namespace device {
19 19
20 namespace { 20 namespace {
21 21
22 int BitrateToSpeedConstant(int bitrate) { 22 int BitrateToSpeedConstant(int bitrate) {
23 #define BITRATE_TO_SPEED_CASE(x) \ 23 #define BITRATE_TO_SPEED_CASE(x) \
24 case x: \ 24 case x: \
25 return CBR_##x; 25 return CBR_##x;
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 std::string SerialIoHandler::MaybeFixUpPortName(const std::string& port_name) { 526 std::string SerialIoHandler::MaybeFixUpPortName(const std::string& port_name) {
527 // For COM numbers less than 9, CreateFile is called with a string such as 527 // For COM numbers less than 9, CreateFile is called with a string such as
528 // "COM1". For numbers greater than 9, a prefix of "\\\\.\\" must be added. 528 // "COM1". For numbers greater than 9, a prefix of "\\\\.\\" must be added.
529 if (port_name.length() > std::string("COM9").length()) 529 if (port_name.length() > std::string("COM9").length())
530 return std::string("\\\\.\\").append(port_name); 530 return std::string("\\\\.\\").append(port_name);
531 531
532 return port_name; 532 return port_name;
533 } 533 }
534 534
535 } // namespace device 535 } // namespace device
OLDNEW
« no previous file with comments | « device/serial/BUILD.gn ('k') | device/test/test_device_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698