OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h" | 5 #include "chrome/browser/ui/webui/signin/inline_login_handler_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 void InlineLoginHandlerImpl::DidCommitProvisionalLoadForFrame( | 489 void InlineLoginHandlerImpl::DidCommitProvisionalLoadForFrame( |
490 content::RenderFrameHost* render_frame_host, | 490 content::RenderFrameHost* render_frame_host, |
491 const GURL& url, | 491 const GURL& url, |
492 ui::PageTransition transition_type) { | 492 ui::PageTransition transition_type) { |
493 if (!web_contents()) | 493 if (!web_contents()) |
494 return; | 494 return; |
495 | 495 |
496 // Returns early if this is not a gaia iframe navigation. | 496 // Returns early if this is not a gaia iframe navigation. |
497 const GURL kGaiaExtOrigin( | 497 const GURL kGaiaExtOrigin( |
498 "chrome-extension://mfffpogegjflfpflabcdkioaeobkgjik/"); | 498 "chrome-extension://mfffpogegjflfpflabcdkioaeobkgjik/"); |
499 content::RenderFrameHost* gaia_iframe = InlineLoginUI::GetAuthIframe( | 499 content::RenderFrameHost* gaia_frame = InlineLoginUI::GetAuthFrame( |
500 web_contents(), kGaiaExtOrigin, "signin-frame"); | 500 web_contents(), kGaiaExtOrigin, "signin-frame"); |
501 if (render_frame_host != gaia_iframe) | 501 if (render_frame_host != gaia_frame) |
502 return; | 502 return; |
503 | 503 |
504 // Loading any untrusted (e.g., HTTP) URLs in the privileged sign-in process | 504 // Loading any untrusted (e.g., HTTP) URLs in the privileged sign-in process |
505 // will require confirmation before the sign in takes effect. | 505 // will require confirmation before the sign in takes effect. |
506 if (!url.is_empty()) { | 506 if (!url.is_empty()) { |
507 GURL origin(url.GetOrigin()); | 507 GURL origin(url.GetOrigin()); |
508 if (url.spec() != url::kAboutBlankURL && | 508 if (url.spec() != url::kAboutBlankURL && |
509 origin != kGaiaExtOrigin && | 509 origin != kGaiaExtOrigin && |
510 !gaia::IsGaiaSignonRealm(origin)) { | 510 !gaia::IsGaiaSignonRealm(origin)) { |
511 confirm_untrusted_signin_ = true; | 511 confirm_untrusted_signin_ = true; |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 } | 775 } |
776 } | 776 } |
777 | 777 |
778 if (show_account_management) { | 778 if (show_account_management) { |
779 browser->window()->ShowAvatarBubbleFromAvatarButton( | 779 browser->window()->ShowAvatarBubbleFromAvatarButton( |
780 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, | 780 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT, |
781 signin::ManageAccountsParams()); | 781 signin::ManageAccountsParams()); |
782 } | 782 } |
783 } | 783 } |
784 } | 784 } |
OLD | NEW |