Commit Graph
2806 Commits
Author SHA1 Message Date
Mario Sanchez Prada 8945f814b6 Merge pull request #12655 from brave/issues/21608
Migrate define(OS_*) to using BUILDFLAG(IS_*) instead
2022-03-22 23:00:23 +01:00
Mario Sanchez Prada 7d7f5e7554 Added missing includes for build/build_config.h 2022-03-22 10:57:30 +01:00
Mario Sanchez Prada f4c7bdda37 Migrate define(OS_*) to using BUILDFLAG(IS_*) instead
See the following PSA in the chromium-dev mailing list for more
information and links to the original discussion, the design
document and the metabug:

https://groups.google.com/a/chromium.org/g/chromium-dev/c/EIuQCy9sVfw/m/Net3FPz6AwAJ

Resolves https://github.com/brave/brave-browser/issues/21608
2022-03-22 10:57:30 +01:00
Kyle Hickinson 0c1ae71e5c Add ability to fetch wallet stats ping params on iOS 2022-03-21 16:46:32 -04:00
Simon Hong 7502849e77 Prepared for using different FirstRun dialog on Win
Modifed FirstRun dialog is used on macOS/Linux.
And we'll use our own FirstRun dialog on Win.
2022-03-20 23:01:46 +09:00
Mario Sanchez Prada 8a435b358c Migrate away from GetListDeprecated/TakeListDeprecated
This is a second pass after commit fe9b3d9e36 to finally migrate away
from this deprecated methods, which required changing the signature
of some methods to avoid replacing use of base::Value::[Const]ListView
with the new types instead (e.g. base::Value::List).

[1] https://github.com/brave/brave-core/commit/fe9b3d9e36

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/60e6b2d9538d743e7aaac58f46e996e6031b8a86

commit 60e6b2d9538d743e7aaac58f46e996e6031b8a86
Author: Daniel Cheng <dcheng@chromium.org>
Date:   Sat Feb 5 01:08:46 2022 +0000

    base::Value: Remove GetList(), TakeList(), and TakeDict().

    Also remove (a lot of) new uses of GetList() that crept in. There is
    also one use of GetList() in a third-party code generator that was
    missed in previous iterations. Since the file is checked directly into
    Chrome, the usage is removed in this CL, but upstream will need to be
    updated before the next roll.

    Bug: 1291666, 1294416
2022-03-18 20:04:15 -04:00
Emerick Rogul d98d8db184 Disable kPrivacySandboxApisEnabledV2 privacy sandbox API preference
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/7af9b25ea15c99177eeb7e1286c2bef002c70440

commit 7af9b25ea15c99177eeb7e1286c2bef002c70440
Author: sauski <sauski@google.com>
Date:   Tue Feb 1 09:59:45 2022 +0000

    Privacy Sandbox Settings: Introduce new un-synced primary preference

    This CL introduces V2 of the PrivacySandboxApisEnabled preference, which
    will replace the initial version as the primary control for Privacy
    Sandbox APIs.

    A migration is required as post Kartoffel release 3, the primary
    control will not be synced across devices. The new pref will be init
    appropriately during the confirmation moment of Kartoffel 3, and so
    is default off.

    All locations that consult or set the V1 preference have been updated
    to consult the new pref as required. The exception is the FLoC
    generated preference, which as FLoC has been discontinued will be
    removed and does not need to be updated.

    The PrivacySandboxSettings unit tests have been parameterized based
    on the value of the feature, with test utils updated to only set the
    appropriate pref.

    Bug: 1286276
2022-03-18 20:04:14 -04:00
samartnik 3b5cafeab3 [Android] Additional guards for web_applications headers
Chromium change:
https://github.com/chromium/chromium/commit/f3b62d52726e194af49c378360c8fec7c9627ddb

Clear Web app's last launch time when browsing data is cleared.
R=dslee@chromium.org

Bug: 1284783
2022-03-18 20:04:11 -04:00
Mario Sanchez Prada 4e0ddbe1d1 Adapt to replacement of DnsOverHttpsServerConfig -> DnsOverHttpsConfig
Chromium changes:

https://source.chromium.org/chromium/chromium/src/+/5f94831af245a25e570c1baf2846200c08f18033

