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

Issue 591463003: Remote Assistance on Chrome OS Part III - NativeMessageHost (Closed)

Created:
6 years, 3 months ago by kelvinp
Modified:
5 years, 10 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@native_messaging
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remote Assistance on Chrome OS Part III - NativeMessageHost This CL extracts the NativeMessageHost interface from the NativeMessageProcessHost A NativeMessageHost hosts a native component, which can be running in the same process as chrome or in a separate process. Committed: https://crrev.com/ba722a2a8ddf967dcadb483ea32d5ad31fc4bdf6 Cr-Commit-Position: refs/heads/master@{#298366} Committed: https://crrev.com/3b73f509613829b8b0719ee739292228a83c00ac Cr-Commit-Position: refs/heads/master@{#298579}

Patch Set 1 : #

Total comments: 24

Patch Set 2 : Address Sergey's feedback #

Total comments: 16

Patch Set 3 : #

Total comments: 25

Patch Set 4 : #

Total comments: 10

Patch Set 5 : Add NativeMessagePort::Core #

Total comments: 29

Patch Set 6 : #

Total comments: 1

Patch Set 7 : Rebase on ToT #

Total comments: 4

Patch Set 8 : Fix compile error #

Total comments: 4

Patch Set 9 : Fix browser test errors #

Patch Set 10 : Fix merge error with s/OVERRIDE/override #

Patch Set 11 : Fix GN linker error #

Patch Set 12 : Rebase on ToT #

Patch Set 13 : Debug build bots failure #

Patch Set 14 : Fix NativeMessagingBasic test on Release builds #

