Commit Graph
22605 Commits
Author SHA1 Message Date
Mario Sanchez Prada d63204d299 Updated patches from Chromium 92.0.4485.0 to Chromium 92.0.4491.6. 2021-06-29 16:35:04 -04:00
samartnik 88b1407b19 [Android] Various classes and variables were renamed, extended or moved 2021-06-29 16:35:04 -04:00
Mario Sanchez Prada ef0275fb43 Adapt PermissionRequest override to account for IsDuplicateOf()
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
2021-06-29 16:35:03 -04:00
Mario Sanchez Prada 928f9f857c Update reference to GN target //extensions/browser/api/web_request
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
2021-06-29 16:35:03 -04:00
Mario Sanchez Prada 6e1a6e7b5e Add Profile::OTRProfileID::CreateFromProfileID() via chromium override
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
2021-06-29 16:35:02 -04:00
Mario Sanchez Prada 71f521f1f4 Replace usage of TabMutedReason::CONTEXT_MENU with TMR::CONTENT_SETTING
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().
2021-06-29 16:35:02 -04:00
Mario Sanchez Prada b3a3e4558b Migrate usage of base::[ASCII|UTF8]ToUTF16 to u literals.
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
2021-06-29 16:35:01 -04:00
Mario Sanchez Prada 9bb6a2673d Adapt override of translate_manager_unittest.cc as needed
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
2021-06-29 16:35:01 -04:00
Mario Sanchez Prada b81e6eb698 Add definition for newly added constant Brave-specific override
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
2021-06-29 16:35:00 -04:00
Mario Sanchez Prada 9a4bedfa11 Replace use of AvatarToolbarButton::State::kGenericProfile with kNormal
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
2021-06-29 16:35:00 -04:00
Mario Sanchez Prada 29831a42a8 Remove unused include for deleted file toolbar_actions_bar.h
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
2021-06-29 16:34:59 -04:00
Mario Sanchez Prada 135a644734 Replace calls to EvalJsWithManualReply() with calls to EvalJS()
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
2021-06-29 16:34:59 -04:00
Mario Sanchez Prada 09303b7b5b Remove calls to views::BubbleBorder::set_md_shadow_color()
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
2021-06-29 16:34:58 -04:00
Mario Sanchez Prada d3f2fc269f Pass newly-added parameter to Profile::GetPrimaryOTRProfile()
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
2021-06-29 16:34:58 -04:00
Mario Sanchez Prada 489ed25904 Pass newly-added parameter to Profile::GetOffTheRecordProfile()
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
2021-06-29 16:34:57 -04:00
Mario Sanchez Prada c4eb51a95e Pass newly-added parameter to ExecuteScriptInIsolatedWorld()
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
2021-06-29 16:34:57 -04:00
Mario Sanchez Prada ba3fbedfc9 Adapt permissions::RequestType enum to add Brave-specific type
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
2021-06-29 16:34:56 -04:00
Mario Sanchez Prada f4463340ff Updated strings for Chromium 92.0.4485.0. 2021-06-29 16:34:56 -04:00
Mario Sanchez Prada 65226afc16 Conflict-resolved patches from Chromium 91.0.4472.124 to Chromium 92.0.4485.0. 2021-06-29 16:34:55 -04:00
Mario Sanchez Prada bc0d3b4b08 Updated patches from Chromium 91.0.4472.124 to Chromium 92.0.4485.0. 2021-06-29 16:34:54 -04:00
Mihai PLESA 6ecfaa30cb no system xcode when on goma (#9278) 2021-06-29 15:32:15 -05:00
Francois Marier 6fee6c6e97 Merge pull request #9270 from brave/remove-fake-api-key-16672
Replace the bogus API key with a placeholder
2021-06-29 12:09:25 -07:00
brave-builds a36e598dd4 1.28.38 2021-06-29 18:01:13 +00:00
Brian R. Bondy b4c066c0c3 Merge pull request #9248 from brave/swap-controller
Add Swap controller, API and wallet handler code related to the swap
2021-06-29 13:40:44 -04:00
yan e3d6464fff Address NPM audit alert 1762 (#9267)
Fix https://github.com/brave/brave-browser/issues/14423
2021-06-29 09:31:56 -05:00
Kevin Smith 3361d850b9 Merge pull request #9143 from brave/ksmith-initial-state-migration
Fix initial Rewards state migration for old versions
2021-06-29 10:08:46 -04:00
brave-builds 0b0db53800 1.28.37 2021-06-29 12:00:53 +00:00
Aleksey Khoroshilov aa3746b324 Merge pull request #9095 from brave/issues/15906-cookieoptions-migration
Unify ephemeral storage trigger logic to use net::CookieOptions.
2021-06-29 13:42:36 +07:00
Kevin Kuehler 06beaa8201 Merge pull request #9265 from brave/speedreader_icon_touchups
views/speedreader: icon touchups
2021-06-28 22:21:23 -07:00
Kevin Kuehler 535283c4c0 views/speedreader: icon touchups
* Got a larger icon from @kliu
  * Use the omnibox theme, not the toolbar

Resolves https://github.com/brave/brave-browser/issues/16664
2021-06-28 21:05:18 -07:00
Francois Marier 1d0ea634c5 Replace the bogus API key with a placeholder (fixes brave/brave-browser#16672) 2021-06-28 19:46:23 -07:00
Kevin Kuehler 54b647392e Merge pull request #9262 from brave/speedreader_help_center
url_constants: Point speedreader to help center
2021-06-28 19:00:33 -07:00
Brian Clifton fd151bc256 Merge pull request #9259 from brave/bsc-ecosia-update
Update Ecosia search engine params
2021-06-28 18:46:07 -07:00
brave-builds 363ce1806e 1.28.36 2021-06-29 00:01:27 +00:00
Kevin Kuehler 68d4d7d05f url_constants: Point speedreader to help center 2021-06-28 16:47:31 -07:00
Brian Johnson 92a73153aa Do not override xcode gn config (#9242)
* add code owner for build commands

* do not override `use_system_xcode` or `mac_sdk_official_version`

* add missing revert from https://github.com/brave/brave-core/pull/9116/files#diff-4a7ab71a64ac5712bb35fb91782847039cf2def6ee9c3d64a7efa66562a99acfR408
2021-06-28 16:42:03 -05:00
Terry Mancey 320537911c Merge pull request #9252 from brave/issues/15936
Refactor deprecated Brave Ads WebContents::GetURL to use GetLastCommittedURL or GetVisibleURL
2021-06-28 13:36:16 -05:00
yan 754e71154d Merge pull request #9243 from brave/fix/16470
move security and privacy settings out of additional menu
2021-06-28 11:23:06 -07:00
Brian R. Bondy 4816116f78 Merge pull request #9081 from brave/revert-8995-U2F-transport
Revert "Temporarily revert U2F sig check for Ledger U2F transport support"
2021-06-28 14:20:16 -04:00
brave-builds e4ece56fd8 1.28.35 2021-06-28 18:01:29 +00:00
Brian Clifton b0ae106774 Update Ecosia search engine params
Fixes https://github.com/brave/brave-browser/issues/16639
2021-06-28 09:39:57 -07:00
Max 46990dc1be Merge pull request #9211 from brave/maxk-update-1.26.x-ja-l10n
Update Japanese l10n for 1.26.x release.
2021-06-28 12:33:09 -04:00
wchen342 bdefe6d867 Merge pull request #9256 from brave/appcompat_fix
Change AppCompatActivity to AsyncInitializationActivity
2021-06-28 18:10:10 +02:00
Brian R. Bondy f9f22d4d37 Revert "Temporarily revert U2F sig check for Ledger U2F transport support" 2021-06-28 11:12:19 -04:00
Brian R. Bondy 63bddae0a7 Merge pull request #9251 from brave/asset-ratio-spot
Asset ratio spot price response changes
2021-06-28 11:08:23 -04:00
wchen342 6e22f7e41c Merge pull request #9210 from brave/brave_onboarding_notification_fix
[Android] Make BraveAdsOnboardingFragment implement FirstRunFragment
2021-06-28 16:23:35 +02:00
wchen342 d33b4dcfdf Change AppCompatActivity to AsyncInitializationActivity 2021-06-28 16:10:50 +03:00
zenparsing bd7a8fe9a5 Fix initial Rewards state migration for old versions 2021-06-28 09:07:21 -04:00
Terry Mancey b0d698a749 Refactor deprecated Brave Ads WebContents::GetURL to use GetLastCommittedURL or GetVisibleURL 2021-06-28 08:05:33 -05:00
Aleksey Khoroshilov e5225e08ce Add more network cookies tests. 2021-06-28 20:04:34 +07:00