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

Issue 125993002: Add error handling for supervised user import flow. (Closed)

Created:
6 years, 11 months ago by Adrian Kuegel
Modified:
6 years, 11 months ago
CC:
chromium-reviews, dbeam+watch-options_chromium.org, tfarina, rginda+watch_chromium.org, pam+watch_chromium.org, arv+watch_chromium.org
Visibility:
Public.

Description

Add error handling for supervised user import flow. Add a check if the user tries to create a profile with the name of an already existing supervised user. In that case, the user is not allowed to create a new such supervised user profile, instead he can directly import the existing supervised user. A screenshot can be found in the bug description. BUG=282464 TEST=browser_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243855

Patch Set 1 : Add error handling. #

Patch Set 2 : Move error bubble below checkboxes. #

Total comments: 22

Patch Set 3 : Address review comments. #

Total comments: 4

Patch Set 4 : Move ManagedUserListData to its own file. #

Total comments: 3

Patch Set 5 : Update ManagedDelete test. #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+401 lines, -99 lines) Patch
M chrome/app/generated_resources.grd View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/resources/options/manage_profile_overlay.css View 1 2 2 chunks +17 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/manage_profile_overlay.html View 1 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/resources/options/manage_profile_overlay.js View 1 2 3 14 chunks +125 lines, -39 lines 0 comments Download
M chrome/browser/resources/options/managed_user_create_confirm.js View 1 2 2 chunks +4 lines, -17 lines 0 comments Download
M chrome/browser/resources/options/managed_user_import.js View 1 2 3 6 chunks +10 lines, -16 lines 0 comments Download
A chrome/browser/resources/options/managed_user_list_data.js View 1 2 3 1 chunk +115 lines, -0 lines 12 comments Download
M chrome/browser/resources/options/options_bundle.js View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_browsertest.js View 1 2 3 4 7 chunks +89 lines, -10 lines 0 comments Download
M chrome/browser/ui/webui/options/manage_profile_handler.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options/managed_user_import_handler.cc View 1 2 3 3 chunks +3 lines, -13 lines 0 comments Download
M ui/webui/resources/js/util.js View 1 2 3 1 chunk +28 lines, -0 lines 2 comments Download

Messages

