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 |