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

Side by Side Diff: chrome/browser/password_manager/password_store_default_unittest.cc

Issue 6646051: Fix DCHECK, memory leak, and refactor PasswordStore to use CancelableRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try works all platforms now. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/stl_util-inl.h" 6 #include "base/stl_util-inl.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/scoped_temp_dir.h" 8 #include "base/scoped_temp_dir.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 20 matching lines...) Expand all
31 using testing::Pointee; 31 using testing::Pointee;
32 using testing::Property; 32 using testing::Property;
33 using testing::WithArg; 33 using testing::WithArg;
34 using webkit_glue::PasswordForm; 34 using webkit_glue::PasswordForm;
35 35
36 namespace { 36 namespace {
37 37
38 class MockPasswordStoreConsumer : public PasswordStoreConsumer { 38 class MockPasswordStoreConsumer : public PasswordStoreConsumer {
39 public: 39 public:
40 MOCK_METHOD2(OnPasswordStoreRequestDone, 40 MOCK_METHOD2(OnPasswordStoreRequestDone,
41 void(int, const std::vector<webkit_glue::PasswordForm*>&)); 41 void(PasswordStore::Handle,
42 const std::vector<webkit_glue::PasswordForm*>&));
42 }; 43 };
43 44
44 class MockWebDataServiceConsumer : public WebDataServiceConsumer { 45 class MockWebDataServiceConsumer : public WebDataServiceConsumer {
45 public: 46 public:
46 MOCK_METHOD2(OnWebDataServiceRequestDone, void(WebDataService::Handle, 47 MOCK_METHOD2(OnWebDataServiceRequestDone, void(WebDataService::Handle,
47 const WDTypedResult*)); 48 const WDTypedResult*));
48 }; 49 };
49 50
50 // This class will add and remove a mock notification observer from 51 // This class will add and remove a mock notification observer from
51 // the DB thread. 52 // the DB thread.
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 expected_delete_changes))))); 504 expected_delete_changes)))));
504 505
505 // Deleting the login should trigger a notification. 506 // Deleting the login should trigger a notification.
506 store->RemoveLogin(*form); 507 store->RemoveLogin(*form);
507 508
508 // Wait for PasswordStore to send the notification. 509 // Wait for PasswordStore to send the notification.
509 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, 510 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
510 new SignalingTask(&done)); 511 new SignalingTask(&done));
511 done.Wait(); 512 done.Wait();
512 } 513 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698