Commit 5cfaf0a0 authored by Chris Lu's avatar Chris Lu Committed by Commit Bot

[ios] Move all logic under Collections flag to under UIRefresh flag

Remove all references to CollectionsUIReboot flag.

Bug: 875063

Change-Id: I5222da0ba5ec50da282a434f8e075758feebb59a
Reviewed-on: https://chromium-review.googlesource.com/1178932Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Chris Lu <thegreenfrog@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584071}
parent 99aaaedd
......@@ -265,9 +265,6 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
{"ui-refresh-phase-1", flag_descriptions::kUIRefreshPhase1Name,
flag_descriptions::kUIRefreshPhase1Description, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kUIRefreshPhase1)},
{"collections-ui-reboot", flag_descriptions::kCollectionsUIRebootName,
flag_descriptions::kCollectionsUIRebootDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kCollectionsUIReboot)},
{"infobars-ui-reboot", flag_descriptions::kInfobarsUIRebootName,
flag_descriptions::kInfobarsUIRebootDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kInfobarsUIReboot)},
......
......@@ -63,9 +63,6 @@ bool IsBookmarksUIRebootEnabled();
// Whether the Reading List UI Reboot is enabled.
bool IsReadingListUIRebootEnabled();
// Whether the Collections UI Reboot is enabled.
bool IsCollectionsUIRebootEnabled();
// Whether the Settings UI Reboot is enabled.
bool IsSettingsUIRebootEnabled();
......
......@@ -138,10 +138,6 @@ bool IsReadingListUIRebootEnabled() {
return base::FeatureList::IsEnabled(kUIRefreshPhase1);
}
bool IsCollectionsUIRebootEnabled() {
return base::FeatureList::IsEnabled(kCollectionsUIReboot);
}
bool IsSettingsUIRebootEnabled() {
return base::FeatureList::IsEnabled(kUIRefreshPhase1);
}
......
......@@ -13,7 +13,6 @@
#include "components/favicon/core/large_icon_service.h"
#include "components/favicon_base/fallback_icon_style.h"
#include "components/favicon_base/favicon_callback.h"
#include "ios/chrome/browser/experimental_flags.h"
#import "ios/chrome/browser/ui/uikit_ui_util.h"
#import "ios/chrome/common/favicon/favicon_attributes.h"
#include "skia/ext/skia_utils_ios.h"
......@@ -68,7 +67,7 @@ FaviconAttributes* FaviconLoader::FaviconForUrl(
skia::UIColorFromSkColor(result.fallback_icon_style->text_color);
UIColor* backgroundColor =
skia::UIColorFromSkColor(result.fallback_icon_style->background_color);
if (experimental_flags::IsCollectionsUIRebootEnabled()) {
if (IsUIRefreshPhase1Enabled()) {
textColor = UIColorFromRGB(kFallbackIconDefaultTextColor);
backgroundColor = [UIColor clearColor];
}
......@@ -91,7 +90,7 @@ FaviconAttributes* FaviconLoader::FaviconForUrl(
url, min_favicon_size, favicon_size_in_pixels,
base::BindRepeating(favicon_block), &cancelable_task_tracker_);
if (experimental_flags::IsCollectionsUIRebootEnabled()) {
if (IsUIRefreshPhase1Enabled()) {
return [FaviconAttributes
attributesWithImage:[UIImage imageNamed:@"default_world_favicon"]];
}
......
......@@ -204,10 +204,6 @@ const char kInfobarsUIRebootName[] = "Infobars UI Reboot";
const char kInfobarsUIRebootDescription[] =
"When enabled, Infobars will use the new UI Reboot layout.";
const char kCollectionsUIRebootName[] = "Collections UI Reboot";
const char kCollectionsUIRebootDescription[] =
"When enabled, Collections will use the new UI Reboot stack.";
const char kSlimNavigationManagerName[] = "Use Slim Navigation Manager";
const char kSlimNavigationManagerDescription[] =
"When enabled, uses the experimental slim navigation manager that provides "
......
......@@ -165,11 +165,6 @@ extern const char kPasswordExportDescription[];
extern const char kPhysicalWeb[];
extern const char kPhysicalWebDescription[];
// Title and description for the flag to enable the new UI Reboot on existing
// Collections.
extern const char kCollectionsUIRebootName[];
extern const char kCollectionsUIRebootDescription[];
// Title and description for the flag to enable the new UI Reboot on existing
// Infobars.
extern const char kInfobarsUIRebootName[];
......
......@@ -13,7 +13,6 @@
#include "components/reading_list/core/reading_list_model.h"
#import "components/reading_list/ios/reading_list_model_bridge_observer.h"
#include "components/url_formatter/url_formatter.h"
#include "ios/chrome/browser/experimental_flags.h"
#import "ios/chrome/browser/ui/favicon/favicon_attributes_provider.h"
#import "ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.h"
#import "ios/chrome/browser/ui/reading_list/reading_list_data_sink.h"
......@@ -170,8 +169,7 @@ const CGFloat kFallbackIconDefaultBackgroundColor = 0xf1f3f4;
if (!strongSelf || !strongItem) {
return;
}
if (attributes.monogramString &&
experimental_flags::IsCollectionsUIRebootEnabled()) {
if (attributes.monogramString && IsUIRefreshPhase1Enabled()) {
UIColor* textColor = [UIColor colorWithWhite:0 alpha:0.33];
UIColor* backgroundColor =
UIColorFromRGB(kFallbackIconDefaultBackgroundColor);
......
......@@ -20,6 +20,7 @@
#import "ios/chrome/browser/tabs/tab_model.h"
#import "ios/chrome/browser/ui/tab_grid/grid/grid_consumer.h"
#import "ios/chrome/browser/ui/tab_grid/grid/grid_item.h"
#include "ios/chrome/browser/ui/ui_util.h"
#import "ios/chrome/browser/web/tab_id_tab_helper.h"
#include "ios/chrome/browser/web_state_list/web_state_list.h"
#import "ios/chrome/browser/web_state_list/web_state_list_observer_bridge.h"
......@@ -346,7 +347,7 @@ web::WebState* GetWebStateWithId(WebStateList* web_state_list,
return;
}
UIImage* defaultFavicon;
if (experimental_flags::IsCollectionsUIRebootEnabled()) {
if (IsUIRefreshPhase1Enabled()) {
if (webState->GetBrowserState()->IsOffTheRecord()) {
defaultFavicon = [UIImage imageNamed:@"default_world_favicon_incognito"];
} else {
......
......@@ -13,9 +13,6 @@ const base::Feature kUIRefreshLocationBar{"UIRefreshLocationBar",
const base::Feature kUIRefreshPhase1{"UIRefreshPhase1",
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kCollectionsUIReboot{"CollectionsUIReboot",
base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kInfobarsUIReboot{"InfobarsUIReboot",
base::FEATURE_DISABLED_BY_DEFAULT};
......
......@@ -21,11 +21,6 @@ extern const base::Feature kUIRefreshLocationBar;
// used directly. Instead use ui_util::IsUIRefreshPhase1Enabled().
extern const base::Feature kUIRefreshPhase1;
// Feature to choose whether to use the new UI Reboot Collection stack, or the
// legacy one. This flag should not be used directly. Instead use
// experimental_flags::IsCollectionsUIRebootEnabled()
extern const base::Feature kCollectionsUIReboot;
// Feature to choose whether to use the new UI Reboot Infobar UX, or the legacy
// one. This flag should not be used directly. Instead, use
// IsRefreshInfobarEnabled().
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment