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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 1054403002: Basic tests for new webview based signin flow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove flaky back-button check Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc ('k') | chrome/browser/ui/webui/signin/inline_login_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698