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

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: use non-zero tests until http://crbug.com/77650 is addressed. 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 83b729dcfd9904e2a87e4486c1f31ede127d5cfb..b316a757544655633ee584d8683da92ee3a19b5d 100644
--- a/chrome/browser/ui/webui/options/password_manager_handler.h
+++ b/chrome/browser/ui/webui/options/password_manager_handler.h
@@ -8,7 +8,9 @@
#include <string>
#include <vector>
+#include "base/memory/scoped_vector.h"
#include "chrome/browser/password_manager/password_store.h"
+#include "chrome/browser/password_manager/password_store_consumer.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
class PasswordManagerHandler : public OptionsPageUIHandler,
@@ -66,11 +68,12 @@ 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) = 0;
+ CancelableRequestProvider::Handle handle,
+ const std::vector<webkit_glue::PasswordForm*>& result) = 0;
protected:
PasswordManagerHandler* page_;
- int pending_login_query_;
+ CancelableRequestProvider::Handle pending_login_query_;
};
// A short class to mediate requests to the password store for passwordlist.
@@ -83,7 +86,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);
+ CancelableRequestProvider::Handle handle,
+ const std::vector<webkit_glue::PasswordForm*>& result);
};
// A short class to mediate requests to the password store for exceptions.
@@ -96,15 +100,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);
+ CancelableRequestProvider::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