We need to disable upstream's IsDuplicateOf() via a define above and
re-declare it to workaround the fact that the first parameter of the
upstream method will change into PermissionRequest_ChromiumImpl too.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/d7e4d44c73251333f1c9163480208033ace4bdbc
commit d7e4d44c73251333f1c9163480208033ace4bdbc
Author: Bret Sepulveda <bsep@chromium.org>
Date: Tue Apr 20 13:46:41 2021 +0000
Miscellaneous permissions cleanup.
This patch:
* Introduces a new method PermissionRequest::IsDuplicateOf, rather than
relying on comparing the result of GetMessageTextFragment (which
returns a human-readable string) to determine whether two requests are
duplicates.
* Makes PermissionRequest::GetMessageTextFragment desktop-only, as it
was only used elsewhere in the aforementioned duplicates logic.
* Uses std::u16string in MockPermissionRequest everywhere.
* And deletes a few bits of unused code.
Bug: 1110905
It has been merged into //extensions/browser:browser_sources now, which
is a private GN target, so we need to use //extensions/browser now.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/62bb3237d58b0797d3da2074b66fced143dd5b7c
commit 62bb3237d58b0797d3da2074b66fced143dd5b7c
Author: Ghazale Hosseinabadi <ghazale@google.com>
Date: Tue Apr 20 21:44:52 2021 +0000
[Code health] Enable gn check for declarative_net_request:*
This CL enables gn check for
//extensions/browser/api/declarative_net_request:*. This is done by
making a single target for
//extensions/browser/api/declarative_net_request:*,
//extensions/browser/api/web_request:*,
//extensions/browser/api/activity_log and
//extensions/browser:browser_sources.
Bug: 1158944
The constructor Profile::OTRProfileID::OTRProfileID is private now, so
we need a way of creating an instance from Brave's TorProfileManager
that doesn't require access to Profile::OTRProfileID's private members.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/990446325f38f9c1cdc22d6b1703aa0554089424
commit 990446325f38f9c1cdc22d6b1703aa0554089424
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Mon Apr 19 12:10:37 2021 +0000
Make OTRProfileID constructor private.
OTRProfileID constructor is made private to reduce the possibility of
using duplicate ids and making MakeUnique function more visible.
OTRProfileID::CreateUniqueForTesting() is added to be used as a
shorthand in tests since we don't need specific id prefixes in tests.
This CL does not change any behavior.
Bug: 1196661
TabMutedReason::CONTEXT_MENU was never set anyway, use the right value.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/ea0ec630d201e63a1da932442acb109eac691809
commit ea0ec630d201e63a1da932442acb109eac691809
Author: Johann <johannkoenig@google.com>
Date: Mon Apr 19 20:13:18 2021 +0000
tab muting: remove CONTEXT_MENU entry
CONTEXT_MENU is never specified when muting a tab. When muting is initiated from
the tab menu, it is associated with the site and CONTENT_SETTING is specified as
the reason. See SoundContentSettingsObserver::MuteOrUnmuteIfNecessary().
We need to use either u"..." literals or char16_t constant strings now.
Chromium changes:
https://chromium.googlesource.com/chromium/src.git/+/522370fb5f2b8ec0719a3752bcac4897164dd32d
commit 522370fb5f2b8ec0719a3752bcac4897164dd32d
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date: Fri Apr 16 17:22:39 2021 +0000
[LSC] Disallow base::ASCIIToUTF16("...") outside of tests
This change modifies base::ASCIIToUTF16 to cause compilation errors when
it is used with a string constant outside of tests. Instead, callers
should just use a UTF16 literal (u"...") instead.
Bug: 1189439
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
commit 9ca8a38a28e547d0c47630e3e56a69d06c7ab68b
Author: Peter Kasting <pkasting@chromium.org>
Date: Wed May 12 03:08:22 2021 +0000
Ban UTF8ToUTF16 on compile-time string constants.
Bug: 1189439
UpdateLastDeniedTime() and IsTooOftenDenied() have been removed now, so
we need to remove our overwrite of SetLanguageTooOftenDenied() to keep
things building.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/71887edfdf68353dfeb77524bf296143c412b5ea
commit 71887edfdf68353dfeb77524bf296143c412b5ea
Author: Anthony Cui <cuianthony@google.com>
Date: Wed Apr 14 02:14:44 2021 +0000
Remove unused translate autoblocklist-related code
This involves the removal of TranslatePrefs methods ResetDenialState,
IsTooOftenDenied and UpdateLastDeniedTime, and the DenialTimeUpdate
class (only used by UpdateLastDeniedTime). Corresponding tests, pref
updating and event reporting are also removed.
Bug: 1196868
Upstream added kSearchHistoryUrlInClearBrowsingData, so we need to
add our own definition in the url_constants.cc file.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/da0cfa74ccdedb232afd97f2fe357a869864d5ba
commit da0cfa74ccdedb232afd97f2fe357a869864d5ba
Author: Rainhard Findling <rainhard@chromium.org>
Date: Tue Apr 13 12:25:42 2021 +0000
[Search history link] Add search history string to CBD dialog
Add a new search history string to the CBD dialog that leads users to
deleting their search history.
Bug: 1192623
As the upstream change says, the only difference between those was that
kGenericProfile returned "Current user" for the tooltip text instead of
the user's name, but that's no longer the case and the default kNormal
value (i.e. "You") is good enough now, so we need to adapt.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/b07074b944d742236dca99b181ea612cd770f7fb
commit b07074b944d742236dca99b181ea612cd770f7fb
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date: Fri Apr 9 09:06:35 2021 +0000
Remove AvatarToolbarButton::State::kGenericProfile
The only difference between kGenericProfile and kNormal is the tooltip
text shown when hovering the avatar button: for kGenericProfile it's
"Current user", for kNormal it's the profile name.
However,
a) The profile name already has a good default ("You").
b) IsGenericProfile() seems half broken. It checks that there is 1
profile and that profile has the default icon. This means if the user:
- Changes their profile name, they will still see "Generic
user" (the change happens only on restart because no bserver
code is implemented).
- Changes their icon, they will start seeing the profile name,
for no apparent reason.
This CL removes kGenericProfile. States that previously returned this
value will now return kNormal, or kAnimatedUserIdentity (the identity
pill). We also use the occasion to remove one leftover file from
crrev.com/c/2794508.
Bug: 1191411
The chrome/browser/ui/toolbar/toolbar_actions_bar.h header file was
not really used from brave_action_icon_with_badge_image_source.cc,
so we can simply drop this include.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/cce6d1f1107e7893ed3b05c94ad3ea0c7ce90be7
commit cce6d1f1107e7893ed3b05c94ad3ea0c7ce90be7
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date: Fri Apr 9 01:56:00 2021 +0000
[Extensions UI] Remove ToolbarActionsBar
The ToolbarActionsBar is no longer necessary with the current
extensions toolbar UI. Remove it entirely, along with
ToolbarActionsBarDelegate.
Bug: 1165609
EvalJsWithManualReply() does not exist now and the same result can be
achieved with EvalJS() + content::EXECUTE_SCRIPT_USE_MANUAL_REPLY.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/3e40e53511bd00b43d97c04929aa7fb2b78f42e3
commit 3e40e53511bd00b43d97c04929aa7fb2b78f42e3
Author: Avi Drissman <avi@chromium.org>
Date: Fri Apr 9 17:23:30 2021 +0000
Kill EvalJsWithManualReply
It already exists as an EvalJsOption.
Bug: 1157718
Shadow color for bubble borders is dynamically calculated now and
that method does no longer exist, so remove calls to it.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/5d8609e0de1a4db416894b7edb1f2eda3436a91c
commit 5d8609e0de1a4db416894b7edb1f2eda3436a91c
Author: Elaine Chien <elainechien@chromium.org>
Date: Wed Apr 14 20:21:07 2021 +0000
Remove hardcoded SkColorSet* from bubble_border
This CL removes the hardcoded SkColorSet* in bubble_border and the
associated hardcoded default shadow color
The dynamic computation of the shadow color for bubble_border is
primarily for RoundedOmniboxResultsFrame which may use GG800 on a
light background (Instead of the default black).
This CL removes allowing setting an arbitrary shadow color and instead
standardizes shadow colors by always using GG800 on light backgrounds
and black on dark backgrounds.
Bug: 1056950, 1194617
We need to pass true to preserve the previous behaviour now.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/94e457276df130575423e518181ece753734d6b9
commit 94e457276df130575423e518181ece753734d6b9
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Tue Apr 13 12:27:51 2021 +0000
Remove default value of Profile::GetOffTheRecordProfile()
Removes the default value of the newly added |create_if_needed|
aregument of Profile::GetOffTheRecordProfile() and updates all use cases
with adding the new argument.
This CL does not change any behavior.
AX-Relnotes: n/a.
Bug: 1191315
We need to pass true to preserve the previous behaviour now.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/0362a5a3758a52999f0947f2ce65f711b39ec05f
commit 0362a5a3758a52999f0947f2ce65f711b39ec05f
Author: Ramin Halavati <rhalavati@chromium.org>
Date: Mon Mar 29 21:56:42 2021 +0000
Add |create_if_needed| to Profile::GetOffTheRecordProfile arguments.
Adds an argument to Profile::GetOffTheRecordProfile to control if a new
profile should be created when the requested one does not exist.
The current behavior is to create one if it is not available. To keep
the CL small, a default value to keep current behavior is provided and
will be removed in next CLs.
Bug: 1191315
We need to pass blink::BackForwardCacheAware::kAllow to preserve
the previous behaviour now.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/306a724087e219def8c70151b33876e617e3cf58
commit 306a724087e219def8c70151b33876e617e3cf58
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Fri Apr 9 14:20:02 2021 +0000
Reland "If an extension does a content injection disable bf cache."
This is a reland of c787d2af62f04f65457595649c229d7da12e4c87
This is the same as the original change except for one change in
the tests to resolve test flakiness by using WaitUntilDeleted.
Original change's description:
> If an extension does a content injection disable bf cache.
>
> This code tracks whether a content injection (insertCSS, contentScript,
> executeScript) has occurred for a WebFrame. If so then turn off
> BFCache for the frame.
>
> BUG=1192785
>
> Change-Id: I682a9efb247aae358023e3a591368c84d47001ce
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2787195
> Reviewed-by: Reilly Grant <reillyg@chromium.org>
> Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
> Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
> Reviewed-by: Avi Drissman <avi@chromium.org>
> Reviewed-by: Kentaro Hara <haraken@chromium.org>
> Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
> Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#870582}
Bug: 1192785
Since a recent change upstream, it's not that straightforward to add
this to the end of the enumeration, so let's add it right before the
last element so that the kMaxValue doesn't need to be adapted.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/b9937ed4e2a76bd93fcbb4241b6d91e531052e87
commit b9937ed4e2a76bd93fcbb4241b6d91e531052e87
Author: Ehimare Okoyomon <eokoyomon@chromium.org>
Date: Wed Apr 14 10:24:26 2021 +0000
[Android] Add list size check to discoverability RequestType test
Add check to make sure the test params and the size of the backend enum
are the same. Allow us to verify that the number of tests is same.
Bug: 1158288, 1185066