Chromium Code Reviews| 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 17f25190018cee91d5b7e48962f19c5d627de6ea..cbd56463f8e6cb10a14a60d2eda254e6dc46ab25 100644 |
| --- a/chrome/browser/ui/sync/one_click_signin_helper.cc |
| +++ b/chrome/browser/ui/sync/one_click_signin_helper.cc |
| @@ -1052,9 +1052,9 @@ 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)) { |
| + // Make sure the renderer process is no longer considered the trusted |
| + // sign-in process when a navigation to a non-sign-in URL occurs. |
| Profile* profile = |
| Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
| SigninManager* manager = profile ? |
| @@ -1062,6 +1062,13 @@ void OneClickSigninHelper::DidNavigateMainFrame( |
| int process_id = web_contents()->GetRenderProcessHost()->GetID(); |
| if (manager && manager->IsSigninProcess(process_id)) |
| manager->ClearSigninProcess(); |
| + |
| + // If the navigation to a non-sign-in URL hasn't been triggered by the web |
| + // contents, the sign in flow has been aborted and the state must be |
| + // cleaned (crbug.com/269421). |
| + if (!content::PageTransitionIsWebTriggerable(params.transition) && |
| + auto_accept_ != AUTO_ACCEPT_NONE) |
|
fdoray
2013/08/09 14:32:25
CleanTransientState() cannot be executed in a unit
(NOT FOR CODE REVIEWS)
2013/08/09 14:43:04
Is it only for tests? Can you set do_not_clear_pe
fdoray
2013/08/09 17:42:14
It's for tests, but it also avoids unnecessary cal
|
| + CleanTransientState(); |
|
(NOT FOR CODE REVIEWS)
2013/08/09 14:43:04
Should add { and } to this if statement since cond
fdoray
2013/08/09 17:42:14
Done.
|
| } |
| } |