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

Issue 1272833002: Pass error messages from native messaging to web-app. (Closed)

Created:
5 years, 4 months ago by Jamie
Modified:
5 years, 4 months ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Pass error messages from native messaging to web-app. This replaces a single onDone(result) callback with a pair (onDone(), onError(message, location)). The error message and location are communicated via native messaging as additional parameters, which should ensure backwards-compatibility in both directions. BUG=517176 Committed: https://crrev.com/a1826488343b1923906c2b8bbd194eef51cfda26 Cr-Commit-Position: refs/heads/master@{#344622}

Patch Set 1 #

Patch Set 2 : Mac implementation. #

Patch Set 3 : Fix start_host. #

Total comments: 4

Patch Set 4 : Fixed unit tests. #

Total comments: 6

Patch Set 5 : Implement LogMessageHandler to pass native messaging logs to web-app. #

Patch Set 6 : Added IT2Me support. #

Total comments: 25

Patch Set 7 : Reviewer feedback. #

Patch Set 8 : Use a bare pointer for the LogMessageHandler global. #

Patch Set 9 : Rebase and compilation error fix. #

Total comments: 6

Patch Set 10 : Review feedback. #

Patch Set 11 : Fixed compilation on ChromeOS. #

Patch Set 12 : Fix unit tests. #

Total comments: 4

