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

Issue 10918255: The Windows portion of Native Messagaing (Closed)

Created:
8 years, 3 months ago by eaugusti
Modified:
7 years, 10 months ago
CC:
chromium-reviews, Aaron Boodman, erikwright+watch_chromium.org, mihaip-chromium-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

The Windows portion of Native Messagaing Native Messaging is a new api that allows extensions to communicate with registered hosts on the native machine. See these two documents for more information: https://docs.google.com/a/chromium.org/document/d/1sjmIO2rT6ZptB4O5WHu5C0oNCCIdPmCk7lnDGFi5Pm4/edit https://docs.google.com/a/chromium.org/document/d/1tDmeyo6hbAmuU5jYAAmKFt6YGBTVBc-5MHqaIOPa04E/edit BUG=142915

Patch Set 1 : #

Patch Set 2 : fixed bad merge #

Patch Set 3 : Linux merged up with Windows changes #

Patch Set 4 : #

Patch Set 5 : Windows is Ready #

Total comments: 16

Patch Set 6 : Less Sleepy #

Total comments: 19

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+507 lines, -334 lines) Patch
M base/process_util.h View 1 2 3 4 5 6 2 chunks +12 lines, -0 lines 0 comments Download
M base/process_util_win.cc View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/messaging/message_service.cc View 1 2 3 4 5 6 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_port.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host.h View 1 2 3 4 5 6 7 chunks +78 lines, -14 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host.cc View 1 2 3 4 5 6 9 chunks +88 lines, -42 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host_posix.cc View 1 2 3 4 5 2 chunks +27 lines, -7 lines 0 comments Download
A + chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc View 1 2 3 4 5 6 6 chunks +43 lines, -28 lines 0 comments Download
D chrome/browser/extensions/api/messaging/native_message_process_host_unittest_posix.cc View 1 2 3 4 5 6 1 chunk +0 lines, -182 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host_win.cc View 1 2 3 4 5 6 1 chunk +117 lines, -10 lines 0 comments Download
A + chrome/browser/extensions/api/messaging/native_messaging_apitest.cc View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc View 1 2 3 4 1 chunk +0 lines, -25 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_process_launcher_win.cc View 1 2 3 4 5 6 2 chunks +92 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/examples/extensions/native_messaging/README.txt View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
A + chrome/common/extensions/docs/examples/extensions/native_messaging/echo.bat View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/common/extensions/docs/examples/extensions/native_messaging/popup.js View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/native_messaging/test.js View 1 2 3 4 2 chunks +11 lines, -9 lines 0 comments Download
A + chrome/test/data/native_messaging/Native Hosts/echo.bat View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
A + chrome/test/data/native_messaging/Native Hosts/empty_app.bat View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Aaron Boodman
Matt, can you take this? (-self)
8 years, 2 months ago (2012-10-24 00:28:01 UTC) #1
Matt Perry
Is the CL description still accurate? http://codereview.chromium.org/10918255/diff/18001/base/process_util_win.cc File base/process_util_win.cc (right): http://codereview.chromium.org/10918255/diff/18001/base/process_util_win.cc#newcode351 base/process_util_win.cc:351: ::SetLastError(0); Is this ...
8 years, 2 months ago (2012-10-24 23:40:31 UTC) #2
eaugusti
The CL description is now correct :) Brettw, I see that you some of the ...
8 years, 1 month ago (2012-10-30 22:03:12 UTC) #3
Matt Perry
lgtm
8 years, 1 month ago (2012-10-30 22:59:52 UTC) #4
rvargas (doing something else)
I just skimmed through some of the files and there are some serious blockers. The ...
8 years ago (2012-11-29 01:19:23 UTC) #5
Sergey Ulanov
Thanks, Recardo. I've addressed some of your comments in crrev.com/11419267 . https://codereview.chromium.org/10918255/diff/43001/base/process_util.h File base/process_util.h (right): ...
8 years ago (2012-12-01 01:22:59 UTC) #6
rvargas (doing something else)
https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc File chrome/browser/extensions/api/messaging/native_process_launcher_win.cc (right): https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc#newcode58 chrome/browser/extensions/api/messaging/native_process_launcher_win.cc:58: NOTREACHED() << "Failed to create pipe"; On 2012/12/01 01:23:00, ...
8 years ago (2012-12-01 01:57:24 UTC) #7
Sergey Ulanov
https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc File chrome/browser/extensions/api/messaging/native_process_launcher_win.cc (right): https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc#newcode99 chrome/browser/extensions/api/messaging/native_process_launcher_win.cc:99: options.inherit_handles = true; On 2012/12/01 01:57:24, rvargas wrote: > ...
8 years ago (2012-12-04 23:50:43 UTC) #8
rvargas (doing something else)
https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc File chrome/browser/extensions/api/messaging/native_process_launcher_win.cc (right): https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc#newcode99 chrome/browser/extensions/api/messaging/native_process_launcher_win.cc:99: options.inherit_handles = true; On 2012/12/04 23:50:43, sergeyu wrote: > ...
8 years ago (2012-12-05 20:59:05 UTC) #9
rvargas (doing something else)
https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc File chrome/browser/extensions/api/messaging/native_process_launcher_win.cc (right): https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc#newcode99 chrome/browser/extensions/api/messaging/native_process_launcher_win.cc:99: options.inherit_handles = true; > Yeah, that's a pain in ...
8 years ago (2012-12-06 19:15:06 UTC) #10
eaugusti
On 2012/12/06 19:15:06, rvargas wrote: > https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc > File chrome/browser/extensions/api/messaging/native_process_launcher_win.cc > (right): > > https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc#newcode99 ...
8 years ago (2012-12-06 23:22:45 UTC) #11
eaugusti
I merged in sergeyu process_util cl. https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/message_service.cc File chrome/browser/extensions/api/messaging/message_service.cc (right): https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/message_service.cc#newcode219 chrome/browser/extensions/api/messaging/message_service.cc:219: content::BrowserThread::IO, Because Windows' ...
8 years ago (2012-12-07 02:21:07 UTC) #12
jschuh
On 2012/12/06 23:22:45, eaugusti wrote: > On 2012/12/06 19:15:06, rvargas wrote: > > > https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc ...
8 years ago (2012-12-08 00:59:00 UTC) #13
rvargas (doing something else)
8 years ago (2012-12-12 00:20:22 UTC) #14
https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions...
File chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
(right):

https://codereview.chromium.org/10918255/diff/43001/chrome/browser/extensions...
chrome/browser/extensions/api/messaging/native_process_launcher_win.cc:58:
NOTREACHED() << "Failed to create pipe";
> What about using a DPLOG?
> It makes sense not to use NOTREACHED() because it is used to catch programmer
> errors, and not system errors. My main concern is that something happens on
some
> trybot and someone is left without any indication of what failed in the this
> sequence of system calls.
> 
> Is the bloat an issue here? (Forgive my ignorance, I though D*LOG was pretty
> cheap).

You may be surprised by the amount of code inserted by a log... definitely looks
more innocuous than what it is.

D(P)LOGs are ok, but I would log once from the caller as opposed to adding 5 log
points from this code.

Powered by Google App Engine
This is Rietveld 408576698