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

Issue 40053002: Implements the dialog view for logout button tray in public sessions. (Closed)

Created:
7 years, 2 months ago by binjin
Modified:
6 years, 11 months ago
CC:
chromium-reviews, kalyank, sadrul, ben+ash_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Implements the dialog view for logout confirmation dialog in public sessions. Implements ash::internal::LogoutConfirmationDialogView which is supposed to be used by ash::internal::LogoutButtonTray. BUG=223846 TEST=new unit test Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=242286 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243530

Patch Set 1 #

Total comments: 104

Patch Set 2 : Rewrite the implementations of logout confirmation #

Patch Set 3 : Add preference for dialog duration #

Total comments: 29

Patch Set 4 : Minor improvements #

Patch Set 5 : Immediately reflect duration updates #

Total comments: 30

Patch Set 6 : minor fixes; use scoped_ptr; fix timer #

Total comments: 4

Patch Set 7 : add tests; simplify code #

Patch Set 8 : minor improvement on comments #

Total comments: 73

Patch Set 9 : minor fixes #

Patch Set 10 : rebase #

Patch Set 11 : enhence tests; simplify code; fix win build(hope so) #

Total comments: 71

Patch Set 12 : fixes; use OnClosed() approach #

Patch Set 13 : drop weak pointer for owner #

Total comments: 8

Patch Set 14 : minor fixes #

Total comments: 24

Patch Set 15 : more fixes #

Total comments: 44

Patch Set 16 : more improvements #

Patch Set 17 : rebase; remove scoped_ptr; remove GetUpdateInterval() #

Total comments: 12

Patch Set 18 : more fixes #

Patch Set 19 : minor fix #

Total comments: 28

Patch Set 20 : more fixes; make delegate pure; add ShowDialog() to delegate(); add TODO in tests #

Total comments: 8

Patch Set 21 : fixes; attempt to fix win build #

Patch Set 22 : second attempt to fix win build #

Patch Set 23 : attempt to fix presubmit trybot warning #

Patch Set 24 : first attempt to fix memory leak in tests #

Patch Set 25 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+736 lines, -21 lines) Patch
M ash/ash.gyp 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 2 chunks +3 lines, -0 lines 0 comments Download
M ash/ash_strings.grd 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 1 chunk +13 lines, -0 lines 0 comments Download
M ash/system/logout_button/logout_button_observer.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +12 lines, -4 lines 0 comments Download
M ash/system/logout_button/logout_button_tray.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +26 lines, -3 lines 0 comments Download
M ash/system/logout_button/logout_button_tray.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 5 chunks +83 lines, -6 lines 0 comments Download
A ash/system/logout_button/logout_button_tray_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 1 chunk +344 lines, -0 lines 0 comments Download
A ash/system/logout_button/logout_confirmation_dialog_view.h 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 +77 lines, -0 lines 0 comments Download
A ash/system/logout_button/logout_confirmation_dialog_view.cc 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 +138 lines, -0 lines 0 comments Download
M ash/system/tray/system_tray_notifier.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M ash/system/tray/system_tray_notifier.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/chrome_launcher_prefs.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +7 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.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 3 chunks +12 lines, -0 lines 0 comments Download
M chrome/common/pref_names.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 1 chunk +3 lines, -1 line 0 comments Download
M chrome/common/pref_names.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 1 chunk +9 lines, -4 lines 0 comments Download

Messages

