1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- --- a/chrome/browser/about_flags.cc
- +++ b/chrome/browser/about_flags.cc
- @@ -288,6 +288,13 @@ const FeatureEntry::Choice kPDFPluginNam
- {"Microsoft Edge", switches::kPDFPluginName, "edge"},
- };
-
- +const FeatureEntry::Choice kBookmarkBarNewTab[] = {
- + {flags_ui::kGenericExperimentChoiceDefault, "", ""},
- + {"Never",
- + "bookmark-bar-ntp",
- + "never"},
- +};
- +
- const FeatureEntry::Choice kTouchEventFeatureDetectionChoices[] = {
- {flags_ui::kGenericExperimentChoiceDisabled, "", ""},
- {flags_ui::kGenericExperimentChoiceEnabled,
- @@ -2072,6 +2079,12 @@ const FeatureEntry kFeatureEntries[] = {
- {"focus-mode", flag_descriptions::kFocusMode,
- flag_descriptions::kFocusModeDescription, kOsDesktop,
- FEATURE_VALUE_TYPE(features::kFocusMode)},
- +
- + {"bookmark-bar-ntp",
- + "Bookmark Bar on New-Tab-Page",
- + "Disable the Bookmark Bar on the New-Tab-Page", kOsDesktop,
- + MULTI_VALUE_TYPE(kBookmarkBarNewTab)},
- +
- {"touch-events", flag_descriptions::kTouchEventsName,
- flag_descriptions::kTouchEventsDescription, kOsDesktop,
- MULTI_VALUE_TYPE(kTouchEventFeatureDetectionChoices)},
- --- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
- +++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
- @@ -4,6 +4,7 @@
-
- #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
-
- +#include "base/command_line.h"
- #include "base/observer_list.h"
- #include "build/build_config.h"
- #include "chrome/browser/bookmarks/bookmark_model_factory.h"
- @@ -71,10 +72,12 @@ bool BookmarkTabHelper::ShouldShowBookma
- !prefs->GetBoolean(bookmarks::prefs::kShowBookmarkBar))
- return false;
-
- + const std::string flag_value =
- + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII("bookmark-bar-ntp");
- // The bookmark bar is only shown on the NTP if the user
- // has added something to it.
- return IsNTP(web_contents()) && bookmark_model_ &&
- - bookmark_model_->HasBookmarks();
- + bookmark_model_->HasBookmarks() && (flag_value != "never");
- }
-
- void BookmarkTabHelper::AddObserver(BookmarkTabHelperObserver* observer) {
|