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

Issue 719983002: Reporting of policy errors via host-offline-reason: part 3 (Closed)

Created:
6 years, 1 month ago by Łukasz Anforowicz
Modified:
5 years, 11 months ago
Reviewers:
Sergey Ulanov, Lambros, Wez
CC:
chromium-reviews, chromoting-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@hor-nohoststatussender
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reporting of policy errors via host-offline-reason: part 3 Introducing HostSignalingManager for extending host process's lifetime while we wait for an ack to host-offline-reason heartbeat. - HostSignalingManager is needed primarily to control process lifetime by holding a ref-count to network_task_runner via a field of HostSignalingManager - network_task_runner (via its stop/join) callback) keeps a ref-count to the main thread (ui_task_runner). And main thread / ui_task_runner will keep the whole process running until its refcount drops to zero. - Introducing HostSignalingManager also helps take multiple fields that used to be held by HostProcess and embed/hide those fields/objects inside HostSignalingManager - Lifetime of HostSignalingManager is temporarily extended while we are waiting for a timeout or ack to host-offline-reason heartbeat. BUG=410050 Committed: https://crrev.com/806efecb817d9a4fd9dfe460b5ce7d132ace615d Cr-Commit-Position: refs/heads/master@{#311077}

Patch Set 1 #

Total comments: 24

Patch Set 2 : Addressed CR feedback + extracted ReportAckOrTimeout function. #

Patch Set 3 : Switched to base::Unretained in mock_callback.h #

Patch Set 4 : Minor tweaks after end-to-end tests and self-review. #

Total comments: 9

Patch Set 5 : Rebasing... #

Total comments: 23

Patch Set 6 : Addressed code review feedback from Lambros. #

Patch Set 7 : Rebasing... #

Total comments: 7

Patch Set 8 : Better MockCallback documentation and use-after-death. #

Patch Set 9 : git cl format #

Total comments: 15

Patch Set 10 : Addressed (some) code review feedback from Wez. #

Patch Set 11 : Trying to see how things look without mock_callback.h #

Total comments: 35

Patch Set 12 : Addressed code review feedback from Lambros. #

Total comments: 47

Patch Set 13 : Addressed (some) code review feedback from Wez. #

Patch Set 14 : Added a unit test for the case of a synchronous ack. #

Patch Set 15 : Extracted kHostOfflineReasonTimeoutSeconds constant. #

Total comments: 18

Patch Set 16 : Removed ReportAckOrTimeout and ref-counting. Renamed MinimumHeartbeatSupporter to HostSignalingMan… #

Total comments: 37

Patch Set 17 : Addressed code review feedback from Lambros. #

Patch Set 18 : Better callback currying. #

Total comments: 104

Patch Set 19 : Addressed code review feedback from Lambros. #

Patch Set 20 : Addressed code review feedback from Wez. #

Total comments: 15

Patch Set 21 : Addressed most feedback from Wez. #

Total comments: 14

Patch Set 22 : Small formatting and commenting fixes. #

Patch Set 23 : Rebasing... #

Total comments: 22

Patch Set 24 : Addressed code review feedback from Wez. #

Patch Set 25 : Replaced callbacks with a listener interface in HostSignalingManager. #

Total comments: 11

Patch Set 26 : Addressed code review feedback from Wez. #

