Commit 51f113ec authored by Bret Sepulveda's avatar Bret Sepulveda Committed by Commit Bot

Add finch control for the new tab button position in Refresh.

We need to be able to change this later without a merge.

Bug: 848420
Change-Id: Ie4f50f6a919e5e4e761c364776c702d40513637d
Reviewed-on: https://chromium-review.googlesource.com/1111209Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Commit-Queue: Bret Sepulveda <bsep@chromium.org>
Cr-Commit-Position: refs/heads/master@{#569667}
parent 2f1bec8f
......@@ -8,6 +8,7 @@
#include "base/auto_reset.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/macros.h"
#include "base/metrics/user_metrics.h"
#include "build/build_config.h"
......@@ -61,6 +62,9 @@ using content::WebContents;
namespace {
const base::Feature kRefreshNewTabButtonAfterTabs = {
"RefreshNewTabButtonAfterTabs", base::FEATURE_DISABLED_BY_DEFAULT};
bool DetermineTabStripLayoutStacked(PrefService* prefs, bool* adjust_layout) {
*adjust_layout = false;
// For ash, always allow entering stacked mode.
......@@ -309,8 +313,10 @@ bool BrowserTabStripController::IsCompatibleWith(TabStrip* other) const {
NewTabButtonPosition BrowserTabStripController::GetNewTabButtonPosition()
const {
if (!ui::MaterialDesignController::IsRefreshUi())
if (!ui::MaterialDesignController::IsRefreshUi() ||
base::FeatureList::IsEnabled(kRefreshNewTabButtonAfterTabs)) {
return AFTER_TABS;
}
return GetFrameView()->CaptionButtonsOnLeadingEdge() ? TRAILING : LEADING;
}
......
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