Patch Set 13 : Reviewer feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+343 lines, -44 lines) Patch
M remoting/host/it2me/it2me_native_messaging_host.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +11 lines, -1 line 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -1 line 0 comments Download
M remoting/host/it2me/it2me_native_messaging_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +31 lines, -22 lines 0 comments Download
A remoting/host/native_messaging/log_message_handler.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +46 lines, -0 lines 0 comments Download
A remoting/host/native_messaging/log_message_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +132 lines, -0 lines 0 comments Download
M remoting/host/setup/me2me_native_messaging_host.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M remoting/host/setup/me2me_native_messaging_host.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M remoting/host/setup/me2me_native_messaging_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +29 lines, -20 lines 0 comments Download
M remoting/remoting_host_srcs.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M remoting/remoting_webapp_files.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M remoting/webapp/crd/js/host_daemon_facade.js View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M remoting/webapp/crd/js/it2me_host_facade.js View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
A remoting/webapp/crd/js/native_message_host_log_message_handler.js View 1 2 3 4 5 6 1 chunk +59 lines, -0 lines 0 comments Download
M remoting/webapp/files.gni View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 32 (9 generated)
Jamie
This is not complete yet (it needs implementing on Mac and Windows, and there are ...
5 years, 4 months ago (2015-08-05 22:27:28 UTC) #2
Sergey Ulanov
If the goal is just to get the errors in the JS console then another ...
5 years, 4 months ago (2015-08-06 22:40:57 UTC) #3
Jamie
Regarding echoing the logs, that might be useful in addition to this, but I don't ...
5 years, 4 months ago (2015-08-06 23:06:17 UTC) #4
Sergey Ulanov
I don't like separate callbacks for success and error. It adds more boilerplate code and ...
5 years, 4 months ago (2015-08-08 00:57:10 UTC) #5
Jamie
I decided to take your previous advice and just send log messages to the web-app. ...
5 years, 4 months ago (2015-08-11 21:23:13 UTC) #6
Jamie
On 2015/08/11 21:23:13, Jamie wrote: > I decided to take your previous advice and just ...
5 years, 4 months ago (2015-08-14 18:25:11 UTC) #7
Sergey Ulanov
https://codereview.chromium.org/1272833002/diff/100001/remoting/host/it2me/it2me_native_messaging_host.cc File remoting/host/it2me/it2me_native_messaging_host.cc (right): https://codereview.chromium.org/1272833002/diff/100001/remoting/host/it2me/it2me_native_messaging_host.cc#newcode118 remoting/host/it2me/it2me_native_messaging_host.cc:118: log_message_handler_.reset( This should be disabled on ChromeOS. We don't ...
5 years, 4 months ago (2015-08-16 23:22:03 UTC) #8
Jamie
PTAL https://codereview.chromium.org/1272833002/diff/100001/remoting/host/it2me/it2me_native_messaging_host.cc File remoting/host/it2me/it2me_native_messaging_host.cc (right): https://codereview.chromium.org/1272833002/diff/100001/remoting/host/it2me/it2me_native_messaging_host.cc#newcode118 remoting/host/it2me/it2me_native_messaging_host.cc:118: log_message_handler_.reset( On 2015/08/16 23:22:02, Sergey Ulanov wrote: > ...
5 years, 4 months ago (2015-08-17 17:32:24 UTC) #9
Sergey Ulanov
https://codereview.chromium.org/1272833002/diff/100001/remoting/host/native_messaging/log_message_handler.cc File remoting/host/native_messaging/log_message_handler.cc (right): https://codereview.chromium.org/1272833002/diff/100001/remoting/host/native_messaging/log_message_handler.cc#newcode58 remoting/host/native_messaging/log_message_handler.cc:58: if (g_log_message_handler.Get()) { On 2015/08/17 17:32:23, Jamie wrote: > ...
5 years, 4 months ago (2015-08-17 21:01:16 UTC) #10
Jamie
PTAL https://codereview.chromium.org/1272833002/diff/100001/remoting/host/native_messaging/log_message_handler.cc File remoting/host/native_messaging/log_message_handler.cc (right): https://codereview.chromium.org/1272833002/diff/100001/remoting/host/native_messaging/log_message_handler.cc#newcode58 remoting/host/native_messaging/log_message_handler.cc:58: if (g_log_message_handler.Get()) { On 2015/08/17 21:01:16, Sergey Ulanov ...
5 years, 4 months ago (2015-08-17 21:23:35 UTC) #11
Sergey Ulanov
lgtm https://codereview.chromium.org/1272833002/diff/160001/remoting/host/native_messaging/log_message_handler.cc File remoting/host/native_messaging/log_message_handler.cc (right): https://codereview.chromium.org/1272833002/diff/160001/remoting/host/native_messaging/log_message_handler.cc#newcode19 remoting/host/native_messaging/log_message_handler.cc:19: // and when accessing the weak pointer to ...
5 years, 4 months ago (2015-08-17 23:06:25 UTC) #12
Jamie
FYI https://codereview.chromium.org/1272833002/diff/160001/remoting/host/native_messaging/log_message_handler.cc File remoting/host/native_messaging/log_message_handler.cc (right): https://codereview.chromium.org/1272833002/diff/160001/remoting/host/native_messaging/log_message_handler.cc#newcode19 remoting/host/native_messaging/log_message_handler.cc:19: // and when accessing the weak pointer to ...
5 years, 4 months ago (2015-08-18 00:05:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272833002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272833002/180001
5 years, 4 months ago (2015-08-18 00:06:02 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/20776) chromeos_x86-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, ...
5 years, 4 months ago (2015-08-18 00:22:57 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272833002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272833002/200001
5 years, 4 months ago (2015-08-18 01:16:38 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/91660)
5 years, 4 months ago (2015-08-18 02:11:29 UTC) #23
Jamie
PTAL at the latest patch-set. I had to change some things to fix the unit ...
5 years, 4 months ago (2015-08-18 19:11:48 UTC) #24
Jamie
Ping Sergey
5 years, 4 months ago (2015-08-20 01:38:27 UTC) #25
Sergey Ulanov
still lgtm https://codereview.chromium.org/1272833002/diff/220001/remoting/host/it2me/it2me_native_messaging_host_unittest.cc File remoting/host/it2me/it2me_native_messaging_host_unittest.cc (right): https://codereview.chromium.org/1272833002/diff/220001/remoting/host/it2me/it2me_native_messaging_host_unittest.cc#newcode292 remoting/host/it2me/it2me_native_messaging_host_unittest.cc:292: if (!result->GetString("type", &type) || Add a comment ...
5 years, 4 months ago (2015-08-20 21:50:21 UTC) #26
Jamie
FYI https://codereview.chromium.org/1272833002/diff/220001/remoting/host/it2me/it2me_native_messaging_host_unittest.cc File remoting/host/it2me/it2me_native_messaging_host_unittest.cc (right): https://codereview.chromium.org/1272833002/diff/220001/remoting/host/it2me/it2me_native_messaging_host_unittest.cc#newcode292 remoting/host/it2me/it2me_native_messaging_host_unittest.cc:292: if (!result->GetString("type", &type) || On 2015/08/20 21:50:20, Sergey ...
5 years, 4 months ago (2015-08-20 22:29:16 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272833002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272833002/240001
5 years, 4 months ago (2015-08-20 22:30:09 UTC) #30
commit-bot: I haz the power
Committed patchset #13 (id:240001)
5 years, 4 months ago (2015-08-21 00:11:30 UTC) #31
commit-bot: I haz the power
5 years, 4 months ago (2015-08-21 00:12:43 UTC) #32
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/a1826488343b1923906c2b8bbd194eef51cfda26
Cr-Commit-Position: refs/heads/master@{#344622}

Powered by Google App Engine
This is Rietveld 408576698