Skip to content

Commit

Permalink
Replace bookmark manager empty list string
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhong committed Jan 15, 2020
1 parent 601104e commit 7eade77
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
3 changes: 3 additions & 0 deletions app/brave_generated_resources.grd
Expand Up @@ -700,6 +700,9 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U
Bookmark All Tabs...
</message>
</if>
<message name="IDS_BRAVE_BOOKMARK_MANAGER_EMPTY_LIST" desc="">
To add a bookmark, click the bookmark button next to the address bar
</message>
</messages>
</release>
</grit>
14 changes: 7 additions & 7 deletions chromium_src/chrome/browser/ui/webui/bookmarks/bookmarks_ui.cc
Expand Up @@ -4,14 +4,14 @@
// you can obtain one at http://mozilla.org/MPL/2.0/.

#include "brave/browser/ui/webui/navigation_bar_data_provider.h"
#include "brave/grit/brave_generated_resources.h"
#include "content/public/browser/web_ui_data_source.h"

namespace {

void BraveCustomizeBookmarksDataSource(content::WebUIDataSource* source) {
NavigationBarDataProvider::Initialize(source);
}

} // namespace
#define BRAVE_CUSTOMIZE_BOOKMARKS_DATA_SOURCE(source) \
NavigationBarDataProvider::Initialize(source); \
source->AddLocalizedString( \
"emptyList", IDS_BRAVE_BOOKMARK_MANAGER_EMPTY_LIST);

#include "../../../../../../chrome/browser/ui/webui/bookmarks/bookmarks_ui.cc" // NOLINT

#undef BRAVE_CUSTOMIZE_BOOKMARKS_DATA_SOURCE
16 changes: 8 additions & 8 deletions patches/chrome-browser-ui-webui-bookmarks-bookmarks_ui.cc.patch
@@ -1,12 +1,12 @@
diff --git a/chrome/browser/ui/webui/bookmarks/bookmarks_ui.cc b/chrome/browser/ui/webui/bookmarks/bookmarks_ui.cc
index 094a943ac95d0f159b223d3948e3b2e4b1759e76..f378bfe93dcaa890abb2221e5f3ffbfd45401fe0 100644
index 094a943ac95d0f159b223d3948e3b2e4b1759e76..0e88121e10b4016618a11ff530beebb8009e60eb 100644
--- a/chrome/browser/ui/webui/bookmarks/bookmarks_ui.cc
+++ b/chrome/browser/ui/webui/bookmarks/bookmarks_ui.cc
@@ -46,6 +46,7 @@ content::WebUIDataSource* CreateBookmarksUIHTMLSource(Profile* profile) {
content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUIBookmarksHost);
@@ -174,6 +174,7 @@ content::WebUIDataSource* CreateBookmarksUIHTMLSource(Profile* profile) {

source->UseStringsJs();

+ BRAVE_CUSTOMIZE_BOOKMARKS_DATA_SOURCE(source)
return source;
}

+ BraveCustomizeBookmarksDataSource(source);
// Build an Accelerator to describe undo shortcut
// NOTE: the undo shortcut is also defined in bookmarks/command_manager.js
// TODO(crbug/893033): de-duplicate shortcut by moving all shortcut

0 comments on commit 7eade77

Please sign in to comment.