|
|
Chromium Code Reviews|
Created:
3 years, 11 months ago by xiaoyinh(OOO Sep 11-29) Modified:
3 years, 11 months ago CC:
chromium-reviews, alemate+watch_chromium.org, achuith+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionpropagate proxy auth info into the browser context.
BUG=658625, 255258
TEST=Manual
Review-Url: https://codereview.chromium.org/2644713003
Cr-Commit-Position: refs/heads/master@{#444855}
Committed: https://chromium.googlesource.com/chromium/src/+/9514fbd507c6ffb769209244dc083abfc7879a5b
Patch Set 1 #Patch Set 2 : rebase #
Total comments: 5
Patch Set 3 : incorporate comments #Patch Set 4 : Incorporate comments and rebase #
Total comments: 4
Patch Set 5 : comments from xiyuan@ #Messages
Total messages: 36 (25 generated)
Description was changed from ========== propagate proxy auth info into the browser context. BUG=658625,255258 TEST=Manual ========== to ========== propagate proxy auth info into the browser context. BUG=658625,255258 TEST=Manual ==========
xiaoyinh@chromium.org changed reviewers: + nharper@chromium.org, xiyuan@chromium.org
The CQ bit was checked by xiaoyinh@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...
The CQ bit was checked by xiaoyinh@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...
xiyuan@, nharper@, please take a look! I've tested proxy authentication over ethernet and wifi, both seems to be working.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Cool. lgtm from my side. https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... File chrome/browser/chromeos/login/existing_user_controller.cc (right): https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/login/existing_user_controller.cc:120: // the mail profile to make sure all subsystems of Chrome can access the network Could you help to update the comment since you are here? // .... entered in the login profile in // the mail profile ... => // ... entered in the login profile *to* // the *main* profile...
I guess it lgtm. https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... File chrome/browser/chromeos/login/existing_user_controller.cc (right): https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/login/existing_user_controller.cc:135: content::StoragePartition* signin_partition = login::GetSigninPartition(); Is there a reason for doing this here instead of replacing the ProfileHelper::GetSigninProfile() call at TransferContextAuthenticationsOnIOThread's callsite with this? I don't know what the implications of that would be.
xiaoyinh@chromium.org changed reviewers: + alemate@google.com
https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... File chrome/browser/chromeos/login/existing_user_controller.cc (right): https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/login/existing_user_controller.cc:120: // the mail profile to make sure all subsystems of Chrome can access the network On 2017/01/18 23:34:08, xiyuan wrote: > Could you help to update the comment since you are here? > > // .... entered in the login profile in > // the mail profile ... > > => > // ... entered in the login profile *to* > // the *main* profile... Done. https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/login/existing_user_controller.cc:135: content::StoragePartition* signin_partition = login::GetSigninPartition(); On 2017/01/19 00:42:17, nharper wrote: > Is there a reason for doing this here instead of replacing the > ProfileHelper::GetSigninProfile() call at > TransferContextAuthenticationsOnIOThread's callsite with this? I don't know what > the implications of that would be. Thanks for the review. I just tried the normal login flow(without proxy), and it didn't go through this function. I'm not sure though if TransferContextAuthenticationsOnIOThread is only used to transfer proxy auth data. If that's the case, we probably don't need ProfileHelper::GetSigninProfile() anymore. Initially, I just don't want to break existing auth flow(if any) that are propagated though ProfileHelper::GetSigninProfile(). xiyuan@, alemate@ might know better the history and usage of GetSigninProfile() vs GetSigninPartition();
The CQ bit was checked by xiaoyinh@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...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... File chrome/browser/chromeos/login/existing_user_controller.cc (right): https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... chrome/browser/chromeos/login/existing_user_controller.cc:135: content::StoragePartition* signin_partition = login::GetSigninPartition(); On 2017/01/19 01:32:08, xiaoyinh wrote: > On 2017/01/19 00:42:17, nharper wrote: > > Is there a reason for doing this here instead of replacing the > > ProfileHelper::GetSigninProfile() call at > > TransferContextAuthenticationsOnIOThread's callsite with this? I don't know > what > > the implications of that would be. > > Thanks for the review. I just tried the normal login flow(without proxy), and it > didn't go through this function. I'm not sure though if > TransferContextAuthenticationsOnIOThread is only used to transfer proxy auth > data. If that's the case, we probably don't need > ProfileHelper::GetSigninProfile() anymore. Initially, I just don't want to > break existing auth flow(if any) that are propagated though > ProfileHelper::GetSigninProfile(). > > xiyuan@, alemate@ might know better the history and usage of GetSigninProfile() > vs GetSigninPartition(); The Gaia is now served in webview and GetSigninPartition() should handle that. However, there is still a couple of things use the signin profile directly: the iframe in ToS page and captive portal window on the login screen. It is probably safer to copy both. However, it is a good point to call GetSigninPartition() on the callsite of TransferContextAuthenticationsOnIOThread. TransferContextAuthenticationsOnIOThread as the name indicates runs on the IO thread. And GetSigninPartition() is not thread-safe and probably does not expect to be called on IO thread. Can we change that?
The CQ bit was checked by xiaoyinh@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 2017/01/19 17:20:26, xiyuan wrote: > https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... > File chrome/browser/chromeos/login/existing_user_controller.cc (right): > > https://codereview.chromium.org/2644713003/diff/20001/chrome/browser/chromeos... > chrome/browser/chromeos/login/existing_user_controller.cc:135: > content::StoragePartition* signin_partition = login::GetSigninPartition(); > On 2017/01/19 01:32:08, xiaoyinh wrote: > > On 2017/01/19 00:42:17, nharper wrote: > > > Is there a reason for doing this here instead of replacing the > > > ProfileHelper::GetSigninProfile() call at > > > TransferContextAuthenticationsOnIOThread's callsite with this? I don't know > > what > > > the implications of that would be. > > > > Thanks for the review. I just tried the normal login flow(without proxy), and > it > > didn't go through this function. I'm not sure though if > > TransferContextAuthenticationsOnIOThread is only used to transfer proxy auth > > data. If that's the case, we probably don't need > > ProfileHelper::GetSigninProfile() anymore. Initially, I just don't want to > > break existing auth flow(if any) that are propagated though > > ProfileHelper::GetSigninProfile(). > > > > xiyuan@, alemate@ might know better the history and usage of > GetSigninProfile() > > vs GetSigninPartition(); > > The Gaia is now served in webview and GetSigninPartition() should handle that. > However, there is still a couple of things use the signin profile directly: the > iframe in ToS page and captive portal window on the login screen. It is probably > safer to copy both. > > However, it is a good point to call GetSigninPartition() on the callsite of > TransferContextAuthenticationsOnIOThread. > TransferContextAuthenticationsOnIOThread as the name indicates runs on the IO > thread. And GetSigninPartition() is not thread-safe and probably does not expect > to be called on IO thread. Can we change that? Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2644713003/diff/60001/chrome/browser/chromeos... File chrome/browser/chromeos/login/existing_user_controller.cc (right): https://codereview.chromium.org/2644713003/diff/60001/chrome/browser/chromeos... chrome/browser/chromeos/login/existing_user_controller.cc:125: net::URLRequestContextGetter* webview_context_getter) { nit: move |webview_context_getter| before |browser_process_context_getter| so that input args precede output args. https://codereview.chromium.org/2644713003/diff/60001/chrome/browser/chromeos... chrome/browser/chromeos/login/existing_user_controller.cc:339: task = base::Bind(&TransferContextAuthenticationsOnIOThread, Can we only do base::Bind in one place? e.g. content::StoragePartition* signin_partition = login::GetSigninPartition(); scoped_refptr<net::URLRequestContextGetter> webview_context_getter; if (signin_partition) webview_context_getter = ignin_partition->GetURLRequestContext(); content::BrowserThread::PostDelayedTask(...
The CQ bit was checked by xiaoyinh@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...
https://codereview.chromium.org/2644713003/diff/60001/chrome/browser/chromeos... File chrome/browser/chromeos/login/existing_user_controller.cc (right): https://codereview.chromium.org/2644713003/diff/60001/chrome/browser/chromeos... chrome/browser/chromeos/login/existing_user_controller.cc:125: net::URLRequestContextGetter* webview_context_getter) { On 2017/01/19 20:33:42, xiyuan wrote: > nit: move |webview_context_getter| before |browser_process_context_getter| so > that input args precede output args. Done. https://codereview.chromium.org/2644713003/diff/60001/chrome/browser/chromeos... chrome/browser/chromeos/login/existing_user_controller.cc:339: task = base::Bind(&TransferContextAuthenticationsOnIOThread, On 2017/01/19 20:33:42, xiyuan wrote: > Can we only do base::Bind in one place? > > e.g. > content::StoragePartition* signin_partition = login::GetSigninPartition(); > scoped_refptr<net::URLRequestContextGetter> webview_context_getter; > if (signin_partition) > webview_context_getter = ignin_partition->GetURLRequestContext(); > > content::BrowserThread::PostDelayedTask(... Thanks! Changed.
lgtm++
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by xiaoyinh@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from nharper@chromium.org Link to the patchset: https://codereview.chromium.org/2644713003/#ps80001 (title: "comments from xiyuan@")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 80001, "attempt_start_ts": 1484862926864210,
"parent_rev": "86866d174733b3372662376b3ecfc937727442d2", "commit_rev":
"9514fbd507c6ffb769209244dc083abfc7879a5b"}
Message was sent while issue was closed.
Description was changed from ========== propagate proxy auth info into the browser context. BUG=658625,255258 TEST=Manual ========== to ========== propagate proxy auth info into the browser context. BUG=658625,255258 TEST=Manual Review-Url: https://codereview.chromium.org/2644713003 Cr-Commit-Position: refs/heads/master@{#444855} Committed: https://chromium.googlesource.com/chromium/src/+/9514fbd507c6ffb769209244dc08... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/9514fbd507c6ffb769209244dc08... |
