summaryrefslogtreecommitdiffstats
path: root/chrome/test/live_sync
diff options
context:
space:
mode:
authorscr@chromium.org <scr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 22:27:34 +0000
committerscr@chromium.org <scr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 22:27:34 +0000
commite5721c184caf103838f6a8ae49c12d018fa60c9e (patch)
tree165ee35e1e934b68af069072b7c0ad857d042ab3 /chrome/test/live_sync
parentbacef3cbbc55efebb2573194d329eabac5f5c7e3 (diff)
downloadchromium_src-e5721c184caf103838f6a8ae49c12d018fa60c9e.zip
chromium_src-e5721c184caf103838f6a8ae49c12d018fa60c9e.tar.gz
chromium_src-e5721c184caf103838f6a8ae49c12d018fa60c9e.tar.bz2
When looking at this bug, I found at least the following issues:
1) PasswordManagerHandler was not canceling requests if new requests were made (by double-clicking the "Manage Saved Passwords..." button with a slow database - simulated with long Sleep). 2) PasswordStore starts its handle numbering at 0 meaning that the very first request is non-true and could hit DCHECK(s). 3) PasswordManagerHandler doesn't free the results. When talking with the DOMUI TL (jhawkins) and an author of PasswordStore (stuartmorgan), I learned that it was modeled after HistoryService, which had since been refactored into a reusable suite of classes in content/browser/cancelable_request.h So the CL will include fixes for the 3 issues, as well as a refactor to use the shared code in cancelable_requst.h BUG=71466 TEST=chrome://settings/personal, then click "Manage Saved Passwords". Put PlatformThread::Sleep(10000), then try double-clicking the button to see no error. Review URL: http://codereview.chromium.org/6646051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79625 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/live_sync')
-rw-r--r--chrome/test/live_sync/live_passwords_sync_test.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/test/live_sync/live_passwords_sync_test.h b/chrome/test/live_sync/live_passwords_sync_test.h
index 81fe215..6663f9f 100644
--- a/chrome/test/live_sync/live_passwords_sync_test.h
+++ b/chrome/test/live_sync/live_passwords_sync_test.h
@@ -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.
@@ -9,6 +9,7 @@
#include <set>
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/password_manager/password_store_consumer.h"
#include "chrome/browser/password_manager/password_store.h"
#include "chrome/test/live_sync/live_sync_test.h"
#include "chrome/test/ui_test_utils.h"
@@ -64,7 +65,8 @@ class LivePasswordsSyncTest : public LiveSyncTest {
: PasswordStoreConsumer(), result_(result) {}
virtual void OnPasswordStoreRequestDone(
- int handle, const std::vector<webkit_glue::PasswordForm*>& result) {
+ CancelableRequestProvider::Handle handle,
+ const std::vector<webkit_glue::PasswordForm*>& result) {
result_.clear();
for (std::vector<webkit_glue::PasswordForm*>::const_iterator it =
result.begin(); it != result.end(); ++it) {