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

Issue 10392181: Implement serial API for Windows. (Closed)

Created:
8 years, 7 months ago by miket_OOO
Modified:
8 years, 6 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org
Visibility:
Public.

Description

Implement serial API for Windows. - Got it working using PlatformFile. - Noticed threading-constraint violations; refactored APIResourceController to allow for its resources to exist on different threads, depending on the resource type. - Wondered why I wasn't using PlatformFile for the POSIX version, which would have caused me to build the POSIX version on the file thread to being with. - Fixed that. - Once things were working, observed that serial was not yet using ArrayBuffer. Fixed that. - Simplified ExtensionService's relationship with APIResourceController. - Hardcode all platforms to set bitrate of 57600. BUG=129391, 129483 TEST=Widened scope of existing tests, manually tested with Arduino Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=139463

Patch Set 1 : \\.\COM%d #

Patch Set 2 : Fix weird Windows build error. #

Total comments: 13

Patch Set 3 : OSX/Win fixes and review feedback. #

Total comments: 1

Patch Set 4 : TerminalDevice -> FromCurrentPos #

Total comments: 2

Patch Set 5 : From -> At. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+500 lines, -255 lines) Patch
M base/platform_file.h View 1 2 3 4 3 chunks +31 lines, -20 lines 0 comments Download
M base/platform_file_posix.cc View 1 2 3 4 3 chunks +40 lines, -0 lines 0 comments Download
M base/platform_file_win.cc View 1 2 3 4 2 chunks +11 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/api_resource_controller.h View 2 chunks +18 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/api_resource_controller.cc View 3 2 chunks +71 lines, -18 lines 0 comments Download
M chrome/browser/extensions/api/serial/serial_api.h View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/extensions/api/serial/serial_api.cc View 3 7 chunks +42 lines, -54 lines 0 comments Download
M chrome/browser/extensions/api/serial/serial_apitest.cc View 2 chunks +10 lines, -12 lines 0 comments Download
M chrome/browser/extensions/api/serial/serial_connection.h View 2 chunks +6 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/serial/serial_connection.cc View 1 2 3 4 1 chunk +55 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/serial/serial_connection_posix.cc View 1 2 1 chunk +20 lines, -35 lines 0 comments Download
M chrome/browser/extensions/api/serial/serial_connection_win.cc View 1 1 chunk +23 lines, -27 lines 0 comments Download
M chrome/browser/extensions/api/serial/serial_port_enumerator_posix.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/serial/serial_port_enumerator_win.cc View 1 3 1 chunk +42 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/socket/socket_api.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/usb/usb_api.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_service.h View 3 chunks +2 lines, -4 lines 0 comments Download
chrome/browser/extensions/extension_service.cc View 1 2 3 2 chunks +7 lines, -17 lines 0 comments Download
M chrome/common/extensions/api/experimental_serial.idl View 2 chunks +3 lines, -7 lines 0 comments Download
M chrome/test/data/extensions/api_test/serial/api/background.js View 1 2 3 chunks +114 lines, -43 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
miket_OOO
8 years, 7 months ago (2012-05-24 19:32:51 UTC) #1
asargent_no_longer_on_chrome
As mentioned in person, let's think about possible race conditions at shutdown around accessing the ...
8 years, 7 months ago (2012-05-24 22:43:03 UTC) #2
miket_OOO
Changes made. On trybots now. http://codereview.chromium.org/10392181/diff/33003/chrome/browser/extensions/api/api_resource_controller.cc File chrome/browser/extensions/api/api_resource_controller.cc (right): http://codereview.chromium.org/10392181/diff/33003/chrome/browser/extensions/api/api_resource_controller.cc#newcode56 chrome/browser/extensions/api/api_resource_controller.cc:56: // same one that ...
8 years, 7 months ago (2012-05-24 23:44:43 UTC) #3
miket_OOO
Matt, added you as OWNER of base.
8 years, 7 months ago (2012-05-24 23:47:38 UTC) #4
Matt Perry
On 2012/05/24 23:47:38, miket wrote: > Matt, added you as OWNER of base. I'm not ...
8 years, 7 months ago (2012-05-24 23:53:04 UTC) #5
miket_OOO
On 2012/05/24 23:53:04, Matt Perry wrote: > On 2012/05/24 23:47:38, miket wrote: > > Matt, ...
8 years, 7 months ago (2012-05-25 14:48:45 UTC) #6
asargent_no_longer_on_chrome
Changes lgtm. I came up with a couple of ideas for solving the narrow shutdown ...
8 years, 7 months ago (2012-05-25 17:40:45 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miket@chromium.org/10392181/33025
8 years, 6 months ago (2012-05-29 16:29:42 UTC) #8
commit-bot: I haz the power
Presubmit check for 10392181-33025 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 6 months ago (2012-05-29 16:30:01 UTC) #9
miket_OOO
Darin, I need a base/ reviewer. Would you please?
8 years, 6 months ago (2012-05-29 16:32:33 UTC) #10
darin (slow to review)
https://chromiumcodereview.appspot.com/10392181/diff/33025/base/platform_file.h File base/platform_file.h (right): https://chromiumcodereview.appspot.com/10392181/diff/33025/base/platform_file.h#newcode131 base/platform_file.h:131: BASE_EXPORT int ReadPlatformFileTerminalDevice(PlatformFile file, nit: since the point of ...
8 years, 6 months ago (2012-05-29 19:04:33 UTC) #11
miket_OOO
> ReadPlatformFile{Stream,FromCurrentPos,FromCurrentPosition,WithoutSeeking} Done. Same number of characters, too. On trybots now.
8 years, 6 months ago (2012-05-29 20:04:06 UTC) #12
darin (slow to review)
https://chromiumcodereview.appspot.com/10392181/diff/29025/base/platform_file.h File base/platform_file.h (right): https://chromiumcodereview.appspot.com/10392181/diff/29025/base/platform_file.h#newcode148 base/platform_file.h:148: BASE_EXPORT int WritePlatformFileFromCurrentPos(PlatformFile file, nitty-nit: I forgot to consider ...
8 years, 6 months ago (2012-05-29 20:24:10 UTC) #13
miket_OOO
Updated. https://chromiumcodereview.appspot.com/10392181/diff/29025/base/platform_file.h File base/platform_file.h (right): https://chromiumcodereview.appspot.com/10392181/diff/29025/base/platform_file.h#newcode148 base/platform_file.h:148: BASE_EXPORT int WritePlatformFileFromCurrentPos(PlatformFile file, On 2012/05/29 20:24:10, darin ...
8 years, 6 months ago (2012-05-29 20:53:03 UTC) #14
darin (slow to review)
src/base/ <- LGTM
8 years, 6 months ago (2012-05-29 20:55:26 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miket@chromium.org/10392181/24104
8 years, 6 months ago (2012-05-29 21:16:46 UTC) #16
commit-bot: I haz the power
8 years, 6 months ago (2012-05-30 02:31:17 UTC) #17
Change committed as 139463

Powered by Google App Engine
This is Rietveld 408576698