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

Unified Diff: chrome/browser/ui/webui/options/password_manager_handler.h

Issue 6646051: Fix DCHECK, memory leak, and refactor PasswordStore to use CancelableRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try works all platforms now. Created 9 years, 9 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/ui/webui/options/password_manager_handler.h
diff --git a/chrome/browser/ui/webui/options/password_manager_handler.h b/chrome/browser/ui/webui/options/password_manager_handler.h
index 1a319e79bc33fc65d9d9e7f64df71ddd61e10b76..a37cc67687ba3798c34206608fcfce165b225b75 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.h
+++ b/chrome/browser/ui/webui/options/password_manager_handler.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/scoped_vector.h"
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
@@ -57,14 +58,15 @@ class PasswordManagerHandler : public OptionsPageUIHandler {
class ListPopulater : public PasswordStoreConsumer {
public:
explicit ListPopulater(PasswordManagerHandler* page);
- virtual ~ListPopulater();
+ virtual ~ListPopulater() {}
James Hawkins 2011/03/16 22:39:35 Please keep implementations in the source file.
Sheridan Rawlins 2011/03/20 08:13:11 Done.
// Send a query to the password store to populate a list.
virtual void Populate() = 0;
// Send the password store's reply back to the handler.
virtual void OnPasswordStoreRequestDone(
- int handle, const std::vector<webkit_glue::PasswordForm*>& result) = 0;
+ PasswordStore::Handle handle,
+ const std::vector<webkit_glue::PasswordForm*>& result) = 0;
protected:
PasswordManagerHandler* page_;
@@ -81,7 +83,8 @@ class PasswordManagerHandler : public OptionsPageUIHandler {
// Send the password store's reply back to the handler.
virtual void OnPasswordStoreRequestDone(
- int handle, const std::vector<webkit_glue::PasswordForm*>& result);
+ PasswordStore::Handle handle,
+ const std::vector<webkit_glue::PasswordForm*>& result);
};
// A short class to mediate requests to the password store for exceptions.
@@ -94,15 +97,16 @@ class PasswordManagerHandler : public OptionsPageUIHandler {
// Send the password store's reply back to the handler.
virtual void OnPasswordStoreRequestDone(
- int handle, const std::vector<webkit_glue::PasswordForm*>& result);
+ PasswordStore::Handle handle,
+ const std::vector<webkit_glue::PasswordForm*>& result);
};
// Password store consumer for populating the password list and exceptions.
PasswordListPopulater populater_;
PasswordExceptionListPopulater exception_populater_;
- std::vector<webkit_glue::PasswordForm*> password_list_;
- std::vector<webkit_glue::PasswordForm*> password_exception_list_;
+ ScopedVector<webkit_glue::PasswordForm> password_list_;
+ ScopedVector<webkit_glue::PasswordForm> password_exception_list_;
// User's pref
std::string languages_;

Powered by Google App Engine
This is Rietveld 408576698