Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zhmars:arch
chromium122
0001-add-flag-for-bookmark-bar-ntp.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-add-flag-for-bookmark-bar-ntp.patch of Package chromium122
Index: chromium/chrome/browser/about_flags.cc =================================================================== --- chromium.orig/chrome/browser/about_flags.cc +++ chromium/chrome/browser/about_flags.cc @@ -377,6 +377,13 @@ const FeatureEntry::Choice kScrollEventC "never"} }; +const FeatureEntry::Choice kBookmarkBarNewTab[] = { + {flags_ui::kGenericExperimentChoiceDefault, "", ""}, + {"Never", + "bookmark-bar-ntp", + "never"}, +}; + #if defined(USE_AURA) const FeatureEntry::Choice kPullToRefreshChoices[] = { {flags_ui::kGenericExperimentChoiceDefault, "", ""}, @@ -3905,6 +3912,11 @@ const FeatureEntry kFeatureEntries[] = { "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)}, + {variations::switches::kEnableBenchmarking, flag_descriptions::kEnableBenchmarkingName, flag_descriptions::kEnableBenchmarkingDescription, kOsAll, Index: chromium/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc =================================================================== --- chromium.orig/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc +++ chromium/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) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor