diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 19:50:56 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 19:50:56 +0000 |
commit | ed3fb034eb4b7da69bbc4f3e3da47093dabc481e (patch) | |
tree | d08b2837ab8b05b98fef6990edd26a9d00465589 /chrome/browser/webdata | |
parent | 5eb55c2f42f70fe544a04d200cdd059377d310f7 (diff) | |
download | chromium_src-ed3fb034eb4b7da69bbc4f3e3da47093dabc481e.zip chromium_src-ed3fb034eb4b7da69bbc4f3e3da47093dabc481e.tar.gz chromium_src-ed3fb034eb4b7da69bbc4f3e3da47093dabc481e.tar.bz2 |
Extract load times from WebDataSource. Move them to NavigationState.
Move PasswordForm into the webkit_glue namespace.
TEST=none
BUG=10041
R=brettw
Review URL: http://codereview.chromium.org/126190
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webdata')
-rw-r--r-- | chrome/browser/webdata/web_data_service.cc | 1 | ||||
-rw-r--r-- | chrome/browser/webdata/web_data_service.h | 22 | ||||
-rw-r--r-- | chrome/browser/webdata/web_database.cc | 2 | ||||
-rw-r--r-- | chrome/browser/webdata/web_database.h | 18 | ||||
-rw-r--r-- | chrome/browser/webdata/web_database_unittest.cc | 1 |
5 files changed, 28 insertions, 16 deletions
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc index 7dbf1eb..b93ae6d 100644 --- a/chrome/browser/webdata/web_data_service.cc +++ b/chrome/browser/webdata/web_data_service.cc @@ -20,6 +20,7 @@ using base::Time; using webkit_glue::AutofillForm; +using webkit_glue::PasswordForm; WebDataService::WebDataService() : thread_(NULL), db_(NULL), diff --git a/chrome/browser/webdata/web_data_service.h b/chrome/browser/webdata/web_data_service.h index 212e958..05b997b 100644 --- a/chrome/browser/webdata/web_data_service.h +++ b/chrome/browser/webdata/web_data_service.h @@ -19,12 +19,15 @@ #if defined(OS_WIN) struct IE7PasswordInfo; #endif -struct PasswordForm; class FilePath; class GURL; class ShutdownTask; class TemplateURL; +namespace webkit_glue { +struct PasswordForm; +} + //////////////////////////////////////////////////////////////////////////////// // // WebDataService is a generic data repository for meta data associated with @@ -307,13 +310,13 @@ class WebDataService : public base::RefCountedThreadSafe<WebDataService> { ////////////////////////////////////////////////////////////////////////////// // Updates the remembered password form. - void UpdateLogin(const PasswordForm& form); + void UpdateLogin(const webkit_glue::PasswordForm& form); // Adds |form| to the list of remembered password forms. - void AddLogin(const PasswordForm& form); + void AddLogin(const webkit_glue::PasswordForm& form); // Removes |form| from the list of remembered password forms. - void RemoveLogin(const PasswordForm& form); + void RemoveLogin(const webkit_glue::PasswordForm& form); // Removes all logins created in the specified daterange void RemoveLoginsCreatedBetween(const base::Time delete_begin, @@ -326,7 +329,8 @@ class WebDataService : public base::RefCountedThreadSafe<WebDataService> { // |consumer| will be notified when the request is done. The result is of // type WDResult<std::vector<PasswordForm*>>. // The result will be null on failure. The |consumer| owns all PasswordForm's. - Handle GetLogins(const PasswordForm& form, WebDataServiceConsumer* consumer); + Handle GetLogins(const webkit_glue::PasswordForm& form, + WebDataServiceConsumer* consumer); // Gets the complete list of password forms that have not been blacklisted and // are thus auto-fillable. @@ -437,12 +441,12 @@ class WebDataService : public base::RefCountedThreadSafe<WebDataService> { // Password manager. // ////////////////////////////////////////////////////////////////////////////// - void AddLoginImpl(GenericRequest<PasswordForm>* request); - void UpdateLoginImpl(GenericRequest<PasswordForm>* request); - void RemoveLoginImpl(GenericRequest<PasswordForm>* request); + void AddLoginImpl(GenericRequest<webkit_glue::PasswordForm>* request); + void UpdateLoginImpl(GenericRequest<webkit_glue::PasswordForm>* request); + void RemoveLoginImpl(GenericRequest<webkit_glue::PasswordForm>* request); void RemoveLoginsCreatedBetweenImpl( GenericRequest2<base::Time, base::Time>* request); - void GetLoginsImpl(GenericRequest<PasswordForm>* request); + void GetLoginsImpl(GenericRequest<webkit_glue::PasswordForm>* request); void GetAllAutofillableLoginsImpl(WebDataRequest* request); void GetAllLoginsImpl(WebDataRequest* request); #if defined(OS_WIN) diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc index 8914906..c21aa74 100644 --- a/chrome/browser/webdata/web_database.cc +++ b/chrome/browser/webdata/web_database.cc @@ -24,6 +24,8 @@ // http://code.google.com/p/chromium/issues/detail?id=8205 (Linux) #include "chrome/browser/password_manager/encryptor.h" +using webkit_glue::PasswordForm; + //////////////////////////////////////////////////////////////////////////////// // // Schema diff --git a/chrome/browser/webdata/web_database.h b/chrome/browser/webdata/web_database.h index c4d0d23..7ef4f03 100644 --- a/chrome/browser/webdata/web_database.h +++ b/chrome/browser/webdata/web_database.h @@ -17,9 +17,13 @@ #include "webkit/glue/autofill_form.h" namespace base { - class Time; +class Time; } + +namespace webkit_glue { struct PasswordForm; +} + #if defined(OS_WIN) struct IE7PasswordInfo; #endif @@ -80,7 +84,7 @@ class WebDatabase { ////////////////////////////////////////////////////////////////////////////// // Adds |form| to the list of remembered password forms. - bool AddLogin(const PasswordForm& form); + bool AddLogin(const webkit_glue::PasswordForm& form); #if defined(OS_WIN) // Adds |info| to the list of imported passwords from ie7/ie8. @@ -94,10 +98,10 @@ class WebDatabase { #endif // Updates remembered password form. - bool UpdateLogin(const PasswordForm& form); + bool UpdateLogin(const webkit_glue::PasswordForm& form); // Removes |form| from the list of remembered password forms. - bool RemoveLogin(const PasswordForm& form); + bool RemoveLogin(const webkit_glue::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 @@ -108,14 +112,14 @@ class WebDatabase { // 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 PasswordForm& form, - std::vector<PasswordForm*>* forms) const; + bool GetLogins(const webkit_glue::PasswordForm& form, + std::vector<webkit_glue::PasswordForm*>* forms) const; // Loads the complete list of password forms into the specified vector |forms| // if include_blacklisted is true, otherwise only loads those which are // actually autofillable; i.e haven't been blacklisted by the user selecting // the 'Never for this site' button. - bool GetAllLogins(std::vector<PasswordForm*>* forms, + bool GetAllLogins(std::vector<webkit_glue::PasswordForm*>* forms, bool include_blacklisted) const; ////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/webdata/web_database_unittest.cc b/chrome/browser/webdata/web_database_unittest.cc index a456f91..5076fc2 100644 --- a/chrome/browser/webdata/web_database_unittest.cc +++ b/chrome/browser/webdata/web_database_unittest.cc @@ -19,6 +19,7 @@ using base::Time; using base::TimeDelta; using webkit_glue::AutofillForm; +using webkit_glue::PasswordForm; class WebDatabaseTest : public testing::Test { protected: |