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

Unified Diff: chrome/browser/ui/sync/one_click_signin_helper.cc

Issue 17727002: Stop trusting the sign-in process if it manages to navigate to another URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test Created 7 years, 6 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/sync/one_click_signin_helper.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/sync/one_click_signin_helper.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_helper.cc b/chrome/browser/ui/sync/one_click_signin_helper.cc
index e94693f634c718d763c98df492e13c0b83c7b50b..908536595effebde12549de04b900c7422b06d8e 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -991,6 +991,21 @@ void OneClickSigninHelper::NavigateToPendingEntry(
}
}
+void OneClickSigninHelper::DidNavigateMainFrame(
+ const content::LoadCommittedDetails& details,
+ const content::FrameNavigateParams& params) {
+ // If we navigate to a non-sign-in URL, make sure that the renderer process
+ // is no longer considered the trusted sign-in process.
+ if (!SigninManager::IsWebBasedSigninFlowURL(params.url)) {
+ Profile* profile =
+ Profile::FromBrowserContext(web_contents()->GetBrowserContext());
+ SigninManager* manager = profile ?
+ SigninManagerFactory::GetForProfile(profile) : NULL;
+ if (manager)
+ manager->ClearSigninProcess();
+ }
+}
+
void OneClickSigninHelper::DidStopLoading(
content::RenderViewHost* render_view_host) {
// If the user left the sign in process, clear all members.
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698