Unified diffs Side-by-side diffs Delta from patch set Stats (+753 lines, -309 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +9 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/messaging/message_service.h View 1 2 3 4 5 6 7 8 9 4 chunks +13 lines, -10 lines 0 comments Download
M chrome/browser/extensions/api/messaging/message_service.cc View 1 2 3 4 5 6 7 8 6 chunks +54 lines, -18 lines 0 comments Download
A chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +149 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_port.h View 1 2 3 4 5 6 7 8 9 1 chunk +18 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_port.cc View 1 2 3 4 5 1 chunk +101 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host.h View 1 2 3 4 5 6 7 8 9 6 chunks +14 lines, -49 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host.cc View 1 2 3 4 5 6 7 8 14 chunks +43 lines, -94 lines 0 comments Download
M chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc View 1 2 3 4 5 6 7 8 9 11 chunks +54 lines, -38 lines 0 comments Download
M chrome/browser/policy/policy_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +7 lines, -7 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 3 chunks +7 lines, -6 lines 0 comments Download
M chrome/test/data/extensions/api_test/native_messaging/test.js View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -5 lines 0 comments Download
M extensions/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
A extensions/browser/api/messaging/native_message_host.h View 1 2 3 4 5 6 7 8 1 chunk +62 lines, -0 lines 0 comments Download
A extensions/browser/api/messaging/native_message_host.cc View 1 2 3 4 5 6 7 8 1 chunk +21 lines, -0 lines 0 comments Download
M extensions/common/switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M extensions/extensions.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M remoting/host/it2me/com.google.chrome.remote_assistance.json.jinja2 View 1 1 chunk +3 lines, -0 lines 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host.h View 1 2 3 4 5 6 7 8 9 2 chunks +17 lines, -22 lines 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host.cc View 1 2 3 4 5 6 7 8 11 chunks +29 lines, -31 lines 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host_main.cc View 1 2 3 4 5 2 chunks +12 lines, -3 lines 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host_unittest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +20 lines, -13 lines 0 comments Download
A remoting/host/native_messaging/native_messaging_pipe.h View 1 2 3 4 5 6 7 8 9 1 chunk +50 lines, -0 lines 0 comments Download
A remoting/host/native_messaging/native_messaging_pipe.cc View 1 2 3 4 1 chunk +52 lines, -0 lines 0 comments Download
M remoting/remoting_host.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 73 (31 generated)
kelvinp
Proof of concept only. The code does not compile.
6 years, 3 months ago (2014-09-19 20:48:22 UTC) #2
kelvinp
On 2014/09/19 20:48:22, kelvinp wrote: > Proof of concept only. The code does not compile. ...
6 years, 3 months ago (2014-09-19 23:40:54 UTC) #5
Sergey Ulanov
In case you plan to land this before M39 branch you also need to add ...
6 years, 3 months ago (2014-09-22 23:42:59 UTC) #7
kelvinp
PTAL https://codereview.chromium.org/591463003/diff/20001/chrome/browser/extensions/api/messaging/message_service.h File chrome/browser/extensions/api/messaging/message_service.h (right): https://codereview.chromium.org/591463003/diff/20001/chrome/browser/extensions/api/messaging/message_service.h#newcode157 chrome/browser/extensions/api/messaging/message_service.h:157: virtual void PostMessageFromNative(int port_id, On 2014/09/22 23:42:58, Sergey ...
6 years, 3 months ago (2014-09-23 20:16:42 UTC) #9
kelvinp
PTAL @yoz, can you help me to take a look at the changes on extensions/common/switches.cc/h ...
6 years, 3 months ago (2014-09-23 20:21:12 UTC) #11
Yoyo Zhou
switches LGTM
6 years, 3 months ago (2014-09-23 23:35:59 UTC) #12
Sergey Ulanov
https://codereview.chromium.org/591463003/diff/80001/chrome/browser/extensions/api/messaging/message_service.h File chrome/browser/extensions/api/messaging/message_service.h (right): https://codereview.chromium.org/591463003/diff/80001/chrome/browser/extensions/api/messaging/message_service.h#newcode169 chrome/browser/extensions/api/messaging/message_service.h:169: static PolicyPermission IsHostAllowed(const PrefService* pref_service, This doesn't really need ...
6 years, 3 months ago (2014-09-25 01:45:22 UTC) #13
kelvinp
PTAL https://codereview.chromium.org/591463003/diff/80001/chrome/browser/extensions/api/messaging/message_service.h File chrome/browser/extensions/api/messaging/message_service.h (right): https://codereview.chromium.org/591463003/diff/80001/chrome/browser/extensions/api/messaging/message_service.h#newcode169 chrome/browser/extensions/api/messaging/message_service.h:169: static PolicyPermission IsHostAllowed(const PrefService* pref_service, On 2014/09/25 01:45:21, ...
6 years, 2 months ago (2014-09-26 18:12:27 UTC) #14
Sergey Ulanov
https://codereview.chromium.org/591463003/diff/100001/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/591463003/diff/100001/chrome/browser/about_flags.cc#newcode1930 chrome/browser/about_flags.cc:1930: #endif Add // defined(OS_CHROMEOS) https://codereview.chromium.org/591463003/diff/100001/chrome/browser/extensions/api/messaging/OWNERS File chrome/browser/extensions/api/messaging/OWNERS (right): https://codereview.chromium.org/591463003/diff/100001/chrome/browser/extensions/api/messaging/OWNERS#newcode6 ...
6 years, 2 months ago (2014-09-27 00:24:10 UTC) #15
kelvinp
PTAL https://codereview.chromium.org/591463003/diff/100001/chrome/browser/about_flags.cc File chrome/browser/about_flags.cc (right): https://codereview.chromium.org/591463003/diff/100001/chrome/browser/about_flags.cc#newcode1930 chrome/browser/about_flags.cc:1930: #endif On 2014/09/27 00:24:10, Sergey Ulanov wrote: > ...
6 years, 2 months ago (2014-09-29 22:59:40 UTC) #16
Sergey Ulanov
https://codereview.chromium.org/591463003/diff/100001/remoting/host/native_messaging/native_messaging_pipe.h File remoting/host/native_messaging/native_messaging_pipe.h (right): https://codereview.chromium.org/591463003/diff/100001/remoting/host/native_messaging/native_messaging_pipe.h#newcode32 remoting/host/native_messaging/native_messaging_pipe.h:32: void Start(const base::Closure& quit_closure); On 2014/09/29 22:59:40, kelvinp wrote: ...
6 years, 2 months ago (2014-09-30 20:33:40 UTC) #17
kelvinp
PTAL https://codereview.chromium.org/591463003/diff/120001/chrome/browser/extensions/api/messaging/native_message_port.cc File chrome/browser/extensions/api/messaging/native_message_port.cc (right): https://codereview.chromium.org/591463003/diff/120001/chrome/browser/extensions/api/messaging/native_message_port.cc#newcode23 chrome/browser/extensions/api/messaging/native_message_port.cc:23: native_message_host_->set_client(weak_factory_.GetWeakPtr()); On 2014/09/30 20:33:39, Sergey Ulanov wrote: > ...
6 years, 2 months ago (2014-10-01 06:08:03 UTC) #19
Sergey Ulanov
https://codereview.chromium.org/591463003/diff/180001/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc File chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc (right): https://codereview.chromium.org/591463003/diff/180001/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc#newcode33 chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc:33: EchoHost() {} initialize client_ to NULL. https://codereview.chromium.org/591463003/diff/180001/chrome/browser/extensions/api/messaging/native_message_port.cc File chrome/browser/extensions/api/messaging/native_message_port.cc ...
6 years, 2 months ago (2014-10-01 23:23:59 UTC) #21
kelvinp
PTAL https://codereview.chromium.org/591463003/diff/180001/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc File chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc (right): https://codereview.chromium.org/591463003/diff/180001/chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc#newcode33 chrome/browser/extensions/api/messaging/native_message_host_chromeos.cc:33: EchoHost() {} On 2014/10/01 23:23:58, Sergey Ulanov wrote: ...
6 years, 2 months ago (2014-10-02 03:12:17 UTC) #23
Sergey Ulanov
lgtm when my comments are addressed https://codereview.chromium.org/591463003/diff/180001/chrome/browser/extensions/api/messaging/native_message_process_host.cc File chrome/browser/extensions/api/messaging/native_message_process_host.cc (right): https://codereview.chromium.org/591463003/diff/180001/chrome/browser/extensions/api/messaging/native_message_process_host.cc#newcode185 chrome/browser/extensions/api/messaging/native_message_process_host.cc:185: client_ = client; ...
6 years, 2 months ago (2014-10-02 23:09:59 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/591463003/230001
6 years, 2 months ago (2014-10-03 01:20:22 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/19994)
6 years, 2 months ago (2014-10-03 01:54:48 UTC) #28
Sergey Ulanov
https://codereview.chromium.org/591463003/diff/230001/remoting/host/it2me/it2me_native_messaging_host.cc File remoting/host/it2me/it2me_native_messaging_host.cc (right): https://codereview.chromium.org/591463003/diff/230001/remoting/host/it2me/it2me_native_messaging_host.cc#newcode80 remoting/host/it2me/it2me_native_messaging_host.cc:80: base::Value* message_value = base::JSONReader::Read(message); This won't be deleted if ...
6 years, 2 months ago (2014-10-03 17:55:47 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/591463003/270001
6 years, 2 months ago (2014-10-03 19:13:04 UTC) #34
Sergey Ulanov
Unchecked CQ bit because there is a bug. https://codereview.chromium.org/591463003/diff/270001/remoting/host/it2me/it2me_native_messaging_host.cc File remoting/host/it2me/it2me_native_messaging_host.cc (right): https://codereview.chromium.org/591463003/diff/270001/remoting/host/it2me/it2me_native_messaging_host.cc#newcode81 remoting/host/it2me/it2me_native_messaging_host.cc:81: make_scoped_ptr(base::JSONReader::Read(message))); ...
6 years, 2 months ago (2014-10-03 19:22:10 UTC) #36
kelvinp
PTAL pastarmov@ can you help me review the change on chrome/browser/policy/policy_browsertest.cc asvitkine@ can you help ...
6 years, 2 months ago (2014-10-06 04:37:26 UTC) #39
pastarmovj
chrome/browser/policy/policy_browsertest.cc - LGTM
6 years, 2 months ago (2014-10-06 09:15:39 UTC) #40
Alexei Svitkine (slow)
histograms lgtm
6 years, 2 months ago (2014-10-06 15:27:17 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/591463003/330001
6 years, 2 months ago (2014-10-06 17:05:56 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/22030)
6 years, 2 months ago (2014-10-06 17:33:03 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/591463003/350001
6 years, 2 months ago (2014-10-06 18:28:25 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: linux_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu_triggered_tests/builds/65063) android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/15581)
6 years, 2 months ago (2014-10-06 19:05:44 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/591463003/350001
6 years, 2 months ago (2014-10-06 19:59:58 UTC) #51
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years, 2 months ago (2014-10-06 23:23:17 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/591463003/350001
6 years, 2 months ago (2014-10-07 00:20:31 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/591463003/370001
6 years, 2 months ago (2014-10-07 00:33:39 UTC) #57
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years, 2 months ago (2014-10-07 02:42:10 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/591463003/370001
6 years, 2 months ago (2014-10-07 03:06:19 UTC) #61
commit-bot: I haz the power
Committed patchset #12 (id:370001) as 10e583165e5a45d032977cc25a2d11eb6f5f4dd0
6 years, 2 months ago (2014-10-07 04:18:02 UTC) #62
commit-bot: I haz the power
Patchset 12 (id:??) landed as https://crrev.com/ba722a2a8ddf967dcadb483ea32d5ad31fc4bdf6 Cr-Commit-Position: refs/heads/master@{#298366}
6 years, 2 months ago (2014-10-07 04:19:05 UTC) #63
hayato
It seems that ExtensionApiTest.NativeMessagingBasic and ExtensionApiTest.UserLevelNativeMessaging started to fail. http://build.chromium.org/p/chromium.webkit/builders/Linux%20ChromiumOS%20Tests%20%281%29 http://build.chromium.org/p/chromium.webkit/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/4549 http://build.chromium.org/p/chromium.webkit/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/4549/steps/browser_tests/logs/NativeMessagingBasic http://build.chromium.org/p/chromium.webkit/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/4549/steps/browser_tests/logs/UserLevelNativeMessaging Could you ...
6 years, 2 months ago (2014-10-07 05:57:21 UTC) #64
kelvinp
Not sure why the tests broke as it passed the trybots which run ChromeOS tests. ...
6 years, 2 months ago (2014-10-07 06:29:24 UTC) #65
hayato
Okay. Let me revert that. The revert patch is here: https://codereview.chromium.org/637463002
6 years, 2 months ago (2014-10-07 06:34:23 UTC) #66
hayato
FYI. It seems the revert has fixed the failures. http://build.chromium.org/p/chromium.webkit/builders/Linux%20ChromiumOS%20Tests%20%281%29 http://build.chromium.org/p/chromium.webkit/builders/Linux%20ChromiumOS%20Tests%20%281%29/builds/4557
6 years, 2 months ago (2014-10-07 08:40:35 UTC) #67
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/591463003/390001
6 years, 2 months ago (2014-10-07 19:07:15 UTC) #69
commit-bot: I haz the power
Committed patchset #13 (id:390001) as 41c42f80e66aad80a7006742b8fdef29190decc3
6 years, 2 months ago (2014-10-07 21:50:00 UTC) #70
commit-bot: I haz the power
6 years, 2 months ago (2014-10-07 21:50:46 UTC) #71
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/3b73f509613829b8b0719ee739292228a83c00ac
Cr-Commit-Position: refs/heads/master@{#298579}

Powered by Google App Engine
This is Rietveld 408576698