-
Notifications
You must be signed in to change notification settings - Fork 905
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates extensions store link language on the extensions page. Adds
link to the store even if there are installed extensions. Fixes brave/brave-browser#2497 Fixes brave/brave-browser#1013
- Loading branch information
Showing
5 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
chromium_src/chrome/browser/ui/webui/extensions/extensions_ui.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
#include "brave/grit/brave_generated_resources.h" | ||
#include "content/public/browser/web_ui_data_source.h" | ||
|
||
// Forward declarations needed due to extensions_ui.cc being patched with this | ||
// function name. | ||
namespace extensions { | ||
namespace { | ||
void BraveAddLocalizedStrings(content::WebUIDataSource* html_source); | ||
} // namespace | ||
} // namespace extensions | ||
|
||
#include "../../../../../../chrome/browser/ui/webui/extensions/extensions_ui.cc" | ||
|
||
namespace extensions { | ||
|
||
namespace { | ||
|
||
void BraveAddLocalizedStrings(content::WebUIDataSource* html_source) { | ||
html_source->AddLocalizedString("moreExtensions", | ||
IDS_MD_EXTENSIONS_BRAVE_MORE_EXTENSIONS); | ||
} | ||
|
||
} // namespace | ||
|
||
} // namespace extensions |
18 changes: 18 additions & 0 deletions
18
patches/chrome-browser-resources-md_extensions-item_list.html.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/chrome/browser/resources/md_extensions/item_list.html b/chrome/browser/resources/md_extensions/item_list.html | ||
index 90244de120cf8fda71002f535810619b1e8aeb3e..84450aca34abf7b55e1289b8716b81d5323e6ec0 100644 | ||
--- a/chrome/browser/resources/md_extensions/item_list.html | ||
+++ b/chrome/browser/resources/md_extensions/item_list.html | ||
@@ -106,6 +106,13 @@ | ||
</template> | ||
</div> | ||
</div> | ||
+ <div id="more-items" class="empty-list-message" style="margin-top: 32px;" | ||
+ hidden$="[[shouldShowEmptyItemsMessage_( | ||
+ apps.length, extensions.length)]]"> | ||
+ <span> | ||
+ $i18nRaw{moreExtensions} | ||
+ </span> | ||
+ </div> | ||
</div> | ||
</div> | ||
</template> |
12 changes: 12 additions & 0 deletions
12
patches/chrome-browser-ui-webui-extensions-extensions_ui.cc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/chrome/browser/ui/webui/extensions/extensions_ui.cc b/chrome/browser/ui/webui/extensions/extensions_ui.cc | ||
index 393653d66928e306bfdf479d6e0fd194655e783c..cc330c1194b80b775e4de82c19d7aa373b8f2270 100644 | ||
--- a/chrome/browser/ui/webui/extensions/extensions_ui.cc | ||
+++ b/chrome/browser/ui/webui/extensions/extensions_ui.cc | ||
@@ -348,6 +348,7 @@ ExtensionsUI::ExtensionsUI(content::WebUI* web_ui) : WebUIController(web_ui) { | ||
base::Bind(&ExtensionsUI::OnDevModeChanged, base::Unretained(this))); | ||
|
||
source = CreateMdExtensionsSource(*in_dev_mode_); | ||
+ BraveAddLocalizedStrings(source); | ||
|
||
#if defined(OS_CHROMEOS) | ||
auto kiosk_app_handler = std::make_unique<chromeos::KioskAppsHandler>( |