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

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

Issue 16938006: Adds RefCountedDeleteOnMessageLoop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update the gyp file Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <windows.h> 5 #include <windows.h>
6 #include <wincrypt.h> 6 #include <wincrypt.h>
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual void SetUp() { 110 virtual void SetUp() {
111 ASSERT_TRUE(db_thread_.Start()); 111 ASSERT_TRUE(db_thread_.Start());
112 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 112 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
113 113
114 profile_.reset(new TestingProfile()); 114 profile_.reset(new TestingProfile());
115 115
116 login_db_.reset(new LoginDatabase()); 116 login_db_.reset(new LoginDatabase());
117 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append( 117 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append(
118 FILE_PATH_LITERAL("login_test")))); 118 FILE_PATH_LITERAL("login_test"))));
119 base::FilePath path = temp_dir_.path().AppendASCII("web_data_test"); 119 base::FilePath path = temp_dir_.path().AppendASCII("web_data_test");
120 wdbs_ = new WebDatabaseService(path); 120 wdbs_ = new WebDatabaseService(path,
121 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI));
121 // Need to add at least one table so the database gets created. 122 // Need to add at least one table so the database gets created.
122 wdbs_->AddTable(scoped_ptr<WebDatabaseTable>(new LoginsTable())); 123 wdbs_->AddTable(scoped_ptr<WebDatabaseTable>(new LoginsTable()));
123 wdbs_->LoadDatabase(); 124 wdbs_->LoadDatabase();
124 wds_ = new WebDataService(wdbs_, 125 wds_ = new WebDataService(wdbs_,
125 WebDataServiceBase::ProfileErrorCallback()); 126 WebDataServiceBase::ProfileErrorCallback());
126 wds_->Init(); 127 wds_->Init();
127 } 128 }
128 129
129 virtual void TearDown() { 130 virtual void TearDown() {
130 if (store_.get()) 131 if (store_.get())
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 VectorOfForms expect_none; 420 VectorOfForms expect_none;
420 // expect that we get no results; 421 // expect that we get no results;
421 EXPECT_CALL( 422 EXPECT_CALL(
422 consumer, 423 consumer,
423 OnPasswordStoreRequestDone(_, ContainsAllPasswordForms(expect_none))) 424 OnPasswordStoreRequestDone(_, ContainsAllPasswordForms(expect_none)))
424 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop())); 425 .WillOnce(DoAll(WithArg<1>(STLDeleteElements0()), QuitUIMessageLoop()));
425 426
426 store_->GetAutofillableLogins(&consumer); 427 store_->GetAutofillableLogins(&consumer);
427 base::MessageLoop::current()->Run(); 428 base::MessageLoop::current()->Run();
428 } 429 }
OLDNEW
« no previous file with comments | « base/memory/ref_counted_delete_on_message_loop.h ('k') | chrome/browser/webdata/web_data_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698