Commit ca03ee3b authored by Mark Cogan's avatar Mark Cogan Committed by Commit Bot

[iOS] Remove close-last-tab tab grid experiment.

The closing-last-incognito-tab experiment has been default-on for nearly a year.

This CL deletes the flag.

Bug: 893314
Change-Id: Iafb145e66c8279cca034c04238b7dc3dca1f92f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807247Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Mark Cogan <marq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697591}
parent 6c57d2b5
...@@ -377,10 +377,6 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -377,10 +377,6 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
{"use-multilogin-endpoint", flag_descriptions::kUseMultiloginEndpointName, {"use-multilogin-endpoint", flag_descriptions::kUseMultiloginEndpointName,
flag_descriptions::kUseMultiloginEndpointDescription, flags_ui::kOsIos, flag_descriptions::kUseMultiloginEndpointDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kUseMultiloginEndpoint)}, FEATURE_VALUE_TYPE(kUseMultiloginEndpoint)},
{"closing-last-incognito-tab",
flag_descriptions::kClosingLastIncognitoTabName,
flag_descriptions::kClosingLastIncognitoTabDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kClosingLastIncognitoTab)},
{"omnibox-on-device-head-suggestions", {"omnibox-on-device-head-suggestions",
flag_descriptions::kOmniboxOnDeviceHeadSuggestionsName, flag_descriptions::kOmniboxOnDeviceHeadSuggestionsName,
flag_descriptions::kOmniboxOnDeviceHeadSuggestionsDescription, flag_descriptions::kOmniboxOnDeviceHeadSuggestionsDescription,
......
...@@ -120,12 +120,6 @@ const char kBrowserContainerKeepsContentViewDescription[] = ...@@ -120,12 +120,6 @@ const char kBrowserContainerKeepsContentViewDescription[] =
"When enable, the browser container keeps the content view in the view " "When enable, the browser container keeps the content view in the view "
"hierarchy, to avoid WKWebView from being unloaded from the process."; "hierarchy, to avoid WKWebView from being unloaded from the process.";
// TODO(crbug.com/893314) : Remove this flag.
const char kClosingLastIncognitoTabName[] = "Closing Last Incognito Tab";
const char kClosingLastIncognitoTabDescription[] =
"Automatically switches to the regular tabs panel in the tab grid after "
"closing the last incognito tab";
const char kCollectionsCardPresentationStyleName[] = const char kCollectionsCardPresentationStyleName[] =
"Card style presentation for Collections."; "Card style presentation for Collections.";
const char kCollectionsCardPresentationStyleDescription[] = const char kCollectionsCardPresentationStyleDescription[] =
......
...@@ -92,11 +92,6 @@ extern const char kBreakpadNoDelayInitialUploadDescription[]; ...@@ -92,11 +92,6 @@ extern const char kBreakpadNoDelayInitialUploadDescription[];
extern const char kBrowserContainerKeepsContentViewName[]; extern const char kBrowserContainerKeepsContentViewName[];
extern const char kBrowserContainerKeepsContentViewDescription[]; extern const char kBrowserContainerKeepsContentViewDescription[];
// Title and description for the flag to enable automatically switching to the
// regular tabs after closing the last incognito tab.
extern const char kClosingLastIncognitoTabName[];
extern const char kClosingLastIncognitoTabDescription[];
// Title and description for the flag that controls whether Collections are // Title and description for the flag that controls whether Collections are
// presented using the new iOS13 Card style or the custom legacy one. // presented using the new iOS13 Card style or the custom legacy one.
extern const char kCollectionsCardPresentationStyleName[]; extern const char kCollectionsCardPresentationStyleName[];
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#import "ios/chrome/browser/ui/tab_grid/transitions/grid_transition_layout.h" #import "ios/chrome/browser/ui/tab_grid/transitions/grid_transition_layout.h"
#import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h"
#import "ios/chrome/browser/ui/util/rtl_geometry.h" #import "ios/chrome/browser/ui/util/rtl_geometry.h"
#include "ios/chrome/browser/ui/util/ui_util.h"
#import "ios/chrome/browser/ui/util/uikit_ui_util.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h"
#import "ios/chrome/common/colors/semantic_color_names.h" #import "ios/chrome/common/colors/semantic_color_names.h"
#import "ios/chrome/common/ui_util/constraints_ui_util.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h"
...@@ -1118,8 +1117,7 @@ NSUInteger GetPageIndexFromPage(TabGridPage page) { ...@@ -1118,8 +1117,7 @@ NSUInteger GetPageIndexFromPage(TabGridPage page) {
// No assumption is made as to the state of the UI. This method can be // No assumption is made as to the state of the UI. This method can be
// called with an incognito view controller and a current page that is not // called with an incognito view controller and a current page that is not
// the incognito tabs. // the incognito tabs.
if (IsClosingLastIncognitoTabEnabled() && count == 0 && if (count == 0 && self.currentPage == TabGridPageIncognitoTabs) {
self.currentPage == TabGridPageIncognitoTabs) {
// Show the regular tabs to the user if the last incognito tab is closed. // Show the regular tabs to the user if the last incognito tab is closed.
if (self.viewLoaded && self.view.window) { if (self.viewLoaded && self.view.window) {
// Visibly scroll to the regular tabs panel after a slight delay when // Visibly scroll to the regular tabs panel after a slight delay when
......
...@@ -4,10 +4,6 @@ ...@@ -4,10 +4,6 @@
#include "ios/chrome/browser/ui/ui_feature_flags.h" #include "ios/chrome/browser/ui/ui_feature_flags.h"
// TODO(crbug.com/893314) : Remove this flag.
const base::Feature kClosingLastIncognitoTab{"ClosingLastIncognitoTab",
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kBrowserContainerKeepsContentView{ const base::Feature kBrowserContainerKeepsContentView{
"BrowserContainerKeepsContentView", base::FEATURE_DISABLED_BY_DEFAULT}; "BrowserContainerKeepsContentView", base::FEATURE_DISABLED_BY_DEFAULT};
......
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
#include "base/feature_list.h" #include "base/feature_list.h"
// Feature to automatically switch to the regular tabs panel in tab grid after
// closing the last incognito tab.
extern const base::Feature kClosingLastIncognitoTab;
// Feature to retain the contentView in the browser container. // Feature to retain the contentView in the browser container.
extern const base::Feature kBrowserContainerKeepsContentView; extern const base::Feature kBrowserContainerKeepsContentView;
......
...@@ -39,10 +39,6 @@ CGFloat CurrentScreenWidth(); ...@@ -39,10 +39,6 @@ CGFloat CurrentScreenWidth();
// Returns true if the device is an iPhone X. // Returns true if the device is an iPhone X.
bool IsIPhoneX(); bool IsIPhoneX();
// Returns whether the flag is enabled for switching to the regular tabs panel
// in tab switcher when the last incognito tab is closed.
bool IsClosingLastIncognitoTabEnabled();
// Returns the approximate corner radius of the current device. // Returns the approximate corner radius of the current device.
CGFloat DeviceCornerRadius(); CGFloat DeviceCornerRadius();
......
...@@ -59,11 +59,6 @@ bool IsIPhoneX() { ...@@ -59,11 +59,6 @@ bool IsIPhoneX() {
(height == 2436 || height == 2688 || height == 1792)); (height == 2436 || height == 2688 || height == 1792));
} }
// TODO(crbug.com/893314) : Remove this flag.
bool IsClosingLastIncognitoTabEnabled() {
return base::FeatureList::IsEnabled(kClosingLastIncognitoTab);
}
CGFloat DeviceCornerRadius() { CGFloat DeviceCornerRadius() {
return IsIPhoneX() ? 40.0 : 0.0; return IsIPhoneX() ? 40.0 : 0.0;
} }
......
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