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

Issue 2650443002: Webapp share dialog is not closed when client end of the connection is closed (Closed)

Created:
3 years, 11 months ago by joedow
Modified:
3 years, 9 months ago
Reviewers:
Sergey Ulanov
CC:
chromium-reviews, chromoting-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Webapp share dialog is not closed when client end of the connection is closed This problem is occurring because the share request dialog must be accepted before the connection is considered authenticated and the host is only notified of a disconnect if the connection is authenticated. The host does receive an access denied callback in this case as OnSessionAuthenticationFailed is called. The initial state (session is not authenticated until dialog is accepted) is correct so I am adding code to dismiss the confirmation dialog if we receive OnAccessDenied (via OnSessionAuthenticationFailed) for the JID represented by the confirmation dialog. I also reset the host state (from 'connecting' to 'received access code' (i.e. ready for client connection) when this occurs so the webapp will update its UI appropriately. This new behavior allows the remote user to cancel while the share dialog is present and attempt to reconnect using the same access code. Since it is possible to display multiple confirmation dialogs in one session, I removed the static Create method from the confirmation dialog class and replaced it with a factory class. On platforms where the confirmation dialog is displayed with a blocking UI thread (i.e. Windows), the webapp UI will be updated once the timeout timer fires or the user makes a selection. On other platforms the dialog will be dismissed automatically. BUG=681159 Review-Url: https://codereview.chromium.org/2650443002 Cr-Commit-Position: refs/heads/master@{#458096} Committed: https://chromium.googlesource.com/chromium/src/+/d15dc6a9d267c09c67d36838cba240d69bc68ab2

Patch Set 1 #

Patch Set 2 : Formatting cleanup #

Total comments: 6

Patch Set 3 : Addressing feedback #

Patch Set 4 : Comment tweaks #

Total comments: 2

Patch Set 5 : Merging with changes from dependent patchset #

Patch Set 6 : Addressing cr feedback #

Patch Set 7 : Merging changes from dependent CL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -42 lines) Patch
M remoting/host/it2me/it2me_confirmation_dialog.h View 1 2 2 chunks +11 lines, -2 lines 0 comments Download
M remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/it2me/it2me_confirmation_dialog_linux.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/it2me/it2me_confirmation_dialog_mac.mm View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc View 1 2 3 4 5 3 chunks +8 lines, -6 lines 0 comments Download
M remoting/host/it2me/it2me_confirmation_dialog_win.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M remoting/host/it2me/it2me_host.h View 1 2 3 4 3 chunks +5 lines, -2 lines 0 comments Download
M remoting/host/it2me/it2me_host.cc View 1 2 3 4 6 chunks +13 lines, -5 lines 0 comments Download
M remoting/host/it2me/it2me_host_unittest.cc View 1 2 3 4 8 chunks +51 lines, -19 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 25 (18 generated)
joedow
PTAL! Thanks! Joe
3 years, 11 months ago (2017-01-20 19:30:43 UTC) #4
Sergey Ulanov
https://codereview.chromium.org/2650443002/diff/20001/remoting/host/it2me/it2me_confirmation_dialog_proxy.h File remoting/host/it2me/it2me_confirmation_dialog_proxy.h (right): https://codereview.chromium.org/2650443002/diff/20001/remoting/host/it2me/it2me_confirmation_dialog_proxy.h#newcode36 remoting/host/it2me/it2me_confirmation_dialog_proxy.h:36: void Cancel(); I don't think we really need this ...
3 years, 11 months ago (2017-01-20 20:05:44 UTC) #7
joedow
PTAL! https://codereview.chromium.org/2650443002/diff/20001/remoting/host/it2me/it2me_confirmation_dialog_proxy.h File remoting/host/it2me/it2me_confirmation_dialog_proxy.h (right): https://codereview.chromium.org/2650443002/diff/20001/remoting/host/it2me/it2me_confirmation_dialog_proxy.h#newcode36 remoting/host/it2me/it2me_confirmation_dialog_proxy.h:36: void Cancel(); On 2017/01/20 20:05:43, Sergey Ulanov wrote: ...
3 years, 9 months ago (2017-03-14 16:46:36 UTC) #11
Sergey Ulanov
lgtm https://codereview.chromium.org/2650443002/diff/60001/remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc File remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc (right): https://codereview.chromium.org/2650443002/diff/60001/remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc#newcode126 remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc:126: std::unique_ptr<StubIt2MeConfirmationDialog> dialog( auto dialog = base::MakeUnique<StubIt2MeConfirmationDialog>( dialog_task_runner()); This ...
3 years, 9 months ago (2017-03-14 21:50:36 UTC) #14
joedow
Thanks! https://codereview.chromium.org/2650443002/diff/60001/remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc File remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc (right): https://codereview.chromium.org/2650443002/diff/60001/remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc#newcode126 remoting/host/it2me/it2me_confirmation_dialog_proxy_unittest.cc:126: std::unique_ptr<StubIt2MeConfirmationDialog> dialog( On 2017/03/14 21:50:35, Sergey Ulanov wrote: ...
3 years, 9 months ago (2017-03-16 21:39:10 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650443002/120001
3 years, 9 months ago (2017-03-20 16:12:05 UTC) #22
commit-bot: I haz the power
3 years, 9 months ago (2017-03-20 16:54:29 UTC) #25
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/d15dc6a9d267c09c67d36838cba2...

Powered by Google App Engine
This is Rietveld 408576698