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

Unified Diff: chrome/browser/dom_ui/options/password_manager_handler.cc

Issue 6299014: DOMUI: Cancel pending queries to the PasswordStore on destruction to avoid (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Bump copyright. Created 9 years, 11 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
« no previous file with comments | « chrome/browser/dom_ui/options/password_manager_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/options/password_manager_handler.cc
diff --git a/chrome/browser/dom_ui/options/password_manager_handler.cc b/chrome/browser/dom_ui/options/password_manager_handler.cc
index b6769e6bf3f2998c35ae7029eb4715e89b12c354..0c9eaa5cb2b6613adeaa2c57f096963023735743 100644
--- a/chrome/browser/dom_ui/options/password_manager_handler.cc
+++ b/chrome/browser/dom_ui/options/password_manager_handler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -153,6 +153,19 @@ void PasswordManagerHandler::SetPasswordExceptionList() {
L"PasswordManager.setPasswordExceptionsList", entries);
}
+PasswordManagerHandler::ListPopulater::ListPopulater(
+ PasswordManagerHandler* page) : page_(page),
+ pending_login_query_(0) {
+}
+
+PasswordManagerHandler::ListPopulater::~ListPopulater() {
+ page_->GetPasswordStore()->CancelLoginsQuery(pending_login_query_);
+}
+
+PasswordManagerHandler::PasswordListPopulater::PasswordListPopulater(
+ PasswordManagerHandler* page) : ListPopulater(page) {
+}
+
void PasswordManagerHandler::PasswordListPopulater::Populate() {
DCHECK(!pending_login_query_);
PasswordStore* store = page_->GetPasswordStore();
@@ -171,6 +184,11 @@ void PasswordManagerHandler::PasswordListPopulater::
page_->SetPasswordList();
}
+PasswordManagerHandler::PasswordExceptionListPopulater::
+ PasswordExceptionListPopulater(PasswordManagerHandler* page)
+ : ListPopulater(page) {
+}
+
void PasswordManagerHandler::PasswordExceptionListPopulater::Populate() {
DCHECK(!pending_login_query_);
PasswordStore* store = page_->GetPasswordStore();
« no previous file with comments | « chrome/browser/dom_ui/options/password_manager_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698