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

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

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 4 years, 12 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/serial_io_handler_win.h ('k') | device/serial/serial_service_impl.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/scoped_observer.h" 12 #include "base/scoped_observer.h"
12 #include "base/threading/thread_checker.h" 13 #include "base/threading/thread_checker.h"
13 #include "device/core/device_info_query_win.h" 14 #include "device/core/device_info_query_win.h"
14 #include "device/core/device_monitor_win.h" 15 #include "device/core/device_monitor_win.h"
15 #include "third_party/re2/src/re2/re2.h" 16 #include "third_party/re2/src/re2/re2.h"
16 17
17 namespace device { 18 namespace device {
18 19
19 namespace { 20 namespace {
20 21
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 std::string SerialIoHandler::MaybeFixUpPortName(const std::string& port_name) { 534 std::string SerialIoHandler::MaybeFixUpPortName(const std::string& port_name) {
534 // For COM numbers less than 9, CreateFile is called with a string such as 535 // For COM numbers less than 9, CreateFile is called with a string such as
535 // "COM1". For numbers greater than 9, a prefix of "\\\\.\\" must be added. 536 // "COM1". For numbers greater than 9, a prefix of "\\\\.\\" must be added.
536 if (port_name.length() > std::string("COM9").length()) 537 if (port_name.length() > std::string("COM9").length())
537 return std::string("\\\\.\\").append(port_name); 538 return std::string("\\\\.\\").append(port_name);
538 539
539 return port_name; 540 return port_name;
540 } 541 }
541 542
542 } // namespace device 543 } // namespace device
OLDNEW
« no previous file with comments | « device/serial/serial_io_handler_win.h ('k') | device/serial/serial_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698