summaryrefslogtreecommitdiffstats
path: root/chrome/browser/password_manager
diff options
context:
space:
mode:
authorblundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-05 01:29:14 +0000
committerblundell@chromium.org <blundell@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-05 01:29:14 +0000
commit1ecbe866c38fb6c781d337393b7ff62d0c662f4e (patch)
tree37ddf68241e68df9035f2c612388369f1539fe4d /chrome/browser/password_manager
parent456cface8888f0e39742243f25295d55c8922744 (diff)
downloadchromium_src-1ecbe866c38fb6c781d337393b7ff62d0c662f4e.zip
chromium_src-1ecbe866c38fb6c781d337393b7ff62d0c662f4e.tar.gz
chromium_src-1ecbe866c38fb6c781d337393b7ff62d0c662f4e.tar.bz2
Move forms/ out of webkit/.
The motivation for this CL is to move PasswordForm and friends (which are totally unrelated to WebKit) out of webkit/ and into a target that platforms that do not use WebKit (such as iOS) can logically depend on. As such, this CL does three things: 1. Separates the WebKit-related code in webkit/forms from the non-WebKit-related code. Concretely, this means having the WebKit::WebFormElement->PasswordForm conversion function in its own file. 2. Moves the core, non-WebKit-related forms code to chrome/common and content/public/common depending on where its usage points are. 3. Moves the above-mentioned conversion function to content/public/renderer. It cannot stay in webkit/ as it (now) has a dependency on content/, and as it is used only in chrome/renderer and content/renderer, this is a good place for it. The rest of this CL is churn due to namespace, file location, and GYP target changes. BUG= Review URL: https://chromiumcodereview.appspot.com/11000016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160280 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/password_manager')
-rw-r--r--chrome/browser/password_manager/login_database.cc4
-rw-r--r--chrome/browser/password_manager/login_database.h22
-rw-r--r--chrome/browser/password_manager/login_database_unittest.cc4
-rw-r--r--chrome/browser/password_manager/mock_password_store.h22
-rw-r--r--chrome/browser/password_manager/native_backend_gnome_x.cc2
-rw-r--r--chrome/browser/password_manager/native_backend_gnome_x.h14
-rw-r--r--chrome/browser/password_manager/native_backend_gnome_x_unittest.cc2
-rw-r--r--chrome/browser/password_manager/native_backend_kwallet_x.cc2
-rw-r--r--chrome/browser/password_manager/native_backend_kwallet_x.h16
-rw-r--r--chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_form_data.cc8
-rw-r--r--chrome/browser/password_manager/password_form_data.h16
-rw-r--r--chrome/browser/password_manager/password_form_manager.cc6
-rw-r--r--chrome/browser/password_manager/password_form_manager.h26
-rw-r--r--chrome/browser/password_manager/password_form_manager_unittest.cc14
-rw-r--r--chrome/browser/password_manager/password_manager.cc16
-rw-r--r--chrome/browser/password_manager/password_manager.h18
-rw-r--r--chrome/browser/password_manager/password_manager_delegate.h10
-rw-r--r--chrome/browser/password_manager/password_manager_delegate_impl.cc4
-rw-r--r--chrome/browser/password_manager/password_manager_delegate_impl.h2
-rw-r--r--chrome/browser/password_manager/password_manager_unittest.cc4
-rw-r--r--chrome/browser/password_manager/password_store.cc4
-rw-r--r--chrome/browser/password_manager/password_store.h42
-rw-r--r--chrome/browser/password_manager/password_store_change.h8
-rw-r--r--chrome/browser/password_manager/password_store_consumer.h6
-rw-r--r--chrome/browser/password_manager/password_store_default.cc4
-rw-r--r--chrome/browser/password_manager/password_store_default.h12
-rw-r--r--chrome/browser/password_manager/password_store_default_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc8
-rw-r--r--chrome/browser/password_manager/password_store_mac.h22
-rw-r--r--chrome/browser/password_manager/password_store_mac_internal.h44
-rw-r--r--chrome/browser/password_manager/password_store_mac_unittest.cc4
-rw-r--r--chrome/browser/password_manager/password_store_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_store_win.cc2
-rw-r--r--chrome/browser/password_manager/password_store_win.h6
-rw-r--r--chrome/browser/password_manager/password_store_win_unittest.cc4
-rw-r--r--chrome/browser/password_manager/password_store_x.cc2
-rw-r--r--chrome/browser/password_manager/password_store_x.h22
-rw-r--r--chrome/browser/password_manager/password_store_x_unittest.cc2
39 files changed, 198 insertions, 212 deletions
diff --git a/chrome/browser/password_manager/login_database.cc b/chrome/browser/password_manager/login_database.cc
index 1427f47..a2f4d03 100644
--- a/chrome/browser/password_manager/login_database.cc
+++ b/chrome/browser/password_manager/login_database.cc
@@ -16,7 +16,7 @@
#include "sql/statement.h"
#include "sql/transaction.h"
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
static const int kCurrentVersionNumber = 1;
static const int kCompatibleVersionNumber = 1;
@@ -297,7 +297,7 @@ bool LoginDatabase::GetLogins(const PasswordForm& form,
bool LoginDatabase::GetLoginsCreatedBetween(
const base::Time begin,
const base::Time end,
- std::vector<webkit::forms::PasswordForm*>* forms) const {
+ std::vector<content::PasswordForm*>* forms) const {
DCHECK(forms);
sql::Statement s(db_.GetCachedStatement(SQL_FROM_HERE,
"SELECT origin_url, action_url, "
diff --git a/chrome/browser/password_manager/login_database.h b/chrome/browser/password_manager/login_database.h
index 06ac6f1..e37b966 100644
--- a/chrome/browser/password_manager/login_database.h
+++ b/chrome/browser/password_manager/login_database.h
@@ -10,9 +10,9 @@
#include "base/file_path.h"
#include "base/string16.h"
+#include "content/public/common/password_form.h"
#include "sql/connection.h"
#include "sql/meta_table.h"
-#include "webkit/forms/password_form.h"
// Interface to the database storage of login information, intended as a helper
// for PasswordStore on platforms that need internal storage of some or all of
@@ -30,14 +30,14 @@ class LoginDatabase {
void ReportMetrics();
// Adds |form| to the list of remembered password forms.
- bool AddLogin(const webkit::forms::PasswordForm& form);
+ bool AddLogin(const content::PasswordForm& form);
// Updates remembered password form. Returns true on success and sets
// items_changed (if non-NULL) to the number of logins updated.
- bool UpdateLogin(const webkit::forms::PasswordForm& form, int* items_changed);
+ bool UpdateLogin(const content::PasswordForm& form, int* items_changed);
// Removes |form| from the list of remembered password forms.
- bool RemoveLogin(const webkit::forms::PasswordForm& form);
+ bool RemoveLogin(const content::PasswordForm& form);
// Removes all logins created from |delete_begin| onwards (inclusive) and
// before |delete_end|. You may use a null Time value to do an unbounded
@@ -48,8 +48,8 @@ class LoginDatabase {
// Loads a list of matching password forms into the specified vector |forms|.
// The list will contain all possibly relevant entries to the observed |form|,
// including blacklisted matches.
- bool GetLogins(const webkit::forms::PasswordForm& form,
- std::vector<webkit::forms::PasswordForm*>* forms) const;
+ bool GetLogins(const content::PasswordForm& form,
+ std::vector<content::PasswordForm*>* forms) const;
// Loads all logins created from |begin| onwards (inclusive) and before |end|.
// You may use a null Time value to do an unbounded search in either
@@ -57,16 +57,16 @@ class LoginDatabase {
bool GetLoginsCreatedBetween(
const base::Time begin,
const base::Time end,
- std::vector<webkit::forms::PasswordForm*>* forms) const;
+ std::vector<content::PasswordForm*>* forms) const;
// Loads the complete list of autofillable password forms (i.e., not blacklist
// entries) into |forms|.
bool GetAutofillableLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) const;
+ std::vector<content::PasswordForm*>* forms) const;
// Loads the complete list of blacklist forms into |forms|.
bool GetBlacklistLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) const;
+ std::vector<content::PasswordForm*>* forms) const;
// Deletes the login database file on disk, and creates a new, empty database.
// This can be used after migrating passwords to some other store, to ensure
@@ -87,13 +87,13 @@ class LoginDatabase {
// Fills |form| from the values in the given statement (which is assumed to
// be of the form used by the Get*Logins methods).
- void InitPasswordFormFromStatement(webkit::forms::PasswordForm* form,
+ void InitPasswordFormFromStatement(content::PasswordForm* form,
sql::Statement& s) const;
// Loads all logins whose blacklist setting matches |blacklisted| into
// |forms|.
bool GetAllLoginsWithBlacklistSetting(
- bool blacklisted, std::vector<webkit::forms::PasswordForm*>* forms) const;
+ bool blacklisted, std::vector<content::PasswordForm*>* forms) const;
FilePath db_path_;
mutable sql::Connection db_;
diff --git a/chrome/browser/password_manager/login_database_unittest.cc b/chrome/browser/password_manager/login_database_unittest.cc
index d2486a2..c31376d 100644
--- a/chrome/browser/password_manager/login_database_unittest.cc
+++ b/chrome/browser/password_manager/login_database_unittest.cc
@@ -13,9 +13,9 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/password_manager/login_database.h"
#include "chrome/common/chrome_paths.h"
-#include "webkit/forms/password_form.h"
+#include "content/public/common/password_form.h"
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
class LoginDatabaseTest : public testing::Test {
protected:
diff --git a/chrome/browser/password_manager/mock_password_store.h b/chrome/browser/password_manager/mock_password_store.h
index 627b5db..608c2ad 100644
--- a/chrome/browser/password_manager/mock_password_store.h
+++ b/chrome/browser/password_manager/mock_password_store.h
@@ -6,8 +6,8 @@
#define CHROME_BROWSER_PASSWORD_MANAGER_MOCK_PASSWORD_STORE_H_
#include "chrome/browser/password_manager/password_store.h"
+#include "content/public/common/password_form.h"
#include "testing/gmock/include/gmock/gmock.h"
-#include "webkit/forms/password_form.h"
class Profile;
@@ -17,26 +17,26 @@ class MockPasswordStore : public PasswordStore {
static scoped_refptr<RefcountedProfileKeyedService> Build(Profile* profile);
- MOCK_METHOD1(RemoveLogin, void(const webkit::forms::PasswordForm&));
- MOCK_METHOD2(GetLogins, int(const webkit::forms::PasswordForm&,
+ MOCK_METHOD1(RemoveLogin, void(const content::PasswordForm&));
+ MOCK_METHOD2(GetLogins, int(const content::PasswordForm&,
PasswordStoreConsumer*));
- MOCK_METHOD1(AddLogin, void(const webkit::forms::PasswordForm&));
- MOCK_METHOD1(UpdateLogin, void(const webkit::forms::PasswordForm&));
+ MOCK_METHOD1(AddLogin, void(const content::PasswordForm&));
+ MOCK_METHOD1(UpdateLogin, void(const content::PasswordForm&));
MOCK_METHOD0(ReportMetrics, void());
MOCK_METHOD0(ReportMetricsImpl, void());
- MOCK_METHOD1(AddLoginImpl, void(const webkit::forms::PasswordForm&));
- MOCK_METHOD1(UpdateLoginImpl, void(const webkit::forms::PasswordForm&));
- MOCK_METHOD1(RemoveLoginImpl, void(const webkit::forms::PasswordForm&));
+ MOCK_METHOD1(AddLoginImpl, void(const content::PasswordForm&));
+ MOCK_METHOD1(UpdateLoginImpl, void(const content::PasswordForm&));
+ MOCK_METHOD1(RemoveLoginImpl, void(const content::PasswordForm&));
MOCK_METHOD2(RemoveLoginsCreatedBetweenImpl, void(const base::Time&,
const base::Time&));
MOCK_METHOD2(GetLoginsImpl, void(GetLoginsRequest*,
- const webkit::forms::PasswordForm&));
+ const content::PasswordForm&));
MOCK_METHOD1(GetAutofillableLoginsImpl, void(GetLoginsRequest*));
MOCK_METHOD1(GetBlacklistLoginsImpl, void(GetLoginsRequest*));
MOCK_METHOD1(FillAutofillableLogins,
- bool(std::vector<webkit::forms::PasswordForm*>*));
+ bool(std::vector<content::PasswordForm*>*));
MOCK_METHOD1(FillBlacklistLogins,
- bool(std::vector<webkit::forms::PasswordForm*>*));
+ bool(std::vector<content::PasswordForm*>*));
virtual void ShutdownOnUIThread();
diff --git a/chrome/browser/password_manager/native_backend_gnome_x.cc b/chrome/browser/password_manager/native_backend_gnome_x.cc
index 94dcdd2..6fa8f6c 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x.cc
@@ -22,7 +22,7 @@
#include "content/public/browser/browser_thread.h"
using content::BrowserThread;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
#define GNOME_KEYRING_DEFINE_POINTER(name) \
typeof(&::gnome_keyring_##name) GnomeKeyringLoader::gnome_keyring_##name;
diff --git a/chrome/browser/password_manager/native_backend_gnome_x.h b/chrome/browser/password_manager/native_backend_gnome_x.h
index 233eb84..f421831 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x.h
+++ b/chrome/browser/password_manager/native_backend_gnome_x.h
@@ -17,11 +17,9 @@
class PrefService;
-namespace webkit {
-namespace forms {
+namespace content {
struct PasswordForm;
}
-}
// Many of the gnome_keyring_* functions use variable arguments, which makes
// them difficult if not impossible to truly wrap in C. Therefore, we use
@@ -75,12 +73,12 @@ class NativeBackendGnome : public PasswordStoreX::NativeBackend,
virtual bool Init() OVERRIDE;
// Implements NativeBackend interface.
- virtual bool AddLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
- virtual bool UpdateLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
- virtual bool RemoveLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual bool AddLogin(const content::PasswordForm& form) OVERRIDE;
+ virtual bool UpdateLogin(const content::PasswordForm& form) OVERRIDE;
+ virtual bool RemoveLogin(const content::PasswordForm& form) OVERRIDE;
virtual bool RemoveLoginsCreatedBetween(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
- virtual bool GetLogins(const webkit::forms::PasswordForm& form,
+ virtual bool GetLogins(const content::PasswordForm& form,
PasswordFormList* forms) OVERRIDE;
virtual bool GetLoginsCreatedBetween(const base::Time& get_begin,
const base::Time& get_end,
@@ -90,7 +88,7 @@ class NativeBackendGnome : public PasswordStoreX::NativeBackend,
private:
// Adds a login form without checking for one to replace first.
- bool RawAddLogin(const webkit::forms::PasswordForm& form);
+ bool RawAddLogin(const content::PasswordForm& form);
// Reads PasswordForms from the keyring with the given autofillability state.
bool GetLoginsList(PasswordFormList* forms, bool autofillable);
diff --git a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
index b1163c5..eb0e44d 100644
--- a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc
@@ -18,7 +18,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
namespace {
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x.cc b/chrome/browser/password_manager/native_backend_kwallet_x.cc
index 66208a1..d88ac50 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x.cc
+++ b/chrome/browser/password_manager/native_backend_kwallet_x.cc
@@ -22,7 +22,7 @@
#include "ui/base/l10n/l10n_util.h"
using content::BrowserThread;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
// We could localize this string, but then changing your locale would cause
// you to lose access to all your stored passwords. Maybe best not to do that.
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x.h b/chrome/browser/password_manager/native_backend_kwallet_x.h
index 0bd909e..4bcfc8f 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x.h
+++ b/chrome/browser/password_manager/native_backend_kwallet_x.h
@@ -18,11 +18,9 @@ class Pickle;
class PickleIterator;
class PrefService;
-namespace webkit {
-namespace forms {
+namespace content {
struct PasswordForm;
}
-}
namespace base {
class WaitableEvent;
@@ -43,12 +41,12 @@ class NativeBackendKWallet : public PasswordStoreX::NativeBackend {
virtual bool Init() OVERRIDE;
// Implements NativeBackend interface.
- virtual bool AddLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
- virtual bool UpdateLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
- virtual bool RemoveLogin(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual bool AddLogin(const content::PasswordForm& form) OVERRIDE;
+ virtual bool UpdateLogin(const content::PasswordForm& form) OVERRIDE;
+ virtual bool RemoveLogin(const content::PasswordForm& form) OVERRIDE;
virtual bool RemoveLoginsCreatedBetween(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
- virtual bool GetLogins(const webkit::forms::PasswordForm& form,
+ virtual bool GetLogins(const content::PasswordForm& form,
PasswordFormList* forms) OVERRIDE;
virtual bool GetLoginsCreatedBetween(const base::Time& get_begin,
const base::Time& get_end,
@@ -127,8 +125,8 @@ class NativeBackendKWallet : public PasswordStoreX::NativeBackend {
// If |update_check| is false, we only check the fields that are checked by
// LoginDatabase::UpdateLogin() when updating logins; otherwise, we check the
// fields that are checked by LoginDatabase::RemoveLogin() for removing them.
- static bool CompareForms(const webkit::forms::PasswordForm& a,
- const webkit::forms::PasswordForm& b,
+ static bool CompareForms(const content::PasswordForm& a,
+ const content::PasswordForm& b,
bool update_check);
// Serializes a list of PasswordForms to be stored in the wallet.
diff --git a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
index 3157a29..32c2648 100644
--- a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
+++ b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
@@ -29,7 +29,7 @@ using content::BrowserThread;
using testing::_;
using testing::Invoke;
using testing::Return;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
namespace {
diff --git a/chrome/browser/password_manager/password_form_data.cc b/chrome/browser/password_manager/password_form_data.cc
index 3c6f377..c2c9a01 100644
--- a/chrome/browser/password_manager/password_form_data.cc
+++ b/chrome/browser/password_manager/password_form_data.cc
@@ -6,7 +6,7 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/password_manager/password_form_data.h"
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
PasswordForm* CreatePasswordFormFromData(
const PasswordFormData& form_data) {
@@ -69,7 +69,7 @@ std::ostream& operator<<(std::ostream& os, const PasswordForm& form) {
<< "date_created: " << form.date_created.ToDoubleT();
}
-typedef std::set<const webkit::forms::PasswordForm*> SetOfForms;
+typedef std::set<const content::PasswordForm*> SetOfForms;
bool ContainsSamePasswordFormsPtr(
const std::vector<PasswordForm*>& first,
@@ -105,8 +105,8 @@ bool ContainsSamePasswordFormsPtr(
}
bool ContainsSamePasswordForms(
- std::vector<webkit::forms::PasswordForm>& first,
- std::vector<webkit::forms::PasswordForm>& second) {
+ std::vector<content::PasswordForm>& first,
+ std::vector<content::PasswordForm>& second) {
std::vector<PasswordForm*> first_ptr;
for (unsigned int i = 0; i < first.size(); ++i) {
first_ptr.push_back(&first[i]);
diff --git a/chrome/browser/password_manager/password_form_data.h b/chrome/browser/password_manager/password_form_data.h
index 35be0de..0bc512f 100644
--- a/chrome/browser/password_manager/password_form_data.h
+++ b/chrome/browser/password_manager/password_form_data.h
@@ -7,13 +7,13 @@
#include <ostream>
+#include "content/public/common/password_form.h"
#include "testing/gmock/include/gmock/gmock.h"
-#include "webkit/forms/password_form.h"
// Struct used for creation of PasswordForms from static arrays of data.
// Note: This is only meant to be used in unit test.
struct PasswordFormData {
- const webkit::forms::PasswordForm::Scheme scheme;
+ const content::PasswordForm::Scheme scheme;
const char* signon_realm;
const char* origin;
const char* action;
@@ -29,23 +29,23 @@ struct PasswordFormData {
// Creates and returns a new PasswordForm built from form_data. Caller is
// responsible for deleting the object when finished with it.
-webkit::forms::PasswordForm* CreatePasswordFormFromData(
+content::PasswordForm* CreatePasswordFormFromData(
const PasswordFormData& form_data);
// Checks whether two vectors of PasswordForms contain equivalent elements,
// regardless of order.
bool ContainsSamePasswordFormsPtr(
- const std::vector<webkit::forms::PasswordForm*>& first,
- const std::vector<webkit::forms::PasswordForm*>& second);
+ const std::vector<content::PasswordForm*>& first,
+ const std::vector<content::PasswordForm*>& second);
bool ContainsSamePasswordForms(
- std::vector<webkit::forms::PasswordForm>& first,
- std::vector<webkit::forms::PasswordForm>& second);
+ std::vector<content::PasswordForm>& first,
+ std::vector<content::PasswordForm>& second);
// Pretty-prints the contents of a PasswordForm.
// TODO(sync): This file must eventually be refactored away -- crbug.com/87185.
std::ostream& operator<<(std::ostream& os,
- const webkit::forms::PasswordForm& form);
+ const content::PasswordForm& form);
// This gmock matcher is used to check that the |arg| contains exactly the same
// PasswordForms as |forms|, regardless of order.
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index 16b3075..6aacd0c 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -16,11 +16,11 @@
#include "chrome/common/autofill_messages.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
-#include "webkit/forms/password_form_dom_manager.h"
+#include "content/public/common/password_form.h"
using base::Time;
-using webkit::forms::PasswordForm;
-using webkit::forms::PasswordFormMap;
+using content::PasswordForm;
+using content::PasswordFormMap;
PasswordFormManager::PasswordFormManager(Profile* profile,
PasswordManager* password_manager,
diff --git a/chrome/browser/password_manager/password_form_manager.h b/chrome/browser/password_manager/password_form_manager.h
index 1580f13..aa4bb1c 100644
--- a/chrome/browser/password_manager/password_form_manager.h
+++ b/chrome/browser/password_manager/password_form_manager.h
@@ -12,7 +12,7 @@
#include "base/stl_util.h"
#include "chrome/browser/password_manager/password_store_consumer.h"
-#include "webkit/forms/password_form.h"
+#include "content/public/common/password_form.h"
namespace content {
class WebContents;
@@ -35,7 +35,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
PasswordFormManager(Profile* profile,
PasswordManager* password_manager,
content::WebContents* web_contents,
- const webkit::forms::PasswordForm& observed_form,
+ const content::PasswordForm& observed_form,
bool ssl_valid);
virtual ~PasswordFormManager();
@@ -46,7 +46,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Compare basic data of observed_form_ with argument. Only check the action
// URL when action match is required.
- bool DoesManage(const webkit::forms::PasswordForm& form,
+ bool DoesManage(const content::PasswordForm& form,
ActionMatch action_match) const;
// Retrieves potential matching logins from the database.
@@ -85,12 +85,12 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Determines if we need to autofill given the results of the query.
void OnRequestDone(
- int handle, const std::vector<webkit::forms::PasswordForm*>& result);
+ int handle, const std::vector<content::PasswordForm*>& result);
// PasswordStoreConsumer implementation.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit::forms::PasswordForm*>& result) OVERRIDE;
+ const std::vector<content::PasswordForm*>& result) OVERRIDE;
// A user opted to 'never remember' passwords for this form.
// Blacklist it so that from now on when it is seen we ignore it.
@@ -99,7 +99,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// If the user has submitted observed_form_, provisionally hold on to
// the submitted credentials until we are told by PasswordManager whether
// or not the login was successful.
- void ProvisionallySave(const webkit::forms::PasswordForm& credentials);
+ void ProvisionallySave(const content::PasswordForm& credentials);
// Handles save-as-new or update of the form managed by this manager.
// Note the basic data of updated_credentials must match that of
@@ -166,7 +166,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Helper for OnPasswordStoreRequestDone to determine whether or not
// the given result form is worth scoring.
- bool IgnoreResult(const webkit::forms::PasswordForm& form) const;
+ bool IgnoreResult(const content::PasswordForm& form) const;
// Helper for Save in the case that best_matches.size() == 0, meaning
// we have no prior record of this form/username/password and the user
@@ -176,7 +176,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Helper for OnPasswordStoreRequestDone to score an individual result
// against the observed_form_.
- int ScoreResult(const webkit::forms::PasswordForm& form) const;
+ int ScoreResult(const content::PasswordForm& form) const;
// Helper for Save in the case that best_matches.size() > 0, meaning
// we have at least one match for this form/username/password. This
@@ -202,13 +202,13 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Set of PasswordForms from the DB that best match the form
// being managed by this. Use a map instead of vector, because we most
// frequently require lookups by username value in IsNewLogin.
- webkit::forms::PasswordFormMap best_matches_;
+ content::PasswordFormMap best_matches_;
// Cleans up when best_matches_ goes out of scope.
- STLValueDeleter<webkit::forms::PasswordFormMap> best_matches_deleter_;
+ STLValueDeleter<content::PasswordFormMap> best_matches_deleter_;
// The PasswordForm from the page or dialog managed by this.
- webkit::forms::PasswordForm observed_form_;
+ content::PasswordForm observed_form_;
// The origin url path of observed_form_ tokenized, for convenience when
// scoring.
@@ -216,7 +216,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Stores updated credentials when the form was submitted but success is
// still unknown.
- webkit::forms::PasswordForm pending_credentials_;
+ content::PasswordForm pending_credentials_;
// Whether pending_credentials_ stores a new login or is an update
// to an existing one.
@@ -235,7 +235,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// as preferred. This is only allowed to be null if there are no best matches
// at all, since there will always be one preferred login when there are
// multiple matches (when first saved, a login is marked preferred).
- const webkit::forms::PasswordForm* preferred_match_;
+ const content::PasswordForm* preferred_match_;
typedef enum {
PRE_MATCHING_PHASE, // Have not yet invoked a GetLogins query to find
diff --git a/chrome/browser/password_manager/password_form_manager_unittest.cc b/chrome/browser/password_manager/password_form_manager_unittest.cc
index 07f3e67..43f1a02 100644
--- a/chrome/browser/password_manager/password_form_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_form_manager_unittest.cc
@@ -12,16 +12,16 @@
#include "chrome/browser/password_manager/password_manager_delegate.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/test/base/testing_profile.h"
-#include "webkit/forms/password_form.h"
+#include "content/public/common/password_form.h"
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
class TestPasswordManagerDelegate : public PasswordManagerDelegate {
public:
explicit TestPasswordManagerDelegate(Profile* profile) : profile_(profile) {}
virtual void FillPasswordForm(
- const webkit::forms::PasswordFormFillData& form_data) OVERRIDE {}
+ const PasswordFormFillData& form_data) OVERRIDE {}
virtual void AddSavePasswordInfoBarIfPermitted(
PasswordFormManager* form_to_save) OVERRIDE {}
virtual Profile* GetProfile() OVERRIDE { return profile_; }
@@ -37,9 +37,9 @@ class TestPasswordManager : public PasswordManager {
: PasswordManager(NULL, delegate) {}
virtual void Autofill(
- const webkit::forms::PasswordForm& form_for_autofill,
- const webkit::forms::PasswordFormMap& best_matches,
- const webkit::forms::PasswordForm& preferred_match,
+ const content::PasswordForm& form_for_autofill,
+ const content::PasswordFormMap& best_matches,
+ const content::PasswordForm& preferred_match,
bool wait_for_username) const OVERRIDE {}
};
@@ -47,7 +47,7 @@ class TestPasswordFormManager : public PasswordFormManager {
public:
TestPasswordFormManager(Profile* profile,
PasswordManager* manager,
- const webkit::forms::PasswordForm& observed_form,
+ const content::PasswordForm& observed_form,
bool ssl_valid)
: PasswordFormManager(profile, manager, NULL, observed_form, ssl_valid),
num_sent_messages_(0) {}
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index fdd0138..2f93ea5 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -21,8 +21,8 @@
using content::UserMetricsAction;
using content::WebContents;
-using webkit::forms::PasswordForm;
-using webkit::forms::PasswordFormMap;
+using content::PasswordForm;
+using content::PasswordFormMap;
namespace {
@@ -285,12 +285,12 @@ void PasswordManager::Autofill(
case PasswordForm::SCHEME_HTML: {
// Note the check above is required because the observer_ for a non-HTML
// schemed password form may have been freed, so we need to distinguish.
- webkit::forms::PasswordFormFillData fill_data;
- webkit::forms::PasswordFormDomManager::InitFillData(form_for_autofill,
- best_matches,
- &preferred_match,
- wait_for_username,
- &fill_data);
+ PasswordFormFillData fill_data;
+ InitPasswordFormFillData(form_for_autofill,
+ best_matches,
+ &preferred_match,
+ wait_for_username,
+ &fill_data);
delegate_->FillPasswordForm(fill_data);
return;
}
diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h
index 6b990dc..544546d 100644
--- a/chrome/browser/password_manager/password_manager.h
+++ b/chrome/browser/password_manager/password_manager.h
@@ -13,9 +13,9 @@
#include "chrome/browser/api/prefs/pref_member.h"
#include "chrome/browser/password_manager/password_form_manager.h"
#include "chrome/browser/ui/login/login_model.h"
+#include "chrome/common/password_form_fill_data.h"
#include "content/public/browser/web_contents_observer.h"
-#include "webkit/forms/password_form.h"
-#include "webkit/forms/password_form_dom_manager.h"
+#include "content/public/common/password_form.h"
class PasswordManagerDelegate;
class PasswordManagerTest;
@@ -44,23 +44,23 @@ class PasswordManager : public LoginModel,
// Called by a PasswordFormManager when it decides a form can be autofilled
// on the page.
- virtual void Autofill(const webkit::forms::PasswordForm& form_for_autofill,
- const webkit::forms::PasswordFormMap& best_matches,
- const webkit::forms::PasswordForm& preferred_match,
+ virtual void Autofill(const content::PasswordForm& form_for_autofill,
+ const content::PasswordFormMap& best_matches,
+ const content::PasswordForm& preferred_match,
bool wait_for_username) const;
// LoginModel implementation.
virtual void SetObserver(LoginModelObserver* observer) OVERRIDE;
// Mark this form as having a generated password.
- void SetFormHasGeneratedPassword(const webkit::forms::PasswordForm& form);
+ void SetFormHasGeneratedPassword(const content::PasswordForm& form);
// TODO(isherman): This should not be public, but is currently being used by
// the LoginPrompt code.
// When a form is submitted, we prepare to save the password but wait
// until we decide the user has successfully logged in. This is step 1
// of 2 (see SavePassword).
- void ProvisionallySavePassword(const webkit::forms::PasswordForm& form);
+ void ProvisionallySavePassword(const content::PasswordForm& form);
// content::WebContentsObserver overrides.
virtual void DidNavigateAnyFrame(
@@ -71,9 +71,9 @@ class PasswordManager : public LoginModel,
// TODO(isherman): This should not be public, but is currently being used by
// the LoginPrompt code.
void OnPasswordFormsParsed(
- const std::vector<webkit::forms::PasswordForm>& forms);
+ const std::vector<content::PasswordForm>& forms);
void OnPasswordFormsRendered(
- const std::vector<webkit::forms::PasswordForm>& visible_forms);
+ const std::vector<content::PasswordForm>& visible_forms);
private:
// Is password autofill enabled for the current profile?
diff --git a/chrome/browser/password_manager/password_manager_delegate.h b/chrome/browser/password_manager/password_manager_delegate.h
index 158311cc..e3314ba 100644
--- a/chrome/browser/password_manager/password_manager_delegate.h
+++ b/chrome/browser/password_manager/password_manager_delegate.h
@@ -5,15 +5,11 @@
#ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_H_
#define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_H_
-namespace webkit {
-namespace forms {
-struct PasswordFormFillData;
-}
-}
-
class PasswordFormManager;
class Profile;
+struct PasswordFormFillData;
+
// An abstraction of operations in the external environment (WebContents)
// that the PasswordManager depends on. This allows for more targeted
// unit testing.
@@ -26,7 +22,7 @@ class PasswordManagerDelegate {
// through the RenderViewHost to FillPasswordForm. Tests can override this
// to sever the dependency on the entire rendering stack.
virtual void FillPasswordForm(
- const webkit::forms::PasswordFormFillData& form_data) = 0;
+ const PasswordFormFillData& form_data) = 0;
// A mechanism to show an infobar in the current tab at our request.
// The infobar may not show in some circumstances, such as when the one-click
diff --git a/chrome/browser/password_manager/password_manager_delegate_impl.cc b/chrome/browser/password_manager/password_manager_delegate_impl.cc
index 6360be4..3966ba3 100644
--- a/chrome/browser/password_manager/password_manager_delegate_impl.cc
+++ b/chrome/browser/password_manager/password_manager_delegate_impl.cc
@@ -18,6 +18,7 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/common/password_form.h"
#include "content/public/common/ssl_status.h"
#include "google_apis/gaia/gaia_urls.h"
#include "grit/chromium_strings.h"
@@ -26,7 +27,6 @@
#include "net/base/cert_status_flags.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
-#include "webkit/forms/password_form.h"
// After a successful *new* login attempt, we take the PasswordFormManager in
// provisional_save_manager_ and move it to a SavePasswordInfoBarDelegate while
@@ -123,7 +123,7 @@ InfoBarDelegate::InfoBarAutomationType
// PasswordManagerDelegateImpl ------------------------------------------------
void PasswordManagerDelegateImpl::FillPasswordForm(
- const webkit::forms::PasswordFormFillData& form_data) {
+ const PasswordFormFillData& form_data) {
bool disable_popup = tab_contents_->autofill_manager()->HasExternalDelegate();
tab_contents_->web_contents()->GetRenderViewHost()->Send(
diff --git a/chrome/browser/password_manager/password_manager_delegate_impl.h b/chrome/browser/password_manager/password_manager_delegate_impl.h
index 6b8c4e9..3837b45 100644
--- a/chrome/browser/password_manager/password_manager_delegate_impl.h
+++ b/chrome/browser/password_manager/password_manager_delegate_impl.h
@@ -18,7 +18,7 @@ class PasswordManagerDelegateImpl : public PasswordManagerDelegate {
// PasswordManagerDelegate implementation.
virtual void FillPasswordForm(
- const webkit::forms::PasswordFormFillData& form_data) OVERRIDE;
+ const PasswordFormFillData& form_data) OVERRIDE;
virtual void AddSavePasswordInfoBarIfPermitted(
PasswordFormManager* form_to_save) OVERRIDE;
virtual Profile* GetProfile() OVERRIDE;
diff --git a/chrome/browser/password_manager/password_manager_unittest.cc b/chrome/browser/password_manager/password_manager_unittest.cc
index 3afd0a3..054c126 100644
--- a/chrome/browser/password_manager/password_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_manager_unittest.cc
@@ -22,7 +22,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using content::BrowserThread;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
using testing::_;
using testing::DoAll;
using ::testing::Exactly;
@@ -32,7 +32,7 @@ using ::testing::Return;
class MockPasswordManagerDelegate : public PasswordManagerDelegate {
public:
MOCK_METHOD1(FillPasswordForm, void(
- const webkit::forms::PasswordFormFillData&));
+ const PasswordFormFillData&));
MOCK_METHOD1(AddSavePasswordInfoBarIfPermitted, void(PasswordFormManager*));
MOCK_METHOD0(GetProfile, Profile*());
MOCK_METHOD0(DidLastPageLoadEncounterSSLErrors, bool());
diff --git a/chrome/browser/password_manager/password_store.cc b/chrome/browser/password_manager/password_store.cc
index c08ec91..d4ef8e1 100644
--- a/chrome/browser/password_manager/password_store.cc
+++ b/chrome/browser/password_manager/password_store.cc
@@ -10,11 +10,11 @@
#include "base/stl_util.h"
#include "chrome/browser/password_manager/password_store_consumer.h"
#include "content/public/browser/browser_thread.h"
-#include "webkit/forms/password_form.h"
+#include "content/public/common/password_form.h"
using content::BrowserThread;
using std::vector;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
PasswordStore::GetLoginsRequest::GetLoginsRequest(
const GetLoginsCallback& callback)
diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h
index 7233d13..a15bd7a 100644
--- a/chrome/browser/password_manager/password_store.h
+++ b/chrome/browser/password_manager/password_store.h
@@ -25,16 +25,14 @@ class PasswordModelAssociator;
class PasswordModelWorker;
}
-namespace webkit {
-namespace forms {
+namespace content {
struct PasswordForm;
}
-}
namespace passwords_helper {
-void AddLogin(PasswordStore* store, const webkit::forms::PasswordForm& form);
-void RemoveLogin(PasswordStore* store, const webkit::forms::PasswordForm& form);
-void UpdateLogin(PasswordStore* store, const webkit::forms::PasswordForm& form);
+void AddLogin(PasswordStore* store, const content::PasswordForm& form);
+void RemoveLogin(PasswordStore* store, const content::PasswordForm& form);
+void UpdateLogin(PasswordStore* store, const content::PasswordForm& form);
}
// Interface for storing form passwords in a platform-specific secure way.
@@ -45,7 +43,7 @@ class PasswordStore
public CancelableRequestProvider {
public:
typedef base::Callback<
- void(Handle, const std::vector<webkit::forms::PasswordForm*>&)>
+ void(Handle, const std::vector<content::PasswordForm*>&)>
GetLoginsCallback;
// PasswordForm vector elements are meant to be owned by the
@@ -53,7 +51,7 @@ class PasswordStore
// allocation, then the request must take care of the deletion.
class GetLoginsRequest
: public CancelableRequest1<GetLoginsCallback,
- std::vector<webkit::forms::PasswordForm*> > {
+ std::vector<content::PasswordForm*> > {
public:
explicit GetLoginsRequest(const GetLoginsCallback& callback);
@@ -92,13 +90,13 @@ class PasswordStore
virtual bool Init();
// Adds the given PasswordForm to the secure password store asynchronously.
- virtual void AddLogin(const webkit::forms::PasswordForm& form);
+ virtual void AddLogin(const content::PasswordForm& form);
// Updates the matching PasswordForm in the secure password store (async).
- void UpdateLogin(const webkit::forms::PasswordForm& form);
+ void UpdateLogin(const content::PasswordForm& form);
// Removes the matching PasswordForm from the secure password store (async).
- void RemoveLogin(const webkit::forms::PasswordForm& form);
+ void RemoveLogin(const content::PasswordForm& form);
// Removes all logins created in the given date range.
void RemoveLoginsCreatedBetween(const base::Time& delete_begin,
@@ -107,7 +105,7 @@ class PasswordStore
// Searches for a matching PasswordForm and returns a handle so the async
// request can be tracked. Implement the PasswordStoreConsumer interface to be
// notified on completion.
- virtual Handle GetLogins(const webkit::forms::PasswordForm& form,
+ virtual Handle GetLogins(const content::PasswordForm& form,
PasswordStoreConsumer* consumer);
// Gets the complete list of PasswordForms that are not blacklist entries--and
@@ -136,11 +134,11 @@ class PasswordStore
friend class browser_sync::PasswordModelAssociator;
friend class browser_sync::PasswordModelWorker;
friend void passwords_helper::AddLogin(PasswordStore*,
- const webkit::forms::PasswordForm&);
+ const content::PasswordForm&);
friend void passwords_helper::RemoveLogin(PasswordStore*,
- const webkit::forms::PasswordForm&);
+ const content::PasswordForm&);
friend void passwords_helper::UpdateLogin(PasswordStore*,
- const webkit::forms::PasswordForm&);
+ const content::PasswordForm&);
virtual ~PasswordStore();
@@ -156,11 +154,11 @@ class PasswordStore
// Synchronous implementation that reports usage metrics.
virtual void ReportMetricsImpl() = 0;
// Synchronous implementation to add the given login.
- virtual void AddLoginImpl(const webkit::forms::PasswordForm& form) = 0;
+ virtual void AddLoginImpl(const content::PasswordForm& form) = 0;
// Synchronous implementation to update the given login.
- virtual void UpdateLoginImpl(const webkit::forms::PasswordForm& form) = 0;
+ virtual void UpdateLoginImpl(const content::PasswordForm& form) = 0;
// Synchronous implementation to remove the given login.
- virtual void RemoveLoginImpl(const webkit::forms::PasswordForm& form) = 0;
+ virtual void RemoveLoginImpl(const content::PasswordForm& form) = 0;
// Synchronous implementation to remove the given logins.
virtual void RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin,
const base::Time& delete_end) = 0;
@@ -168,7 +166,7 @@ class PasswordStore
// will then be scored by the PasswordFormManager. Once they are found
// (or not), the consumer should be notified.
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit::forms::PasswordForm& form) = 0;
+ const content::PasswordForm& form) = 0;
// Finds all non-blacklist PasswordForms, and notifies the consumer.
virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) = 0;
// Finds all blacklist PasswordForms, and notifies the consumer.
@@ -176,10 +174,10 @@ class PasswordStore
// Finds all non-blacklist PasswordForms, and fills the vector.
virtual bool FillAutofillableLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) = 0;
+ std::vector<content::PasswordForm*>* forms) = 0;
// Finds all blacklist PasswordForms, and fills the vector.
virtual bool FillBlacklistLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) = 0;
+ std::vector<content::PasswordForm*>* forms) = 0;
// Dispatches the result to the PasswordStoreConsumer on the original caller's
// thread so the callback can be executed there. This should be the UI thread.
@@ -196,7 +194,7 @@ class PasswordStore
// See GetLogins() for more information on |ignore_logins_cutoff|.
template<typename BackendFunc>
Handle Schedule(BackendFunc func, PasswordStoreConsumer* consumer,
- const webkit::forms::PasswordForm& form,
+ const content::PasswordForm& form,
const base::Time& ignore_logins_cutoff);
// Wrapper method called on the destination thread (DB for non-mac) that
diff --git a/chrome/browser/password_manager/password_store_change.h b/chrome/browser/password_manager/password_store_change.h
index 8e5de8d..404f57b 100644
--- a/chrome/browser/password_manager/password_store_change.h
+++ b/chrome/browser/password_manager/password_store_change.h
@@ -7,7 +7,7 @@
#include <vector>
-#include "webkit/forms/password_form.h"
+#include "content/public/common/password_form.h"
class PasswordStoreChange {
public:
@@ -17,13 +17,13 @@ class PasswordStoreChange {
REMOVE,
};
- PasswordStoreChange(Type type, const webkit::forms::PasswordForm& form)
+ PasswordStoreChange(Type type, const content::PasswordForm& form)
: type_(type), form_(form) {
}
virtual ~PasswordStoreChange() {}
Type type() const { return type_; }
- const webkit::forms::PasswordForm& form() const { return form_; }
+ const content::PasswordForm& form() const { return form_; }
bool operator==(const PasswordStoreChange& other) const {
return type() == other.type() &&
@@ -45,7 +45,7 @@ class PasswordStoreChange {
private:
Type type_;
- webkit::forms::PasswordForm form_;
+ content::PasswordForm form_;
};
typedef std::vector<PasswordStoreChange> PasswordStoreChangeList;
diff --git a/chrome/browser/password_manager/password_store_consumer.h b/chrome/browser/password_manager/password_store_consumer.h
index 7d2ab8d..87e7f43 100644
--- a/chrome/browser/password_manager/password_store_consumer.h
+++ b/chrome/browser/password_manager/password_store_consumer.h
@@ -7,11 +7,9 @@
#include "chrome/browser/common/cancelable_request.h"
-namespace webkit {
-namespace forms {
+namespace content {
struct PasswordForm;
}
-}
// Reads from the PasswordStore are done asynchronously on a separate
// thread. PasswordStoreConsumer provides the virtual callback method, which is
@@ -26,7 +24,7 @@ class PasswordStoreConsumer {
// anyway with an empty vector.
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<webkit::forms::PasswordForm*>& result) = 0;
+ const std::vector<content::PasswordForm*>& result) = 0;
// The CancelableRequest framework needs both a callback (the
// PasswordStoreConsumer::OnPasswordStoreRequestDone) as well as a
diff --git a/chrome/browser/password_manager/password_store_default.cc b/chrome/browser/password_manager/password_store_default.cc
index 50f54f9..a5c6db6 100644
--- a/chrome/browser/password_manager/password_store_default.cc
+++ b/chrome/browser/password_manager/password_store_default.cc
@@ -18,7 +18,7 @@
#include "content/public/browser/notification_service.h"
using content::BrowserThread;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
PasswordStoreDefault::PasswordStoreDefault(LoginDatabase* login_db,
Profile* profile)
@@ -94,7 +94,7 @@ void PasswordStoreDefault::RemoveLoginsCreatedBetweenImpl(
}
void PasswordStoreDefault::GetLoginsImpl(
- GetLoginsRequest* request, const webkit::forms::PasswordForm& form) {
+ GetLoginsRequest* request, const content::PasswordForm& form) {
login_db_->GetLogins(form, &request->value);
ForwardLoginsResult(request);
}
diff --git a/chrome/browser/password_manager/password_store_default.h b/chrome/browser/password_manager/password_store_default.h
index 0fe7750..ac624ca 100644
--- a/chrome/browser/password_manager/password_store_default.h
+++ b/chrome/browser/password_manager/password_store_default.h
@@ -29,21 +29,21 @@ class PasswordStoreDefault : public PasswordStore {
// Implements PasswordStore interface.
virtual void ReportMetricsImpl() OVERRIDE;
- virtual void AddLoginImpl(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual void AddLoginImpl(const content::PasswordForm& form) OVERRIDE;
virtual void UpdateLoginImpl(
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
virtual void RemoveLoginImpl(
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
virtual void RemoveLoginsCreatedBetweenImpl(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual bool FillAutofillableLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
+ std::vector<content::PasswordForm*>* forms) OVERRIDE;
virtual bool FillBlacklistLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
+ std::vector<content::PasswordForm*>* forms) OVERRIDE;
protected:
inline bool DeleteAndRecreateDatabaseFile() {
diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc
index 4c99c42..32c6f43 100644
--- a/chrome/browser/password_manager/password_store_default_unittest.cc
+++ b/chrome/browser/password_manager/password_store_default_unittest.cc
@@ -28,13 +28,13 @@
using base::WaitableEvent;
using content::BrowserThread;
+using content::PasswordForm;
using testing::_;
using testing::DoAll;
using testing::ElementsAreArray;
using testing::Pointee;
using testing::Property;
using testing::WithArg;
-using webkit::forms::PasswordForm;
namespace {
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index a1cb791..5c2bb25 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -25,7 +25,7 @@
#include "crypto/apple_keychain.h"
using crypto::AppleKeychain;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
// Utility class to handle the details of constructing and running a keychain
// search from a set of attributes.
@@ -644,7 +644,7 @@ SecKeychainItemRef MacKeychainPasswordFormAdapter::KeychainItemForForm(
std::vector<SecKeychainItemRef>
MacKeychainPasswordFormAdapter::MatchingKeychainItems(
const std::string& signon_realm,
- webkit::forms::PasswordForm::Scheme scheme,
+ content::PasswordForm::Scheme scheme,
const char* path, const char* username) {
std::vector<SecKeychainItemRef> matches;
@@ -889,7 +889,7 @@ void PasswordStoreMac::RemoveLoginsCreatedBetweenImpl(
}
void PasswordStoreMac::GetLoginsImpl(GetLoginsRequest* request,
- const webkit::forms::PasswordForm& form) {
+ const content::PasswordForm& form) {
MacKeychainPasswordFormAdapter keychain_adapter(keychain_.get());
std::vector<PasswordForm*> keychain_forms =
keychain_adapter.PasswordsFillingForm(form);
@@ -962,7 +962,7 @@ bool PasswordStoreMac::AddToKeychainIfNecessary(const PasswordForm& form) {
}
bool PasswordStoreMac::DatabaseHasFormMatchingKeychainForm(
- const webkit::forms::PasswordForm& form) {
+ const content::PasswordForm& form) {
bool has_match = false;
std::vector<PasswordForm*> database_forms;
login_metadata_db_->GetLogins(form, &database_forms);
diff --git a/chrome/browser/password_manager/password_store_mac.h b/chrome/browser/password_manager/password_store_mac.h
index 3974ecb..39cc572 100644
--- a/chrome/browser/password_manager/password_store_mac.h
+++ b/chrome/browser/password_manager/password_store_mac.h
@@ -44,44 +44,44 @@ class PasswordStoreMac : public PasswordStore {
private:
virtual void ReportMetricsImpl() OVERRIDE;
- virtual void AddLoginImpl(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual void AddLoginImpl(const content::PasswordForm& form) OVERRIDE;
virtual void UpdateLoginImpl(
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
virtual void RemoveLoginImpl(
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
virtual void RemoveLoginsCreatedBetweenImpl(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual bool FillAutofillableLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
+ std::vector<content::PasswordForm*>* forms) OVERRIDE;
virtual bool FillBlacklistLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
+ std::vector<content::PasswordForm*>* forms) OVERRIDE;
// Adds the given form to the Keychain if it's something we want to store
// there (i.e., not a blacklist entry). Returns true if the operation
// succeeded (either we added successfully, or we didn't need to).
- bool AddToKeychainIfNecessary(const webkit::forms::PasswordForm& form);
+ bool AddToKeychainIfNecessary(const content::PasswordForm& form);
// Returns true if our database contains a form that exactly matches the given
// keychain form.
bool DatabaseHasFormMatchingKeychainForm(
- const webkit::forms::PasswordForm& form);
+ const content::PasswordForm& form);
// Returns all the Keychain entries that we own but no longer have
// corresponding metadata for in our database.
// Caller is responsible for deleting the forms.
- std::vector<webkit::forms::PasswordForm*> GetUnusedKeychainForms();
+ std::vector<content::PasswordForm*> GetUnusedKeychainForms();
// Removes the given forms from the database.
void RemoveDatabaseForms(
- const std::vector<webkit::forms::PasswordForm*>& forms);
+ const std::vector<content::PasswordForm*>& forms);
// Removes the given forms from the Keychain.
void RemoveKeychainForms(
- const std::vector<webkit::forms::PasswordForm*>& forms);
+ const std::vector<content::PasswordForm*>& forms);
// Allows the creation of |notification_service_| to be scheduled on the right
// thread.
diff --git a/chrome/browser/password_manager/password_store_mac_internal.h b/chrome/browser/password_manager/password_store_mac_internal.h
index b287557..9a01ea4 100644
--- a/chrome/browser/password_manager/password_store_mac_internal.h
+++ b/chrome/browser/password_manager/password_store_mac_internal.h
@@ -26,40 +26,40 @@ class MacKeychainPasswordFormAdapter {
// Returns PasswordForms for each keychain entry that could be used to fill
// |form|. Caller is responsible for deleting the returned forms.
- std::vector<webkit::forms::PasswordForm*> PasswordsFillingForm(
- const webkit::forms::PasswordForm& query_form);
+ std::vector<content::PasswordForm*> PasswordsFillingForm(
+ const content::PasswordForm& query_form);
// Returns PasswordForms for each keychain entry that could be merged with
// |form|. Differs from PasswordsFillingForm in that the username must match.
// Caller is responsible for deleting the returned forms.
- std::vector<webkit::forms::PasswordForm*> PasswordsMergeableWithForm(
- const webkit::forms::PasswordForm& query_form);
+ std::vector<content::PasswordForm*> PasswordsMergeableWithForm(
+ const content::PasswordForm& query_form);
// Returns the PasswordForm for the Keychain entry that matches |form| on all
// of the fields that uniquely identify a Keychain item, or NULL if there is
// no such entry.
// Caller is responsible for deleting the returned form.
- webkit::forms::PasswordForm* PasswordExactlyMatchingForm(
- const webkit::forms::PasswordForm& query_form);
+ content::PasswordForm* PasswordExactlyMatchingForm(
+ const content::PasswordForm& query_form);
// Returns true if PasswordsMergeableWithForm would return any items. This is
// a separate method because calling PasswordsMergeableWithForm and checking
// the return count would require reading the passwords from the keychain,
// thus potentially triggering authorizaiton UI, whereas this won't.
bool HasPasswordsMergeableWithForm(
- const webkit::forms::PasswordForm& query_form);
+ const content::PasswordForm& query_form);
// Returns all keychain items of types corresponding to password forms.
- std::vector<webkit::forms::PasswordForm*> GetAllPasswordFormPasswords();
+ std::vector<content::PasswordForm*> GetAllPasswordFormPasswords();
// Creates a new keychain entry from |form|, or updates the password of an
// existing keychain entry if there is a collision. Returns true if a keychain
// entry was successfully added/updated.
- bool AddPassword(const webkit::forms::PasswordForm& form);
+ bool AddPassword(const content::PasswordForm& form);
// Removes the keychain password matching |form| if any. Returns true if a
// keychain item was found and successfully removed.
- bool RemovePassword(const webkit::forms::PasswordForm& form);
+ bool RemovePassword(const content::PasswordForm& form);
// Controls whether or not Chrome will restrict Keychain searches to items
// that it created. Defaults to false.
@@ -69,14 +69,14 @@ class MacKeychainPasswordFormAdapter {
// Returns PasswordForms constructed from the given Keychain items, calling
// AppleKeychain::Free on all of the keychain items and clearing the vector.
// Caller is responsible for deleting the returned forms.
- std::vector<webkit::forms::PasswordForm*> ConvertKeychainItemsToForms(
+ std::vector<content::PasswordForm*> ConvertKeychainItemsToForms(
std::vector<SecKeychainItemRef>* items);
// Searches |keychain| for the specific keychain entry that corresponds to the
// given form, and returns it (or NULL if no match is found). The caller is
// responsible for calling AppleKeychain::Free on on the returned item.
SecKeychainItemRef KeychainItemForForm(
- const webkit::forms::PasswordForm& form);
+ const content::PasswordForm& form);
// Returns the Keychain items matching the given signon_realm, scheme, and
// optionally path and username (either of both can be NULL).
@@ -84,7 +84,7 @@ class MacKeychainPasswordFormAdapter {
// returned items.
std::vector<SecKeychainItemRef> MatchingKeychainItems(
const std::string& signon_realm,
- webkit::forms::PasswordForm::Scheme scheme,
+ content::PasswordForm::Scheme scheme,
const char* path,
const char* username);
@@ -100,7 +100,7 @@ class MacKeychainPasswordFormAdapter {
// Returns the Keychain SecAuthenticationType type corresponding to |scheme|.
SecAuthenticationType AuthTypeForScheme(
- webkit::forms::PasswordForm::Scheme scheme);
+ content::PasswordForm::Scheme scheme);
// Changes the password for keychain_item to |password|; returns true if the
// password was successfully changed.
@@ -142,12 +142,12 @@ namespace internal_keychain_helpers {
// require authorization).
bool FillPasswordFormFromKeychainItem(const AppleKeychain& keychain,
const SecKeychainItemRef& keychain_item,
- webkit::forms::PasswordForm* form);
+ content::PasswordForm* form);
// Returns true if the two given forms match based on signon_reaml, scheme, and
// username_value, and are thus suitable for merging (see MergePasswordForms).
-bool FormsMatchForMerge(const webkit::forms::PasswordForm& form_a,
- const webkit::forms::PasswordForm& form_b);
+bool FormsMatchForMerge(const content::PasswordForm& form_a,
+ const content::PasswordForm& form_b);
// Populates merged_forms by combining the password data from keychain_forms and
// the metadata from database_forms, removing used entries from the two source
@@ -159,16 +159,16 @@ bool FormsMatchForMerge(const webkit::forms::PasswordForm& form_a,
// keychain_forms its entries that weren't merged into at least one database
// form.
void MergePasswordForms(
- std::vector<webkit::forms::PasswordForm*>* keychain_forms,
- std::vector<webkit::forms::PasswordForm*>* database_forms,
- std::vector<webkit::forms::PasswordForm*>* merged_forms);
+ std::vector<content::PasswordForm*>* keychain_forms,
+ std::vector<content::PasswordForm*>* database_forms,
+ std::vector<content::PasswordForm*>* merged_forms);
// Fills in the passwords for as many of the forms in |database_forms| as
// possible using entries from |keychain| and returns them. On return,
// |database_forms| will contain only the forms for which no password was found.
-std::vector<webkit::forms::PasswordForm*> GetPasswordsForForms(
+std::vector<content::PasswordForm*> GetPasswordsForForms(
const AppleKeychain& keychain,
- std::vector<webkit::forms::PasswordForm*>* database_forms);
+ std::vector<content::PasswordForm*>* database_forms);
} // internal_keychain_helpers
diff --git a/chrome/browser/password_manager/password_store_mac_unittest.cc b/chrome/browser/password_manager/password_store_mac_unittest.cc
index be42d3b..1a689ce 100644
--- a/chrome/browser/password_manager/password_store_mac_unittest.cc
+++ b/chrome/browser/password_manager/password_store_mac_unittest.cc
@@ -21,7 +21,7 @@
using content::BrowserThread;
using crypto::MockAppleKeychain;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
using testing::_;
using testing::DoAll;
using testing::WithArg;
@@ -32,7 +32,7 @@ class MockPasswordStoreConsumer : public PasswordStoreConsumer {
public:
MOCK_METHOD2(OnPasswordStoreRequestDone,
void(CancelableRequestProvider::Handle,
- const std::vector<webkit::forms::PasswordForm*>&));
+ const std::vector<content::PasswordForm*>&));
};
ACTION(STLDeleteElements0) {
diff --git a/chrome/browser/password_manager/password_store_unittest.cc b/chrome/browser/password_manager/password_store_unittest.cc
index f7fdc89..aec69d9 100644
--- a/chrome/browser/password_manager/password_store_unittest.cc
+++ b/chrome/browser/password_manager/password_store_unittest.cc
@@ -26,7 +26,7 @@ using content::BrowserThread;
using testing::_;
using testing::DoAll;
using testing::WithArg;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
namespace {
diff --git a/chrome/browser/password_manager/password_store_win.cc b/chrome/browser/password_manager/password_store_win.cc
index cdabe99..3982ec4 100644
--- a/chrome/browser/password_manager/password_store_win.cc
+++ b/chrome/browser/password_manager/password_store_win.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/webdata/web_data_service.h"
using content::BrowserThread;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
namespace {
// Subclass GetLoginsRequest in order to hold a copy of the form information
diff --git a/chrome/browser/password_manager/password_store_win.h b/chrome/browser/password_manager/password_store_win.h
index 22006e6..c4dae0c 100644
--- a/chrome/browser/password_manager/password_store_win.h
+++ b/chrome/browser/password_manager/password_store_win.h
@@ -12,11 +12,9 @@ class LoginDatabase;
class Profile;
class WebDataService;
-namespace webkit {
-namespace forms {
+namespace content {
struct PasswordForm;
}
-}
// Windows PasswordStore implementation that uses the default implementation,
// but also uses IE7 passwords if no others found.
@@ -46,7 +44,7 @@ class PasswordStoreWin : public PasswordStoreDefault {
// Overridden so that we can save the form for later use.
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
scoped_ptr<DBHandler> db_handler_;
diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc
index 6a18b21a..e75861f 100644
--- a/chrome/browser/password_manager/password_store_win_unittest.cc
+++ b/chrome/browser/password_manager/password_store_win_unittest.cc
@@ -32,7 +32,7 @@ using content::BrowserThread;
using testing::_;
using testing::DoAll;
using testing::WithArg;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
namespace {
@@ -40,7 +40,7 @@ class MockPasswordStoreConsumer : public PasswordStoreConsumer {
public:
MOCK_METHOD2(OnPasswordStoreRequestDone,
void(CancelableRequestProvider::Handle,
- const std::vector<webkit::forms::PasswordForm*>&));
+ const std::vector<content::PasswordForm*>&));
};
class MockWebDataServiceConsumer : public WebDataServiceConsumer {
diff --git a/chrome/browser/password_manager/password_store_x.cc b/chrome/browser/password_manager/password_store_x.cc
index 13e5a98..f1e29c3 100644
--- a/chrome/browser/password_manager/password_store_x.cc
+++ b/chrome/browser/password_manager/password_store_x.cc
@@ -20,7 +20,7 @@
using content::BrowserThread;
using std::vector;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
PasswordStoreX::PasswordStoreX(LoginDatabase* login_db,
Profile* profile,
diff --git a/chrome/browser/password_manager/password_store_x.h b/chrome/browser/password_manager/password_store_x.h
index 5f8e455..5caad55 100644
--- a/chrome/browser/password_manager/password_store_x.h
+++ b/chrome/browser/password_manager/password_store_x.h
@@ -28,18 +28,18 @@ class PasswordStoreX : public PasswordStoreDefault {
// with return values rather than implicit consumer notification.
class NativeBackend {
public:
- typedef std::vector<webkit::forms::PasswordForm*> PasswordFormList;
+ typedef std::vector<content::PasswordForm*> PasswordFormList;
virtual ~NativeBackend() {}
virtual bool Init() = 0;
- virtual bool AddLogin(const webkit::forms::PasswordForm& form) = 0;
- virtual bool UpdateLogin(const webkit::forms::PasswordForm& form) = 0;
- virtual bool RemoveLogin(const webkit::forms::PasswordForm& form) = 0;
+ virtual bool AddLogin(const content::PasswordForm& form) = 0;
+ virtual bool UpdateLogin(const content::PasswordForm& form) = 0;
+ virtual bool RemoveLogin(const content::PasswordForm& form) = 0;
virtual bool RemoveLoginsCreatedBetween(const base::Time& delete_begin,
const base::Time& delete_end) = 0;
- virtual bool GetLogins(const webkit::forms::PasswordForm& form,
+ virtual bool GetLogins(const content::PasswordForm& form,
PasswordFormList* forms) = 0;
virtual bool GetLoginsCreatedBetween(const base::Time& get_begin,
const base::Time& get_end,
@@ -73,21 +73,21 @@ class PasswordStoreX : public PasswordStoreDefault {
virtual ~PasswordStoreX();
// Implements PasswordStore interface.
- virtual void AddLoginImpl(const webkit::forms::PasswordForm& form) OVERRIDE;
+ virtual void AddLoginImpl(const content::PasswordForm& form) OVERRIDE;
virtual void UpdateLoginImpl(
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
virtual void RemoveLoginImpl(
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
virtual void RemoveLoginsCreatedBetweenImpl(
const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
virtual void GetLoginsImpl(GetLoginsRequest* request,
- const webkit::forms::PasswordForm& form) OVERRIDE;
+ const content::PasswordForm& form) OVERRIDE;
virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE;
virtual bool FillAutofillableLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
+ std::vector<content::PasswordForm*>* forms) OVERRIDE;
virtual bool FillBlacklistLogins(
- std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE;
+ std::vector<content::PasswordForm*>* forms) OVERRIDE;
// Sort logins by origin, like the ORDER BY clause in login_database.cc.
void SortLoginsByOrigin(NativeBackend::PasswordFormList* list);
diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc
index 29ed91a..55d2d3c 100644
--- a/chrome/browser/password_manager/password_store_x_unittest.cc
+++ b/chrome/browser/password_manager/password_store_x_unittest.cc
@@ -39,7 +39,7 @@ using testing::ElementsAreArray;
using testing::Pointee;
using testing::Property;
using testing::WithArg;
-using webkit::forms::PasswordForm;
+using content::PasswordForm;
typedef std::vector<PasswordForm*> VectorOfForms;