commit 5f94831af245a25e570c1baf2846200c08f18033
Author: Benjamin M. Schwartz <bemasc@chromium.org>
Date:   Wed Feb 16 15:37:37 2022 +0000

    Use DnsOverHttpsConfig where appropriate

    This replaces most instances of
    std::vector<net::DnsOverHttpsServerConfig> with DnsOverHttpsConfig.
    This simplifies code that handles these collections as unitary objects.

    This change has no effect on behavior.

    BUG=1200908
2022-03-18 20:04:09 -04:00
Mario Sanchez Prada 700c1a68bf Disable Raw sockets API by default via user preferences
The kDirectSockets feature flag has now been removed, so we now disable
by default via user preferences, which is how this is now configured.

Original request: https://github.com/brave/brave-browser/issues/11546

Chromium changes:

https://source.chromium.org/chromium/chromium/src/+/ed1d8707479fbfa698a3494ce64841d2e37ac351
https://source.chromium.org/chromium/chromium/src/+/d3e9f468aa3a6439c4b97d42cb281a29c720460e

commit ed1d8707479fbfa698a3494ce64841d2e37ac351
Author: Andrew Rayskiy <greengrape@google.com>
Date:   Wed Feb 16 13:23:53 2022 +0000

    Direct Sockets: Remove kDirectSockets feature flag.

    Explainer: https://docs.google.com/document/d/17J0hUbra10hyDxRlM6er4tv5j2vAbuzKByTemCpaHD0/edit?usp=sharing&resourcekey=0-P6OX0hBBPfiS02y_rD7-jg

    Bug: 1293486

