Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/ea58b457dd75daeeba5911a5b32b2cef7a5ed3c9
commit ea58b457dd75daeeba5911a5b32b2cef7a5ed3c9
Author: Istiaque Ahmed <lazyboy@chromium.org>
Date: Wed Nov 3 17:33:47 2021 +0000
[Extensions] RunFunctionAndReturnSingleResult returns owned result.
This CL makes
extension_function_test_utils::RunFunctionAndReturnSingleResult return
std::unique_ptr instead of unowned base::Value*. This will make the
"result" to never leak.
Bug: 1263370
This change upstream was motivated by the work on MPArch, meaning
that we need to rely on the ForEachRenderFrameHost() methods now,
as well adapt tests where needed.
Chromium change:
https://github.com/chromium/chromium/commit/4e3a62323f0487be3ea815396281bc306c0445f6
commit 4e3a62323f0487be3ea815396281bc306c0445f6
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed Oct 27 16:14:02 2021 +0000
Rewrite Extension url checking to use ForEachRenderFrameHost.
Replace last usage of GetAllFrames with ForEachRenderFrameHost. The
debugger API checks that each frame has may attach to the URL, change
this to iterate all frames from the primary main frame.
Remove deprecated API from WebContents.
BUG=1208438
This method will go away soon, so we get rid of Brave-specific
instances now to prepare for the future.
For now, this patch just makes sure we don't call the deprecated
method, but ideally we should probably make deeper changes not to
use a GURL as the type for origins, and use url::Origin instead.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/e439902e17bbd1f540f7dc7f6e3e153871c76b34
commit e439902e17bbd1f540f7dc7f6e3e153871c76b34
Author: Matt Menke <mmenke@chromium.org>
Date: Thu Oct 21 18:04:42 2021 +0000
Reporting: Remove use of GURL::DeprecatedGetOriginAsURL().
In some places this was called only to eventually convert the result
to an Origin.
Also make reporting APIs that were taking a URL only to convert it to
an origin take origins instead.
Bug: 512374
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/800532c0bf6712ea4ab5928da9e776d6607a10b1
commit 800532c0bf6712ea4ab5928da9e776d6607a10b1
Author: Mike West <mkwst@chromium.org>
Date: Thu Oct 14 09:26:52 2021 +0000
Deprecate returning a GURL from GURL::GetOrigin().
This patch renames `GURL::GetOrigin()` to
`GURL::DeprecatedGetOriginAsURL()`. A subsequent patch will
reintroduce a `GURL::GetOrigin()` that returns a `url::Origin`
rather than a `GURL`.
This patch was brought to you by sed, followed by a little manual
work to deal with look-alike methods (most notably
`CascadePriority::GetOrigin()` and `NudgeTracker::GetOrigin()`) and
two or three spots that held pointers to GURLs:
```
git grep -n -l ".GetOrigin(" | \
xargs -L1 sed -i '' \
-e 's/\.GetOrigin(/.DeprecatedGetOriginAsURL(/g'
```
Bug: 512374
Previously, the front-end would decide on the order and type of card used for each feed item. Having the mojom API return that makes it easier to have the same decisions apply to desktop and android.
Also uses strong typings from mojom es module output. Works very well with Typescript.
Now that the mojom API is feature-complete, we can remove the extension API.
Just use ListValue::Append() now.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/f138b4dac9a98f7d21cffc042e48fe3061b075ac
commit f138b4dac9a98f7d21cffc042e48fe3061b075ac
Author: Clark DuVall <cduvall@chromium.org>
Date: Wed Sep 1 18:07:05 2021 +0000
[Code Health] Remove ListValue::Append(Integer|Boolean)
This was an automated change done with a slightly modified copy of
//tools/clang/value_cleanup.
A small manual change was made to gin_java_method_invocation_helper.cc
which required casting to use the correct Append() override.
Bug: 1187102
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/a6dba25659702847866ae636d6e334cb4096c4dc
commit a6dba25659702847866ae636d6e334cb4096c4dc
Author: Alex Turner <alexmt@chromium.org>
Date: Wed Aug 18 01:29:05 2021 +0000
Move args_ to private in ExtensionFunction
Following the change in crrev.com/c/3066527, ExtensionFunction now
provides the protected methods has_args() and args(). We can therefore
now make args_ private. This requires converting a large number of
`Params::Create(*args_)` calls to `Params::Create(args())`.
Bug: 1187062
fix https://github.com/brave/brave-browser/issues/18305
Selected VPN region data is stored as dict in prefs.
Moved existing kBraveVPNShowButton pref name to brave_vpn/pref_names to
manage vpn related prefs in one place.