Commit Graph
42 Commits
Author SHA1 Message Date
AlexeyBarabash b8f04fec8a [cr148][Android] Fixed gn_check fail at host_content_settings_map_unittest.cc
Error message was:
```
ERROR at //chrome/browser/content_settings/host_content_settings_map_unittest.cc:79:11: Can't include this header from here.
          ^----------------------------------
The target:
  //chrome/browser/content_settings:unit_tests
is including a file from the target:
  //brave/extensions:common

It's usually best to depend directly on the destination target.
In some cases, the destination target is considered a subcomponent
of an intermediate target. In this case, the intermediate target
should depend publicly on the destination to forward the ability
to include headers.

Dependency chain (there may also be others):
  //chrome/browser/content_settings:unit_tests -->
  //chrome/browser:browser --[private]-->
  //brave/extensions:common
```

In upstream Chromium, extensions/common/url_pattern_set.h
belongs to //extensions/common which is a real target.
But on Android where enable_extensions=false, that target
doesn't exist/isn't built. So effectively, on Android, the
header has no upstream owner — and Brave's source_set
//brave/extensions:common "claims" to make it available.

Source
chrome/browser/content_settings/host_content_settings_map_unittest.cc
is at
//chrome/browser/content_settings:unit_tests
but does not depend on //brave/extensions:common .
This is the complain of the gn_check.

The purpose of deprecated_visibility_allowed is only to prevent
new uses of url_pattern_set, current commit doesn't introduce that.

The upside - no need to patch chrome/browser/content_settings:unit_tests,
as depenence is visible through
//chrome/browser/content_settings:unit_tests  -->
//chrome/browser:browser                      -->
//chrome/browser:browser_public_dependencies

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/7307848029fabb938e5cce51d0e3581d1096a58b

commit 7307848029fabb938e5cce51d0e3581d1096a58b
Author: Joel Hockey <joelhockey@chromium.org>
Date:   Mon Mar 16 18:26:20 2026 -0700

    Add new ExtensionInstallTimePermissionProvider

    It provides the status of permissions which are enabled via
    extension manifests.  Current analysis shows that only
    geolocation and notifications are relevant.

    With support for extensions in desktop android, the SiteSettings page should show when extensions have permissions enabled.  Desktop looks
    up these permissions via site_settings_helper GetPermissionResultForOriginWithoutContext(), but it can be done
    via HostContentsSettingsMap by adding this new provider.

    Bug: 40215363
    Bug: 458227842
    Change-Id: I4528923a56d0d20e1ab8a166dd729d4accc50d48
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7627082
    Reviewed-by: Elias Klim <elklm@chromium.org>
    Commit-Queue: Joel Hockey <joelhockey@chromium.org>
    Reviewed-by: Sam McNally <sammc@chromium.org>
    Reviewed-by: Reilly Grant <reillyg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1600254}