commit d3e9f468aa3a6439c4b97d42cb281a29c720460e
Author: Andrew Rayskiy <greengrape@google.com>
Date:   Tue Feb 15 16:53:56 2022 +0000

    Direct Sockets: Add policy for enterprise managed devices

    Right now the service is not available on enterprise managed devices
    (https://github.com/WICG/direct-sockets/blob/main/docs/explainer.md#threat-6)
    as it might violate various enterprise policies on network access. However,
    we would still like to allow developers to test the api on enterprise manage
    devices; for this we introduce the EnableDirectSockets policy that be set to
    true for regular users and false for enterprise-managed users.

    Bug: 1293488,1293875
2022-03-18 20:04:09 -04:00
Mario Sanchez Prada 85fbcf3cf4 Disable the "Manage devices link" feature now there is no feature flag
The feature flag is gone and the call to CreateManageDevicesLink is now
unconditionally run, so we need to early return to avoid it.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/d243ec32d8bff417719474afe7fab15b79602d61

commit d243ec32d8bff417719474afe7fab15b79602d61
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date:   Wed Feb 16 02:30:56 2022 +0000

    Clean up SendTabToSelfWhenSignedIn feature toggles

    Delete kSendTabToSelfWhenSignedIn and kSendTabToSelfManageDevicesLink
    (already enabled by default).

    This unblocks simplifications in the send-tab-to-self Android code. The
    device picker UI now never has button to settings, so we can delete the
    SettingsLauncher plumbing and deprecate related metrics.

    We also find a test in ShareRegistrationCoordinatorTest that was
    conditioned to kSendTabToSelfWhenSignedIn disabled for no justifiable
    reason. The test still passes with the feature enabled, so it's kept.

    Bug: 1295211
2022-03-18 20:04:08 -04:00
Mario Sanchez Prada a885eebdf2 Adapt to relocation of web_app_shortcut_mac.mm
Moved into //chrome/browser/web_applications/os_integration/

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/2ddeccc443fda120815d0f4ad2e12bb73966ef59

commit 2ddeccc443fda120815d0f4ad2e12bb73966ef59
Author: Daniel Murphy <dmurph@chromium.org>
Date:   Thu Feb 17 02:14:22 2022 +0000

    [dPWA] Moving all OS integration code to its own directory.

    This is a purely mechanical change done by using a combination of grep
    and sed.

    See this spreadsheet for the find-and-replace commands that were used:
    https://docs.google.com/spreadsheets/d/1itZvdhTyXiWnAeHtLTGgv6WG_NJBpCmGcMRJEt33WXg/edit#gid=0

    And here is the definition of the git-grep-replace command:
    https://github.com/dmurph/dotfiles/blob/master/chromium_aliases#L32

    Bug: 1297156
2022-03-18 20:04:08 -04:00
Mario Sanchez Prada 511e941c4b Add incognito_profile param to BravePrivacySandboxSettings constructor
Also adapt callers and tests.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/b45b897081fc762201a3436a6cc169618af4c484

commit b45b897081fc762201a3436a6cc169618af4c484
Author: sauski <sauski@google.com>
Date:   Mon Feb 14 11:57:33 2022 +0000

    Privacy Sandbox Settings: Disable APIs in Incognito for Release 3

    CL disables all Privacy Sandbox API in incognito if the Release 3 flag
    is enabled.

    Bug: 1286276
2022-03-18 20:04:02 -04:00
Mario Sanchez Prada ffee90678b Adapt to new signature of ComponentInstaller::Register()
It expects an additional base::TaskPriority parameter now.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/b906784680726a7f56483fbd9b62ec9d0b6fcf1d

commit b906784680726a7f56483fbd9b62ec9d0b6fcf1d
Author: cfredric <cfredric@chromium.org>
Date:   Fri Feb 11 20:26:18 2022 +0000

    Modify `Register` to optionally take a TaskPriority.

    Bug: 1283271, 1266014
2022-03-18 20:04:02 -04:00
Mario Sanchez Prada 61de25f935 Adapt to change in parameters for AddUiColorMixer()
It receives a ColorProviderManager::Key now instead of two bools.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/7f04bd0c93d2dd1133caaf0c5b65c881685266bd

commit 7f04bd0c93d2dd1133caaf0c5b65c881685266bd
Author: Peter Kasting <pkasting@chromium.org>
Date:   Tue Feb 15 22:24:40 2022 +0000

    Move most of GTK color mixers to ui/color/.

    This only leaves the actual GTK-native accessor portions in ui/gtk/.

    Bug: none
2022-03-18 20:04:01 -04:00
Mario Sanchez Prada 29d9706c56 Rename kGoogleAccountActivityControlsURLInPrivacy{Review->Guide}
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/634612c9ba649264043333082fe8d9023455177d

commit 634612c9ba649264043333082fe8d9023455177d
Author: Rainhard Findling <rainhard@chromium.org>
Date:   Tue Feb 15 08:35:18 2022 +0000

    Privacy Guide: rename URLs

    Rename privacy guide URLs from the old "privacy review" naming scheme to
    the new "privacy guide" naming scheme.

    Bug: 1215630,1296565
2022-03-18 20:04:00 -04:00
Emerick Rogul b0e221e933 Disable the kDestroyProfileOnBrowserClose feature
With this feature enabled, profiles are destroyed on browser close instead of on
browser exit. This means that when ClearOnExit() calls GetLoadedProfiles(), no
profiles are returned and thus no data is cleared.

For now, let's disable this feature. In the future, we will need to investigate
an alternative approach here.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/86c7dc91ccf31eff5576b8f2ee092734fab523aa

commit 86c7dc91ccf31eff5576b8f2ee092734fab523aa
Author: Nicolas Ouellet-Payeur <nicolaso@chromium.org>
Date:   Tue Feb 8 21:05:06 2022 +0000

    [Profiles] Enable DestroyProfileOnBrowserClose by default

    DestroyProfileOnBrowserClose has been enabled at 50% Stable for a bit,
    so the next logical step is to enable it by default.

    Make DestroyProfileOnBrowserClose ENABLED_BY_DEFAULT. This will mostly
    affect Chrome-branded builds with Variations disabled, since Chromium
    builds have been on-by-default for many months (via
    fieldtrial_testing_config.json). Other Chromium-based browsers may also
    be affected, depending on whether they respect
    fieldtrial_testing_config.json.

    This only affects Windows, Mac, and Desktop Linux. Lacros is
    deliberately left out, since this flag isn't ready yet.

    Bug: 88586
2022-03-18 20:03:58 -04:00
Emerick Rogul 1afdff5778 Remove const from PromoteUpdater function signature
Chromium update:

https://source.chromium.org/chromium/chromium/src/+/769424beca1206977d2b03641c3bc7ac76108fa5

commit 769424beca1206977d2b03641c3bc7ac76108fa5
Author: Michael Chang <donchan@microsoft.com>
Date:   Tue Jan 25 01:48:28 2022 +0000

    Add connection between browser and ChromiumUpdater system level helper

    For installing a system level updater on Mac for the ChromiumUpdater,
    there was a need to create a helper executable that will be installed to
    the PrivilegedHelpers folder. To install it, an SMJobBless call was
    was necessary. After the SMJobBless call completes, an XPC connection
    will be made with the with the privileged helper to perform a system
    level installation.

    Bug: 1236770
2022-03-18 20:03:58 -04:00
Emerick Rogul 7e3b11adc5 Move extension API test files to their corresponding api/ dirs
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/60e4554344df085958561b68e88a7cfb0dad65b1

commit 60e4554344df085958561b68e88a7cfb0dad65b1
Author: David Bertoni <dbertoni@chromium.org>
Date:   Fri Jan 7 00:42:36 2022 +0000

    [Extensions] Move API test files to their corresponding api/ dirs.

    Bug: 883570
2022-03-18 20:03:57 -04:00
Emerick Rogul ddf4de833a Update function signature for HandleRelaunch
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/2d5863b4bd4a723b2cbaa4cc708f1ebf7682f9ff

commit 2d5863b4bd4a723b2cbaa4cc708f1ebf7682f9ff
Author: Moe Ahmadi <mahmadi@chromium.org>
Date:   Sat Feb 5 02:07:54 2022 +0000

    [CodeHealth] Removes RegisterDeprecatedMessageCallback in settings WebUI

    Removes instances of RegisterDeprecatedMessageCallback in
    //chrome/browser/ui/webui/settings/

    Bug: 1243386
2022-03-18 20:03:57 -04:00
Emerick Rogul eec5240d1a Update signature of SetCanonicalCookieAsync to include new result parameter
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/9fa241487539f91407c6a73e07406e54b5c36956

commit 9fa241487539f91407c6a73e07406e54b5c36956
Author: Juba Borgohain <chromiumjuba@gmail.com>
Date:   Fri Feb 4 18:25:42 2022 +0000

    Update CookieAccessResult to include WARN status

    When a cookie is created and it includes a WARN_*
    CookieInclusionStatus, the status is not passed along when setting
    the cookie. This impacts what messages show up in devtools issues.

    These changes make it possible to show a message in devtools issues
    for a cookie that has a WARN_* status.

    Bug: 1254192
2022-03-18 20:03:57 -04:00
Emerick Rogul db57bfc266 Include field_trial_params.h as necessary
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/c290fc89c4b4953caaaace648fc419953ae440bf

commit c290fc89c4b4953caaaace648fc419953ae440bf
Author: David Sanders <dsanders11@ucsbalum.com>
Date:   Fri Feb 4 18:04:55 2022 +0000

    Reland "Remove unused include of //base/metrics/field_trial_params.h"

    This is a reland of ff34cabdb95a8e887f253f140abcb66a79455b93

    Original change's description:
    > Remove unused include of //base/metrics/field_trial_params.h
    >
    > Bug: 242216
    > Change-Id: Ifaff25245e573b377f21e89e901be961909fcc63
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3425470
    > Reviewed-by: Lei Zhang <thestig@chromium.org>
    > Commit-Queue: Lei Zhang <thestig@chromium.org>
    > Owners-Override: Lei Zhang <thestig@chromium.org>
    > Cr-Commit-Position: refs/heads/main@{#966975}

    Bug: 242216
2022-03-18 20:03:57 -04:00
Emerick Rogul 76a95ab648 Adapt to removal of FLoC
This change is adapting to the removal of FLoC. There's still some work to do
here and we should verify that we're still testing everything that needs to be
tested.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/9255aecd4114c0b3da4016f641316367112adb53

commit 9255aecd4114c0b3da4016f641316367112adb53
Author: Yao Xiao <yaoxia@chromium.org>
Date:   Sat Feb 5 00:02:19 2022 +0000

    Remove FLoC code

    - Remove the obsolete FLoC code.
    - Add the prefs deprecation/migration logic in browser_prefs.cc.

    Bug: 1292169
2022-03-18 20:03:56 -04:00
Emerick Rogul 54ebba22bf Replace GetList/TakeList with GetListDeprecated/TakeListDeprecated
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/60e6b2d9538d743e7aaac58f46e996e6031b8a86

commit 60e6b2d9538d743e7aaac58f46e996e6031b8a86
Author: Daniel Cheng <dcheng@chromium.org>
Date:   Sat Feb 5 01:08:46 2022 +0000

    base::Value: Remove GetList(), TakeList(), and TakeDict().

    Also remove (a lot of) new uses of GetList() that crept in. There is
    also one use of GetList() in a third-party code generator that was
    missed in previous iterations. Since the file is checked directly into
    Chrome, the usage is removed in this CL, but upstream will need to be
    updated before the next roll.

    Bug: 1291666, 1294416
2022-03-18 20:03:56 -04:00
Emerick Rogul 1fbd5a14ca Privacy Sandbox Settings moved into components/ 2022-03-18 20:03:51 -04:00
Mario Sanchez Prada 0cfb069de8 Pass content::InterestGroupManager* parameter of PrivacySandboxService
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/ffae4e2a807168114e4d2013a855f68d31a36505

commit ffae4e2a807168114e4d2013a855f68d31a36505
Author: sauski <sauski@google.com>
Date:   Tue Jan 25 20:22:43 2022 +0000

    Privacy Sandbox Settings: Expose FLEDGE interest group joining origins

    At a high level this CL makes the list of eTLD + 1s on which the user
    was joined to a FLEDGE interest group accessible to Chrome UI code.

    It does this in three parts:

    1) Moves the definition of required parts of the existing
    InterestGroupManager into content/public/browser.
    2) Renames the existing InterestGroupManager to be an Impl version,
    inheriting from the public interface version.
    3) Creates function on the PrivacySandboxService to transform the
    provided list of origins into eTLD+1s for display to the user

    Part 2 above results in the bulk of file changes, which are simply
    mechanical changes to refer InterestGroupManagerImpl as appropriate.

    Bug: 1286276
