summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 19:50:56 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 19:50:56 +0000
commited3fb034eb4b7da69bbc4f3e3da47093dabc481e (patch)
treed08b2837ab8b05b98fef6990edd26a9d00465589 /chrome/browser
parent5eb55c2f42f70fe544a04d200cdd059377d310f7 (diff)
downloadchromium_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')
-rw-r--r--chrome/browser/importer/firefox2_importer.cc1
-rw-r--r--chrome/browser/importer/firefox3_importer.cc1
-rw-r--r--chrome/browser/importer/firefox_importer_utils.cc1
-rw-r--r--chrome/browser/importer/firefox_importer_utils.h2
-rw-r--r--chrome/browser/importer/ie_importer.cc1
-rw-r--r--chrome/browser/importer/importer.cc2
-rw-r--r--chrome/browser/importer/importer.h2
-rw-r--r--chrome/browser/importer/importer_unittest.cc2
-rw-r--r--chrome/browser/login_prompt.cc1
-rw-r--r--chrome/browser/password_manager/login_database.cc2
-rw-r--r--chrome/browser/password_manager/login_database.h14
-rw-r--r--chrome/browser/password_manager/login_database_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_form_manager.cc2
-rw-r--r--chrome/browser/password_manager/password_form_manager.h25
-rw-r--r--chrome/browser/password_manager/password_form_manager_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_manager.cc3
-rw-r--r--chrome/browser/password_manager/password_manager.h10
-rw-r--r--chrome/browser/password_manager/password_store.cc1
-rw-r--r--chrome/browser/password_manager/password_store.h24
-rw-r--r--chrome/browser/password_manager/password_store_default.cc2
-rw-r--r--chrome/browser/password_manager/password_store_default.h14
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc2
-rw-r--r--chrome/browser/password_manager/password_store_mac.h6
-rw-r--r--chrome/browser/password_manager/password_store_mac_internal.h12
-rw-r--r--chrome/browser/password_manager/password_store_mac_unittest.cc2
-rw-r--r--chrome/browser/password_manager/password_store_win.cc1
-rw-r--r--chrome/browser/password_manager/password_store_win.h5
-rw-r--r--chrome/browser/renderer_host/render_view_host.cc2
-rw-r--r--chrome/browser/renderer_host/render_view_host.h3
-rw-r--r--chrome/browser/renderer_host/render_view_host_delegate.h3
-rw-r--r--chrome/browser/renderer_host/test_render_view_host.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc2
-rw-r--r--chrome/browser/tab_contents/tab_contents.h3
-rw-r--r--chrome/browser/tab_contents/web_contents_unittest.cc2
-rw-r--r--chrome/browser/views/options/exceptions_page_view.cc1
-rw-r--r--chrome/browser/views/options/passwords_page_view.cc1
-rw-r--r--chrome/browser/views/options/passwords_page_view.h7
-rw-r--r--chrome/browser/webdata/web_data_service.cc1
-rw-r--r--chrome/browser/webdata/web_data_service.h22
-rw-r--r--chrome/browser/webdata/web_database.cc2
-rw-r--r--chrome/browser/webdata/web_database.h18
-rw-r--r--chrome/browser/webdata/web_database_unittest.cc1
43 files changed, 135 insertions, 79 deletions
diff --git a/chrome/browser/importer/firefox2_importer.cc b/chrome/browser/importer/firefox2_importer.cc
index 95f7587d..5885773 100644
--- a/chrome/browser/importer/firefox2_importer.cc
+++ b/chrome/browser/importer/firefox2_importer.cc
@@ -20,6 +20,7 @@
#include "net/base/data_url.h"
using base::Time;
+using webkit_glue::PasswordForm;
// Firefox2Importer.
diff --git a/chrome/browser/importer/firefox3_importer.cc b/chrome/browser/importer/firefox3_importer.cc
index 60be97c..0c6571d 100644
--- a/chrome/browser/importer/firefox3_importer.cc
+++ b/chrome/browser/importer/firefox3_importer.cc
@@ -16,6 +16,7 @@
#include "grit/generated_resources.h"
using base::Time;
+using webkit_glue::PasswordForm;
// Wraps the function sqlite3_close() in a class that is
// used in scoped_ptr_malloc.
diff --git a/chrome/browser/importer/firefox_importer_utils.cc b/chrome/browser/importer/firefox_importer_utils.cc
index 8380290..47816c8 100644
--- a/chrome/browser/importer/firefox_importer_utils.cc
+++ b/chrome/browser/importer/firefox_importer_utils.cc
@@ -21,6 +21,7 @@
#include "googleurl/src/gurl.h"
#include "net/base/base64.h"
+using webkit_glue::PasswordForm;
namespace {
diff --git a/chrome/browser/importer/firefox_importer_utils.h b/chrome/browser/importer/firefox_importer_utils.h
index 14c0c7a..cb44b1c 100644
--- a/chrome/browser/importer/firefox_importer_utils.h
+++ b/chrome/browser/importer/firefox_importer_utils.h
@@ -190,7 +190,7 @@ class NSSDecryptor {
// username/password and reads other related information.
// The result will be stored in |forms|.
void ParseSignons(const std::string& content,
- std::vector<PasswordForm>* forms);
+ std::vector<webkit_glue::PasswordForm>* forms);
private:
// Methods in Firefox security components.
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index 4ccfdf8..3862437 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -28,6 +28,7 @@
#include "grit/generated_resources.h"
using base::Time;
+using webkit_glue::PasswordForm;
namespace {
diff --git a/chrome/browser/importer/importer.cc b/chrome/browser/importer/importer.cc
index b3a36a3..1046cfd 100644
--- a/chrome/browser/importer/importer.cc
+++ b/chrome/browser/importer/importer.cc
@@ -47,6 +47,8 @@
#include "chrome/browser/gtk/import_lock_dialog_gtk.h"
#endif
+using webkit_glue::PasswordForm;
+
// ProfileWriter.
bool ProfileWriter::BookmarkModelIsLoaded() const {
diff --git a/chrome/browser/importer/importer.h b/chrome/browser/importer/importer.h
index b42bc20..bce26ee 100644
--- a/chrome/browser/importer/importer.h
+++ b/chrome/browser/importer/importer.h
@@ -94,7 +94,7 @@ class ProfileWriter : public base::RefCounted<ProfileWriter> {
};
// Helper methods for adding data to local stores.
- virtual void AddPasswordForm(const PasswordForm& form);
+ virtual void AddPasswordForm(const webkit_glue::PasswordForm& form);
#if defined(OS_WIN)
virtual void AddIE7PasswordInfo(const IE7PasswordInfo& info);
#endif
diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc
index e732365..d6ab67a 100644
--- a/chrome/browser/importer/importer_unittest.cc
+++ b/chrome/browser/importer/importer_unittest.cc
@@ -22,6 +22,8 @@
#include "chrome/browser/profile.h"
#include "chrome/common/chrome_paths.h"
+using webkit_glue::PasswordForm;
+
class ImporterTest : public testing::Test {
public:
protected:
diff --git a/chrome/browser/login_prompt.cc b/chrome/browser/login_prompt.cc
index 002e017..dbed8aa 100644
--- a/chrome/browser/login_prompt.cc
+++ b/chrome/browser/login_prompt.cc
@@ -26,6 +26,7 @@
using namespace std;
using views::LoginView;
+using webkit_glue::PasswordForm;
class LoginHandlerImpl;
diff --git a/chrome/browser/password_manager/login_database.cc b/chrome/browser/password_manager/login_database.cc
index a8eebab..d455300 100644
--- a/chrome/browser/password_manager/login_database.cc
+++ b/chrome/browser/password_manager/login_database.cc
@@ -10,6 +10,8 @@
#include "base/time.h"
#include "chrome/common/sqlite_utils.h"
+using webkit_glue::PasswordForm;
+
static const int kCurrentVersionNumber = 1;
static const int kCompatibleVersionNumber = 1;
diff --git a/chrome/browser/password_manager/login_database.h b/chrome/browser/password_manager/login_database.h
index bc067dd..ce53993 100644
--- a/chrome/browser/password_manager/login_database.h
+++ b/chrome/browser/password_manager/login_database.h
@@ -28,13 +28,13 @@ class LoginDatabase {
bool Init(const std::string& db_name);
// Adds |form| to the list of remembered password forms.
- bool AddLogin(const PasswordForm& form);
+ bool AddLogin(const webkit_glue::PasswordForm& form);
// 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
@@ -45,14 +45,14 @@ 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 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;
protected:
@@ -69,7 +69,7 @@ class LoginDatabase {
private:
// Fills |form| from the values in the given statement (which is assumed to
// be of the form used by GetLogins/GetAllLogins).
- void InitPasswordFormFromStatement(PasswordForm* form,
+ void InitPasswordFormFromStatement(webkit_glue::PasswordForm* form,
SQLStatement* s) const;
sqlite3* db_;
diff --git a/chrome/browser/password_manager/login_database_unittest.cc b/chrome/browser/password_manager/login_database_unittest.cc
index 9e8be84..6c6322f 100644
--- a/chrome/browser/password_manager/login_database_unittest.cc
+++ b/chrome/browser/password_manager/login_database_unittest.cc
@@ -16,6 +16,8 @@
#include "chrome/common/chrome_paths.h"
#include "webkit/glue/password_form.h"
+using webkit_glue::PasswordForm;
+
class LoginDatabaseTest : public testing::Test {
protected:
virtual void SetUp() {
diff --git a/chrome/browser/password_manager/password_form_manager.cc b/chrome/browser/password_manager/password_form_manager.cc
index 8122f28..94d0c93 100644
--- a/chrome/browser/password_manager/password_form_manager.cc
+++ b/chrome/browser/password_manager/password_form_manager.cc
@@ -12,6 +12,8 @@
#include "webkit/glue/password_form_dom_manager.h"
using base::Time;
+using webkit_glue::PasswordForm;
+using webkit_glue::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 90ffc86..78229de 100644
--- a/chrome/browser/password_manager/password_form_manager.h
+++ b/chrome/browser/password_manager/password_form_manager.h
@@ -26,12 +26,12 @@ class PasswordFormManager : public PasswordStoreConsumer {
// used to filter login results from database.
PasswordFormManager(Profile* profile,
PasswordManager* password_manager,
- const PasswordForm& observed_form,
+ const webkit_glue::PasswordForm& observed_form,
bool ssl_valid);
virtual ~PasswordFormManager();
// Compare basic data of observed_form_ with argument.
- bool DoesManage(const PasswordForm& form) const;
+ bool DoesManage(const webkit_glue::PasswordForm& form) const;
// Retrieves potential matching logins from the database.
void FetchMatchingLoginsFromWebDatabase();
@@ -59,11 +59,12 @@ class PasswordFormManager : public PasswordStoreConsumer {
bool IsNewLogin();
// Determines if we need to autofill given the results of the query.
- void OnRequestDone(int handle, const std::vector<PasswordForm*>& result);
+ void OnRequestDone(
+ int handle, const std::vector<webkit_glue::PasswordForm*>& result);
// PasswordStoreConsumer implementation.
virtual void OnPasswordStoreRequestDone(
- int handle, const std::vector<PasswordForm*>& result);
+ int handle, const std::vector<webkit_glue::PasswordForm*>& result);
// A user opted to 'never remember' passwords for this form.
// Blacklist it so that from now on when it is seen we ignore it.
@@ -72,7 +73,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 PasswordForm& credentials);
+ void ProvisionallySave(const webkit_glue::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
@@ -87,7 +88,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Helper for OnWebDataServiceRequestDone to determine whether or not
// the given result form is worth scoring.
- bool IgnoreResult(const PasswordForm& form) const;
+ bool IgnoreResult(const webkit_glue::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
@@ -96,7 +97,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Helper for OnWebDataServiceRequestDone to score an individual result
// against the observed_form_.
- int ScoreResult(const PasswordForm& form) const;
+ int ScoreResult(const webkit_glue::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
@@ -108,13 +109,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.
- PasswordFormMap best_matches_;
+ webkit_glue::PasswordFormMap best_matches_;
// Cleans up when best_matches_ goes out of scope.
- STLValueDeleter<PasswordFormMap> best_matches_deleter_;
+ STLValueDeleter<webkit_glue::PasswordFormMap> best_matches_deleter_;
// The PasswordForm from the page or dialog managed by this.
- PasswordForm observed_form_;
+ webkit_glue::PasswordForm observed_form_;
// The origin url path of observed_form_ tokenized, for convenience when
// scoring.
@@ -122,7 +123,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Stores updated credentials when the form was submitted but success is
// still unknown.
- PasswordForm pending_credentials_;
+ webkit_glue::PasswordForm pending_credentials_;
// Whether pending_credentials_ stores a new login or is an update
// to an existing one.
@@ -138,7 +139,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 PasswordForm* preferred_match_;
+ const webkit_glue::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 092cfd9..30c4faa 100644
--- a/chrome/browser/password_manager/password_form_manager_unittest.cc
+++ b/chrome/browser/password_manager/password_form_manager_unittest.cc
@@ -10,6 +10,8 @@
#include "chrome/test/testing_profile.h"
#include "webkit/glue/password_form.h"
+using webkit_glue::PasswordForm;
+
class PasswordFormManagerTest : public testing::Test {
public:
PasswordFormManagerTest() {
diff --git a/chrome/browser/password_manager/password_manager.cc b/chrome/browser/password_manager/password_manager.cc
index 5566e99..58c4afd 100644
--- a/chrome/browser/password_manager/password_manager.cc
+++ b/chrome/browser/password_manager/password_manager.cc
@@ -19,6 +19,9 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+using webkit_glue::PasswordForm;
+using webkit_glue::PasswordFormMap;
+
// After a successful *new* login attempt, we take the PasswordFormManager in
// provisional_save_manager_ and move it to a SavePasswordInfoBarDelegate while
// the user makes up their mind with the "save password" infobar. Note if the
diff --git a/chrome/browser/password_manager/password_manager.h b/chrome/browser/password_manager/password_manager.h
index 175e4cd..5487da3 100644
--- a/chrome/browser/password_manager/password_manager.h
+++ b/chrome/browser/password_manager/password_manager.h
@@ -30,9 +30,9 @@ class PasswordManager : public views::LoginModel {
// Called by a PasswordFormManager when it decides a form can be autofilled
// on the page.
- void Autofill(const PasswordForm& form_for_autofill,
- const PasswordFormMap& best_matches,
- const PasswordForm* const preferred_match) const;
+ void Autofill(const webkit_glue::PasswordForm& form_for_autofill,
+ const webkit_glue::PasswordFormMap& best_matches,
+ const webkit_glue::PasswordForm* const preferred_match) const;
// Notification that the user navigated away from the current page.
// Unless this is a password form submission, for our purposes this
@@ -44,12 +44,12 @@ class PasswordManager : public views::LoginModel {
void DidStopLoading();
// Notifies the password manager that password forms were parsed on the page.
- void PasswordFormsSeen(const std::vector<PasswordForm>& forms);
+ void PasswordFormsSeen(const std::vector<webkit_glue::PasswordForm>& forms);
// 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(PasswordForm form);
+ void ProvisionallySavePassword(webkit_glue::PasswordForm form);
// Clear any pending saves
void ClearProvisionalSave();
diff --git a/chrome/browser/password_manager/password_store.cc b/chrome/browser/password_manager/password_store.cc
index d84b788..ba258bf 100644
--- a/chrome/browser/password_manager/password_store.cc
+++ b/chrome/browser/password_manager/password_store.cc
@@ -8,6 +8,7 @@
#include "base/task.h"
using std::vector;
+using webkit_glue::PasswordForm;
PasswordStore::PasswordStore() : handle_(0) {
}
diff --git a/chrome/browser/password_manager/password_store.h b/chrome/browser/password_manager/password_store.h
index 1850e48..d63f099 100644
--- a/chrome/browser/password_manager/password_store.h
+++ b/chrome/browser/password_manager/password_store.h
@@ -22,7 +22,7 @@ class PasswordStoreConsumer {
// Call this when the request is finished. If there are no results, call it
// anyway with an empty vector.
virtual void OnPasswordStoreRequestDone(
- int handle, const std::vector<PasswordForm*>& result) = 0;
+ int handle, const std::vector<webkit_glue::PasswordForm*>& result) = 0;
};
// Interface for storing form passwords in a platform-specific secure way.
@@ -39,15 +39,15 @@ class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> {
// password_store_default; once that is fixed, they can become non-virtual.
// Adds the given PasswordForm to the secure password store asynchronously.
- virtual void AddLogin(const PasswordForm& form);
+ virtual void AddLogin(const webkit_glue::PasswordForm& form);
// Updates the matching PasswordForm in the secure password store (async).
- virtual void UpdateLogin(const PasswordForm& form);
+ virtual void UpdateLogin(const webkit_glue::PasswordForm& form);
// Removes the matching PasswordForm from the secure password store (async).
- virtual void RemoveLogin(const PasswordForm& form);
+ virtual void RemoveLogin(const webkit_glue::PasswordForm& form);
// 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 int GetLogins(const PasswordForm& form,
+ virtual int GetLogins(const webkit_glue::PasswordForm& form,
PasswordStoreConsumer* consumer);
// Cancels a previous GetLogins query (async)
@@ -57,12 +57,12 @@ class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> {
// Simple container class that represents a GetLogins request.
// Created in GetLogins and passed to GetLoginsImpl.
struct GetLoginsRequest {
- GetLoginsRequest(const PasswordForm& f,
+ GetLoginsRequest(const webkit_glue::PasswordForm& f,
PasswordStoreConsumer* c,
int handle);
// The query form that was originally passed to GetLogins
- PasswordForm form;
+ webkit_glue::PasswordForm form;
// The consumer to notify when this GetLogins request is complete
PasswordStoreConsumer* consumer;
// A unique handle for the request
@@ -79,11 +79,11 @@ class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> {
// These will be run in PasswordStore's own thread.
// Synchronous implementation to add the given login.
- virtual void AddLoginImpl(const PasswordForm& form) = 0;
+ virtual void AddLoginImpl(const webkit_glue::PasswordForm& form) = 0;
// Synchronous implementation to update the given login.
- virtual void UpdateLoginImpl(const PasswordForm& form) = 0;
+ virtual void UpdateLoginImpl(const webkit_glue::PasswordForm& form) = 0;
// Synchronous implementation to remove the given login.
- virtual void RemoveLoginImpl(const PasswordForm& form) = 0;
+ virtual void RemoveLoginImpl(const webkit_glue::PasswordForm& form) = 0;
// 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.
@@ -91,7 +91,7 @@ class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> {
// Notifies the consumer that GetLoginsImpl() is complete.
void NotifyConsumer(GetLoginsRequest* request,
- const std::vector<PasswordForm*> forms);
+ const std::vector<webkit_glue::PasswordForm*> forms);
// Next handle to return from GetLogins() to allow callers to track
// their request.
@@ -106,7 +106,7 @@ class PasswordStore : public base::RefCountedThreadSafe<PasswordStore> {
// that PasswordStoreConsumer doesn't have to be reference counted (we assume
// consumers will cancel their requests before they are destroyed).
void NotifyConsumerImpl(PasswordStoreConsumer* consumer, int handle,
- const std::vector<PasswordForm*> forms);
+ const std::vector<webkit_glue::PasswordForm*> forms);
// List of pending request handles. Handles are removed from the set when
// they finish or are canceled.
diff --git a/chrome/browser/password_manager/password_store_default.cc b/chrome/browser/password_manager/password_store_default.cc
index 33895b5..050fe46 100644
--- a/chrome/browser/password_manager/password_store_default.cc
+++ b/chrome/browser/password_manager/password_store_default.cc
@@ -9,6 +9,8 @@
#include "base/logging.h"
#include "base/task.h"
+using webkit_glue::PasswordForm;
+
PasswordStoreDefault::PasswordStoreDefault(WebDataService* web_data_service)
: web_data_service_(web_data_service) {
}
diff --git a/chrome/browser/password_manager/password_store_default.h b/chrome/browser/password_manager/password_store_default.h
index 5529502..2434900 100644
--- a/chrome/browser/password_manager/password_store_default.h
+++ b/chrome/browser/password_manager/password_store_default.h
@@ -29,18 +29,18 @@ class PasswordStoreDefault : public PasswordStore,
// Overridden to bypass the threading logic in PasswordStore, since
// WebDataService's API is not threadsafe.
- virtual void AddLogin(const PasswordForm& form);
- virtual void UpdateLogin(const PasswordForm& form);
- virtual void RemoveLogin(const PasswordForm& form);
- virtual int GetLogins(const PasswordForm& form,
+ virtual void AddLogin(const webkit_glue::PasswordForm& form);
+ virtual void UpdateLogin(const webkit_glue::PasswordForm& form);
+ virtual void RemoveLogin(const webkit_glue::PasswordForm& form);
+ virtual int GetLogins(const webkit_glue::PasswordForm& form,
PasswordStoreConsumer* consumer);
virtual void CancelLoginsQuery(int handle);
protected:
// Implements PasswordStore interface.
- void AddLoginImpl(const PasswordForm& form);
- void UpdateLoginImpl(const PasswordForm& form);
- void RemoveLoginImpl(const PasswordForm& form);
+ void AddLoginImpl(const webkit_glue::PasswordForm& form);
+ void UpdateLoginImpl(const webkit_glue::PasswordForm& form);
+ void RemoveLoginImpl(const webkit_glue::PasswordForm& form);
void GetLoginsImpl(GetLoginsRequest* request);
// Called when a WebDataService method finishes.
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index 760e5dc5..07032de 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -14,6 +14,8 @@
#include "base/time.h"
#include "chrome/browser/keychain_mac.h"
+using webkit_glue::PasswordForm;
+
namespace internal_keychain_helpers {
// Utility class to handle the details of constructing and running a keychain
diff --git a/chrome/browser/password_manager/password_store_mac.h b/chrome/browser/password_manager/password_store_mac.h
index 61bce2d..425081f 100644
--- a/chrome/browser/password_manager/password_store_mac.h
+++ b/chrome/browser/password_manager/password_store_mac.h
@@ -17,9 +17,9 @@ class PasswordStoreMac : public PasswordStore {
virtual ~PasswordStoreMac() {}
private:
- void AddLoginImpl(const PasswordForm& form);
- void UpdateLoginImpl(const PasswordForm& form);
- void RemoveLoginImpl(const PasswordForm& form);
+ void AddLoginImpl(const webkit_glue::PasswordForm& form);
+ void UpdateLoginImpl(const webkit_glue::PasswordForm& form);
+ void RemoveLoginImpl(const webkit_glue::PasswordForm& form);
void GetLoginsImpl(GetLoginsRequest* request);
scoped_ptr<MacKeychain> keychain_;
diff --git a/chrome/browser/password_manager/password_store_mac_internal.h b/chrome/browser/password_manager/password_store_mac_internal.h
index 53113d4..09da925 100644
--- a/chrome/browser/password_manager/password_store_mac_internal.h
+++ b/chrome/browser/password_manager/password_store_mac_internal.h
@@ -38,24 +38,26 @@ bool TimeFromKeychainTimeString(const char* time_string_bytes,
base::Time* time);
// Returns the Keychain SecAuthenticationType type corresponding to |scheme|.
-SecAuthenticationType AuthTypeForScheme(PasswordForm::Scheme scheme);
+SecAuthenticationType AuthTypeForScheme(
+ webkit_glue::PasswordForm::Scheme scheme);
// Returns the PasswordForm Scheme corresponding to |auth_type|.
-PasswordForm::Scheme SchemeForAuthType(SecAuthenticationType auth_type);
+webkit_glue::PasswordForm::Scheme SchemeForAuthType(
+ SecAuthenticationType auth_type);
// Searches |keychain| for all items usable for the given signon_realm, and
// puts them in |items|. The caller is responsible for calling keychain->Free
// on each of them when it is finished with them.
void FindMatchingKeychainItems(const MacKeychain& keychain,
const std::string& signon_realm,
- PasswordForm::Scheme scheme,
+ webkit_glue::PasswordForm::Scheme scheme,
std::vector<SecKeychainItemRef>* items);
// Searches |keychain| for the specific keychain entry matching the given form.
// If no match is found, |match| will be NULL on return.
// The caller is responsible for calling keychain->Free on |match|.
void FindMatchingKeychainItem(const MacKeychain& keychain,
- const PasswordForm& form,
+ const webkit_glue::PasswordForm& form,
SecKeychainItemRef* match);
// Sets the fields of |form| based on the keychain data from |keychain_item|.
@@ -71,7 +73,7 @@ void FindMatchingKeychainItem(const MacKeychain& keychain,
// require authorization).
bool FillPasswordFormFromKeychainItem(const MacKeychain& keychain,
const SecKeychainItemRef& keychain_item,
- PasswordForm* form);
+ webkit_glue::PasswordForm* form);
} // 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 1c352fe..f7ce02d 100644
--- a/chrome/browser/password_manager/password_store_mac_unittest.cc
+++ b/chrome/browser/password_manager/password_store_mac_unittest.cc
@@ -8,6 +8,8 @@
#include "chrome/browser/password_manager/password_store_mac.h"
#include "chrome/browser/password_manager/password_store_mac_internal.h"
+using webkit_glue::PasswordForm;
+
#pragma mark Mock Keychain
// TODO(stuartmorgan): Replace this with gMock. You know, once we have it.
diff --git a/chrome/browser/password_manager/password_store_win.cc b/chrome/browser/password_manager/password_store_win.cc
index fa5e4ab..c8bd867 100644
--- a/chrome/browser/password_manager/password_store_win.cc
+++ b/chrome/browser/password_manager/password_store_win.cc
@@ -12,6 +12,7 @@
using std::map;
using std::vector;
+using webkit_glue::PasswordForm;
PasswordStoreWin::PasswordStoreWin(WebDataService* web_data_service)
: PasswordStoreDefault(web_data_service) {
diff --git a/chrome/browser/password_manager/password_store_win.h b/chrome/browser/password_manager/password_store_win.h
index a56b416..ad59d8a 100644
--- a/chrome/browser/password_manager/password_store_win.h
+++ b/chrome/browser/password_manager/password_store_win.h
@@ -30,8 +30,9 @@ class PasswordStoreWin : public PasswordStoreDefault {
// Gets logins from IE7 if no others are found. Also copies them into
// Chrome's WebDatabase so we don't need to look next time.
- PasswordForm* GetIE7Result(const WDTypedResult* result,
- const PasswordForm& form);
+ webkit_glue::PasswordForm* GetIE7Result(
+ const WDTypedResult* result,
+ const webkit_glue::PasswordForm& form);
DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin);
};
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index 9aa1d0a..d6d1767 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -1218,7 +1218,7 @@ void RenderViewHost::OnMsgShowModalHTMLDialog(
}
void RenderViewHost::OnMsgPasswordFormsSeen(
- const std::vector<PasswordForm>& forms) {
+ const std::vector<webkit_glue::PasswordForm>& forms) {
delegate_->PasswordFormsSeen(forms);
}
diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h
index 92b05b8..67d8347 100644
--- a/chrome/browser/renderer_host/render_view_host.h
+++ b/chrome/browser/renderer_host/render_view_host.h
@@ -517,7 +517,8 @@ class RenderViewHost : public RenderWidgetHost {
void OnMsgShowModalHTMLDialog(const GURL& url, int width, int height,
const std::string& json_arguments,
IPC::Message* reply_msg);
- void OnMsgPasswordFormsSeen(const std::vector<PasswordForm>& forms);
+ void OnMsgPasswordFormsSeen(
+ const std::vector<webkit_glue::PasswordForm>& forms);
void OnMsgAutofillFormSubmitted(const webkit_glue::AutofillForm& forms);
void OnMsgStartDragging(const WebDropData& drop_data);
void OnUpdateDragCursor(bool is_drop_target);
diff --git a/chrome/browser/renderer_host/render_view_host_delegate.h b/chrome/browser/renderer_host/render_view_host_delegate.h
index fb41a9c..dbf29eb 100644
--- a/chrome/browser/renderer_host/render_view_host_delegate.h
+++ b/chrome/browser/renderer_host/render_view_host_delegate.h
@@ -322,7 +322,8 @@ class RenderViewHostDelegate {
IPC::Message* reply_msg) { }
// Password forms have been detected in the page.
- virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms) { }
+ virtual void PasswordFormsSeen(
+ const std::vector<webkit_glue::PasswordForm>& forms) { }
// Forms fillable by autofill have been detected in the page.
virtual void AutofillFormSubmitted(const webkit_glue::AutofillForm& form) { }
diff --git a/chrome/browser/renderer_host/test_render_view_host.cc b/chrome/browser/renderer_host/test_render_view_host.cc
index 44001fd..65dd323 100644
--- a/chrome/browser/renderer_host/test_render_view_host.cc
+++ b/chrome/browser/renderer_host/test_render_view_host.cc
@@ -8,6 +8,8 @@
#include "chrome/browser/tab_contents/test_web_contents.h"
#include "chrome/common/render_messages.h"
+using webkit_glue::PasswordForm;
+
TestRenderViewHost::TestRenderViewHost(SiteInstance* instance,
RenderViewHostDelegate* delegate,
int routing_id,
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
index 7f6390c..7e70e08 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -8,6 +8,8 @@
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/common/render_messages.h"
+using webkit_glue::PasswordForm;
+
static const char* kGoogleURL = "http://www.google.com/";
static const char* kGoodURL = "http://www.goodguys.com/";
static const char* kBadURL = "http://www.badguys.com/";
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 8965085..0380c2b 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1925,7 +1925,7 @@ void TabContents::ShowModalHTMLDialog(const GURL& url, int width, int height,
}
void TabContents::PasswordFormsSeen(
- const std::vector<PasswordForm>& forms) {
+ const std::vector<webkit_glue::PasswordForm>& forms) {
GetPasswordManager()->PasswordFormsSeen(forms);
}
diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h
index f32bfb7..c344a8a 100644
--- a/chrome/browser/tab_contents/tab_contents.h
+++ b/chrome/browser/tab_contents/tab_contents.h
@@ -803,7 +803,8 @@ class TabContents : public PageNavigator,
virtual void ShowModalHTMLDialog(const GURL& url, int width, int height,
const std::string& json_arguments,
IPC::Message* reply_msg);
- virtual void PasswordFormsSeen(const std::vector<PasswordForm>& forms);
+ virtual void PasswordFormsSeen(
+ const std::vector<webkit_glue::PasswordForm>& forms);
virtual void AutofillFormSubmitted(const webkit_glue::AutofillForm& form);
virtual void GetAutofillSuggestions(const std::wstring& field_name,
const std::wstring& user_text, int64 node_id, int request_id);
diff --git a/chrome/browser/tab_contents/web_contents_unittest.cc b/chrome/browser/tab_contents/web_contents_unittest.cc
index 5a228ac..c391fd1 100644
--- a/chrome/browser/tab_contents/web_contents_unittest.cc
+++ b/chrome/browser/tab_contents/web_contents_unittest.cc
@@ -17,6 +17,8 @@
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
+using webkit_glue::PasswordForm;
+
static void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params,
int page_id,
const GURL& url) {
diff --git a/chrome/browser/views/options/exceptions_page_view.cc b/chrome/browser/views/options/exceptions_page_view.cc
index 1718484..f9d77c9 100644
--- a/chrome/browser/views/options/exceptions_page_view.cc
+++ b/chrome/browser/views/options/exceptions_page_view.cc
@@ -17,6 +17,7 @@
using views::ColumnSet;
using views::GridLayout;
+using webkit_glue::PasswordForm;
///////////////////////////////////////////////////////////////////////////////
// ExceptionsTableModel
diff --git a/chrome/browser/views/options/passwords_page_view.cc b/chrome/browser/views/options/passwords_page_view.cc
index 64da35b..bc73703 100644
--- a/chrome/browser/views/options/passwords_page_view.cc
+++ b/chrome/browser/views/options/passwords_page_view.cc
@@ -17,6 +17,7 @@
using views::ColumnSet;
using views::GridLayout;
+using webkit_glue::PasswordForm;
///////////////////////////////////////////////////////////////////////////////
// MultiLabelButtons
diff --git a/chrome/browser/views/options/passwords_page_view.h b/chrome/browser/views/options/passwords_page_view.h
index 35cb31e..907ffb4 100644
--- a/chrome/browser/views/options/passwords_page_view.h
+++ b/chrome/browser/views/options/passwords_page_view.h
@@ -87,7 +87,7 @@ class PasswordsTableModel : public views::TableModel,
void GetAllSavedLoginsForProfile();
// Return the PasswordForm at the specified index.
- PasswordForm* GetPasswordFormAt(int row);
+ webkit_glue::PasswordForm* GetPasswordFormAt(int row);
// Set the observer who concerns about how many rows are in the table.
void set_row_count_observer(PasswordsTableModelObserver* observer) {
@@ -98,7 +98,8 @@ class PasswordsTableModel : public views::TableModel,
// Wraps the PasswordForm from the database and caches the display URL for
// quick sorting.
struct PasswordRow {
- PasswordRow(const gfx::SortedDisplayURL& url, PasswordForm* password_form)
+ PasswordRow(const gfx::SortedDisplayURL& url,
+ webkit_glue::PasswordForm* password_form)
: display_url(url), form(password_form) {
}
@@ -106,7 +107,7 @@ class PasswordsTableModel : public views::TableModel,
gfx::SortedDisplayURL display_url;
// The underlying PasswordForm. We own this.
- scoped_ptr<PasswordForm> form;
+ scoped_ptr<webkit_glue::PasswordForm> form;
};
// The web data service associated with the currently active profile.
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: