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

Issue 9265026: Implement restart on Idle for Kiosk Mode. (Closed)

Created:
8 years, 11 months ago by rkc
Modified:
8 years, 9 months ago
CC:
chromium-reviews, arv (Not doing code reviews), stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org, zel, Chris Masone, Will Drewry
Visibility:
Public.

Description

Implement restart on Idle for Kiosk Mode. Implement the Kiosk Mode flag and the idle timeout for a logged in user/guest if the flag is enabled. Currently the timeout to restart is hard coded to 2m total with the dialog showing in the last 20 seconds. If the machine goes active while the dialog is counting down, the restart will be aborted and the state reset. R=flackr@chromium.org,rbyers@chromium.org,xiyuan@chromium.org BUG=23363 TEST=Tested with the flag enabled to ensure that guest and user login acts as expected; tested without the flag to ensure regular functionality is not affected.

Patch Set 1 #

Total comments: 45

Patch Set 2 : Renamed kiosk->retail and incorporated review comments. #

Total comments: 28

Patch Set 3 : Review changes. #

Patch Set 4 : Merge. #

Total comments: 48

Patch Set 5 : Review comments. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+616 lines, -9 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 2 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/browser_resources.grd View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 2 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/chromeos/dbus/mock_power_manager_client.h View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/chromeos/dbus/power_manager_client.h View 1 2 3 4 4 chunks +25 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/dbus/power_manager_client.cc View 4 chunks +54 lines, -2 lines 0 comments Download
A chrome/browser/chromeos/retail_mode/retail_mode_screen_locker.h View 1 2 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/retail_mode/retail_mode_screen_locker.cc View 1 2 3 4 1 chunk +98 lines, -0 lines 0 comments Download
A chrome/browser/resources/chromeos/retail_mode_logout_dialog.css View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
A chrome/browser/resources/chromeos/retail_mode_logout_dialog.html View 1 2 3 4 1 chunk +24 lines, -0 lines 0 comments Download
A chrome/browser/resources/chromeos/retail_mode_logout_dialog.js View 1 2 3 4 1 chunk +43 lines, -0 lines 1 comment Download
M chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.h View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.cc View 1 2 3 4 1 chunk +187 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/url_constants.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/url_constants.cc View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
rkc
8 years, 11 months ago (2012-01-20 04:20:56 UTC) #1
flackr
http://codereview.chromium.org/9265026/diff/1/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screen_locker.cc File chrome/browser/chromeos/kiosk_mode/kiosk_mode_screen_locker.cc (right): http://codereview.chromium.org/9265026/diff/1/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screen_locker.cc#newcode11 chrome/browser/chromeos/kiosk_mode/kiosk_mode_screen_locker.cc:11: #include "chrome/browser/ui/browser_dialogs.h" nit: sort. http://codereview.chromium.org/9265026/diff/1/chrome/browser/resources/kiosk_mode_logout_dialog.css File chrome/browser/resources/kiosk_mode_logout_dialog.css (right): http://codereview.chromium.org/9265026/diff/1/chrome/browser/resources/kiosk_mode_logout_dialog.css#newcode20 ...
8 years, 11 months ago (2012-01-20 16:16:58 UTC) #2
xiyuan
http://codereview.chromium.org/9265026/diff/1/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): http://codereview.chromium.org/9265026/diff/1/chrome/app/generated_resources.grd#newcode5047 chrome/app/generated_resources.grd:5047: <message name="IDS_FLAGS_ENABLE_KIOSK_MODE_NAME" desc="Title for the flag to enable kiosk ...
8 years, 11 months ago (2012-01-20 18:23:44 UTC) #3
rkc
I've incorporated the review comments; additionally with discussion on the design doc, it was becoming ...
8 years, 11 months ago (2012-01-26 03:37:23 UTC) #4
xiyuan
LGTM with nits http://codereview.chromium.org/9265026/diff/1/chrome/browser/browser_resources.grd File chrome/browser/browser_resources.grd (right): http://codereview.chromium.org/9265026/diff/1/chrome/browser/browser_resources.grd#newcode76 chrome/browser/browser_resources.grd:76: <include name="IDR_KIOSK_MODE_LOGOUT_DIALOG_HTML" file="resources\kiosk_mode_logout_dialog.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" ...
8 years, 11 months ago (2012-01-26 19:34:18 UTC) #5
Chris Masone
There is not a single test in this CL. Please test your new feature. On ...
8 years, 11 months ago (2012-01-26 19:37:14 UTC) #6
rkc
Review changes incorporated. http://codereview.chromium.org/9265026/diff/10001/chrome/browser/chromeos/retail_mode/retail_mode_screen_locker.cc File chrome/browser/chromeos/retail_mode/retail_mode_screen_locker.cc (right): http://codereview.chromium.org/9265026/diff/10001/chrome/browser/chromeos/retail_mode/retail_mode_screen_locker.cc#newcode19 chrome/browser/chromeos/retail_mode/retail_mode_screen_locker.cc:19: On 2012/01/26 19:34:18, xiyuan wrote: > ...
8 years, 11 months ago (2012-01-26 21:36:06 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rkc@chromium.org/9265026/12008
8 years, 11 months ago (2012-01-26 21:36:39 UTC) #8
commit-bot: I haz the power
Can't apply patch for file chrome/browser/ui/browser_dialogs.h. While running patch -p1 --forward --force; patching file chrome/browser/ui/browser_dialogs.h ...
8 years, 11 months ago (2012-01-26 21:36:45 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rkc@chromium.org/9265026/12008
8 years, 11 months ago (2012-01-26 21:37:52 UTC) #10
commit-bot: I haz the power
Can't apply patch for file chrome/browser/ui/browser_dialogs.h. While running patch -p1 --forward --force; patching file chrome/browser/ui/browser_dialogs.h ...
8 years, 11 months ago (2012-01-26 21:37:58 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rkc@chromium.org/9265026/12010
8 years, 11 months ago (2012-01-26 23:24:58 UTC) #12
commit-bot: I haz the power
Presubmit check for 9265026-12010 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 11 months ago (2012-01-26 23:25:13 UTC) #13
rkc
Added reviewers for OWNER's reviews. satorux for chrome/browser/chromeos/dbus estade,arv,jhawkins for chrome/browser/ui/webui
8 years, 11 months ago (2012-01-26 23:28:06 UTC) #14
Will Drewry
tl;dr I'd prefer this waited until the design work was done. Your current implementation requires ...
8 years, 11 months ago (2012-01-26 23:54:02 UTC) #15
satorux1
dbus LGTM if few nits fixed: http://codereview.chromium.org/9265026/diff/12010/chrome/browser/chromeos/dbus/power_manager_client.h File chrome/browser/chromeos/dbus/power_manager_client.h (right): http://codereview.chromium.org/9265026/diff/12010/chrome/browser/chromeos/dbus/power_manager_client.h#newcode81 chrome/browser/chromeos/dbus/power_manager_client.h:81: // Called when ...
8 years, 11 months ago (2012-01-26 23:55:44 UTC) #16
satorux1
Instead of submiting this at once, you might want to create a smaller patch for ...
8 years, 11 months ago (2012-01-26 23:57:56 UTC) #17
Evan Stade
http://codereview.chromium.org/9265026/diff/12010/chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.cc File chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.cc (right): http://codereview.chromium.org/9265026/diff/12010/chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.cc#newcode44 chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.cc:44: const int kRetailModeLogoutDialogHeight = 120; document all these http://codereview.chromium.org/9265026/diff/12010/chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.cc#newcode46 ...
8 years, 11 months ago (2012-01-27 06:54:45 UTC) #18
flackr
http://codereview.chromium.org/9265026/diff/12010/chrome/browser/resources/chromeos/retail_mode_logout_dialog.css File chrome/browser/resources/chromeos/retail_mode_logout_dialog.css (right): http://codereview.chromium.org/9265026/diff/12010/chrome/browser/resources/chromeos/retail_mode_logout_dialog.css#newcode17 chrome/browser/resources/chromeos/retail_mode_logout_dialog.css:17: background: -webkit-linear-gradient(left, #FFFFFF, #DADADA); s/#FFFFFF/white s/#DADADA/#dadada or rgb notation ...
8 years, 11 months ago (2012-01-27 07:48:03 UTC) #19
rkc
Review comments incorporated. Will/Chris: This is just a first iteration, all of this code is ...
8 years, 10 months ago (2012-02-08 02:52:19 UTC) #20
Chris Masone
On Tue, Feb 7, 2012 at 6:52 PM, <rkc@chromium.org> wrote: > Review comments incorporated. > ...
8 years, 10 months ago (2012-02-08 03:45:13 UTC) #21
rkc
On 2012/02/08 03:45:13, Chris Masone wrote: > On Tue, Feb 7, 2012 at 6:52 PM, ...
8 years, 10 months ago (2012-02-08 04:07:04 UTC) #22
satorux1
rkc@, please create a separate patch for chrome/browser/chromeos/dbus. then, this patch will be a bit ...
8 years, 10 months ago (2012-02-08 04:11:26 UTC) #23
Chris Masone
On Tue, Feb 7, 2012 at 8:07 PM, <rkc@chromium.org> wrote: > On 2012/02/08 03:45:13, Chris ...
8 years, 10 months ago (2012-02-08 06:32:38 UTC) #24
flackr
8 years, 10 months ago (2012-02-08 21:23:44 UTC) #25
https://chromiumcodereview.appspot.com/9265026/diff/12010/chrome/browser/ui/w...
File chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.h (right):

https://chromiumcodereview.appspot.com/9265026/diff/12010/chrome/browser/ui/w...
chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.h:48:
RetailModeLogoutDialogHandler* handler_;
On 2012/02/08 02:52:19, Rahul Chaturvedi wrote:
> On 2012/01/27 07:48:04, flackr wrote:
> > Comments, including on ownership of pointer.
> 
> This is a bit self evident. I haven't seen people documenting at this level in
> almost any of the current code for similar dialogs.

It is self evident what the data member is, it may not be self evident if the
pointer is owned by this class. If it is, you should use scoped_ptr which would
make that self evident, or document that it is a weak pointer if the pointer is
owned by another class.

https://chromiumcodereview.appspot.com/9265026/diff/12010/chrome/browser/ui/w...
chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.h:53: class
RetailModeLogoutDialogUI : public HtmlDialogUI {
On 2012/02/08 02:52:19, Rahul Chaturvedi wrote:
> On 2012/01/27 07:48:04, flackr wrote:
> > Class comment.
> 
> Ditto.

http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Class_Comments

https://chromiumcodereview.appspot.com/9265026/diff/25001/chrome/browser/reso...
File chrome/browser/resources/chromeos/retail_mode_logout_dialog.js (right):

https://chromiumcodereview.appspot.com/9265026/diff/25001/chrome/browser/reso...
chrome/browser/resources/chromeos/retail_mode_logout_dialog.js:9: var
countdownTimer = -1;
nit: leave value undefined.

Powered by Google App Engine
This is Rietveld 408576698