2022-03-18 20:03:51 -04:00
Mario Sanchez Prada 84cbbcd763 Rename IsPrivacySandboxAllowed() calls to IsPrivacySandboxEnabled()
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/7af9b25ea15c99177eeb7e1286c2bef002c70440

commit 7af9b25ea15c99177eeb7e1286c2bef002c70440
Author: sauski <sauski@google.com>
Date:   Tue Feb 1 09:59:45 2022 +0000

    Privacy Sandbox Settings: Introduce new un-synced primary preference

    This CL introduces V2 of the PrivacySandboxApisEnabled preference, which
    will replace the initial version as the primary control for Privacy
    Sandbox APIs.

    A migration is required as post Kartoffel release 3, the primary
    control will not be synced across devices. The new pref will be init
    appropriately during the confirmation moment of Kartoffel 3, and so
    is default off.

    All locations that consult or set the V1 preference have been updated
    to consult the new pref as required. The exception is the FLoC
    generated preference, which as FLoC has been discontinued will be
    removed and does not need to be updated.

    The PrivacySandboxSettings unit tests have been parameterized based
    on the value of the feature, with test utils updated to only set the
    appropriate pref.

    Bug: 1286276
2022-03-18 20:03:51 -04:00
Mario Sanchez Prada 1c8a9e2891 Use [[maybe_unused]] instead of ALLOW_UNUSED_LOCAL when needed
On first_run_dialog.cc we actually do a small hack to avoid having to
patch or fully-override the header file just to add [[maybe_unused]].

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/44d8af458bb86ca8477493cef5bc9d1ed12a8f40

