summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authorkaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-14 04:01:56 +0000
committerkaiwang@chromium.org <kaiwang@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-14 04:01:56 +0000
commitcef1a75de87b9ccc381f3d5f8e6d56cc2d58bcbc (patch)
treec82191bc5fd01f06af77791d788447776a550bda /chrome/browser/sync
parent5ea6fdb73760fc1c7a7929dcb4d5f5dd89230610 (diff)
downloadchromium_src-cef1a75de87b9ccc381f3d5f8e6d56cc2d58bcbc.zip
chromium_src-cef1a75de87b9ccc381f3d5f8e6d56cc2d58bcbc.tar.gz
chromium_src-cef1a75de87b9ccc381f3d5f8e6d56cc2d58bcbc.tar.bz2
Convert PasswordStore::GetLogins to not depend on CancelableRequest
Please note, in order to reduce the CL size, I only converted GetLogins. There will be another CL to convert GetAutofillableLogins and GetBlackListLogins. As a result, there's a bunch of old code I can not get rid of now. e.g. PasswordStore::GetLoginRequest PasswordStore::Schedule PasswordStoreConsumer::OnPasswordStoreRequestDone etc Will clean them up in next CL BUG=155883,162337 Review URL: https://chromiumcodereview.appspot.com/11415106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173076 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/test/integration/passwords_helper.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/chrome/browser/sync/test/integration/passwords_helper.cc b/chrome/browser/sync/test/integration/passwords_helper.cc
index e54d89d..fd8836b 100644
--- a/chrome/browser/sync/test/integration/passwords_helper.cc
+++ b/chrome/browser/sync/test/integration/passwords_helper.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/sync/test/integration/passwords_helper.h"
+#include "base/compiler_specific.h"
#include "base/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/time.h"
@@ -43,13 +44,19 @@ class PasswordStoreConsumerHelper : public PasswordStoreConsumer {
virtual void OnPasswordStoreRequestDone(
CancelableRequestProvider::Handle handle,
- const std::vector<PasswordForm*>& result) {
+ const std::vector<PasswordForm*>& result) OVERRIDE {
+ // TODO(kaiwang): Remove this function.
+ NOTREACHED();
+ }
+
+ virtual void OnGetPasswordStoreResults(
+ const std::vector<PasswordForm*>& result) OVERRIDE {
result_->clear();
for (std::vector<PasswordForm*>::const_iterator it = result.begin();
- it != result.end(); ++it) {
- // Make a copy of the form since it gets deallocated after the caller of
- // this method returns.
+ it != result.end();
+ ++it) {
result_->push_back(**it);
+ delete *it;
}
// Quit the message loop to wake up passwords_helper::GetLogins.