2026-04-27 12:00:52 +01:00
Kyle Hickinson ac9554c379 [CodeHealth] Convert url sanitizer into a layered component (#31706)
- Everything in `browser` → `core/browser`
- Everything in `common` → `core/common`
- Moved unit test target to `brave_components_unittests`

This will enable moving iOS bridges into the component in the future
2025-10-09 10:40:54 -04:00
Brian Johnson 181d7e17e1 Cleanup some incorrect usage of //extensions/common from android and ios (#30251) 2025-07-24 16:26:36 -07:00
AlexeyBarabash 5749232eaa Fixed gn check error
```
ERROR at //extensions/common/constants.cc:13:11: Can't include this header from here.
          ^--------------------------
The target:
  //brave/extensions:common
is including a file from the target:
  //build:chromeos_buildflags

It's usually best to depend directly on the destination target.
In some cases, the destination target is considered a subcomponent
of an intermediate target. In this case, the intermediate target
should depend publicly on the destination to forward the ability
to include headers.

Dependency chain (there may also be others):
  //brave/extensions:common -->
  //base:base --[private]-->
  //base:rust_logger --[private]-->
  //build:chromeos_buildflags
```
2025-06-11 17:07:43 -04:00
Claudio DeSouza 5f743cf53f url_constants.cc deleted
All constants in that header are now `constexpr`. This change moves the
brave constant being appended through an override to the header.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/c6f2561d8fa102a5fc1677a94244b76528ad5a78

commit c6f2561d8fa102a5fc1677a94244b76528ad5a78
Author: Avi Drissman <avi@chromium.org>
Date:   Wed Jul 3 19:03:12 2024 +0000

    Use base::FixedFlatSet in content

    Bug: none
2024-08-07 21:31:28 -04:00
mkarolin b08e107e90 Fixes presubmit license headers warnings. 2023-09-06 12:38:50 +01:00
Claudio DeSouza 9f51d666ce Fix transient inclusion vr build flags
A public //content header for url constantly was transiently making vr
buildflags a dependency. This change adds that dependency to
//brave/extensions:common.

Chromium change:
https://chromium.googlesource.com/chromium/src/+/c4eee9a301891f6ad397f49add6ad33a19a96a6a

commit c4eee9a301891f6ad397f49add6ad33a19a96a6a
Author: Mahmoud Ahmed <mahmoudaahmedd@gmail.com>
Date:   Fri Jul 21 17:19:24 2023 +0000

    Introduces the initial version of the WebXR Internals debugging page

    Summary:
    This commit introduces the initial version of the WebXR Internals
    debugging page. The page will display relevant information and data
    for debugging purposes.

    The following features have been implemented:

     - Device Info: Displays information about the user's system,
       including GPU driver, GPU vendor ID, operating system name and OS
       version.

    Further work is needed to complete the remaining attributes in the XR
    Session Info section and integrate data fetching from the Blink module
    for the interactive charts.

    Bug: 1458661
2023-09-06 12:38:48 +01:00
bridiver 3a87babb9b fix android deps for gn check 2022-12-22 20:09:10 -07:00
samartnik 1069fb2535 New assert check was added for extensions_enabled
Chromium change:
chromium/chromium@c7d760c

[Extensions] Add assert(extensions_enabled) in extensions BUILD.gns
There were two extensions BUILD.gn files that we couldn't
assert(extensions_enabled) in: extensions/BUILD.gn and
extensions/common/BUILD.gn. This was because of dependencies on
extensions that weren't properly guarded by
`#if BUILDFLAG(ENABLE_EXTENSIONS)`. Following recent CLs, we can now
fix this, and add the missing assertions to these two build files.

Bug: 731689
2022-03-18 20:04:05 -04:00
Kyle Hickinson 5c61998691 [iOS] Add BraveServiceKey to brave proxy urls 2022-02-15 10:32:18 -05:00
Mark Pilgrim f44782000c Implement debouncing 2021-09-09 21:39:25 -04:00
Gyuyoung Kim 230c3be3f2 Fix deps in //brave/extensions
Resolves brave/brave-browser#10698.
2020-09-11 14:07:49 +09:00
bridiver f13ca8e6c3 misc extension fixes
remove unused patch
2020-08-06 17:32:23 -04:00
mkarolin ffc6cef477 Code Review: [Android] Fixes //brave/extensions:common deps. 2020-08-06 17:32:20 -04:00
samartnik 9d6e1be5a0 [Android] Added dependency for extentions
Otherwise there is an error:

In file included from ../../extensions/common/url_pattern.cc:19:
In file included from ../../extensions/common/constants.h:10:
In file included from gen/components/services/app_service/public/mojom/types.mojom.h:34:
In file included from gen/ui/gfx/image/mojom/image.mojom.h:31:
In file included from gen/ui/gfx/image/mojom/image.mojom-forward.h:41:
In file included from ../../ui/gfx/image/mojom/image_skia_mojom_traits.h:12:
In file included from ../../skia/public/mojom/bitmap_skbitmap_mojom_traits.h:14:
In file included from ../../skia/public/mojom/image_info_mojom_traits.h:12:
../../third_party/skia/include/core/SkImageInfo.h:11:10: fatal error: 'include/core/SkColorSpace.h' file not found
2020-08-06 17:31:59 -04:00
Pranjal Jumde 9c2501854e Fix 9365: Add gn check to npm scripts 2020-07-20 09:58:02 -07:00
Anthony Tseng 26277afbd2 Add missing deps for //components/sync/driver and
add ios guards to //brave/common
2020-06-12 16:35:08 -07:00
Simon Hong a3ed63a640 Delete deprecated BraveNativeExtensionBindingsSystem
With refactoing shields methods, each shields settings api has
their own method instead of using general get/set apis.
2019-11-04 09:46:09 +09:00
mkarolin 36d9ea29bc extensions::APIRequestHandler::StartRequest signature change.
No longer needs `thread` param.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/16395195c71cc831e85e10524f2c18311b325df5

commit 16395195c71cc831e85e10524f2c18311b325df5
Author: Clark DuVall <cduvall@chromium.org>
Date:   Tue Jul 30 18:04:24 2019 +0000

    Remove unused IOThreadExtensionFunction

    This also merges UIThreadExtensionFunction and ExtensionFunction since
    there's no need for them to be separate anymore. This was made possible
    because WebRequest has moved to the UI thread, and it was the only API
    using IOThreadExtensionFunction.

    Follow up CL will remove references to UIThreadExtensionFunction.

    Bug: 980774
2019-10-09 21:50:28 -04:00
Jocelyn Liu 1022dd9798 lint and clang format 2019-10-02 13:26:56 -07:00
Jocelyn Liu b6fe6d83bf Create brave's extensions browser client to remove patching chrome_extensions_browser_client.cc 2019-10-02 13:26:55 -07:00
Max Karolinskiy 7d38f211bc Lint fixes. 2019-09-06 13:25:38 -04:00
Max Karolinskiy aaed1c9982 APISignature::ParseArgumentsToJSON signature change.
The method now returns a struct instrad of having mutliple out params.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/4ed01619c8ae43d3a1ef1f8acd713aa6aaa3530b

commit 4ed01619c8ae43d3a1ef1f8acd713aa6aaa3530b
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date:   Thu Jul 18 17:41:55 2019 +0000

    [Extensions Bindings] Return a struct from APISignature parsing methods

    Make APISignature::ParseArgumentsToJSON(),
    APISignature::ParseArgumentsToV8(), and
    APISignature::ConvertArgumentsIgnoringSchema() return a struct
    containing the parse results, including arguments, error, and
    async response type (callback if one were provided).

    This will make it easier when we need to provide additional information
    about if a promise should be returned.

    No behavior change is expected.

    Bug: 978538
2019-09-05 21:22:11 -04:00
bridiver 28d03b7d03 use chromium cookie settings
related https://github.com/brave/brave-browser/issues/2351
2019-08-15 12:44:35 -07:00
Simon Hong 2ab4d0d738 Fix brave/extensions/renderer build error
Add proper dependency list.
2018-09-30 05:24:24 +09:00
Simon Hong 8697769492 Add Get/Set contentSettings api to BraveShields
Newly addied apis set content settings to user preference instead of
ContentSettingsStore.
Also, previously set value in extension's ContentSettingsStore is
deleted when user changes current setting.
2018-09-28 15:47:18 -04:00
bridiver 038a31cb65 extensions dep cleanup 2018-06-13 18:24:26 -07:00
bridiver d1849f394d simply patch for content setting prefs update 2018-06-13 17:43:02 -07:00
Brian R. Bondy 3c046d3a41 Allow progressive web apps (PWAs) 2018-06-06 01:24:37 -04:00
Brian R. Bondy 004aa316f3 Merge pull request #128 from brave/c67
Upgrade to Chromium 67.0.3396.62
2018-06-04 18:07:21 -04:00
Brian R. Bondy 2382d4ff1c Allow chormedriver to run e2e extension tests
Fix https://github.com/brave/brave-browser/issues/268
2018-06-04 16:39:51 -04:00
Emerick Rogul ba8d6b4c59 Reference Ad Block component id and public key from regional list 2018-06-04 11:24:43 -04:00
Emerick Rogul 18e62d0949 Fix blacklist/whitelist tests referring to wrong class 2018-06-04 10:51:38 -04:00
Simon Hong 91d047434c Fix compile error of brave_browser_tests target (#127)
* Fix compile error of brave_browser_tests target

Add missing base/strings/utf_string_conversions.h header.

* Update brave_extension_provider_browsertest.cc
2018-06-04 09:26:48 -04:00
Brian R. Bondy 0bbe939175 brave-core changes for Chromium 67.0.3396.62 2018-06-04 01:37:51 -04:00
Brian R. Bondy 081878c297 Add test for loading a PDF file with PDF.js 2018-06-01 13:10:26 -04:00
Brian R. Bondy 1d1753140f Install PDF.js by default
Fix https://github.com/brave/brave-browser/issues/255
2018-06-01 13:10:10 -04:00
Simon Hong efec64c292 Remove identical methods with parent methods in BraveExtensionProvider
BraveExtensionProvider::MustRemainDisabled() that always returns false
seems fine. So can be removed.
2018-06-01 02:59:30 +09:00
Simon Hong df181e5ad7 Enable debug build
Avoid file I/O in UI thread.
2018-05-31 12:44:10 +09:00
Brian R. Bondy c4329ab692 Add tests for extension whitelist 2018-05-17 00:49:07 -04:00
Brian R. Bondy 5eae9c748e Support whitelist for extensions
Fix https://github.com/brave/brave-browser/issues/196
2018-05-17 00:49:06 -04:00
Jocelyn Liu c28967d264 Subclass ExtensionPrefs 2018-03-22 12:48:36 -07:00