Skip to content

Commit

Permalink
Revert "Clean up UpdateHistoryEntryPointsInIncognito flags in iOS."
Browse files Browse the repository at this point in the history
This reverts commit f7ab44b.

Reason for revert: We still need the flag

Original change's description:
> Clean up UpdateHistoryEntryPointsInIncognito flags in iOS.
>
> This CL cleans up the old UpdateHistoryEntryPointsInIncognito feature
> flag in iOS.
>
> Bug: 1308395
> Change-Id: I0b255d843b8eee938682e7a477762a2d21f5a160
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3568569
> Reviewed-by: Gauthier Ambard <gambard@chromium.org>
> Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#988925}

Bug: 1308395
Change-Id: I9a75bfe633b51bafdeac3d4f4f1aa9e3e8770a79
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3578738
Reviewed-by: Gauthier Ambard <gambard@chromium.org>
Commit-Queue: Side YILMAZ <sideyilmaz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#990950}
  • Loading branch information
Side YILMAZ authored and Chromium LUCI CQ committed Apr 11, 2022
1 parent 1d74835 commit 4b40a30
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ios/chrome/browser/flags/about_flags.mm
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,11 @@
{"incognito-ntp-revamp", flag_descriptions::kIncognitoNtpRevampName,
flag_descriptions::kIncognitoNtpRevampDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kIncognitoNtpRevamp)},
{"update-history-entry-points-in-incognito",
flag_descriptions::kUpdateHistoryEntryPointsInIncognitoName,
flag_descriptions::kUpdateHistoryEntryPointsInIncognitoDescription,
flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kUpdateHistoryEntryPointsInIncognito)},
{"sync-trusted-vault-passphrase-ios-rpc",
flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCName,
flag_descriptions::kSyncTrustedVaultPassphraseiOSRPCDescription,
Expand Down
6 changes: 6 additions & 0 deletions ios/chrome/browser/flags/ios_chrome_flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,12 @@ const char kToolbarContainerDescription[] =
"When enabled, the toolbars and their fullscreen animations will be "
"managed by the toolbar container coordinator rather than BVC.";

const char kUpdateHistoryEntryPointsInIncognitoName[] =
"Update history entry points in Incognito.";
const char kUpdateHistoryEntryPointsInIncognitoDescription[] =
"When enabled, the entry points to history UI from Incognito mode will be "
"removed.";

const char kUseLensToSearchForImageName[] =
"Use Google Lens to Search for images";
const char kUseLensToSearchForImageDescription[] =
Expand Down
5 changes: 5 additions & 0 deletions ios/chrome/browser/flags/ios_chrome_flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,11 @@ extern const char kTabsSearchRegularResultsSuggestedActionsDescription[];
extern const char kToolbarContainerName[];
extern const char kToolbarContainerDescription[];

// Title and description for the flag to enable removing any entry points to the
// history UI from Incognito mode.
extern const char kUpdateHistoryEntryPointsInIncognitoName[];
extern const char kUpdateHistoryEntryPointsInIncognitoDescription[];

// Title and description for the flag to enable using Lens to search for an
// image from the long press context menu.
extern const char kUseLensToSearchForImageName[];
Expand Down
6 changes: 4 additions & 2 deletions ios/chrome/browser/ui/popup_menu/popup_menu_mediator.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,8 @@ - (void)createToolsMenuItems {
CreateTableViewItem(IDS_IOS_TOOLS_MENU_SETTINGS, PopupMenuActionSettings,
@"popup_menu_settings", kToolsMenuSettingsId);

if (self.isIncognito) {
if (self.isIncognito &&
base::FeatureList::IsEnabled(kUpdateHistoryEntryPointsInIncognito)) {
return @[ bookmarks, self.readingListItem, downloadsFolder, settings ];
}

Expand Down Expand Up @@ -1191,7 +1192,8 @@ - (BOOL)isEditBookmarksEnabled {
// item associated with |URL|.
- (BOOL)shouldUseIncognitoNTPResourcesForURL:(const GURL&)URL {
return URL.DeprecatedGetOriginAsURL() == kChromeUINewTabURL &&
self.isIncognito;
self.isIncognito &&
base::FeatureList::IsEnabled(kUpdateHistoryEntryPointsInIncognito);
}

@end
3 changes: 2 additions & 1 deletion ios/chrome/browser/ui/toolbar/toolbar_mediator.mm
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ - (UIMenu*)menuForNavigationItems:
// item associated with |URL|.
- (BOOL)shouldUseIncognitoNTPResourcesForURL:(const GURL&)URL {
return URL.DeprecatedGetOriginAsURL() == kChromeUINewTabURL &&
self.isIncognito;
self.isIncognito &&
base::FeatureList::IsEnabled(kUpdateHistoryEntryPointsInIncognito);
}

// Returns the menu for the new tab button.
Expand Down
3 changes: 3 additions & 0 deletions ios/chrome/browser/ui/ui_feature_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const base::Feature kIOSLocationBarUseNativeContextMenu{
const base::Feature kSearchHistoryLinkIOS{"SearchHistoryLinkIOS",
base::FEATURE_ENABLED_BY_DEFAULT};

const base::Feature kUpdateHistoryEntryPointsInIncognito{
"UpdateHistoryEntryPointsInIncognito", base::FEATURE_DISABLED_BY_DEFAULT};

const base::Feature kUseLensToSearchForImage{"UseLensToSearchForImage",
base::FEATURE_DISABLED_BY_DEFAULT};

Expand Down
4 changes: 4 additions & 0 deletions ios/chrome/browser/ui/ui_feature_flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ extern const char kIOSOmniboxUpdatedPopupUIVariation2[];
// Enables the Search History Link in Clear Browsing Data for iOS.
extern const base::Feature kSearchHistoryLinkIOS;

// Feature flag to enable removing any entry points to the history UI from
// Incognito mode.
extern const base::Feature kUpdateHistoryEntryPointsInIncognito;

// Feature flag to enable using Lens to search for images.
extern const base::Feature kUseLensToSearchForImage;

Expand Down

0 comments on commit 4b40a30

Please sign in to comment.