summaryrefslogtreecommitdiffstats
path: root/components/autofill
diff options
context:
space:
mode:
authorgcasto@chromium.org <gcasto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-09 07:37:34 +0000
committergcasto@chromium.org <gcasto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-09 07:37:34 +0000
commit47d2f1982b6e33e8645e7611cb84ccad55bec363 (patch)
treee58766512fb07943f6cc63339f0d5aec3cbb33b6 /components/autofill
parent7e2811ee362674f82f73319b7831b2b9addce6c3 (diff)
downloadchromium_src-47d2f1982b6e33e8645e7611cb84ccad55bec363.zip
chromium_src-47d2f1982b6e33e8645e7611cb84ccad55bec363.tar.gz
chromium_src-47d2f1982b6e33e8645e7611cb84ccad55bec363.tar.bz2
Rename PasswordGenerationManager to PasswordGenerationAgent
BUG= Review URL: https://codereview.chromium.org/25892006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/autofill')
-rw-r--r--components/autofill/content/renderer/password_generation_agent.cc (renamed from components/autofill/content/renderer/password_generation_manager.cc)28
-rw-r--r--components/autofill/content/renderer/password_generation_agent.h (renamed from components/autofill/content/renderer/password_generation_manager.h)14
2 files changed, 21 insertions, 21 deletions
diff --git a/components/autofill/content/renderer/password_generation_manager.cc b/components/autofill/content/renderer/password_generation_agent.cc
index 8c035c7..fe53344 100644
--- a/components/autofill/content/renderer/password_generation_manager.cc
+++ b/components/autofill/content/renderer/password_generation_agent.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/autofill/content/renderer/password_generation_manager.h"
+#include "components/autofill/content/renderer/password_generation_agent.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -90,16 +90,16 @@ bool ContainsForm(const std::vector<autofill::FormData>& forms,
} // namespace
-PasswordGenerationManager::PasswordGenerationManager(
+PasswordGenerationAgent::PasswordGenerationAgent(
content::RenderView* render_view)
: content::RenderViewObserver(render_view),
render_view_(render_view),
enabled_(false) {
render_view_->GetWebView()->setPasswordGeneratorClient(this);
}
-PasswordGenerationManager::~PasswordGenerationManager() {}
+PasswordGenerationAgent::~PasswordGenerationAgent() {}
-void PasswordGenerationManager::DidFinishDocumentLoad(WebKit::WebFrame* frame) {
+void PasswordGenerationAgent::DidFinishDocumentLoad(WebKit::WebFrame* frame) {
// In every navigation, the IPC message sent by the password autofill manager
// to query whether the current form is blacklisted or not happens when the
// document load finishes, so we need to clear previous states here before we
@@ -118,7 +118,7 @@ void PasswordGenerationManager::DidFinishDocumentLoad(WebKit::WebFrame* frame) {
}
}
-void PasswordGenerationManager::DidFinishLoad(WebKit::WebFrame* frame) {
+void PasswordGenerationAgent::DidFinishLoad(WebKit::WebFrame* frame) {
// We don't want to generate passwords if the browser won't store or sync
// them.
if (!enabled_)
@@ -164,7 +164,7 @@ void PasswordGenerationManager::DidFinishLoad(WebKit::WebFrame* frame) {
password_generation::NO_SIGN_UP_DETECTED);
}
-bool PasswordGenerationManager::ShouldAnalyzeDocument(
+bool PasswordGenerationAgent::ShouldAnalyzeDocument(
const WebKit::WebDocument& document) const {
// Make sure that this security origin is allowed to use password manager.
// Generating a password that can't be saved is a bad idea.
@@ -177,7 +177,7 @@ bool PasswordGenerationManager::ShouldAnalyzeDocument(
return true;
}
-void PasswordGenerationManager::openPasswordGenerator(
+void PasswordGenerationAgent::openPasswordGenerator(
WebKit::WebInputElement& element) {
WebKit::WebElement button(element.passwordGeneratorButtonElement());
gfx::Rect rect(button.boundsInViewportSpace());
@@ -194,9 +194,9 @@ void PasswordGenerationManager::openPasswordGenerator(
password_generation::BUBBLE_SHOWN);
}
-bool PasswordGenerationManager::OnMessageReceived(const IPC::Message& message) {
+bool PasswordGenerationAgent::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(PasswordGenerationManager, message)
+ IPC_BEGIN_MESSAGE_MAP(PasswordGenerationAgent, message)
IPC_MESSAGE_HANDLER(AutofillMsg_FormNotBlacklisted,
OnFormNotBlacklisted)
IPC_MESSAGE_HANDLER(AutofillMsg_GeneratedPasswordAccepted,
@@ -210,12 +210,12 @@ bool PasswordGenerationManager::OnMessageReceived(const IPC::Message& message) {
return handled;
}
-void PasswordGenerationManager::OnFormNotBlacklisted(const PasswordForm& form) {
+void PasswordGenerationAgent::OnFormNotBlacklisted(const PasswordForm& form) {
not_blacklisted_password_form_origins_.push_back(form.origin);
MaybeShowIcon();
}
-void PasswordGenerationManager::OnPasswordAccepted(
+void PasswordGenerationAgent::OnPasswordAccepted(
const base::string16& password) {
for (std::vector<WebKit::WebInputElement>::iterator it = passwords_.begin();
it != passwords_.end(); ++it) {
@@ -227,18 +227,18 @@ void PasswordGenerationManager::OnPasswordAccepted(
}
}
-void PasswordGenerationManager::OnPasswordGenerationEnabled(bool enabled) {
+void PasswordGenerationAgent::OnPasswordGenerationEnabled(bool enabled) {
enabled_ = enabled;
}
-void PasswordGenerationManager::OnAccountCreationFormsDetected(
+void PasswordGenerationAgent::OnAccountCreationFormsDetected(
const std::vector<autofill::FormData>& forms) {
account_creation_forms_.insert(
account_creation_forms_.end(), forms.begin(), forms.end());
MaybeShowIcon();
}
-void PasswordGenerationManager::MaybeShowIcon() {
+void PasswordGenerationAgent::MaybeShowIcon() {
// We should show the password generation icon only when we have detected
// account creation form, we have confirmed from browser that this form
// is not blacklisted by the users, and the Autofill server has marked one
diff --git a/components/autofill/content/renderer/password_generation_manager.h b/components/autofill/content/renderer/password_generation_agent.h
index 82ce489..0bbc573 100644
--- a/components/autofill/content/renderer/password_generation_manager.h
+++ b/components/autofill/content/renderer/password_generation_agent.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_MANAGER_H_
-#define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_MANAGER_H_
+#ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_
+#define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_
#include <map>
#include <utility>
@@ -28,11 +28,11 @@ struct PasswordForm;
// This class is responsible for controlling communication for password
// generation between the browser (which shows the popup and generates
// passwords) and WebKit (shows the generation icon in the password field).
-class PasswordGenerationManager : public content::RenderViewObserver,
+class PasswordGenerationAgent : public content::RenderViewObserver,
public WebKit::WebPasswordGeneratorClient {
public:
- explicit PasswordGenerationManager(content::RenderView* render_view);
- virtual ~PasswordGenerationManager();
+ explicit PasswordGenerationAgent(content::RenderView* render_view);
+ virtual ~PasswordGenerationAgent();
protected:
// Returns true if this document is one that we should consider analyzing.
@@ -80,9 +80,9 @@ class PasswordGenerationManager : public content::RenderViewObserver,
std::vector<WebKit::WebInputElement> passwords_;
- DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager);
+ DISALLOW_COPY_AND_ASSIGN(PasswordGenerationAgent);
};
} // namespace autofill
-#endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_MANAGER_H_
+#endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_GENERATION_AGENT_H_