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

Unified Diff: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc

Issue 2653953009: Convert InlineLoginHandlerImpl to use the new navigation callbacks. (Closed)
Patch Set: nit Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/signin/inline_login_handler_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
diff --git a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
index b0ecfb59ce82839bc9788301d54a0ae6fde6ccc8..593183a60dc3359364ea032a4e2dbfbc64781d7c 100644
--- a/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_handler_impl.cc
@@ -61,6 +61,7 @@
#include "components/signin/core/common/profile_management_switches.h"
#include "components/signin/core/common/signin_pref_names.h"
#include "components/strings/grit/components_strings.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_ui.h"
@@ -395,26 +396,27 @@ InlineLoginHandlerImpl::InlineLoginHandlerImpl()
InlineLoginHandlerImpl::~InlineLoginHandlerImpl() {}
// This method is not called with webview sign in enabled.
-void InlineLoginHandlerImpl::DidCommitProvisionalLoadForFrame(
- content::RenderFrameHost* render_frame_host,
- const GURL& url,
- ui::PageTransition transition_type) {
- if (!web_contents())
+void InlineLoginHandlerImpl::DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) {
+ if (!web_contents() ||
+ !navigation_handle->HasCommitted() ||
+ navigation_handle->IsErrorPage()) {
return;
+ }
// Returns early if this is not a gaia webview navigation.
content::RenderFrameHost* gaia_frame =
signin::GetAuthFrame(web_contents(), "signin-frame");
- if (render_frame_host != gaia_frame)
+ if (navigation_handle->GetRenderFrameHost() != gaia_frame)
return;
// Loading any untrusted (e.g., HTTP) URLs in the privileged sign-in process
// will require confirmation before the sign in takes effect.
const GURL kGaiaExtOrigin(
GaiaUrls::GetInstance()->signin_completed_continue_url().GetOrigin());
- if (!url.is_empty()) {
- GURL origin(url.GetOrigin());
- if (url.spec() != url::kAboutBlankURL &&
+ if (!navigation_handle->GetURL().is_empty()) {
+ GURL origin(navigation_handle->GetURL().GetOrigin());
+ if (navigation_handle->GetURL().spec() != url::kAboutBlankURL &&
origin != kGaiaExtOrigin &&
!gaia::IsGaiaSignonRealm(origin)) {
confirm_untrusted_signin_ = true;
« no previous file with comments | « chrome/browser/ui/webui/signin/inline_login_handler_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698