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

Unified Diff: chrome/browser/password_manager/password_form_manager.cc

Issue 8089012: Don't immediately fill saved passwords in Incognito mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/password_manager/password_form_manager.cc
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index c0a6724091cdd2dd2916d6a031cb622af07403fd..1cbbdec6377cad3725dc132b8fcdd9847eb17c61 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -293,10 +293,13 @@ void PasswordFormManager::OnRequestDone(int handle,
return;
}
- // Proceed to autofill (note that we provide the choices but don't
- // actually prefill a value if the ACTION paths don't match).
- bool wait_for_username = observed_form_.action.GetWithEmptyPath() !=
- preferred_match_->action.GetWithEmptyPath();
+ // Proceed to autofill.
+ // Note that we provide the choices but don't actually prefill a value if
+ // either: (1) we are in Incognito mode, or (2) the ACTION paths don't match.
+ bool wait_for_username =
+ profile_->IsOffTheRecord() ||
+ observed_form_.action.GetWithEmptyPath() !=
+ preferred_match_->action.GetWithEmptyPath();
if (wait_for_username)
manager_action_ = kManagerActionNone;
else
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698