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

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

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky Created 4 years, 3 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 "chrome/browser/password_manager/password_store_x.h" 5 #include "chrome/browser/password_manager/password_store_x.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 base::ScopedTempDir temp_dir_; 324 base::ScopedTempDir temp_dir_;
325 BackendType backend_type_; 325 BackendType backend_type_;
326 scoped_refptr<PasswordStoreX> store_; 326 scoped_refptr<PasswordStoreX> store_;
327 327
328 DISALLOW_COPY_AND_ASSIGN(PasswordStoreXTestDelegate); 328 DISALLOW_COPY_AND_ASSIGN(PasswordStoreXTestDelegate);
329 }; 329 };
330 330
331 PasswordStoreXTestDelegate::PasswordStoreXTestDelegate(BackendType backend_type) 331 PasswordStoreXTestDelegate::PasswordStoreXTestDelegate(BackendType backend_type)
332 : backend_type_(backend_type) { 332 : backend_type_(backend_type) {
333 SetupTempDir(); 333 SetupTempDir();
334 store_ = new PasswordStoreX( 334 store_ = new PasswordStoreX(base::ThreadTaskRunnerHandle::Get(),
335 base::ThreadTaskRunnerHandle::Get(), base::ThreadTaskRunnerHandle::Get(), 335 base::ThreadTaskRunnerHandle::Get(),
336 base::WrapUnique( 336 base::MakeUnique<password_manager::LoginDatabase>(
337 new password_manager::LoginDatabase(test_login_db_file_path())), 337 test_login_db_file_path()),
338 GetBackend(backend_type_)); 338 GetBackend(backend_type_));
339 store_->Init(syncer::SyncableService::StartSyncFlare()); 339 store_->Init(syncer::SyncableService::StartSyncFlare());
340 } 340 }
341 341
342 PasswordStoreXTestDelegate::~PasswordStoreXTestDelegate() { 342 PasswordStoreXTestDelegate::~PasswordStoreXTestDelegate() {
343 store_->ShutdownOnUIThread(); 343 store_->ShutdownOnUIThread();
344 FinishAsyncProcessing(); 344 FinishAsyncProcessing();
345 } 345 }
346 346
347 void PasswordStoreXTestDelegate::FinishAsyncProcessing() { 347 void PasswordStoreXTestDelegate::FinishAsyncProcessing() {
348 base::RunLoop().RunUntilIdle(); 348 base::RunLoop().RunUntilIdle();
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 583
584 INSTANTIATE_TEST_CASE_P(NoBackend, 584 INSTANTIATE_TEST_CASE_P(NoBackend,
585 PasswordStoreXTest, 585 PasswordStoreXTest,
586 testing::Values(NO_BACKEND)); 586 testing::Values(NO_BACKEND));
587 INSTANTIATE_TEST_CASE_P(FailingBackend, 587 INSTANTIATE_TEST_CASE_P(FailingBackend,
588 PasswordStoreXTest, 588 PasswordStoreXTest,
589 testing::Values(FAILING_BACKEND)); 589 testing::Values(FAILING_BACKEND));
590 INSTANTIATE_TEST_CASE_P(WorkingBackend, 590 INSTANTIATE_TEST_CASE_P(WorkingBackend,
591 PasswordStoreXTest, 591 PasswordStoreXTest,
592 testing::Values(WORKING_BACKEND)); 592 testing::Values(WORKING_BACKEND));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698