From f590c5d6b83d82969255f9a9405e2d881a0f7b68 Mon Sep 17 00:00:00 2001 From: Tetsui Ohkubo Date: Thu, 25 Oct 2018 01:30:28 +0000 Subject: [PATCH] Unified: Remove SystemTrayUnified flag. This CL removes SystemTrayUnified flag. This is the part 1 of removing old System Tray code. (1) Removing the flag (2) Removing references to IsSystemTrayUnifiedEnabled() (3) Removing classes that are only used in old System Tray I'll try to keep the number of CLs as small as possible to make the history clean, but there can be multiple CLs for both part 2 and part 3 because some of them requires nontrivial refactoring to remove the dependency to the old code. TEST=manual BUG=898419 Change-Id: I7a24d57afe7d39d437a17c475e5f6be330f0351e Reviewed-on: https://chromium-review.googlesource.com/c/1297778 Reviewed-by: James Cook Commit-Queue: Tetsui Ohkubo Cr-Commit-Position: refs/heads/master@{#602561} --- ash/public/cpp/ash_features.cc | 5 +---- ash/public/cpp/ash_features.h | 3 --- ash/system/status_area_widget_unittest.cc | 5 ----- ash/system/tracing_notification_controller_unittest.cc | 9 --------- .../update/update_notification_controller_unittest.cc | 8 -------- chrome/browser/about_flags.cc | 3 --- chrome/browser/flag_descriptions.cc | 4 ---- chrome/browser/flag_descriptions.h | 3 --- 8 files changed, 1 insertion(+), 39 deletions(-) diff --git a/ash/public/cpp/ash_features.cc b/ash/public/cpp/ash_features.cc index e7e85a5e7f809b..5e0a52dca05949 100644 --- a/ash/public/cpp/ash_features.cc +++ b/ash/public/cpp/ash_features.cc @@ -49,9 +49,6 @@ const base::Feature kNotificationScrollBar{"NotificationScrollBar", const base::Feature kOverviewSwipeToClose{"OverviewSwipeToClose", base::FEATURE_ENABLED_BY_DEFAULT}; -const base::Feature kSystemTrayUnified{"SystemTrayUnified", - base::FEATURE_ENABLED_BY_DEFAULT}; - const base::Feature kTrilinearFiltering{"TrilinearFiltering", base::FEATURE_DISABLED_BY_DEFAULT}; @@ -101,7 +98,7 @@ bool IsNotificationScrollBarEnabled() { } bool IsSystemTrayUnifiedEnabled() { - return base::FeatureList::IsEnabled(kSystemTrayUnified); + return true; } bool IsTrilinearFilteringEnabled() { diff --git a/ash/public/cpp/ash_features.h b/ash/public/cpp/ash_features.h index 43df5bd42e8bc4..fda3ac4a36e0a7 100644 --- a/ash/public/cpp/ash_features.h +++ b/ash/public/cpp/ash_features.h @@ -68,9 +68,6 @@ ASH_PUBLIC_EXPORT extern const base::Feature kNotificationScrollBar; // https://crbug.com/828646. ASH_PUBLIC_EXPORT extern const base::Feature kOverviewSwipeToClose; -// Enables new system menu. -ASH_PUBLIC_EXPORT extern const base::Feature kSystemTrayUnified; - // Enables trilinear filtering. ASH_PUBLIC_EXPORT extern const base::Feature kTrilinearFiltering; diff --git a/ash/system/status_area_widget_unittest.cc b/ash/system/status_area_widget_unittest.cc index 63cf084e154e35..533677ed62ff05 100644 --- a/ash/system/status_area_widget_unittest.cc +++ b/ash/system/status_area_widget_unittest.cc @@ -23,7 +23,6 @@ #include "ash/system/virtual_keyboard/virtual_keyboard_tray.h" #include "ash/test/ash_test_base.h" #include "base/command_line.h" -#include "base/test/scoped_feature_list.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/network/network_handler.h" #include "components/prefs/testing_pref_service.h" @@ -299,8 +298,6 @@ class UnifiedStatusAreaWidgetTest : public AshTestBase { // AshTestBase: void SetUp() override { - scoped_feature_list_.InitAndEnableFeature(features::kSystemTrayUnified); - chromeos::DBusThreadManager::Initialize(); // Initializing NetworkHandler before ash is more like production. chromeos::NetworkHandler::Initialize(); @@ -320,8 +317,6 @@ class UnifiedStatusAreaWidgetTest : public AshTestBase { } private: - base::test::ScopedFeatureList scoped_feature_list_; - TestingPrefServiceSimple profile_prefs_; TestingPrefServiceSimple local_state_; diff --git a/ash/system/tracing_notification_controller_unittest.cc b/ash/system/tracing_notification_controller_unittest.cc index 3bbaa735007e3e..5dff50c9e9de29 100644 --- a/ash/system/tracing_notification_controller_unittest.cc +++ b/ash/system/tracing_notification_controller_unittest.cc @@ -4,11 +4,9 @@ #include "ash/system/tracing_notification_controller.h" -#include "ash/public/cpp/ash_features.h" #include "ash/shell.h" #include "ash/system/model/system_tray_model.h" #include "ash/test/ash_test_base.h" -#include "base/test/scoped_feature_list.h" #include "ui/message_center/message_center.h" namespace ash { @@ -18,11 +16,6 @@ class TracingNotificationControllerTest : public AshTestBase { TracingNotificationControllerTest() = default; ~TracingNotificationControllerTest() override = default; - void SetUp() override { - scoped_feature_list_.InitAndEnableFeature(features::kSystemTrayUnified); - AshTestBase::SetUp(); - } - protected: bool HasNotification() { return message_center::MessageCenter::Get()->FindVisibleNotificationById( @@ -30,8 +23,6 @@ class TracingNotificationControllerTest : public AshTestBase { } private: - base::test::ScopedFeatureList scoped_feature_list_; - DISALLOW_COPY_AND_ASSIGN(TracingNotificationControllerTest); }; diff --git a/ash/system/update/update_notification_controller_unittest.cc b/ash/system/update/update_notification_controller_unittest.cc index 2b028f53e0b904..038f59379c5271 100644 --- a/ash/system/update/update_notification_controller_unittest.cc +++ b/ash/system/update/update_notification_controller_unittest.cc @@ -9,7 +9,6 @@ #include "ash/system/model/system_tray_model.h" #include "ash/test/ash_test_base.h" #include "base/strings/utf_string_conversions.h" -#include "base/test/scoped_feature_list.h" #include "ui/message_center/message_center.h" #if defined(GOOGLE_CHROME_BUILD) @@ -25,11 +24,6 @@ class UpdateNotificationControllerTest : public AshTestBase { UpdateNotificationControllerTest() = default; ~UpdateNotificationControllerTest() override = default; - void SetUp() override { - scoped_feature_list_.InitAndEnableFeature(features::kSystemTrayUnified); - AshTestBase::SetUp(); - } - protected: bool HasNotification() { return message_center::MessageCenter::Get()->FindVisibleNotificationById( @@ -78,8 +72,6 @@ class UpdateNotificationControllerTest : public AshTestBase { } private: - base::test::ScopedFeatureList scoped_feature_list_; - DISALLOW_COPY_AND_ASSIGN(UpdateNotificationControllerTest); }; diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 9ff3fecde69853..a553b4473388bd 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -2160,9 +2160,6 @@ const FeatureEntry kFeatureEntries[] = { #endif // ENABLE_EXTENSIONS #if !defined(OS_ANDROID) #if defined(OS_CHROMEOS) - {"enable-system-tray-unified", flag_descriptions::kSystemTrayUnifiedName, - flag_descriptions::kSystemTrayUnifiedDescription, kOsCrOS, - FEATURE_VALUE_TYPE(ash::features::kSystemTrayUnified)}, {"enable-lock-screen-notification", flag_descriptions::kLockScreenNotificationName, flag_descriptions::kLockScreenNotificationDescription, kOsCrOS, diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 53c0040e64f616..6199ee2c457e7f 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc @@ -77,10 +77,6 @@ const char kEnableBloatedRendererDetectionName[] = "Bloated renderer detection"; const char kEnableBloatedRendererDetectionDescription[] = "Enable bloated renderer detection"; -const char kSystemTrayUnifiedName[] = "New system menu"; -const char kSystemTrayUnifiedDescription[] = - "Enable the experimental system menu."; - const char kAsyncImageDecodingName[] = "AsyncImageDecoding"; const char kAsyncImageDecodingDescription[] = "Enables asynchronous decoding of images from raster for web content"; diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index d703b8091df6c3..3ab8a8ceac0f03 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h @@ -73,9 +73,6 @@ extern const char kEnableBlinkHeapUnifiedGarbageCollectionDescription[]; extern const char kEnableBloatedRendererDetectionName[]; extern const char kEnableBloatedRendererDetectionDescription[]; -extern const char kSystemTrayUnifiedName[]; -extern const char kSystemTrayUnifiedDescription[]; - extern const char kAsyncImageDecodingName[]; extern const char kAsyncImageDecodingDescription[];