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

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

Issue 11000016: Move forms/ out of webkit/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 2 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 7233d1378dc8cab618b37cd6ea9e047b3e32848f..a15bd7a84daf1c649116175844da24f7f4b54c89 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
« 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