This bootstrap script will allows us to have a stable environment
across all bots runnning toolchain scripts.
The basics of this script is that we can chain it with the toolchain
ones, and it takes care that we have a valid `vpython` install to run
our tools on. It is possible to use both a url to download a script, or
to provide a local one.
This is being done to correct some of the issues we are having in CI
with python deps, but it will also permit us to come up with subrevision
schemes for toolchains that take into account the hashing of the
builder.
Bug: https://github.com/brave/brave-browser/issues/55812
To add a new BraveVpnService implementation based on Architecture 2.0,
which must co-exist with Architecture 1.0 for quite a while, we need
to split service's interface and implementation. All the external
components will keep accessing VPN service via the BraveVpnService
interface, but the implementation mostly goes into BraveVpnServiceImpl.
This change moves ClearSubscriberCredential from a helper located in
a "browser" directory, to utils located in a "common" directory. This
function is used outside of the Brave VPN targes, so an additional
dependency on V1's "browser" there is unnecessary.
Implements part of https://github.com/brave/brave-browser/issues/54597
This PR disables the hook for downloading the Mac toolchain, that can be
only used by Google employees, as that hook own output was quit
confusing, as it preceeded our own hook being run.
We are also disabling downloading the hermetic toolchain for ios
checkouts. IOS builds do not use the hermetic tooolchain, and recently
we've run into significant issues in CI relating to that.
https://github.com/brave/brave-browser/issues/55812
This change adds a dedicated `WebGLExtensionHandler` handler to handle farbling around WebGL's `getSupportedExtensions` and `getExtension` calls. The handler is instantiated taking into account different levels of fingerprinting protections as follows:
#### 1) Balanced fingerprinting protections:
- [WebGLBalancedFingerprintingProtection](https://sourcegraph.com/r/github.com/brave/brave-core/-/blob/chromium_src/third_party/blink/common/features.cc?L63) **enabled**: calls to `getSupportedExtensions` will injects a fake extension to the list and will keep this new list consistent till the lifetime of that handler. Calls to getExtension on the fake extension would return a fake `ScriptObject` with the name of the fake extension in CamelCase.
- [WebGLBalancedFingerprintingProtection](https://sourcegraph.com/r/github.com/brave/brave-core/-/blob/chromium_src/third_party/blink/common/features.cc?L63) **disabled**: No change in behaviour i.e we don't farble and return the true list of supported extensions.
#### 2) Maximum fingerprinting protections:
- No change in behaviour i.e we continue to return a single entry for the getSupportedExtensions call viz. WEBGL_debug_renderer_info.
#### 3) No fingerprinting protections:
- No change in behaviour. We return the true list of supported extensions.
Please note that this is part of the change from the bigger [PR](https://github.com/brave/brave-core/pull/36605). The `WebGLExtensionHandler` would later be created by [BraveSessionCache](https://sourcegraph.com/r/github.com/brave/brave-core/-/blob/third_party/blink/renderer/core/farbling/brave_session_cache.h). This integration with `BraveSessionCache` and then with `WebGLRenderingContextBase` would be followed in later CLs.
This change also adds unit_tests for the same. Browser tests would be followed up later once we have the full integration complete.
<!-- Add brave-browser issue below that this PR will resolve -->
Related https://github.com/brave/brave-browser/issues/55858
* Remove #define in c/b/ui/accelerator_table.cc
Replaces #define macro with plaster + chromium_src override.
plaster will rename GetAcceleratorList() to GetAcceleratorList_ChromiumImpl()
so that we can have our own implementation of GetAcceleratorList().
* Remote model fetch and parsing.
* Applied review suggestions
* feat(ai_chat): update remote model parser to server capabilities format
* feat(ai_chat): address review feedback on RemoteModelsFetcher
This removes the newly added auth check when the Private Tabs > Require Face ID setting is enabled which could conflict with Browser Lock and leave the user stuck on the launch screen
Resource components were registered with the component updater but never
explicitly unregistered, causing it to keep downloading updates for
country and language models even after the ads service shut down or the
user opted out of notification ads. Components are now unregistered in
OnPrefChanged when the service becomes ineligible, and the language
component is additionally unregistered immediately when the user opts
out of notification ads while the service is still running.
To add a new BraveVpnService implementation based on Architecture 2.0,
which must co-exist with Architecture 1.0 for quite a while, we need
to split service's interface and implementation. All the external
components will keep accessing VPN service via the BraveVpnService
interface, but the implementation mostly goes into BraveVpnServiceImpl.
This incremental change splits "brave_vpn" target into two:
- "brave_vpn" itself, shared between V1 and V2 implementations.
- "v1_utils", a strictly V1 target, currently containing the VPN
connection manager utility code for Architecture 1.0.
Most existing targets will continue depending on the shared
"brave_vpn"; "v1_utils" is used only in the specific place where V1
connection manager creation is done, and will be later gated by a
buildflag.
Implements part of https://github.com/brave/brave-browser/issues/54597
The RFC suggests a maximum chunk size of 16,384 bytes. If a request is made with
a plaintext length that is greater than the limit, split it up into 15kb chunks and
encrypt them individually.
URL response handlers previously returned anonymous pairs of a message
string and a retry flag, making it unclear at call sites what each
value represented. Handlers now return UrlResponseResult<T>, carrying
either the success value or a UrlResponseErrorInfo with named fields,
making intent obvious and reducing the chance of mistakes.
The migration that cleared kMaximumNotificationAdsPerHour and opted the
user out of notification ads when the value was zero was added in
08/2023. The migration has been in place long enough that all affected
users have upgraded, so remove it.
Resolvesbrave/brave-browser#55848
Add a new modal for selecting Polkadot networks, which then grabs the correct
chain id for ss58 address generation and also the correct block explorer URL.
For Polkadot, the main block explorer we use will set parachain-specific
subdomains.
Update how we handle chain metadata by returning the CXX-generated struct
directly and relocating the definition of the runtime parsing routines, removing
the need for intermediate structs. We also add defaulted implementations of the
default constructor and equality operators. We update the code to provide direct
access to the CxxPolkadotChainMetadata data members via the arrow operator,
which removes the need for getters.
This is motivated by the number of fields attached the metadata growing
substantially over time.
`BraveOriginPolicyManager::Init` was only called lazily from
`BraveOriginServiceFactory::BuildServiceInstanceForBrowserContext`,
which runs during profile keyed-service build. Profile pref-store init
waits on `PolicyService::IsInitializationComplete`, which waits on
`BraveProfilePolicyProvider::IsInitializationComplete`, which gates on
`manager->IsInitialized()` -- and that's only flipped by the lazy call
that itself is gated on profile build. Cycle manifests as "stuck on
profile selection screen" for some users.
Initialize the manager eagerly at the end of `BraveBrowserProcessImpl::Init()`,
right next to the existing `AdBlockOnlyModePolicyManager::Init` call. The
factory's lazy `if (!IsInitialized()) Init(...)` block stays as a backstop
for tests that bypass `BraveBrowserProcessImpl`.
Resolves: https://github.com/brave/brave-browser/issues/55733
Calling chrome::ShowSettingsSubPageForProfile inline from the SKU
CredentialSummary mojo reply runs during the same dispatch frame that
just fired SetPurchased() — which reloads managed prefs via the policy
provider observer chain. Opening a settings tab synchronously from that
mid-cascade state has produced BackupRefPtr dangling raw_ptr crashes
when the Refresh button on account.brave.com first detects a purchase.
Set did_open_origin_settings_ before posting and let the helper run on
the next loop iteration; the WeakPtr guards against the service being
torn down between the post and the run.
Also drop a stray LOG(ERROR) debug print left in OnCredentialSummary.
Fixesbrave/brave-browser#55632