123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- --- 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 "build/chromeos_buildflags.h"
- @@ -70,10 +71,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) {
- --- a/chrome/browser/ungoogled_flag_choices.h
- +++ b/chrome/browser/ungoogled_flag_choices.h
- @@ -34,4 +34,10 @@ const FeatureEntry::Choice kScrollEventC
- "scroll-tabs",
- "never"}
- };
- +const FeatureEntry::Choice kBookmarkBarNewTab[] = {
- + {flags_ui::kGenericExperimentChoiceDefault, "", ""},
- + {"Never",
- + "bookmark-bar-ntp",
- + "never"},
- +};
- #endif // CHROME_BROWSER_UNGOOGLED_FLAG_CHOICES_H_
- --- a/chrome/browser/ungoogled_flag_entries.h
- +++ b/chrome/browser/ungoogled_flag_entries.h
- @@ -36,4 +36,8 @@
- "Scroll switches tab",
- "Switch to the left/right tab if the wheel-scroll happens over the tabstrip, or the empty space beside the tabstrip. ungoogled-chromium flag.",
- kOsDesktop, MULTI_VALUE_TYPE(kScrollEventChangesTab)},
- + {"bookmark-bar-ntp",
- + "Bookmark Bar on New-Tab-Page",
- + "Disable the Bookmark Bar on the New-Tab-Page. ungoogled-chromium flag.",
- + kOsDesktop, MULTI_VALUE_TYPE(kBookmarkBarNewTab)},
- #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
|