Commit ec659ce7 authored by Yuheng Huang's avatar Yuheng Huang Committed by Commit Bot

Tab Search: Enable tab search for incognito mode

Bug: 1099917
Change-Id: Id3265adb0eb56ae651145b6ab7a643ba84d8a50a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2516887Reviewed-by: default avatarThomas Lukaszewicz <tluk@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#823697}
parent 07f436ed
......@@ -1065,7 +1065,7 @@ void BrowserCommandController::InitCommandState() {
const bool enable_tab_search_commands =
base::FeatureList::IsEnabled(features::kTabSearch) &&
browser_->is_type_normal() && !browser_->profile()->IsIncognitoProfile();
browser_->is_type_normal();
command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH,
enable_tab_search_commands);
command_updater_.UpdateCommandEnabled(IDC_TAB_SEARCH_CLOSE,
......
......@@ -116,7 +116,6 @@ TabStripRegionView::TabStripRegionView(std::unique_ptr<TabStrip> tab_strip) {
views::MaximumFlexSizeRule::kUnbounded));
if (base::FeatureList::IsEnabled(features::kTabSearch) &&
!tab_strip_->controller()->GetProfile()->IsIncognitoProfile() &&
tab_strip_->controller()->GetBrowser()->is_type_normal()) {
auto tab_search_button = std::make_unique<TabSearchButton>(tab_strip_);
tab_search_button->SetTooltipText(
......
......@@ -89,15 +89,6 @@ IN_PROC_BROWSER_TEST_F(TabSearchButtonBrowserTest, TestBubbleVisible) {
RunUntilBubbleWidgetDestroyed();
}
IN_PROC_BROWSER_TEST_F(TabSearchButtonBrowserTest, BubbleNotVisibleIncognito) {
Browser* incognito_browser = CreateIncognitoBrowser();
BrowserView* incognito_browser_view =
BrowserView::GetBrowserViewForBrowser(incognito_browser);
// The Tab Search button should not be available on incognito browsers.
EXPECT_EQ(nullptr, incognito_browser_view->GetTabSearchButton());
}
// On macOS, most accelerators are handled by CommandDispatcher.
#if !defined(OS_MAC)
IN_PROC_BROWSER_TEST_F(TabSearchButtonBrowserTest, TestBubbleKeyboardShortcut) {
......
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