Skip to content

Commit

Permalink
Unified: Remove SystemTrayUnified flag.
Browse files Browse the repository at this point in the history
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 <jamescook@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602561}
  • Loading branch information
Tetsui Ohkubo authored and Commit Bot committed Oct 25, 2018
1 parent 9c5a72c commit f590c5d
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 39 deletions.
5 changes: 1 addition & 4 deletions ash/public/cpp/ash_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -101,7 +98,7 @@ bool IsNotificationScrollBarEnabled() {
}

bool IsSystemTrayUnifiedEnabled() {
return base::FeatureList::IsEnabled(kSystemTrayUnified);
return true;
}

bool IsTrilinearFilteringEnabled() {
Expand Down
3 changes: 0 additions & 3 deletions ash/public/cpp/ash_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 0 additions & 5 deletions ash/system/status_area_widget_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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();
Expand All @@ -320,8 +317,6 @@ class UnifiedStatusAreaWidgetTest : public AshTestBase {
}

private:
base::test::ScopedFeatureList scoped_feature_list_;

TestingPrefServiceSimple profile_prefs_;
TestingPrefServiceSimple local_state_;

Expand Down
9 changes: 0 additions & 9 deletions ash/system/tracing_notification_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -18,20 +16,13 @@ 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(
TracingNotificationController::kNotificationId);
}

private:
base::test::ScopedFeatureList scoped_feature_list_;

DISALLOW_COPY_AND_ASSIGN(TracingNotificationControllerTest);
};

Expand Down
8 changes: 0 additions & 8 deletions ash/system/update/update_notification_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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(
Expand Down Expand Up @@ -78,8 +72,6 @@ class UpdateNotificationControllerTest : public AshTestBase {
}

private:
base::test::ScopedFeatureList scoped_feature_list_;

DISALLOW_COPY_AND_ASSIGN(UpdateNotificationControllerTest);
};

Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 0 additions & 4 deletions chrome/browser/flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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[];

Expand Down

0 comments on commit f590c5d

Please sign in to comment.