Total messages: 18 (0 generated)
Adrian Kuegel
Pam, can you please review this CL?
6 years, 11 months ago (2014-01-07 16:30:10 UTC) #1
Pam (message me for reviews)
https://codereview.chromium.org/125993002/diff/130001/chrome/browser/resources/options/manage_profile_overlay.css File chrome/browser/resources/options/manage_profile_overlay.css (right): https://codereview.chromium.org/125993002/diff/130001/chrome/browser/resources/options/manage_profile_overlay.css#newcode59 chrome/browser/resources/options/manage_profile_overlay.css:59: } From the screenshot, it looks like you also ...
6 years, 11 months ago (2014-01-08 11:21:35 UTC) #2
Adrian Kuegel
https://codereview.chromium.org/125993002/diff/130001/chrome/browser/resources/options/manage_profile_overlay.css File chrome/browser/resources/options/manage_profile_overlay.css (right): https://codereview.chromium.org/125993002/diff/130001/chrome/browser/resources/options/manage_profile_overlay.css#newcode59 chrome/browser/resources/options/manage_profile_overlay.css:59: } On 2014/01/08 11:21:35, Pam (also PM for reviews) ...
6 years, 11 months ago (2014-01-08 12:51:46 UTC) #3
Pam (message me for reviews)
https://codereview.chromium.org/125993002/diff/130001/chrome/browser/resources/options/managed_user_import.js File chrome/browser/resources/options/managed_user_import.js (right): https://codereview.chromium.org/125993002/diff/130001/chrome/browser/resources/options/managed_user_import.js#newcode10 chrome/browser/resources/options/managed_user_import.js:10: * ManagedUserList class. On 2014/01/08 12:51:47, Adrian Kuegel wrote: ...
6 years, 11 months ago (2014-01-08 14:36:45 UTC) #4
Adrian Kuegel
https://codereview.chromium.org/125993002/diff/130001/chrome/browser/resources/options/managed_user_import.js File chrome/browser/resources/options/managed_user_import.js (right): https://codereview.chromium.org/125993002/diff/130001/chrome/browser/resources/options/managed_user_import.js#newcode10 chrome/browser/resources/options/managed_user_import.js:10: * ManagedUserList class. On 2014/01/08 14:36:45, Pam (also PM ...
6 years, 11 months ago (2014-01-08 16:49:07 UTC) #5
Pam (message me for reviews)
LGTM, but see nit below. https://codereview.chromium.org/125993002/diff/390001/chrome/browser/resources/options/manage_profile_overlay.js File chrome/browser/resources/options/manage_profile_overlay.js (right): https://codereview.chromium.org/125993002/diff/390001/chrome/browser/resources/options/manage_profile_overlay.js#newcode70 chrome/browser/resources/options/manage_profile_overlay.js:70: options.ManagedUserListData.reloadExistingManagedUsers(); Since deleting a ...
6 years, 11 months ago (2014-01-08 17:21:16 UTC) #6
Adrian Kuegel
https://codereview.chromium.org/125993002/diff/390001/chrome/browser/resources/options/manage_profile_overlay.js File chrome/browser/resources/options/manage_profile_overlay.js (right): https://codereview.chromium.org/125993002/diff/390001/chrome/browser/resources/options/manage_profile_overlay.js#newcode70 chrome/browser/resources/options/manage_profile_overlay.js:70: options.ManagedUserListData.reloadExistingManagedUsers(); On 2014/01/08 17:21:16, Pam (also PM for reviews) ...
6 years, 11 months ago (2014-01-09 08:56:34 UTC) #7
Pam (message me for reviews)
https://codereview.chromium.org/125993002/diff/390001/chrome/browser/resources/options/manage_profile_overlay.js File chrome/browser/resources/options/manage_profile_overlay.js (right): https://codereview.chromium.org/125993002/diff/390001/chrome/browser/resources/options/manage_profile_overlay.js#newcode70 chrome/browser/resources/options/manage_profile_overlay.js:70: options.ManagedUserListData.reloadExistingManagedUsers(); On 2014/01/09 08:56:34, Adrian Kuegel wrote: > On ...
6 years, 11 months ago (2014-01-09 09:00:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akuegel@chromium.org/125993002/390001
6 years, 11 months ago (2014-01-09 09:01:51 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/akuegel@chromium.org/125993002/570002
6 years, 11 months ago (2014-01-09 10:00:51 UTC) #10
commit-bot: I haz the power
Change committed as 243855
6 years, 11 months ago (2014-01-09 12:01:57 UTC) #11
Bernhard Bauer
Post-commit drive-by review! Don't you just love those? ;-) https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js File chrome/browser/resources/options/managed_user_list_data.js (right): https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js#newcode49 chrome/browser/resources/options/managed_user_list_data.js:49: ...
6 years, 11 months ago (2014-01-09 13:39:07 UTC) #12
Adrian Kuegel
Bernhard, I see you like to review code :) I will send you my next ...
6 years, 11 months ago (2014-01-09 14:12:41 UTC) #13
Bernhard Bauer
https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js File chrome/browser/resources/options/managed_user_list_data.js (right): https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js#newcode79 chrome/browser/resources/options/managed_user_list_data.js:79: * @param {Object} errback the callback function which is ...
6 years, 11 months ago (2014-01-09 14:19:26 UTC) #14
Adrian Kuegel
https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js File chrome/browser/resources/options/managed_user_list_data.js (right): https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js#newcode79 chrome/browser/resources/options/managed_user_list_data.js:79: * @param {Object} errback the callback function which is ...
6 years, 11 months ago (2014-01-09 15:34:16 UTC) #15
Bernhard Bauer
https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js File chrome/browser/resources/options/managed_user_list_data.js (right): https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js#newcode79 chrome/browser/resources/options/managed_user_list_data.js:79: * @param {Object} errback the callback function which is ...
6 years, 11 months ago (2014-01-09 16:25:11 UTC) #16
Adrian Kuegel
On 2014/01/09 16:25:11, Bernhard Bauer wrote: > https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js > File chrome/browser/resources/options/managed_user_list_data.js (right): > > https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resources/options/managed_user_list_data.js#newcode79 ...
6 years, 11 months ago (2014-01-09 18:05:43 UTC) #17
Bernhard Bauer
6 years, 11 months ago (2014-01-09 19:56:58 UTC) #18
Message was sent while issue was closed.
On 2014/01/09 18:05:43, Adrian Kuegel wrote:
> On 2014/01/09 16:25:11, Bernhard Bauer wrote:
> >
>
https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resource...
> > File chrome/browser/resources/options/managed_user_list_data.js (right):
> > 
> >
>
https://codereview.chromium.org/125993002/diff/570002/chrome/browser/resource...
> > chrome/browser/resources/options/managed_user_list_data.js:79: * @param
> {Object}
> > errback the callback function which is called on error.
> > On 2014/01/09 15:34:17, Adrian Kuegel wrote:
> > > On 2014/01/09 14:19:27, Bernhard Bauer wrote:
> > > > On 2014/01/09 14:12:42, Adrian Kuegel wrote:
> > > > > On 2014/01/09 13:39:08, Bernhard Bauer wrote:
> > > > > > It might be nice to do the whole thing with DOM futures... :)
> > > > > > 
> > > > > > That would actually make some of the behavior really nice, like
> caching
> > > the
> > > > > > |managed_users_| list (we just create the promise lazily and send
out
> > the
> > > > > > request to the browser when creating it, then keep it around, so
> future
> > > > > requests
> > > > > > will be immediately served by the fulfilled promise). 
> > > > > 
> > > > > I already have the caching in the code. I didn't know about DOM
futures,
> I
> > > > will
> > > > > read about them now. Maybe they can make some of the code I have
written
> > > > > obsolete. However one functionality we need is that we can invalidate
> the
> > > > cache,
> > > > > because the underlying data can change.
> > > > 
> > > > We can still do that; just throw away the future.
> > > 
> > > From what I have read so far, it looks like it got renamed to Promise, and
> the
> > > spec is still in development. So maybe we should wait a bit before it is
> > > finalized, and then use it. I saw we have cr.Promise available, but that
> seems
> > > to be a bit different from what the spec currently says. Anyway, it will
> > > definitely be useful and simplifies the code.
> > 
> > Promises are available from Chrome 32 on, according to
> >
>
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Obje....
> 
> You are right, and I just tried it, it works. I still need to update the
> documentation in my CL,
> but I will do that tomorrow, and then upload a new patch.

Cool, thanks!

Powered by Google App Engine
This is Rietveld 408576698