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

Unified Diff: chrome/browser/task_management/task_manager_tester.cc

Issue 1912773002: Remove the old task manager view (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits Created 4 years, 7 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/task_management/task_manager_tester.cc
diff --git a/chrome/browser/task_management/task_manager_tester.cc b/chrome/browser/task_management/task_manager_tester.cc
index 5ce535296ec57b97396facf588dad5d06de10be1..627ab684d4f4c03e70799e51875375d012c7bede 100644
--- a/chrome/browser/task_management/task_manager_tester.cc
+++ b/chrome/browser/task_management/task_manager_tester.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_tab_helper.h"
#include "chrome/browser/task_management/task_manager_interface.h"
-#include "chrome/browser/task_manager/legacy_task_manager_tester.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/task_manager/task_manager_table_model.h"
#include "chrome/common/chrome_switches.h"
@@ -21,16 +20,6 @@ namespace task_management {
namespace {
-// Returns whether chrome::ShowTaskManager() will, for the current platform and
-// command line, show a view backed by a task_management::TaskManagerTableModel.
-bool IsNewTaskManagerViewEnabled() {
-#if defined(OS_MACOSX)
- if (!chrome::ToolkitViewsDialogsEnabled())
- return false;
-#endif
- return switches::NewTaskManagerEnabled();
-}
-
// Temporarily intercepts the calls between a TableModel and its Observer,
// running |callback| whenever anything happens.
class ScopedInterceptTableModelObserver : public ui::TableModelObserver {
@@ -156,7 +145,6 @@ class TaskManagerTesterImpl : public TaskManagerTester {
// Returns the TaskManagerTableModel for the the visible NewTaskManagerView.
static task_management::TaskManagerTableModel* GetRealModel() {
- CHECK(IsNewTaskManagerViewEnabled());
// This downcast is safe, as long as the new task manager is enabled.
task_management::TaskManagerTableModel* result =
static_cast<task_management::TaskManagerTableModel*>(
@@ -169,12 +157,9 @@ class TaskManagerTesterImpl : public TaskManagerTester {
};
// static
-std::unique_ptr<TaskManagerTester> TaskManagerTester::Create(
+std::unique_ptr<TaskManagerTester> TaskManagerTester::CreateDefault(
const base::Closure& callback) {
- if (IsNewTaskManagerViewEnabled())
- return base::WrapUnique(new TaskManagerTesterImpl(callback));
- else
- return task_manager::CreateLegacyTaskManagerTester(callback);
+ return base::WrapUnique(new TaskManagerTesterImpl(callback));
}
} // namespace task_management
« no previous file with comments | « chrome/browser/task_management/task_manager_tester.h ('k') | chrome/browser/task_manager/legacy_task_manager_tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698