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

Unified Diff: chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc

Issue 2678083005: Remove extension-to-component migration mechanism (Closed)
Patch Set: . Created 3 years, 10 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/toolbar/media_router_action_controller_unittest.cc
diff --git a/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc b/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc
index 8dc0591c579175c211071ed43cd0122771f05ea4..c7d630790c80cb8035f6c5b34e4c3fa7b18a1641 100644
--- a/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc
+++ b/chrome/browser/ui/toolbar/media_router_action_controller_unittest.cc
@@ -6,16 +6,14 @@
#include <string>
#include "chrome/browser/media/router/mock_media_router.h"
+#include "chrome/browser/ui/toolbar/component_action_delegate.h"
#include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
#include "chrome/browser/ui/toolbar/media_router_action_controller.h"
#include "chrome/browser/ui/webui/media_router/media_router_web_ui_test.h"
#include "chrome/common/pref_names.h"
#include "testing/gmock/include/gmock/gmock.h"
-using extensions::ComponentMigrationHelper;
-
-class FakeComponentActionDelegate
- : public ComponentMigrationHelper::ComponentActionDelegate {
+class FakeComponentActionDelegate : public ComponentActionDelegate {
public:
FakeComponentActionDelegate() {}
~FakeComponentActionDelegate() {}
@@ -61,11 +59,8 @@ class MediaRouterActionControllerUnitTest : public MediaRouterWebUITest {
router_.reset(new media_router::MockMediaRouter());
msw 2017/02/08 02:14:02 optional nit: base::MakeUnique here and twice more
takumif 2017/02/08 03:35:41 Done.
component_action_delegate_.reset(new FakeComponentActionDelegate());
- component_migration_helper_.reset(new ComponentMigrationHelper(
- profile(), component_action_delegate_.get()));
controller_.reset(new MediaRouterActionController(
- profile(), router_.get(), component_action_delegate_.get(),
- component_migration_helper_.get()));
+ profile(), router_.get(), component_action_delegate_.get()));
SetAlwaysShowActionPref(false);
@@ -82,7 +77,6 @@ class MediaRouterActionControllerUnitTest : public MediaRouterWebUITest {
void TearDown() override {
controller_.reset();
- component_migration_helper_.reset();
component_action_delegate_.reset();
router_.reset();
MediaRouterWebUITest::TearDown();
@@ -94,8 +88,8 @@ class MediaRouterActionControllerUnitTest : public MediaRouterWebUITest {
}
void SetAlwaysShowActionPref(bool always_show) {
- component_migration_helper_->SetComponentActionPref(
- ComponentToolbarActionsFactory::kMediaRouterActionId, always_show);
+ MediaRouterActionController::SetAlwaysShowActionPref(profile(),
+ always_show);
}
MediaRouterActionController* controller() { return controller_.get(); }
@@ -117,7 +111,6 @@ class MediaRouterActionControllerUnitTest : public MediaRouterWebUITest {
std::unique_ptr<MediaRouterActionController> controller_;
std::unique_ptr<media_router::MockMediaRouter> router_;
std::unique_ptr<FakeComponentActionDelegate> component_action_delegate_;
- std::unique_ptr<ComponentMigrationHelper> component_migration_helper_;
const media_router::Issue issue_;

Powered by Google App Engine
This is Rietveld 408576698