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

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

Issue 10006037: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compile Created 8 years, 8 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) 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 profile_.reset(new TestingProfile()); 277 profile_.reset(new TestingProfile());
278 278
279 login_db_.reset(new LoginDatabase()); 279 login_db_.reset(new LoginDatabase());
280 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append("login_test"))); 280 ASSERT_TRUE(login_db_->Init(temp_dir_.path().Append("login_test")));
281 281
282 wds_ = new WebDataService(); 282 wds_ = new WebDataService();
283 ASSERT_TRUE(wds_->Init(temp_dir_.path())); 283 ASSERT_TRUE(wds_->Init(temp_dir_.path()));
284 } 284 }
285 285
286 virtual void TearDown() { 286 virtual void TearDown() {
287 wds_->Shutdown(); 287 wds_->ShutdownOnUIThread();
288 wds_ = NULL;
289 base::WaitableEvent done(false, false);
290 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
291 base::Bind(&base::WaitableEvent::Signal, base::Unretained(&done)));
292 done.Wait();
288 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure()); 293 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
289 MessageLoop::current()->Run(); 294 MessageLoop::current()->Run();
290 db_thread_.Stop(); 295 db_thread_.Stop();
291 } 296 }
292 297
293 PasswordStoreX::NativeBackend* GetBackend() { 298 PasswordStoreX::NativeBackend* GetBackend() {
294 switch (GetParam()) { 299 switch (GetParam()) {
295 case FAILING_BACKEND: 300 case FAILING_BACKEND:
296 return new FailingBackend(); 301 return new FailingBackend();
297 case WORKING_BACKEND: 302 case WORKING_BACKEND:
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 750
746 INSTANTIATE_TEST_CASE_P(NoBackend, 751 INSTANTIATE_TEST_CASE_P(NoBackend,
747 PasswordStoreXTest, 752 PasswordStoreXTest,
748 testing::Values(NO_BACKEND)); 753 testing::Values(NO_BACKEND));
749 INSTANTIATE_TEST_CASE_P(FailingBackend, 754 INSTANTIATE_TEST_CASE_P(FailingBackend,
750 PasswordStoreXTest, 755 PasswordStoreXTest,
751 testing::Values(FAILING_BACKEND)); 756 testing::Values(FAILING_BACKEND));
752 INSTANTIATE_TEST_CASE_P(WorkingBackend, 757 INSTANTIATE_TEST_CASE_P(WorkingBackend,
753 PasswordStoreXTest, 758 PasswordStoreXTest,
754 testing::Values(WORKING_BACKEND)); 759 testing::Values(WORKING_BACKEND));
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_win_unittest.cc ('k') | chrome/browser/profiles/off_the_record_profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698