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

Unified Diff: chrome/browser/password_manager/password_form_manager.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/password_manager/password_form_manager.h
diff --git a/chrome/browser/password_manager/password_form_manager.h b/chrome/browser/password_manager/password_form_manager.h
index 698c3e2b0e297107b7362339d1d6448132a81803..f1c48bc922f6970fe98302e3f82ad9ba8a758cd4 100644
--- a/chrome/browser/password_manager/password_form_manager.h
+++ b/chrome/browser/password_manager/password_form_manager.h
@@ -12,10 +12,11 @@
#include "build/build_config.h"
#include "base/stl_util-inl.h"
-#include "chrome/browser/password_manager/password_store.h"
+#include "chrome/browser/password_manager/password_store_consumer.h"
#include "webkit/glue/password_form.h"
class PasswordManager;
+class PasswordStore;
class Profile;
// Per-password-form-{on-page, dialog} class responsible for interactions
@@ -72,7 +73,8 @@ class PasswordFormManager : public PasswordStoreConsumer {
// PasswordStoreConsumer implementation.
virtual void OnPasswordStoreRequestDone(
- int handle, const std::vector<webkit_glue::PasswordForm*>& result);
+ CancelableRequestProvider::Handle 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.
@@ -136,10 +138,6 @@ class PasswordFormManager : public PasswordStoreConsumer {
static const int kMaxNumActionsTaken = kManagerActionMax * kUserActionMax *
kSubmitResultMax;
- // Called by destructor to ensure if this object is deleted, no potential
- // outstanding callbacks can call OnPasswordStoreRequestDone.
- void CancelLoginsQuery();
-
// Helper for OnPasswordStoreRequestDone to determine whether or not
// the given result form is worth scoring.
bool IgnoreResult(const webkit_glue::PasswordForm& form) const;
@@ -197,7 +195,7 @@ class PasswordFormManager : public PasswordStoreConsumer {
const PasswordManager* const password_manager_;
// Handle to any pending PasswordStore::GetLogins query.
- int pending_login_query_;
+ CancelableRequestProvider::Handle pending_login_query_;
// Convenience pointer to entry in best_matches_ that is marked
// as preferred. This is only allowed to be null if there are no best matches
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/password_manager/password_form_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698