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

Unified Diff: chrome/browser/password_manager/password_store.h

Issue 23742004: Move PasswordForm from //content to //autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_password_form_conversion_utils
Patch Set: Rebase Created 7 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
Index: chrome/browser/password_manager/password_store.h
diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h
index 9ae6bf31a5b1b323b173ab652a61d831189c25a4..1c4b96c794e2766506c1351b0020be9973af2f2a 100644
--- a/chrome/browser/password_manager/password_store.h
+++ b/chrome/browser/password_manager/password_store.h
@@ -20,6 +20,10 @@ class PasswordStore;
class PasswordStoreConsumer;
class Task;
+namespace autofill {
+struct PasswordForm;
+}
+
namespace browser_sync {
class PasswordChangeProcessor;
class PasswordDataTypeController;
@@ -27,14 +31,10 @@ class PasswordModelAssociator;
class PasswordModelWorker;
}
-namespace content {
-struct PasswordForm;
-}
-
namespace passwords_helper {
-void AddLogin(PasswordStore* store, const content::PasswordForm& form);
-void RemoveLogin(PasswordStore* store, const content::PasswordForm& form);
-void UpdateLogin(PasswordStore* store, const content::PasswordForm& form);
+void AddLogin(PasswordStore* store, const autofill::PasswordForm& form);
+void RemoveLogin(PasswordStore* store, const autofill::PasswordForm& form);
+void UpdateLogin(PasswordStore* store, const autofill::PasswordForm& form);
}
// Interface for storing form passwords in a platform-specific secure way.
@@ -45,7 +45,7 @@ class PasswordStore
public CancelableRequestProvider {
public:
typedef base::Callback<
- void(Handle, const std::vector<content::PasswordForm*>&)>
+ void(Handle, const std::vector<autofill::PasswordForm*>&)>
GetLoginsCallback;
// PasswordForm vector elements are meant to be owned by the
@@ -53,7 +53,7 @@ class PasswordStore
// allocation, then the request must take care of the deletion.
class GetLoginsRequest
: public CancelableRequest1<GetLoginsCallback,
- std::vector<content::PasswordForm*> > {
+ std::vector<autofill::PasswordForm*> > {
public:
explicit GetLoginsRequest(const GetLoginsCallback& callback);
@@ -92,13 +92,13 @@ class PasswordStore
virtual bool Init();
// Adds the given PasswordForm to the secure password store asynchronously.
- virtual void AddLogin(const content::PasswordForm& form);
+ virtual void AddLogin(const autofill::PasswordForm& form);
// Updates the matching PasswordForm in the secure password store (async).
- void UpdateLogin(const content::PasswordForm& form);
+ void UpdateLogin(const autofill::PasswordForm& form);
// Removes the matching PasswordForm from the secure password store (async).
- void RemoveLogin(const content::PasswordForm& form);
+ void RemoveLogin(const autofill::PasswordForm& form);
// Removes all logins created in the given date range.
void RemoveLoginsCreatedBetween(const base::Time& delete_begin,
@@ -108,7 +108,7 @@ class PasswordStore
// can be tracked. Implement the PasswordStoreConsumer interface to be
// notified on completion.
virtual CancelableTaskTracker::TaskId GetLogins(
- const content::PasswordForm& form,
+ const autofill::PasswordForm& form,
PasswordStoreConsumer* consumer);
// Gets the complete list of PasswordForms that are not blacklist entries--and
@@ -138,11 +138,11 @@ class PasswordStore
friend class browser_sync::PasswordModelAssociator;
friend class browser_sync::PasswordModelWorker;
friend void passwords_helper::AddLogin(PasswordStore*,
- const content::PasswordForm&);
+ const autofill::PasswordForm&);
friend void passwords_helper::RemoveLogin(PasswordStore*,
- const content::PasswordForm&);
+ const autofill::PasswordForm&);
friend void passwords_helper::UpdateLogin(PasswordStore*,
- const content::PasswordForm&);
+ const autofill::PasswordForm&);
virtual ~PasswordStore();
@@ -160,23 +160,23 @@ class PasswordStore
// Synchronous implementation that reports usage metrics.
virtual void ReportMetricsImpl() = 0;
// Synchronous implementation to add the given login.
- virtual void AddLoginImpl(const content::PasswordForm& form) = 0;
+ virtual void AddLoginImpl(const autofill::PasswordForm& form) = 0;
// Synchronous implementation to update the given login.
- virtual void UpdateLoginImpl(const content::PasswordForm& form) = 0;
+ virtual void UpdateLoginImpl(const autofill::PasswordForm& form) = 0;
// Synchronous implementation to remove the given login.
- virtual void RemoveLoginImpl(const content::PasswordForm& form) = 0;
+ virtual void RemoveLoginImpl(const autofill::PasswordForm& form) = 0;
// Synchronous implementation to remove the given logins.
virtual void RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin,
const base::Time& delete_end) = 0;
- typedef base::Callback<void(const std::vector<content::PasswordForm*>&)>
+ typedef base::Callback<void(const std::vector<autofill::PasswordForm*>&)>
ConsumerCallbackRunner; // Owns all PasswordForms in the vector.
// Should find all PasswordForms with the same signon_realm. The results
// will then be scored by the PasswordFormManager. Once they are found
// (or not), the consumer should be notified.
virtual void GetLoginsImpl(
- const content::PasswordForm& form,
+ const autofill::PasswordForm& form,
const ConsumerCallbackRunner& callback_runner) = 0;
// Finds all non-blacklist PasswordForms, and notifies the consumer.
@@ -186,10 +186,10 @@ class PasswordStore
// Finds all non-blacklist PasswordForms, and fills the vector.
virtual bool FillAutofillableLogins(
- std::vector<content::PasswordForm*>* forms) = 0;
+ std::vector<autofill::PasswordForm*>* forms) = 0;
// Finds all blacklist PasswordForms, and fills the vector.
virtual bool FillBlacklistLogins(
- std::vector<content::PasswordForm*>* forms) = 0;
+ std::vector<autofill::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.
@@ -207,7 +207,7 @@ class PasswordStore
template<typename BackendFunc>
Handle Schedule(BackendFunc func,
PasswordStoreConsumer* consumer,
- const content::PasswordForm& form,
+ const autofill::PasswordForm& form,
const base::Time& ignore_logins_cutoff);
// Wrapper method called on the destination thread (DB for non-mac) that
« no previous file with comments | « chrome/browser/password_manager/password_manager_unittest.cc ('k') | chrome/browser/password_manager/password_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698