commit 44d8af458bb86ca8477493cef5bc9d1ed12a8f40
Author: Avi Drissman <avi@chromium.org>
Date:   Tue Jan 25 19:08:20 2022 +0000

    Remove ALLOW_UNUSED macros

    This removes ALLOW_UNUSED_LOCAL, ALLOW_UNUSED_TYPE, and
    ANALYZER_ALLOW_UNUSED.

    Bug: 1286390
2022-03-18 20:03:51 -04:00
Mario Sanchez Prada bc4543bcfb Remove unneeded dependencies on //extensions/common that break the build
Neither the //brave/components/brave_component_updater/browser nor the
//brave/components/content_settings/core/common targets include sources
that actually depend on //extensions/common or //brave/extensions:common,
so we can simply drop those dependencies and avoid a build failure at the
time of processing GN files now that it's not allowed for //components to
depend on //extensions (either directly or indirectly).

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/b4ca4d85fb53aa2e5cd5291a54ffab7b76393c93

commit b4ca4d85fb53aa2e5cd5291a54ffab7b76393c93
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date:   Tue Jan 25 03:16:15 2022 +0000

    [Extensions] (Mostly) Don't allow //components to depend on //extensions

    Most //extensions targets are linked with //chrome and are static
    source_sets. Thus, any components depending on them result in duplicate
    code and, worse, improper singleton behavior.

    Prevent //components from depending on any //extensions targets except
    //extensions/common:common_constants (which is component friendly) and
    //extensions/buildflags.

    Bug: 1289287
2022-03-18 20:03:50 -04:00
Emerick Rogul f8bd779eed Adapt to changes in partitioned/unpartitioned cross-site cookies
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/86f47b025376bc76df06606b14cf39bd724d0571

commit 86f47b025376bc76df06606b14cf39bd724d0571
Author: Dylan Cutler <dylancutler@google.com>
Date:   Fri Jan 21 01:12:22 2022 +0000

    Differentiate partitioned and unpartitioned cross-site cookies in 3P
    cookie blocking

    Partitioned attribute (aka CHIPS) explainer:
    https://github.com/WICG/CHIPS

    Design doc for 3PC blocking changes:
    https://docs.google.com/document/d/1c5kuBkrcZ3-D-CUqTV6GRKOA2NULTmv11opW8L3Td2g/edit?usp=sharing

    Bug: 1225444
2022-03-18 20:03:50 -04:00
Emerick Rogul 7e4c5bade2 Adapt to removal of StoragePartitionId
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/8015afcf8e3730c33a518bed3e7c31ba77d5a814

commit 8015afcf8e3730c33a518bed3e7c31ba77d5a814
Author: Alex Moshchuk <alexmos@chromium.org>
Date:   Mon Jan 31 22:59:25 2022 +0000

    Remove StoragePartitionId.

    (original CL by acolwell@, rebased and submitted by alexmos@)

    This is the final patch in the series to migrate the
    NavigationControllerImpl::session_storage_namespace_map_ to use a
    StoragePartitionConfig instead of a partition ID string. It removes the
    StoragePartitionId class and updates all the existing usage to
    StoragePartitionConfig. This should not introduce user visible behavior
    changes because the current StoragePartitionId implementation is
    essentially a wrapper around a StoragePartitionConfig.  That change was
    made in https://crrev.com/c/2808670, which has reached stable in M93
    and raised no issues.

    - Removes the StoragePartitionId object and replace usage with
      StoragePartitionConfig.
    - Removed NavigationControllerImpl::partition_config_to_id_map_ since
      it is no longer needed.
    - Removed SiteInfo usage from RenderViewHostImpl now that we only
      need a StoragePartitionConfig to get the SessionStorageNamespace.
    - Added GetStoragePartitionConfig() method to SiteInstance to make
      it easier to get the StoragePartitionConfig for a SiteInstance.
      This will also make it easier to remove GetSiteURL() usage related
      to storage partitions in followup CLs.
    - Removed SiteInstanceImpl::GetSiteInfoForRenderViewHost() and
      move code that enabled storage partition verification to the new
      GetStoragePartitionConfig() method.

    Bug: 1166021
2022-03-18 20:03:50 -04:00
Emerick Rogul 6a62016ca4 Adapt to changes in DoH template group parsing
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/aaf851234a576b844c0b5a30fe218edb93b00569

commit aaf851234a576b844c0b5a30fe218edb93b00569
Author: Benjamin M. Schwartz <bemasc@chromium.org>
Date:   Wed Jan 26 21:13:03 2022 +0000

    Move DoH template group parsing to a new class

    Currently, the string representation of a DoH configuration is a
    whitespace-separated list of URI templates.  The knowledge of this
    string format is distributed between net/ and chrome/browser/net.  This
    makes the format difficult to evolve.  To enable a richer syntax for
    the configuration string, this CL collects all string-handling into a
    new class, DnsOverHttpsConfig, which represents a list of URI templates.

    This is the first in a series of CLs related to this reorganization.
    Followup CLs will replace all `vector<DnsOverHttpsServerConfig>` with
    `DnsOverHttpsConfig`, simplifying the browser's concept model.

    BUG=1200908
2022-03-18 20:03:49 -04:00
Emerick Rogul 5044f92586 Adapt to tab muting changes
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/f27f7ff938a4858ad57289f11c39c34bbf1f4ee1

commit f27f7ff938a4858ad57289f11c39c34bbf1f4ee1
Author: evliu <evliu@google.com>
Date:   Tue Jan 25 21:15:24 2022 +0000

    Enable tab muting behind a flag

    This CL reimplements the tab muting feature that was previously removed
    in 2018. This implementation follows the original UX proposal of making
    the existing tab alert indicator into a clickable button but removes the
    hover and double click behavior.

    Bug: 1250848
2022-03-18 20:03:49 -04:00
Emerick Rogul 92f3873e41 Remove ignore_result.h
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/48a3208de992a313605de022023fa8894ace185c

