- Update SimpleURLLoader response to pass thru error code and properly handle body
- Update SimpleURLLoader to use `DownloadToStringOfUnboundedSizeUntilCrashAndDie`
instead of expecting an arbitrary response size
- Renaming and lint fixes
Goal is to expose a few SKU SDK methods via render frame observer injection:
- `window.brave.skus.refresh_order`
- `window.brave.skus.fetch_order_credentials`
- `window.brave.skus.prepare_credentials_presentation`
- `window.brave.skus.credential_summary`
If these methods are detected by the JS SDK on the account.brave.com website, they can be
called in lieu of the methods in the JS SDK - providing a way for the credential to be
safetly be intercepted by the browser.
The first use-case for using a credential is with VPN. The VPN credential is read and
then passed through to the vendor.
`brave_content_browser_client` connects the renderer side
(`BraveSkusRenderFrameObserver` and `BraveSkusJSHandler`) to the
implementation (SkusSdkImpl) via mojom bindings (see
`RegisterBrowserInterfaceBindersForFrame`).
The implementation in this commit exposes the `refresh_order` method and
returns a dummy JSON response.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/e140256d3df3b1cb6c8d2c2d82775f67bc75d172
commit e140256d3df3b1cb6c8d2c2d82775f67bc75d172
Author: Miras Myrzakerey <myrzakereyms@google.com>
Date: Tue Oct 12 06:49:54 2021 +0000
Merge WebBundleBuilder between data_decoder:: and web_package::test::
This CL merges the functionality of a WebBundleBuilder that's used by a
WebBundler in services/data_decoder and WebBundleBuilder that's used
for testing in components/web_package/test_support. The resulting
WebBundleBuilder resides in components/web_package and used everywhere.
Bug: 1193871
The format changed from "Cannot set property '%' of %" to "Cannot
read properties of % (reading '%')") recently in V8.
This fixes the following browser test:
* SerialAPIBrowserTest.SerialAPIDisabled
V8 change:
https://chromium.googlesource.com/v8/v8/+/c0fd89c3c089e888c4f4e8582e56db7066fa779b
commit c0fd89c3c089e888c4f4e8582e56db7066fa779b
Author: Patrick Thier <pthier@chromium.org>
Date: Thu Jun 17 11:15:41 2021 +0000
Reland "Reland "Reland "Improve error messages for property access on null/undefined"""
This is a reland of 819c3ae2f87fc7ad634fe4356de6653bb3cb3b87
Original change's description:
> Reland "Reland "Improve error messages for property access on null/undefined""
>
> This is a reland of 8b18c5e6a534d7c459a16aebdd4fe05133db6dea
>
> Original change's description:
> > Reland "Improve error messages for property access on null/undefined"
> >
> > This is a reland of 24c626c1f7809ce725e56152ab2928696a2f8e9e
> >
> > Original change's description:
> > > Improve error messages for property access on null/undefined
> > >
> > > Only print the property name when accessing null/undefined if we can
> > > convert it to a string without causing side effects.
> > > If we can't, omit the property name in the error message.
> > > This should avoid confusion when the key is an object with toString().
> > > E.g. undefined[{toString:()=>'a'}] doesn't print 'read property [object
> > > Object]' anymore, which was misleading since the property accessed would
> > > be 'a', but we can't evaluate the key without side effects.
> > >
> > > Bug: v8:11365
> > > Change-Id: If82d1adb42561d4851e2bd2ca297a1c71738aee8
> > > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960211
> > > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > > Commit-Queue: Patrick Thier <pthier@chromium.org>
> > > Cr-Commit-Position: refs/heads/master@{#75250}
> >
> > Bug: v8:11365
> > Change-Id: Ie2312337f4f1915faa31528a728d90833d80dbd1
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979599
> > Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> > Commit-Queue: Patrick Thier <pthier@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#75571}
>
> Bug: v8:11365
> Change-Id: I90360641ecd870bd93247aa6d91dfb0ad049cfb8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3008219
> Auto-Submit: Patrick Thier <pthier@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75604}
Bug: v8:11365
Change-Id: I002b537144f328ccbbdcd655e26e5dc87c49c6f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3013935
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75645}
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/2d59e682ab9eb904124f5778eb8ceb3cb2a90231
commit 2d59e682ab9eb904124f5778eb8ceb3cb2a90231
Author: Anton Bikineev <bikineev@chromium.org>
Date: Tue May 18 12:29:22 2021 +0000
Deprecate base/optional.h and fix remaining mentions.
Docs are still to be updated (in a followup).
Bug: 1202909
Converted remaining cases of base::Optional to absl::optional, plus
updated DEPS file with an exception that is temporarily required
while we don't have such exception added to Chromium's toplevel DEPS
file (see commit linked below, not yet included in 92.0.4503.5).
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/9662571bb2954fb1759c49e5c45e59571cd1899e
commit 9662571bb2954fb1759c49e5c45e59571cd1899e
Author: Anton Bikineev <bikineev@chromium.org>
Date: Thu May 13 19:17:50 2021 +0000
Reland "Alias base::Optional to absl::optional"
This relands f3493eb4f80c5716ed2d7de195f710537beacc6b. The reason of the
failure: missing base// dep in some of the internal components, which
caused the branded builds to fail.
For sherrifs: the change may cause build failures on bots that are not
tested in the regular CQ pipeline. Those issues are mostly caused by
missing base// dependencies. Before reverting this change, please
consider fixing missing dependencies, similar to what the CL 2891488
does.
Original CL description:
> Alias base::Optional to absl::optional
>
> This CL does the following:
> 1) Replaces base::Optional and friends with aliases to corresponding
> entities from abseil. base::in_place is the only thing not aliased, as
> it's also used in other contexts (e.g. StructPtr in mojo).
> 2) Replaces all optional-related uses of base::in_place with
> absl::in_place.
> 3) Fixes missing headers (e.g. base/check.h) that used to be recursively
> included from base/optional.h
> 4) Also, removes forward declarations for base::Optional and instead
> includes "base/optional.h" directly. The argument is the same as for
> forward declarations of std types - the exact declaration (struct vs
> class, number of template arguments (e.g. for SFINAE)) is an
> implementation detail that can change.
>
> The CL also tries to support base/optional_unittest.cc (will be removed
> with base/optional.h) however the nocompile is already removed, since
> supporting it seems to be harder.
>
> Followup CLs will replace base::optional with absl::optional per
> component.
>
> Bug: 1202909
> Change-Id: I25b276401ceba13da35b3a0331d5ccbd338c4539
> AX-Relnotes: n/a.
> Reviewed-on:
> https://chromium-review.googlesource.com/c/chromium/src/+/2892208
> Commit-Queue: Anton Bikineev <bikineev@chromium.org>
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Owners-Override: Peter Kasting <pkasting@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#882460}
Bug: 1202909
The "base/strings/string16.h" file does no longer exist and we need
to remove all remaining usages of that type with the one from the
C++ standard library instead, like Chromium upstream already did.
Also replaces no longer needed ASCIIToUTF16 and UTF8ToUTF16 calls used
with constant strings with `u` string literals.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/7e1e44476bb361e95dc252d8428324a3feb89ecd
commit 7e1e44476bb361e95dc252d8428324a3feb89ecd
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date: Sun Mar 14 19:37:05 2021 +0000
[LSC] Remove base/strings/string16.h
This change removes base/strings/string16.h and remaining references to
it from the code base.
Bug: 1184339
Not sure this can be fixes as is due to the Chromium change below.
Need to come up with a different way of testing that the origin trial
would not work.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/529f43bc5bed70eda143373a588611acce3bc89e
commit 529f43bc5bed70eda143373a588611acce3bc89e
Author: Hayato Ito <hayato@chromium.org>
Date: Mon Dec 7 14:25:45 2020 +0000
Support WebBundle Subresource loading via Network Service
This is a follow-up to https://crrev.com/c/2560526.
This CL changes the implementation of WebBundle subresource loading
from "renderer oriented" to "network service oriented".
Before this CL, a renderer parses a WebBundle and serves a subresource
from there directly.
After this CL, they are done in the Network Service, instead of a renderer.
The motivation we're changing our design is "we should honor CORB
[1]". A renderer shouldn't have cross-origin data in their memory.
See the design doc [2] for details.
Note this CL removes
blink/renderer/platform/loader/fetch/url_loader/web_bundle_subresource_loader_test.cc,
which was already moved to
services/network/web_bundle_url_loader_factory_unittest.cc in a previous CL.
- [1]: https://source.chromium.org/chromium/chromium/src/+/master:services/network/cross_origin_read_blocking_explainer md
- [2]: https://docs.google.com/document/d/1_AqUBS4Gr45MPPtXGTUl7Q0DMIEw2zUeWO0zo6Sj0z4/edit
Bug: 1082020