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

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: 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..8b1cf02f54ec1bf44da6d833cfaba93e4488a677 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper.cc
@@ -991,6 +991,22 @@ void OneClickSigninHelper::NavigateToPendingEntry(
}
}
+void OneClickSigninHelper::DidNavigateMainFrame(
tim (not reviewing) 2013/06/25 22:39:43 I forget how WebContentsObserver works... are we s
Charlie Reis 2013/06/26 01:25:39 Yes, since the main frame is what determines the p
+ 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());
+ DCHECK(profile);
tim (not reviewing) 2013/06/25 22:39:43 Asserting that the profile is non-null and then ha
Charlie Reis 2013/06/26 01:25:39 Sure.
+ 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