Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Get more extensions link to brave://settings (uplift to 0.69.x) #3231

Merged
merged 1 commit into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/brave_generated_resources.grd
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,9 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U
<message name="IDS_SETTINGS_MANAGE_EXTENSIONS_LABEL" desc="The label of manage extensions link in settings">
Manage extensions
</message>
<message name="IDS_BRAVE_SETTINGS_GET_MORE_EXTENSIONS_LABEL" desc="The label of get more extensions link in settings">
Get more extensions
</message>
<!-- Extensions page strings -->
<message name="IDS_MD_EXTENSIONS_BRAVE_ITEM_SOURCE_WEBSTORE" desc="The text to indicate that an extension is from the Web Extensions Store.">
Web Extensions Store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@
label="$i18n{manageExtensionsLabel}" on-click="openExtensionsPage_">
</cr-link-row>
</div>
<div class="settings-row" id="getMoreExtensionsRow">
<cr-link-row
label="$i18n{getMoreExtensionsLabel}"
sub-label="$i18n{getMoreExtensionsSubLabel}"
on-click="openWebStoreUrl_" external>
</cr-link-row>
</div>
<template is="dom-if" if="{{ showRestartToast }}">
<div id="needsRestart">
<div class="flex-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,9 @@ Polymer({
openExtensionsPage_: function() {
window.open("chrome://extensions", "_self");
},

openWebStoreUrl_: function() {
window.open(loadTimeData.getString('getMoreExtensionsUrl'));
},
});
})();
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ void BraveAddLocalizedStrings(content::WebUIDataSource*, Profile*);

#include "brave/browser/ui/webui/brave_settings_ui.h"
#include "brave/grit/brave_generated_resources.h"
#include "chrome/grit/chromium_strings.h"
#include "extensions/common/extension_urls.h"

namespace settings {

Expand Down Expand Up @@ -129,12 +131,22 @@ void BraveAddCommonStrings(content::WebUIDataSource* html_source,
{"relaunchButtonLabel",
IDS_SETTINGS_RELAUNCH_BUTTON_LABEL},
{"manageExtensionsLabel",
IDS_SETTINGS_MANAGE_EXTENSIONS_LABEL}
IDS_SETTINGS_MANAGE_EXTENSIONS_LABEL},
{"getMoreExtensionsLabel",
IDS_BRAVE_SETTINGS_GET_MORE_EXTENSIONS_LABEL},
{"getMoreExtensionsSubLabel",
IDS_EXTENSIONS_SIDEBAR_OPEN_CHROME_WEB_STORE}
};
AddLocalizedStringsBulk(html_source, localized_strings,
base::size(localized_strings));
html_source->AddString("webRTCLearnMoreURL",
base::ASCIIToUTF16(kWebRTCLearnMoreURL));
html_source->AddString("getMoreExtensionsUrl",
base::ASCIIToUTF16(
google_util::AppendGoogleLocaleParam(
GURL(extension_urls::GetWebstoreExtensionsCategoryURL()),
g_browser_process->GetApplicationLocale())
.spec()));
}

void BraveAddResources(content::WebUIDataSource* html_source,
Expand Down