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

DO NOT MERGE - Copy of Fork for CI #5124

Closed
wants to merge 4 commits into from
Closed
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
2 changes: 2 additions & 0 deletions browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ source_set("browser_process") {
"//brave/components/brave_webtorrent/browser/buildflags",
"//brave/components/content_settings/core/browser",
"//brave/components/greaselion/browser/buildflags",
"//brave/components/brave_rewards/browser/buildflags",
"//brave/components/brave_sync/buildflags",
"//brave/components/ntp_background_images/browser",
"//brave/components/ntp_tiles",
"//brave/components/p3a",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,30 @@
#include "base/stl_util.h"
#include "brave/common/extensions/extension_constants.h"
#include "brave/components/brave_extension/grit/brave_extension.h"
#include "brave/components/brave_rewards/browser/buildflags/buildflags.h"
#include "brave/components/brave_sync/buildflags/buildflags.h"
#include "brave/components/brave_webtorrent/grit/brave_webtorrent_resources.h"
#include "components/grit/brave_components_resources.h"

#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
#include "brave/components/brave_rewards/resources/extension/grit/brave_rewards_extension_resources.h"
#endif

#if BUILDFLAG(ENABLE_BRAVE_SYNC)
#include "brave/components/brave_sync/grit/brave_sync_resources.h"
#include "brave/components/brave_webtorrent/grit/brave_webtorrent_resources.h"
#endif

namespace extensions {

bool IsComponentExtensionWhitelisted(const std::string& extension_id) {
const char* const kAllowed[] = {
brave_extension_id,
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
brave_rewards_extension_id,
#endif
#if BUILDFLAG(ENABLE_BRAVE_SYNC)
brave_sync_extension_id,
#endif
ethereum_remote_client_extension_id,
brave_webtorrent_extension_id
};
Expand All @@ -38,8 +50,12 @@ namespace extensions {
switch (manifest_resource_id) {
// Please keep the list in alphabetical order.
case IDR_BRAVE_EXTENSION:
#if BUILDFLAG(BRAVE_REWARDS_ENABLED)
case IDR_BRAVE_REWARDS:
#endif
#if BUILDFLAG(ENABLE_BRAVE_SYNC)
case IDR_BRAVE_SYNC_EXTENSION:
#endif
case IDR_BRAVE_WEBTORRENT:
return true;
}
Expand Down