commit 48a3208de992a313605de022023fa8894ace185c
Author: Avi Drissman <avi@chromium.org>
Date:   Tue Jan 25 17:10:57 2022 +0000

    Remove ignore_result.h

    This removes the header file and the ignore_result()
    function. Use `std::ignore =` instead.

    Bug: 1285085
2022-03-18 20:03:49 -04:00
Emerick Rogul d66588cbe6 Replace heap.h with garbage_collected.h
Chromium change:

https://source.chromium.org/chromium/chromium/src/+/fde2db9853cab5681586ea71d877f4cefd5eee13

commit fde2db9853cab5681586ea71d877f4cefd5eee13
Author: Michael Lippautz <mlippautz@chromium.org>
Date:   Mon Nov 22 16:16:02 2021 +0000

    heap: Replace heap.h include with garbage_collected.h in **/core/**

    `heap.h` was only referring to `garbage_collected.h`. Blink code
    should use `garbage_collected.h` to declare a GCed class. This allows
    the header to be reused in future for actual heap internals.

    This CL does not generally address useless includes other than
    running `git cl format`.

    Bug: chromium:1269227
2022-03-18 20:03:49 -04:00
Emerick Rogul 80fca4e6ae NativeTheme::GetSystemColor machinery removed 2022-03-18 20:03:47 -04:00
Mikhail 101d2822bc Enforce using a publisher proof for CRX3 (#12551)
* Enforce using a publisher proof for CRX3
* add a new line
2022-03-16 17:53:59 +07:00
Aleksey Khoroshilov d2ef9c4175 Merge pull request #12600 from brave/issues/20491
Remove outdated DevTools prefs override for auto dark mode.
2022-03-16 11:59:11 +07:00
Simon Hong 8a7190bf36 Merge pull request #12618 from brave/update_sidebar_settings_button_target_url
Updated sidebar settings button target url
2022-03-16 12:39:28 +09:00
Shivan Kaul Sahibandbridiver 9f8247fdbd Redirect AMP pages to their canonical links (#11750)
* De-amp feature
* Add settings UI for de_amp feature
* Add tests 
* Refactor Speedreader + DeAmp throttle/loader
* Restrict De-AMPing to main frame loads
* Pref default on
* Remove Android as test target
* Off by default on Android

Co-authored-by: bridiver <github@brianjohnson.cc>
2022-03-15 20:50:00 -04:00
Simon Hong c7d958bf5d Updated sidebar settings button target url
fix https://github.com/brave/brave-browser/issues/21060

Introduced new IDS_SETTINGS_SIDEBAR_SHOW_OPTION_TITLE.
Although it uses same string with IDS_SIDEBAR_SHOW_OPTION_TITLE,
made different string id to prevent future regression.
IDS_SIDEBAR_SHOW_OPTION_TITLE was shared by many other UI such as app menu
or context menu.
2022-03-16 09:30:12 +09:00
Aleksey Khoroshilov 4294821b88 Merge pull request #12597 from brave/issues/21661
Don't impose WebSockets limits on Extensions
2022-03-15 21:06:04 +07:00
Aleksey Khoroshilov e30b990218 Remove invalid DevTools prefs override for auto dark mode. 2022-03-15 19:03:04 +07:00
Aleksey Khoroshilov d653a78a43 Don't impose WebSockets limit on Extensions. 2022-03-15 14:45:19 +07:00
Aleksey Khoroshilov 0c08e62f93 Fix some nits from initial PR. 2022-03-15 14:11:59 +07:00
Simon Hong b124ca9fe0 Merge pull request #12482 from brave/first_run_on_windows
Use first run dialog on Windows
2022-03-14 21:49:28 +09:00
Simon Hong ed69d85439 Delete ms-edge protocol handling
fix https://github.com/brave/brave-browser/issues/21553

Deleted all ms-edge protocol handling logic as Windows doesn't allow
3p applications as a default ms-edge protocol handler.
2022-03-11 16:48:23 +09:00
Simon Hong 771d141ad4 Use first run dialog on Windows
fix https://github.com/brave/brave-browser/issues/21464
Enabled first run dialog on Windows.
2022-03-08 16:22:30 +09:00
Brian Clifton 2b4d95795c Disable Google Lens by default
Fixes https://github.com/brave/brave-browser/issues/21442
2022-03-07 23:13:23 -07:00
Simon Hong 7fb1ea9956 fixup! Don't show brave search for tor entries from settings 2022-03-08 09:58:34 +09:00