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

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

Issue 8354028: Use base::IgnoreReturn<bool>( instead of base::IgnoreReturn(base::Callback<bool(void)>(. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 2 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
« no previous file with comments | « chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/file_util.h" 7 #include "base/file_util.h"
8 #include "base/platform_file.h" 8 #include "base/platform_file.h"
9 #include "base/scoped_temp_dir.h" 9 #include "base/scoped_temp_dir.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 const FilePath login_db_file = temp_dir_.path().Append("login_test"); 622 const FilePath login_db_file = temp_dir_.path().Append("login_test");
623 base::PlatformFileInfo db_file_start_info; 623 base::PlatformFileInfo db_file_start_info;
624 ASSERT_TRUE(file_util::GetFileInfo(login_db_file, &db_file_start_info)); 624 ASSERT_TRUE(file_util::GetFileInfo(login_db_file, &db_file_start_info));
625 625
626 LoginDatabase* login_db = login_db_.get(); 626 LoginDatabase* login_db = login_db_.get();
627 627
628 // Populate the login DB with logins that should be migrated. 628 // Populate the login DB with logins that should be migrated.
629 for (VectorOfForms::iterator it = expected_autofillable.begin(); 629 for (VectorOfForms::iterator it = expected_autofillable.begin();
630 it != expected_autofillable.end(); ++it) { 630 it != expected_autofillable.end(); ++it) {
631 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, 631 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
632 base::IgnoreReturn(base::Callback<bool(void)>( 632 base::IgnoreReturn<bool>(base::Bind(
633 base::Bind(&LoginDatabase::AddLogin, 633 &LoginDatabase::AddLogin,
634 base::Unretained(login_db), **it)))); 634 base::Unretained(login_db), **it)));
635 } 635 }
636 for (VectorOfForms::iterator it = expected_blacklisted.begin(); 636 for (VectorOfForms::iterator it = expected_blacklisted.begin();
637 it != expected_blacklisted.end(); ++it) { 637 it != expected_blacklisted.end(); ++it) {
638 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, 638 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
639 base::IgnoreReturn(base::Callback<bool(void)>( 639 base::IgnoreReturn<bool>(base::Bind(
640 base::Bind(&LoginDatabase::AddLogin, 640 &LoginDatabase::AddLogin,
641 base::Unretained(login_db), **it)))); 641 base::Unretained(login_db), **it)));
642 } 642 }
643 643
644 // Schedule another task on the DB thread to notify us that it's safe to 644 // Schedule another task on the DB thread to notify us that it's safe to
645 // carry on with the test. 645 // carry on with the test.
646 WaitableEvent done(false, false); 646 WaitableEvent done(false, false);
647 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, 647 BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
648 new SignalingTask(&done)); 648 new SignalingTask(&done));
649 done.Wait(); 649 done.Wait();
650 650
651 // Get the new size of the login DB file. We expect it to be larger. 651 // Get the new size of the login DB file. We expect it to be larger.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 753
754 INSTANTIATE_TEST_CASE_P(NoBackend, 754 INSTANTIATE_TEST_CASE_P(NoBackend,
755 PasswordStoreXTest, 755 PasswordStoreXTest,
756 testing::Values(NO_BACKEND)); 756 testing::Values(NO_BACKEND));
757 INSTANTIATE_TEST_CASE_P(FailingBackend, 757 INSTANTIATE_TEST_CASE_P(FailingBackend,
758 PasswordStoreXTest, 758 PasswordStoreXTest,
759 testing::Values(FAILING_BACKEND)); 759 testing::Values(FAILING_BACKEND));
760 INSTANTIATE_TEST_CASE_P(WorkingBackend, 760 INSTANTIATE_TEST_CASE_P(WorkingBackend,
761 PasswordStoreXTest, 761 PasswordStoreXTest,
762 testing::Values(WORKING_BACKEND)); 762 testing::Values(WORKING_BACKEND));
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698