From 1c4990d214fefa2dfcd154815f44891642181f37 Mon Sep 17 00:00:00 2001 From: "limasdf@gmail.com" Date: Mon, 10 Dec 2012 22:43:17 +0000 Subject: Current Serial port pattern in source cannot find proper port name. That's because in Windows, Serial Port name has COM%d pattern. So I modified from old pattern \\\\.\\COM%d to COM%d Dear Miket, This file, serial_port_enumerator_win.cc has GenerateValidPatterns() function, but Your TODO comment says that you will not use valid_patterns. So, what is your method to solve this?, if allowed to use valid_patterns(like serial_port_enumerator_posix.cc), I'd like to do write code using valid_patterns. and I totally understand that your dev-environment doesn't include 'Windows OS'. so i like to help you contribute about Chrome Serial API in Windows. This issue is http://code.google.com/p/chromium/issues/detail?id=154803 BUG=154803 Review URL: https://chromiumcodereview.appspot.com/11474005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172162 0039d316-1c4b-4281-b951-d872f2087c98 --- AUTHORS | 1 + chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index f980d1b..3b5ba76 100644 --- a/AUTHORS +++ b/AUTHORS @@ -211,3 +211,4 @@ Qiankun Miao Etienne Laurin Yang Gu Timo Reimann +Sungguk Lim \ No newline at end of file diff --git a/chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc b/chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc index 84817aa..94f8a3c 100644 --- a/chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc +++ b/chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc @@ -44,7 +44,7 @@ SerialPortEnumerator::GenerateValidSerialPortNames() { // to refactor this interface to make it more platform-independent. for (int port_number = 0; port_number < max_port_number; ++port_number) { string16 device_string16; - device_string16 = base::StringPrintf(L"\\\\.\\COM%d", port_number); + device_string16 = base::StringPrintf(L"COM%d", port_number); if (PassesCommConfigTest(device_string16)) { // Keep looking for new ports as long as we're finding them. int new_max_port_number = (port_number + 1) * 2; -- cgit v1.1