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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ui/ash/launcher/chrome_launcher_controller_impl.h" 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 model_.reset(new ash::ShelfModel); 513 model_.reset(new ash::ShelfModel);
514 AddAppListLauncherItem(); 514 AddAppListLauncherItem();
515 launcher_controller_.reset( 515 launcher_controller_.reset(
516 ChromeLauncherControllerImpl::CreateInstance(profile(), model_.get())); 516 ChromeLauncherControllerImpl::CreateInstance(profile(), model_.get()));
517 launcher_controller_->Init(); 517 launcher_controller_->Init();
518 } 518 }
519 519
520 void StartAppSyncService(const syncer::SyncDataList& init_sync_list) { 520 void StartAppSyncService(const syncer::SyncDataList& init_sync_list) {
521 app_service_->MergeDataAndStartSyncing( 521 app_service_->MergeDataAndStartSyncing(
522 syncer::APP_LIST, init_sync_list, 522 syncer::APP_LIST, init_sync_list,
523 base::WrapUnique(new syncer::FakeSyncChangeProcessor()), 523 base::MakeUnique<syncer::FakeSyncChangeProcessor>(),
524 base::WrapUnique(new syncer::SyncErrorFactoryMock())); 524 base::MakeUnique<syncer::SyncErrorFactoryMock>());
525 EXPECT_EQ(init_sync_list.size(), app_service_->sync_items().size()); 525 EXPECT_EQ(init_sync_list.size(), app_service_->sync_items().size());
526 } 526 }
527 527
528 void StopAppSyncService() { app_service_->StopSyncing(syncer::APP_LIST); } 528 void StopAppSyncService() { app_service_->StopSyncing(syncer::APP_LIST); }
529 529
530 void SetAppIconLoader(std::unique_ptr<AppIconLoader> loader) { 530 void SetAppIconLoader(std::unique_ptr<AppIconLoader> loader) {
531 std::vector<std::unique_ptr<AppIconLoader>> loaders; 531 std::vector<std::unique_ptr<AppIconLoader>> loaders;
532 loaders.push_back(std::move(loader)); 532 loaders.push_back(std::move(loader));
533 launcher_controller_->SetAppIconLoadersForTest(loaders); 533 launcher_controller_->SetAppIconLoadersForTest(loaders);
534 } 534 }
(...skipping 3166 matching lines...) Expand 10 before | Expand all | Expand 10 after
3701 EXPECT_FALSE(controller->rotation_locked()); 3701 EXPECT_FALSE(controller->rotation_locked());
3702 EXPECT_EQ(display::Display::ROTATE_0, 3702 EXPECT_EQ(display::Display::ROTATE_0,
3703 display::Screen::GetScreen()->GetPrimaryDisplay().rotation()); 3703 display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
3704 3704
3705 NotifyOnTaskOrientationLockRequested(task_id_current_, 3705 NotifyOnTaskOrientationLockRequested(task_id_current_,
3706 OrientationLock::CURRENT); 3706 OrientationLock::CURRENT);
3707 EXPECT_TRUE(controller->rotation_locked()); 3707 EXPECT_TRUE(controller->rotation_locked());
3708 EXPECT_EQ(display::Display::ROTATE_0, 3708 EXPECT_EQ(display::Display::ROTATE_0,
3709 display::Screen::GetScreen()->GetPrimaryDisplay().rotation()); 3709 display::Screen::GetScreen()->GetPrimaryDisplay().rotation());
3710 } 3710 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/app_list/app_list_service_ash.cc ('k') | chrome/browser/ui/ash/system_tray_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698