|
|
Chromium Code Reviews
DescriptionDisplay signin dialog with system profile after the last profile being deleted when force signin enabled.
BUG=642059
Committed: https://crrev.com/438598fc3ff38423311a37341023690405bc34a0
Cr-Commit-Position: refs/heads/master@{#423879}
Patch Set 1 #
Total comments: 1
Patch Set 2 : sky's comments #
Total comments: 1
Messages
Total messages: 25 (13 generated)
Description was changed from ========== Display signin dialog for the default profile after the last profile being deleted. BUG=642059 ========== to ========== Display signin dialog for the default profile after the last profile being deleted for force signin. BUG=642059 ==========
zmin@chromium.org changed reviewers: + anthonyvd@chromium.org, sky@chromium.org
Hi Scott, Anthony, Can you review the CL please? Owen
https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... File chrome/browser/ui/views/profiles/user_manager_view.cc (right): https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... chrome/browser/ui/views/profiles/user_manager_view.cc:292: if (browser_context == nullptr) This seems wrong to me. How is it that web_view_ would have the right BrowserContext, but it wouldn't be passed to this function?
On 2016/10/04 18:22:27, sky wrote: > https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... > File chrome/browser/ui/views/profiles/user_manager_view.cc (right): > > https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... > chrome/browser/ui/views/profiles/user_manager_view.cc:292: if (browser_context > == nullptr) > This seems wrong to me. How is it that web_view_ would have the right > BrowserContext, but it wouldn't be passed to this function? UserManager always uses System Profile as BrowserContext while the Gaia signin dialog doesn't have to. So BrowserContext needs to be passed into the function as a parameter. However, the web_view_'s BrowserContext can still be used as a default value here so that the function is abled to be called without an instance of System Profile as parameter.
On 2016/10/04 19:02:57, zmin wrote: > On 2016/10/04 18:22:27, sky wrote: > > > https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... > > File chrome/browser/ui/views/profiles/user_manager_view.cc (right): > > > > > https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... > > chrome/browser/ui/views/profiles/user_manager_view.cc:292: if (browser_context > > == nullptr) > > This seems wrong to me. How is it that web_view_ would have the right > > BrowserContext, but it wouldn't be passed to this function? > > UserManager always uses System Profile as BrowserContext while the Gaia signin > dialog doesn't have to. So BrowserContext needs to be passed into the function > as a parameter. > However, the web_view_'s BrowserContext can still be used as a default value > here so that the function is abled to be called without an instance of System > Profile as parameter. This is still confusing. I think this logic belongs in the callers, not in the view.
On 2016/10/05 15:45:21, sky wrote: > On 2016/10/04 19:02:57, zmin wrote: > > On 2016/10/04 18:22:27, sky wrote: > > > > > > https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... > > > File chrome/browser/ui/views/profiles/user_manager_view.cc (right): > > > > > > > > > https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... > > > chrome/browser/ui/views/profiles/user_manager_view.cc:292: if > (browser_context > > > == nullptr) > > > This seems wrong to me. How is it that web_view_ would have the right > > > BrowserContext, but it wouldn't be passed to this function? > > > > UserManager always uses System Profile as BrowserContext while the Gaia signin > > dialog doesn't have to. So BrowserContext needs to be passed into the function > > as a parameter. > > However, the web_view_'s BrowserContext can still be used as a default value > > here so that the function is abled to be called without an instance of System > > Profile as parameter. > > This is still confusing. I think this logic belongs in the callers, not in the > view. OK, I can move it to the caller.
The CQ bit was checked by zmin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/10/05 15:50:58, zmin wrote: > On 2016/10/05 15:45:21, sky wrote: > > On 2016/10/04 19:02:57, zmin wrote: > > > On 2016/10/04 18:22:27, sky wrote: > > > > > > > > > > https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... > > > > File chrome/browser/ui/views/profiles/user_manager_view.cc (right): > > > > > > > > > > > > > > https://codereview.chromium.org/2392953002/diff/1/chrome/browser/ui/views/pro... > > > > chrome/browser/ui/views/profiles/user_manager_view.cc:292: if > > (browser_context > > > > == nullptr) > > > > This seems wrong to me. How is it that web_view_ would have the right > > > > BrowserContext, but it wouldn't be passed to this function? > > > > > > UserManager always uses System Profile as BrowserContext while the Gaia > signin > > > dialog doesn't have to. So BrowserContext needs to be passed into the > function > > > as a parameter. > > > However, the web_view_'s BrowserContext can still be used as a default value > > > here so that the function is abled to be called without an instance of > System > > > Profile as parameter. > > > > This is still confusing. I think this logic belongs in the callers, not in the > > view. > > OK, I can move it to the caller. I just realized that the default value is not safe anyway because the system profile creation is asyn. I have updated the code to move this logic to the caller.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Please update the description of the cl too. https://codereview.chromium.org/2392953002/diff/20001/chrome/browser/ui/webui... File chrome/browser/ui/webui/profile_helper.cc (right): https://codereview.chromium.org/2392953002/diff/20001/chrome/browser/ui/webui... chrome/browser/ui/webui/profile_helper.cc:36: #if !defined(OS_MACOSX) Is it expected this branch (force signin enabled) does nothing if mac?
Description was changed from ========== Display signin dialog for the default profile after the last profile being deleted for force signin. BUG=642059 ========== to ========== Display signin dialog for the default profile after the last profile being deleted for force signin. The signin dialog will use system profile as browsercontext. BUG=642059 ==========
Description was changed from ========== Display signin dialog for the default profile after the last profile being deleted for force signin. The signin dialog will use system profile as browsercontext. BUG=642059 ========== to ========== Display signin dialog for the default profile after the last profile being deleted for force signin. The signin dialog will use system profile as its browsercontext. BUG=642059 ==========
On 2016/10/06 16:02:08, sky wrote: > Please update the description of the cl too. > > https://codereview.chromium.org/2392953002/diff/20001/chrome/browser/ui/webui... > File chrome/browser/ui/webui/profile_helper.cc (right): > > https://codereview.chromium.org/2392953002/diff/20001/chrome/browser/ui/webui... > chrome/browser/ui/webui/profile_helper.cc:36: #if !defined(OS_MACOSX) > Is it expected this branch (force signin enabled) does nothing if mac? No, the mac part is still under construction and it will be sent to code review soon. Remove it from Mac right now to avoid Compiler Error.
Update the description and LGTM
Description was changed from ========== Display signin dialog for the default profile after the last profile being deleted for force signin. The signin dialog will use system profile as its browsercontext. BUG=642059 ========== to ========== Display signin dialog with system profile after the last profile being deleted when force signin enabled. BUG=642059 ==========
zmin@chromium.org changed reviewers: - anthonyvd@chromium.org
The CQ bit was checked by zmin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Display signin dialog with system profile after the last profile being deleted when force signin enabled. BUG=642059 ========== to ========== Display signin dialog with system profile after the last profile being deleted when force signin enabled. BUG=642059 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Display signin dialog with system profile after the last profile being deleted when force signin enabled. BUG=642059 ========== to ========== Display signin dialog with system profile after the last profile being deleted when force signin enabled. BUG=642059 Committed: https://crrev.com/438598fc3ff38423311a37341023690405bc34a0 Cr-Commit-Position: refs/heads/master@{#423879} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/438598fc3ff38423311a37341023690405bc34a0 Cr-Commit-Position: refs/heads/master@{#423879} |