Total messages: 59 (0 generated)
binjin
please take a look, thanks
7 years, 2 months ago (2013-10-24 12:20:57 UTC) #1
bartfab (slow)
https://codereview.chromium.org/40053002/diff/1/ash/system/logout_button/logout_button_tray.cc File ash/system/logout_button/logout_button_tray.cc (right): https://codereview.chromium.org/40053002/diff/1/ash/system/logout_button/logout_button_tray.cc#newcode11 ash/system/logout_button/logout_button_tray.cc:11: #include "ash/system/tray/system_tray_delegate.h" No longer used. https://codereview.chromium.org/40053002/diff/1/ash/system/logout_button/logout_button_tray.cc#newcode115 ash/system/logout_button/logout_button_tray.cc:115: void LogoutButtonTray::ShowConfirmDialog() ...
7 years, 2 months ago (2013-10-24 13:11:02 UTC) #2
binjin
I rewrote the code to follow the coding style. Also I used weak pointer and ...
7 years, 1 month ago (2013-10-25 13:03:10 UTC) #3
bartfab (slow)
https://chromiumcodereview.appspot.com/40053002/diff/110001/ash/system/logout_button/logout_button_observer.h File ash/system/logout_button/logout_button_observer.h (right): https://chromiumcodereview.appspot.com/40053002/diff/110001/ash/system/logout_button/logout_button_observer.h#newcode10 ash/system/logout_button/logout_button_observer.h:10: // Observer for the value of the kShowLogoutButtonInTray pref ...
7 years, 1 month ago (2013-10-28 16:24:06 UTC) #4
binjin
I updated the code. Regarding using of weak pointer, I think The current approach fits ...
7 years, 1 month ago (2013-10-29 16:07:04 UTC) #5
bartfab (slow)
Almost there. Tests are still missing though. https://codereview.chromium.org/40053002/diff/200001/ash/system/logout_button/logout_button_observer.h File ash/system/logout_button/logout_button_observer.h (right): https://codereview.chromium.org/40053002/diff/200001/ash/system/logout_button/logout_button_observer.h#newcode23 ash/system/logout_button/logout_button_observer.h:23: virtual void ...
7 years, 1 month ago (2013-10-30 11:17:27 UTC) #6
binjin
I fixed all the problems that you pointed out. tests is still missing though. The ...
7 years, 1 month ago (2013-11-19 14:43:45 UTC) #7
bartfab (slow)
https://codereview.chromium.org/40053002/diff/330001/ash/system/logout_button/logout_button_observer.h File ash/system/logout_button/logout_button_observer.h (right): https://codereview.chromium.org/40053002/diff/330001/ash/system/logout_button/logout_button_observer.h#newcode12 ash/system/logout_button/logout_button_observer.h:12: // Observer for the values of the kShowLogoutButtonInTray pref ...
7 years, 1 month ago (2013-11-20 18:00:44 UTC) #8
binjin
Hello, I send another changeset, please help review it. I'm still not sure if I ...
7 years ago (2013-12-03 15:32:19 UTC) #9
bartfab (slow)
The tests look very nice. If you fix up the nits and comments, I think ...
7 years ago (2013-12-03 19:46:04 UTC) #10
binjin
Hello, Here is quick fixes to some of the comments you left, and two comments ...
7 years ago (2013-12-04 10:47:02 UTC) #11
bartfab (slow)
Another hint on the way we do code reviews: When you address a comment and ...
7 years ago (2013-12-04 12:51:56 UTC) #12
binjin
Hello, I rewrite the code according to most of comments you left, but there are ...
7 years ago (2013-12-05 10:08:04 UTC) #13
bartfab (slow)
https://codereview.chromium.org/40053002/diff/450001/ash/system/logout_button/logout_button_tray_unittest.cc File ash/system/logout_button/logout_button_tray_unittest.cc (right): https://codereview.chromium.org/40053002/diff/450001/ash/system/logout_button/logout_button_tray_unittest.cc#newcode19 ash/system/logout_button/logout_button_tray_unittest.cc:19: class MockTimeSingleThreadTaskRunner : public base::SingleThreadTaskRunner { On 2013/12/05 10:08:05, ...
7 years ago (2013-12-06 13:50:04 UTC) #14
binjin
hello, just fixed the remaining two issues. PTAL https://codereview.chromium.org/40053002/diff/450001/ash/system/logout_button/logout_button_tray_unittest.cc File ash/system/logout_button/logout_button_tray_unittest.cc (right): https://codereview.chromium.org/40053002/diff/450001/ash/system/logout_button/logout_button_tray_unittest.cc#newcode227 ash/system/logout_button/logout_button_tray_unittest.cc:227: } ...
7 years ago (2013-12-09 18:50:01 UTC) #15
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
7 years ago (2013-12-10 09:18:13 UTC) #16
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
7 years ago (2013-12-10 09:24:41 UTC) #17
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
7 years ago (2013-12-10 09:25:20 UTC) #18
bartfab (slow)
I made another pass over all the files except the test for now. https://codereview.chromium.org/40053002/diff/500001/ash/ash.gyp File ...
7 years ago (2013-12-10 12:41:15 UTC) #19
binjin
hello bartfab, I fixed most of issues you pointed out. For the lifetime problem I ...
7 years ago (2013-12-12 13:56:54 UTC) #20
binjin
hello, just send another CL without using weak pointer for owner in LogoutConfirmationDialogView. PTAL Bin
7 years ago (2013-12-12 14:42:27 UTC) #21
bartfab (slow)
https://codereview.chromium.org/40053002/diff/520001/ash/system/logout_button/logout_confirmation_dialog_view.h File ash/system/logout_button/logout_confirmation_dialog_view.h (right): https://codereview.chromium.org/40053002/diff/520001/ash/system/logout_button/logout_confirmation_dialog_view.h#newcode28 ash/system/logout_button/logout_confirmation_dialog_view.h:28: // This class provide setting and interface for LogoutConfirmationDialogView. ...
7 years ago (2013-12-12 15:16:39 UTC) #22
binjin
https://codereview.chromium.org/40053002/diff/520001/ash/system/logout_button/logout_confirmation_dialog_view.h File ash/system/logout_button/logout_confirmation_dialog_view.h (right): https://codereview.chromium.org/40053002/diff/520001/ash/system/logout_button/logout_confirmation_dialog_view.h#newcode28 ash/system/logout_button/logout_confirmation_dialog_view.h:28: // This class provide setting and interface for LogoutConfirmationDialogView. ...
7 years ago (2013-12-12 15:39:09 UTC) #23
bartfab (slow)
https://codereview.chromium.org/40053002/diff/530001/ash/system/logout_button/logout_button_tray.cc File ash/system/logout_button/logout_button_tray.cc (right): https://codereview.chromium.org/40053002/diff/530001/ash/system/logout_button/logout_button_tray.cc#newcode135 ash/system/logout_button/logout_button_tray.cc:135: confirmation_dialog_->DeleteDelegate(); Would it be possible to call confirmation_dialog_->Close() here ...
7 years ago (2013-12-12 16:04:12 UTC) #24
binjin
hello, Here is the fixes, I left explaining comments instead for some comments you left ...
7 years ago (2013-12-17 10:29:48 UTC) #25
bartfab (slow)
This is very close to done now. I have three actual comments. Everything else is ...
7 years ago (2013-12-17 13:21:02 UTC) #26
binjin
hello bartfab, just send out another CL, PTAL binjin https://codereview.chromium.org/40053002/diff/530001/ash/system/logout_button/logout_confirmation_dialog_view.cc File ash/system/logout_button/logout_confirmation_dialog_view.cc (right): https://codereview.chromium.org/40053002/diff/530001/ash/system/logout_button/logout_confirmation_dialog_view.cc#newcode93 ash/system/logout_button/logout_confirmation_dialog_view.cc:93: ...
7 years ago (2013-12-17 14:58:07 UTC) #27
bartfab (slow)
https://codereview.chromium.org/40053002/diff/530001/ash/system/logout_button/logout_confirmation_dialog_view.cc File ash/system/logout_button/logout_confirmation_dialog_view.cc (right): https://codereview.chromium.org/40053002/diff/530001/ash/system/logout_button/logout_confirmation_dialog_view.cc#newcode93 ash/system/logout_button/logout_confirmation_dialog_view.cc:93: if (owner_) { On 2013/12/17 14:58:08, bjin wrote: > ...
7 years ago (2013-12-17 15:57:45 UTC) #28
binjin
I made some changes, PTAL bin https://codereview.chromium.org/40053002/diff/530001/ash/system/logout_button/logout_confirmation_dialog_view.cc File ash/system/logout_button/logout_confirmation_dialog_view.cc (right): https://codereview.chromium.org/40053002/diff/530001/ash/system/logout_button/logout_confirmation_dialog_view.cc#newcode93 ash/system/logout_button/logout_confirmation_dialog_view.cc:93: if (owner_) { ...
7 years ago (2013-12-18 18:13:14 UTC) #29
bartfab (slow)
https://chromiumcodereview.appspot.com/40053002/diff/590001/ash/system/logout_button/logout_confirmation_dialog_view.cc File ash/system/logout_button/logout_confirmation_dialog_view.cc (right): https://chromiumcodereview.appspot.com/40053002/diff/590001/ash/system/logout_button/logout_confirmation_dialog_view.cc#newcode29 ash/system/logout_button/logout_confirmation_dialog_view.cc:29: const int kCountdownUpdateIntervalMs = 1000; // 1 second. Nit: ...
7 years ago (2013-12-18 18:26:49 UTC) #30
binjin
https://codereview.chromium.org/40053002/diff/590001/ash/system/logout_button/logout_confirmation_dialog_view.cc File ash/system/logout_button/logout_confirmation_dialog_view.cc (right): https://codereview.chromium.org/40053002/diff/590001/ash/system/logout_button/logout_confirmation_dialog_view.cc#newcode29 ash/system/logout_button/logout_confirmation_dialog_view.cc:29: const int kCountdownUpdateIntervalMs = 1000; // 1 second. On ...
7 years ago (2013-12-18 18:42:14 UTC) #31
bartfab (slow)
lgtm
7 years ago (2013-12-18 18:54:25 UTC) #32
binjin
Hi stevenjb, please review ash/* and chrome/browser/chromeos/* Hi derat, please review chrome/browser/ui/ash/* and chrome/common/* Thanks ...
7 years ago (2013-12-18 18:54:42 UTC) #33
Daniel Erat
lgtm for chrome/ (not sure if i'm an owner for all of these directories, though) ...
7 years ago (2013-12-18 20:25:40 UTC) #34
stevenjb
https://codereview.chromium.org/40053002/diff/630001/ash/system/logout_button/logout_button_tray.h File ash/system/logout_button/logout_button_tray.h (right): https://codereview.chromium.org/40053002/diff/630001/ash/system/logout_button/logout_button_tray.h#newcode39 ash/system/logout_button/logout_button_tray.h:39: void EnsureConfirmationDialogIsClosed(); Do these need to be public? https://codereview.chromium.org/40053002/diff/630001/ash/system/logout_button/logout_button_tray.h#newcode58 ...
7 years ago (2013-12-18 21:55:19 UTC) #35
binjin
hello stevenjb, I uploaded another CL, PTAL https://codereview.chromium.org/40053002/diff/630001/ash/system/logout_button/logout_button_tray.h File ash/system/logout_button/logout_button_tray.h (right): https://codereview.chromium.org/40053002/diff/630001/ash/system/logout_button/logout_button_tray.h#newcode39 ash/system/logout_button/logout_button_tray.h:39: void EnsureConfirmationDialogIsClosed(); ...
7 years ago (2013-12-19 16:30:39 UTC) #36
stevenjb
lgtm w/ nits https://codereview.chromium.org/40053002/diff/650001/ash/system/logout_button/logout_button_tray.cc File ash/system/logout_button/logout_button_tray.cc (right): https://codereview.chromium.org/40053002/diff/650001/ash/system/logout_button/logout_button_tray.cc#newcode79 ash/system/logout_button/logout_button_tray.cc:79: }; WS https://codereview.chromium.org/40053002/diff/650001/ash/system/logout_button/logout_button_tray.h File ash/system/logout_button/logout_button_tray.h (right): ...
7 years ago (2013-12-19 18:57:43 UTC) #37
binjin
https://codereview.chromium.org/40053002/diff/650001/ash/system/logout_button/logout_button_tray.cc File ash/system/logout_button/logout_button_tray.cc (right): https://codereview.chromium.org/40053002/diff/650001/ash/system/logout_button/logout_button_tray.cc#newcode79 ash/system/logout_button/logout_button_tray.cc:79: }; On 2013/12/19 18:57:44, stevenjb wrote: > WS Done. ...
7 years ago (2013-12-20 13:35:48 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/690001
7 years ago (2013-12-20 13:36:17 UTC) #39
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=42458
7 years ago (2013-12-20 13:57:22 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/770002
7 years ago (2013-12-20 14:07:27 UTC) #41
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) telemetry_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=239015
7 years ago (2013-12-20 15:40:57 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/770002
7 years ago (2013-12-20 21:25:21 UTC) #43
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=239333
7 years ago (2013-12-21 01:12:12 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/770002
7 years ago (2013-12-21 10:36:07 UTC) #45
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=239540
7 years ago (2013-12-21 13:31:47 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/770002
7 years ago (2013-12-21 13:36:04 UTC) #47
commit-bot: I haz the power
Change committed as 242286
7 years ago (2013-12-21 17:55:42 UTC) #48
binjin
hello bartfab, I made a quick fix for the memory leak in tests, PTAL bjin
6 years, 11 months ago (2014-01-07 13:41:54 UTC) #49
bartfab (slow)
lgtm
6 years, 11 months ago (2014-01-07 14:18:25 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/1240001
6 years, 11 months ago (2014-01-07 14:24:52 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/1240001
6 years, 11 months ago (2014-01-07 15:26:38 UTC) #52
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) nacl_integration http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=242463
6 years, 11 months ago (2014-01-07 17:25:23 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/1240001
6 years, 11 months ago (2014-01-07 21:29:46 UTC) #54
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) nacl_integration http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=242788
6 years, 11 months ago (2014-01-08 00:02:14 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/1240001
6 years, 11 months ago (2014-01-08 00:05:37 UTC) #56
commit-bot: I haz the power
Failed to apply patch for chrome/browser/chromeos/system/ash_system_tray_delegate.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; can't find ...
6 years, 11 months ago (2014-01-08 00:06:15 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/binjin@chromium.org/40053002/1590001
6 years, 11 months ago (2014-01-08 09:41:55 UTC) #58
commit-bot: I haz the power
6 years, 11 months ago (2014-01-08 12:26:14 UTC) #59
Message was sent while issue was closed.
Change committed as 243530

Powered by Google App Engine
This is Rietveld 408576698