Patch Set 27 : Rebasing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+450 lines, -202 lines) Patch
M remoting/host/chromoting_host_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +9 lines, -8 lines 0 comments Download
M remoting/host/chromoting_host_context.cc View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -13 lines 0 comments Download
M remoting/host/dns_blackhole_checker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M remoting/host/dns_blackhole_checker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/heartbeat_sender.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +26 lines, -10 lines 0 comments Download
M remoting/host/heartbeat_sender.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +37 lines, -12 lines 0 comments Download
M remoting/host/heartbeat_sender_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 10 chunks +26 lines, -11 lines 0 comments Download
A remoting/host/host_signaling_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +129 lines, -0 lines 0 comments Download
A remoting/host/host_signaling_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +117 lines, -0 lines 0 comments Download
M remoting/host/mock_callback.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -43 lines 0 comments Download
M remoting/host/oauth_token_getter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +7 lines, -4 lines 0 comments Download
M remoting/host/oauth_token_getter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +2 lines, -1 line 0 comments Download
M remoting/host/remoting_me2me_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 16 chunks +72 lines, -89 lines 0 comments Download
M remoting/host/signaling_connector.h View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
M remoting/host/signaling_connector.cc View 1 1 chunk +3 lines, -2 lines 0 comments Download
M remoting/remoting_host_srcs.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M remoting/remoting_test.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -1 line 0 comments Download
M remoting/signaling/xmpp_signal_strategy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -1 line 0 comments Download
M remoting/signaling/xmpp_signal_strategy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 57 (6 generated)
Łukasz Anforowicz
Lambros, could you please review the 3 changelists for reporting policy errors via host-offline-reason? This ...
6 years, 1 month ago (2014-11-12 21:56:24 UTC) #2
Lambros
https://codereview.chromium.org/719983002/diff/1/remoting/host/minimum_heartbeat_supporter.cc File remoting/host/minimum_heartbeat_supporter.cc (right): https://codereview.chromium.org/719983002/diff/1/remoting/host/minimum_heartbeat_supporter.cc#newcode1 remoting/host/minimum_heartbeat_supporter.cc:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
6 years, 1 month ago (2014-11-14 01:24:58 UTC) #3
Łukasz Anforowicz
I addressed CR feedback + extracted ReportAckOrTimeout function. Could you please re-review? Thanks, Lukasz https://codereview.chromium.org/719983002/diff/1/remoting/host/minimum_heartbeat_supporter.cc ...
6 years, 1 month ago (2014-11-17 18:17:02 UTC) #5
Łukasz Anforowicz
Switched to base::Unretained in mock_callback.h (as well as added unit tests in mock_callback_unittest.cc, as the ...
6 years, 1 month ago (2014-11-18 20:29:08 UTC) #6
Łukasz Anforowicz
I've run part1 + part2 + part2b + part3 against updated Chromoting servers in "test" ...
6 years, 1 month ago (2014-11-19 00:56:34 UTC) #8
Lambros
https://codereview.chromium.org/719983002/diff/100001/remoting/host/ack_or_timeout_reporter.h File remoting/host/ack_or_timeout_reporter.h (right): https://codereview.chromium.org/719983002/diff/100001/remoting/host/ack_or_timeout_reporter.h#newcode39 remoting/host/ack_or_timeout_reporter.h:39: function_that_acks, I'm having a little conceptual trouble with this. ...
6 years, 1 month ago (2014-11-19 02:06:17 UTC) #9
Lambros
https://codereview.chromium.org/719983002/diff/100001/remoting/host/minimum_heartbeat_supporter.cc File remoting/host/minimum_heartbeat_supporter.cc (right): https://codereview.chromium.org/719983002/diff/100001/remoting/host/minimum_heartbeat_supporter.cc#newcode142 remoting/host/minimum_heartbeat_supporter.cc:142: void MinimumHeartbeatSupporter::OnAckOrTimeout(AckOrTimeout ack_or_timeout) Do you plan on doing anything ...
6 years, 1 month ago (2014-11-19 02:29:42 UTC) #10
Łukasz Anforowicz
https://codereview.chromium.org/719983002/diff/100001/remoting/host/ack_or_timeout_reporter.h File remoting/host/ack_or_timeout_reporter.h (right): https://codereview.chromium.org/719983002/diff/100001/remoting/host/ack_or_timeout_reporter.h#newcode39 remoting/host/ack_or_timeout_reporter.h:39: function_that_acks, On 2014/11/19 02:06:17, Lambros wrote: > I'm having ...
6 years, 1 month ago (2014-11-19 21:44:25 UTC) #11
Łukasz Anforowicz
https://codereview.chromium.org/719983002/diff/100001/remoting/host/mock_callback.h File remoting/host/mock_callback.h (right): https://codereview.chromium.org/719983002/diff/100001/remoting/host/mock_callback.h#newcode68 remoting/host/mock_callback.h:68: // callbacks go through a long-lived MockCallbackTracker On 2014/11/19 ...
6 years, 1 month ago (2014-11-19 21:54:13 UTC) #12
Łukasz Anforowicz
Parts 1, 2 and 2b have landed. Could you please take another look at part3?
6 years ago (2014-11-26 18:30:47 UTC) #13
Lambros
Here are some comments so far, but I'm still trying to get my head around ...
6 years ago (2014-12-02 03:35:23 UTC) #14
Łukasz Anforowicz
Thanks for the feedback. Please take another look. https://codereview.chromium.org/719983002/diff/120001/remoting/host/heartbeat_sender.h File remoting/host/heartbeat_sender.h (right): https://codereview.chromium.org/719983002/diff/120001/remoting/host/heartbeat_sender.h#newcode143 remoting/host/heartbeat_sender.h:143: const ...
6 years ago (2014-12-02 20:08:01 UTC) #15
Łukasz Anforowicz
Hmmm... clicking "Publish+Mail Comments" again, as Rietveld still thinks that I have some unpublished drafts... ...
6 years ago (2014-12-02 20:56:37 UTC) #16
Lambros
wez: Could you please have a look at the MockCallback stuff - I could do ...
6 years ago (2014-12-03 03:20:25 UTC) #18
Łukasz Anforowicz
I addressed CR feedback. I also added documentation comments to MockCallback that explain why we ...
6 years ago (2014-12-03 17:54:22 UTC) #19
Łukasz Anforowicz
Publishing results of git cl format.
6 years ago (2014-12-03 18:37:46 UTC) #20
Wez
https://codereview.chromium.org/719983002/diff/200001/remoting/host/mock_callback.h File remoting/host/mock_callback.h (right): https://codereview.chromium.org/719983002/diff/200001/remoting/host/mock_callback.h#newcode26 remoting/host/mock_callback.h:26: // base::Callback<void(int)> callback = mock_callback.GetCallback(); Is it important that ...
6 years ago (2014-12-03 19:45:49 UTC) #21
Łukasz Anforowicz
I addressed some review comments. To help decide whether or not keeping mock_callback.h is desirable, ...
6 years ago (2014-12-03 22:00:44 UTC) #22
Łukasz Anforowicz
Ping?
6 years ago (2014-12-05 17:38:38 UTC) #23
Lambros
lgtm without the MockCallback stuff - please take a look at my comments, mostly nits. ...
6 years ago (2014-12-05 22:19:49 UTC) #24
Łukasz Anforowicz
I addressed code review feedback from Lambros. Thanks! Wez - could you please take a ...
6 years ago (2014-12-05 23:59:28 UTC) #25
Lambros
https://codereview.chromium.org/719983002/diff/240001/remoting/host/ack_or_timeout_reporter_unittest.cc File remoting/host/ack_or_timeout_reporter_unittest.cc (right): https://codereview.chromium.org/719983002/diff/240001/remoting/host/ack_or_timeout_reporter_unittest.cc#newcode128 remoting/host/ack_or_timeout_reporter_unittest.cc:128: // |ack_or_timeout_callback| should be dropped after being called once. ...
6 years ago (2014-12-06 01:25:05 UTC) #26
Łukasz Anforowicz
BTW: If tests in patchset#11 are slightly better off, then 1) complexity in mock_callback.h can ...
6 years ago (2014-12-08 17:10:30 UTC) #27
Wez
I'm not convinced by the encapsulation here; it seems that the HostProcess could reasonably manage ...
6 years ago (2014-12-09 00:51:58 UTC) #28
Łukasz Anforowicz
I made small tweaks to address easy feedback from Wez and Lambros. I held back ...
6 years ago (2014-12-09 18:47:07 UTC) #29
Łukasz Anforowicz
Added one more unit test for ReportAckOrTimeout. https://codereview.chromium.org/719983002/diff/260001/remoting/host/ack_or_timeout_reporter.cc File remoting/host/ack_or_timeout_reporter.cc (right): https://codereview.chromium.org/719983002/diff/260001/remoting/host/ack_or_timeout_reporter.cc#newcode16 remoting/host/ack_or_timeout_reporter.cc:16: class AckOrTimeoutReporter ...
6 years ago (2014-12-10 05:11:09 UTC) #30
Łukasz Anforowicz
I extracted a kHostOfflineReasonTimeoutSeconds constant to go next to the constant introduced in https://codereview.chromium.org/784243003/
6 years ago (2014-12-10 23:29:48 UTC) #31
Wez
https://codereview.chromium.org/719983002/diff/260001/remoting/host/ack_or_timeout_reporter.cc File remoting/host/ack_or_timeout_reporter.cc (right): https://codereview.chromium.org/719983002/diff/260001/remoting/host/ack_or_timeout_reporter.cc#newcode80 remoting/host/ack_or_timeout_reporter.cc:80: // of |ack_or_timeout_callback_|. On 2014/12/09 18:47:07, lukasza wrote: > ...
6 years ago (2014-12-15 20:34:24 UTC) #32
Sergey Ulanov
https://codereview.chromium.org/719983002/diff/320001/remoting/host/ack_or_timeout_reporter.h File remoting/host/ack_or_timeout_reporter.h (right): https://codereview.chromium.org/719983002/diff/320001/remoting/host/ack_or_timeout_reporter.h#newcode37 remoting/host/ack_or_timeout_reporter.h:37: void ReportAckOrTimeout( Can this be replaced with something like ...
6 years ago (2014-12-15 22:39:19 UTC) #34
Łukasz Anforowicz
I addressed feedback from Wez and Sergey. Please take another look? https://codereview.chromium.org/719983002/diff/320001/remoting/host/ack_or_timeout_reporter.h File remoting/host/ack_or_timeout_reporter.h (right): ...
6 years ago (2014-12-16 00:59:52 UTC) #35
Wez
CL description needs overhauling! :D
6 years ago (2014-12-16 01:57:00 UTC) #36
Lambros
https://codereview.chromium.org/719983002/diff/340001/remoting/host/heartbeat_sender.cc File remoting/host/heartbeat_sender.cc (right): https://codereview.chromium.org/719983002/diff/340001/remoting/host/heartbeat_sender.cc#newcode109 remoting/host/heartbeat_sender.cc:109: static void StaticCallHostOfflineReasonAckCallback( nit: Maybe just call it RunAckCallback(). ...
6 years ago (2014-12-16 02:14:05 UTC) #37
Łukasz Anforowicz
I am not sure how I managed to miss the email notifying me of pending ...
6 years ago (2014-12-17 18:02:04 UTC) #38
Łukasz Anforowicz
And I also switched to better/proper callback currying in patchset #18.
6 years ago (2014-12-17 18:07:04 UTC) #39
Lambros
Still lgtm, but please look at my comments. https://codereview.chromium.org/719983002/diff/340001/remoting/host/host_signaling_manager.h File remoting/host/host_signaling_manager.h (right): https://codereview.chromium.org/719983002/diff/340001/remoting/host/host_signaling_manager.h#newcode67 remoting/host/host_signaling_manager.h:67: void ...
6 years ago (2014-12-17 23:44:34 UTC) #40
Łukasz Anforowicz
Thanks for the feedback Lambros - I appreciate it (especially catching the self_ sillyness :-/). ...
6 years ago (2014-12-18 00:03:41 UTC) #41
Wez
https://codereview.chromium.org/719983002/diff/340001/remoting/host/heartbeat_sender.cc File remoting/host/heartbeat_sender.cc (right): https://codereview.chromium.org/719983002/diff/340001/remoting/host/heartbeat_sender.cc#newcode108 remoting/host/heartbeat_sender.cc:108: // work with base::Bind inside CallHostOfflineReasonAckCallback below. This description ...
6 years ago (2014-12-18 00:46:22 UTC) #42
Łukasz Anforowicz
Thanks for the feedback. I tried to address it in the latest patchset. Please take ...
6 years ago (2014-12-18 19:02:35 UTC) #43
Wez
https://codereview.chromium.org/719983002/diff/380001/remoting/host/heartbeat_sender.cc File remoting/host/heartbeat_sender.cc (right): https://codereview.chromium.org/719983002/diff/380001/remoting/host/heartbeat_sender.cc#newcode111 remoting/host/heartbeat_sender.cc:111: // of our callers to ensure that they call ...
6 years ago (2014-12-19 22:05:38 UTC) #44
Łukasz Anforowicz
I addressed most code review feedback, except the callbacks-vs-listener issue. Wez - can you please ...
5 years, 11 months ago (2015-01-07 01:24:05 UTC) #45
Wez
https://codereview.chromium.org/719983002/diff/420001/remoting/host/remoting_me2me_host.cc File remoting/host/remoting_me2me_host.cc (right): https://codereview.chromium.org/719983002/diff/420001/remoting/host/remoting_me2me_host.cc#newcode259 remoting/host/remoting_me2me_host.cc:259: void SendOfflineReasonAndShutdownOnNetworkThread(HostExitCodes exit_code); On 2015/01/07 01:24:04, lukasza wrote: > ...
5 years, 11 months ago (2015-01-08 01:49:51 UTC) #46
Wez
This is looking much cleaner now - thanks for all the hard work. :)
5 years, 11 months ago (2015-01-08 01:50:19 UTC) #47
Łukasz Anforowicz
I've made small formatting and commenting fixes. Wez - could you please take another look? ...
5 years, 11 months ago (2015-01-08 23:50:31 UTC) #48
Wez
https://codereview.chromium.org/719983002/diff/380001/remoting/host/host_signaling_manager.h File remoting/host/host_signaling_manager.h (right): https://codereview.chromium.org/719983002/diff/380001/remoting/host/host_signaling_manager.h#newcode45 remoting/host/host_signaling_manager.h:45: const base::Closure& on_auth_failed_callback, On 2015/01/07 01:24:04, lukasza wrote: > ...
5 years, 11 months ago (2015-01-09 02:55:46 UTC) #49
Łukasz Anforowicz
I addressed the feedback (including changing from callbacks to a listener interface in HostSignalingManager). Wez ...
5 years, 11 months ago (2015-01-09 19:00:14 UTC) #50
Wez
LGTM once the remaining nits are addressed. :D https://codereview.chromium.org/719983002/diff/480001/remoting/host/heartbeat_sender_unittest.cc File remoting/host/heartbeat_sender_unittest.cc (right): https://codereview.chromium.org/719983002/diff/480001/remoting/host/heartbeat_sender_unittest.cc#newcode319 remoting/host/heartbeat_sender_unittest.cc:319: EXPECT_CALL(mock_ack_callback, ...
5 years, 11 months ago (2015-01-10 01:43:32 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/719983002/560001
5 years, 11 months ago (2015-01-12 18:03:58 UTC) #53
Łukasz Anforowicz
Oops... forgot to publish the comments and changes I made earlier yesterday. https://codereview.chromium.org/719983002/diff/480001/remoting/host/heartbeat_sender_unittest.cc File remoting/host/heartbeat_sender_unittest.cc ...
5 years, 11 months ago (2015-01-12 18:05:14 UTC) #54
Łukasz Anforowicz
I mean earlier *today*... :-/
5 years, 11 months ago (2015-01-12 18:06:17 UTC) #55
commit-bot: I haz the power
Committed patchset #27 (id:560001)
5 years, 11 months ago (2015-01-12 19:01:40 UTC) #56
commit-bot: I haz the power
5 years, 11 months ago (2015-01-12 19:02:37 UTC) #57
Message was sent while issue was closed.
Patchset 27 (id:??) landed as
https://crrev.com/806efecb817d9a4fd9dfe460b5ce7d132ace615d
Cr-Commit-Position: refs/heads/master@{#311077}

Powered by Google App Engine
This is Rietveld 408576698