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

Unified Diff: chrome/browser/password_manager/password_store_win_unittest.cc

Issue 838453003: Open the LoginDatabase on the DB thread, not the UI thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits from vabr@. Created 5 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
Index: chrome/browser/password_manager/password_store_win_unittest.cc
diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc
index f0849e7f97bb3b04aea8e124fc544b3b733a94a2..79472438bedceda81d2443be08bed32b3bdbb25f 100644
--- a/chrome/browser/password_manager/password_store_win_unittest.cc
+++ b/chrome/browser/password_manager/password_store_win_unittest.cc
@@ -116,9 +116,6 @@ class PasswordStoreWinTest : public testing::Test {
profile_.reset(new TestingProfile());
- login_db_.reset(new LoginDatabase());
- ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append(
- FILE_PATH_LITERAL("login_test"))));
base::FilePath path = temp_dir_.path().AppendASCII("web_data_test");
wdbs_ = new WebDatabaseService(path,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
@@ -150,11 +147,15 @@ class PasswordStoreWinTest : public testing::Test {
db_thread_.Stop();
}
+ base::FilePath test_login_db_file_path() const {
+ return temp_dir_.path().Append(FILE_PATH_LITERAL("login_test"));
+ }
+
PasswordStoreWin* CreatePasswordStore() {
return new PasswordStoreWin(
base::MessageLoopProxy::current(),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB),
- login_db_.release(),
+ make_scoped_ptr(new LoginDatabase(test_login_db_file_path())),
wds_.get());
}
@@ -165,7 +166,6 @@ class PasswordStoreWinTest : public testing::Test {
base::ScopedTempDir temp_dir_;
scoped_ptr<TestingProfile> profile_;
- scoped_ptr<LoginDatabase> login_db_;
scoped_refptr<PasswordWebDataService> wds_;
scoped_refptr<WebDatabaseService> wdbs_;
scoped_refptr<PasswordStore> store_;
« no previous file with comments | « chrome/browser/password_manager/password_store_win.cc ('k') | chrome/browser/password_manager/password_store_x.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698