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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Address most comments, except manifest, need to sync. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
index 560c363901dc1e9cb6fb8d70205f6968f216d6a8..74ec0bf021f3132eff0659537bce19596d160512 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
@@ -293,7 +293,7 @@ class TestV2AppLauncherItemController : public LauncherItemController {
}
bool IsDraggable() override { return false; }
bool CanPin() const override {
- return GetPinnableForAppID(app_id(), launcher_controller()->GetProfile()) ==
+ return GetPinnableForAppID(app_id(), launcher_controller()->profile()) ==
AppListControllerDelegate::PIN_EDITABLE;
}
bool ShouldShowTooltip() override { return false; }
@@ -517,8 +517,8 @@ class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest {
launcher_controller_.reset();
model_.reset(new ash::ShelfModel);
AddAppListLauncherItem();
- launcher_controller_.reset(
- ChromeLauncherControllerImpl::CreateInstance(profile(), model_.get()));
+ launcher_controller_ =
+ base::MakeUnique<ChromeLauncherControllerImpl>(profile(), model_.get());
launcher_controller_->Init();
}
@@ -547,7 +547,8 @@ class ChromeLauncherControllerImplTest : public BrowserWithTestWindowTest {
}
void SetLauncherControllerHelper(LauncherControllerHelper* helper) {
- launcher_controller_->SetLauncherControllerHelperForTest(helper);
+ launcher_controller_->SetLauncherControllerHelperForTest(
+ base::WrapUnique<LauncherControllerHelper>(helper));
}
void InsertPrefValue(base::ListValue* pref_value,
@@ -3420,8 +3421,8 @@ TEST_F(ChromeLauncherControllerImplTest, PersistLauncherItemPositions) {
model_.reset(new ash::ShelfModel);
AddAppListLauncherItem();
- launcher_controller_.reset(
- ChromeLauncherControllerImpl::CreateInstance(profile(), model_.get()));
+ launcher_controller_ =
+ base::MakeUnique<ChromeLauncherControllerImpl>(profile(), model_.get());
helper = new TestLauncherControllerHelper(profile());
helper->SetAppID(tab_strip_model->GetWebContentsAt(0), "1");
helper->SetAppID(tab_strip_model->GetWebContentsAt(1), "2");
@@ -3466,8 +3467,8 @@ TEST_F(ChromeLauncherControllerImplTest, PersistPinned) {
model_.reset(new ash::ShelfModel);
AddAppListLauncherItem();
- launcher_controller_.reset(
- ChromeLauncherControllerImpl::CreateInstance(profile(), model_.get()));
+ launcher_controller_ =
+ base::MakeUnique<ChromeLauncherControllerImpl>(profile(), model_.get());
helper = new TestLauncherControllerHelper(profile());
helper->SetAppID(tab_strip_model->GetWebContentsAt(0), "1");
SetLauncherControllerHelper(helper);

Powered by Google App Engine
This is Rietveld 408576698