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

Unified Diff: chrome/renderer/autofill/password_generation_manager.cc

Issue 10168017: Only enable password generation if password manager and autofill are both (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments Created 8 years, 8 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
Index: chrome/renderer/autofill/password_generation_manager.cc
diff --git a/chrome/renderer/autofill/password_generation_manager.cc b/chrome/renderer/autofill/password_generation_manager.cc
index 8f479474abfd16faa5a4b6f137a6577a6d30c5af..687c035e26579f2a98973b1e5195ebd12bdad4ab 100644
--- a/chrome/renderer/autofill/password_generation_manager.cc
+++ b/chrome/renderer/autofill/password_generation_manager.cc
@@ -20,12 +20,13 @@ namespace autofill {
PasswordGenerationManager::PasswordGenerationManager(
content::RenderView* render_view)
: content::RenderViewObserver(render_view),
- sync_enabled_(false) {}
+ enabled_(false) {}
PasswordGenerationManager::~PasswordGenerationManager() {}
void PasswordGenerationManager::DidFinishDocumentLoad(WebKit::WebFrame* frame) {
- // We don't want to generate passwords if password sync isn't enabled.
- if (!sync_enabled_)
+ // We don't want to generate passwords if the browser won't store or sync
+ // them.
+ if (!enabled_)
return;
if (!ShouldAnalyzeFrame(*frame))
@@ -89,7 +90,7 @@ bool PasswordGenerationManager::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(PasswordGenerationManager, message)
IPC_MESSAGE_HANDLER(AutofillMsg_GeneratedPasswordAccepted,
OnPasswordAccepted)
- IPC_MESSAGE_HANDLER(AutofillMsg_PasswordSyncEnabled,
+ IPC_MESSAGE_HANDLER(AutofillMsg_PasswordGenerationEnabled,
OnPasswordSyncEnabled)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -106,7 +107,7 @@ void PasswordGenerationManager::OnPasswordAccepted(const string16& password) {
}
void PasswordGenerationManager::OnPasswordSyncEnabled(bool enabled) {
- sync_enabled_ = enabled;
+ enabled_ = enabled;
}
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698