From 270b85eecbc83119c4b53f84c6c6e71c0a93afb0 Mon Sep 17 00:00:00 2001 From: "stuartmorgan@chromium.org" Date: Fri, 10 Jul 2009 23:40:28 +0000 Subject: Add the rest of the password manager API to PasswordStore, and move clients off of WebDataService. The methods are unimplemented on the Mac for the moment, and do passthroughs to WDS on Windows as with the rest of the Windows PasswordStore interface. BUG=none TEST=Saving, viewing, and deleting password should still work on Windows. Review URL: http://codereview.chromium.org/155259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20441 0039d316-1c4b-4281-b951-d872f2087c98 --- .../browser/views/options/exceptions_page_view.cc | 24 +++++++--------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'chrome/browser/views/options/exceptions_page_view.cc') diff --git a/chrome/browser/views/options/exceptions_page_view.cc b/chrome/browser/views/options/exceptions_page_view.cc index 52de9eb..9486af4 100644 --- a/chrome/browser/views/options/exceptions_page_view.cc +++ b/chrome/browser/views/options/exceptions_page_view.cc @@ -41,31 +41,21 @@ int ExceptionsTableModel::CompareValues(int row1, int row2, void ExceptionsTableModel::GetAllExceptionsForProfile() { DCHECK(!pending_login_query_); - pending_login_query_ = web_data_service()->GetAllLogins(this); + pending_login_query_ = password_store()->GetAllLogins(this); } -void ExceptionsTableModel::OnWebDataServiceRequestDone( - WebDataService::Handle h, - const WDTypedResult* result) { - DCHECK_EQ(pending_login_query_, h); +void ExceptionsTableModel::OnPasswordStoreRequestDone( + int handle, const std::vector& result) { + DCHECK_EQ(pending_login_query_, handle); pending_login_query_ = NULL; - if (!result) - return; - - DCHECK(result->GetType() == PASSWORD_RESULT); - - // Get the result from the database into a useable form. - const WDResult >* r = - static_cast >*>(result); - std::vector rows = r->GetValue(); STLDeleteElements(&saved_signons_); std::wstring languages = profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); - for (size_t i = 0; i < rows.size(); ++i) { - if (rows[i]->blacklisted_by_user) { + for (size_t i = 0; i < result.size(); ++i) { + if (result[i]->blacklisted_by_user) { saved_signons_.push_back(new PasswordRow( - gfx::SortedDisplayURL(rows[i]->origin, languages), rows[i])); + gfx::SortedDisplayURL(result[i]->origin, languages), result[i])); } } if (observer_) -- cgit v1.1