Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Update patches from Chromium 76.0.3809.132 to Chromium 77.0.3865.42 #3247

Closed
wants to merge 55 commits into from

Conversation

@mkarolin
Copy link
Contributor

mkarolin commented Aug 23, 2019

Fixes brave/brave-browser#5375
Related PR: brave/brave-browser#5785

Submitter Checklist:

Test Plan:

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.
mkarolin added 24 commits Jul 24, 2019
GN change disallows sources that aren't a source, header, or object file.
We need to pass `process_only` flag to process_version to not create source_set
out of the version file.

GN change:

https://gn.googlesource.com/gn/+/8730b0feb6b991fa47368566501ab9ccfb453c92

commit	8730b0feb6b991fa47368566501ab9ccfb453c92
author	Tom Anderson <thomasanderson@chromium.org>	Thu May 16 11:00:40 2019 -0700
committer	Commit Bot <commit-bot@chromium.org>	Thu May 16 21:36:50 2019 +0000

Disallow non-buildable sources in binary targets

When adding a file that's not a source, header, or object file to a source_set,
loadable_module, shared_library, executable, or static_library, gn will now
generate an error like the following:

ERROR at //third_party/protobuf/proto_library.gni:369:15: Only source, header,
and object files belong in the sources of a
source_set. //out/Test/pyproto/google_apis/gcm/protocol/mcs_pb2.py is not one of
the valid types.
    sources = get_target_outputs(":$action_name")
              ^---------------------------------
See //google_apis/gcm/BUILD.gn:78:1: whence it was called.
proto_library("proto") {
^-----------------------
See //BUILD.gn:89:7: which caused the file to be included.
      "//google_apis/gcm:gcm_unit_tests",
      ^---------------------------------

BUG=77
Chrominum changes:

https://chromium.googlesource.com/chromium/src/+/b2720ad134127a6fdd35f92f44b5b2b946452c1b

commit	b2720ad134127a6fdd35f92f44b5b2b946452c1b
author	Nick Harper <nharper@chromium.org>	Fri Jul 12 22:07:10 2019
committer	Commit Bot <commit-bot@chromium.org>	Fri Jul 12 22:07:10 2019
tree	f850eb08e89e08373a37378fb43ea76064672a00
parent	f070ecdf7436215ee672ff7b84a89f4eee90863c [diff]
Remove Channel ID deletion code

Bug: 903642, 975114

https://chromium.googlesource.com/chromium/src/+/d1d11f3957428a77097d49e5fb2971b873d11f5d

commit	d1d11f3957428a77097d49e5fb2971b873d11f5d	[log] [tgz]
author	Xing Liu <xingliu@chromium.org>	Tue Apr 30 21:09:55 2019
committer	Commit Bot <commit-bot@chromium.org>	Tue Apr 30 21:09:55 2019
tree	d8778d132d6b3559a7c91fc12ff2873492e8b948
parent	5e42b1a0fb34030b2e78b6453977cf4801bff761 [diff]
Notification scheduler: Plumb dependencies to glue class.

This CL plumbs dependencies into scheduler glue class, and starts to
connects several subsystems together.

Tests will be added in following CLs to keep this CL smaller, and
there are still many things not implemented in the glue layer yet.

TBR=peter@chromium.org

Bug: 930968
Chromium change:

https://chromium.googlesource.com/chromium/src/+/e31e15795d599fd8a53d04ed2bf8832e36fa0ead

commit	e31e15795d599fd8a53d04ed2bf8832e36fa0ead
author	Yue Ru Sun <yrsun@chromium.org>	Fri Jul 19 17:09:57 2019
committer	Commit Bot <commit-bot@chromium.org>	Fri Jul 19 17:09:57 2019
tree	b5d9b74dae9b156ce8c6abb4d635f8d84480ea88
parent	fb39b07fe2369060544e7cadc86f82cba2e43bb8 [diff]
Sync omnibox type proto change

Field name has changed from INVALID to EMPTY in cl/255470920, this patch syncs that change and fix all occurrences.

See https://bugs.chromium.org/p/chromium/issues/detail?id=983220

Bug: 983220
Chromium change:

https://chromium.googlesource.com/chromium/src/+/b6042ed37a482983111cdf1f9d0b09ffe972c309

commit b6042ed37a482983111cdf1f9d0b09ffe972c309
Author: Clark DuVall <cduvall@chromium.org>
Date:   Mon Jul 15 17:20:45 2019 +0000

    Support HandleExternalProtocol on UI thread

    This allows HandleExternalProtocol to be used on the UI thread in
    android_webview. This is part of migrating the navigation loader to the
    UI thread.

    Bug: 824840
…rkRequest.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/1d81619dbd351cb570943140bddac7a80559dd76

commit 1d81619dbd351cb570943140bddac7a80559dd76
Author: Clark DuVall <cduvall@chromium.org>
Date:   Fri Jul 19 19:54:42 2019 +0000

    Move WebRequest to the UI thread

    Now that network service is launched, there is no reason to have
    WebRequest run on the IO thread. This moves all WebRequest code and
    the WebRequestProxyingURLLoaderFactory to the UI thread, which
    eliminates thread hops. For more info, see the Chrome IO Thread
    Simplification: Planning doc:
    https://docs.google.com/document/d/1fowGQ8xWBv4YqHj_YbK-S3wpmJQDE7L0-GwNR_vAkHE/edit#

    Change-Id: I5ba8954c5d91c98c96a66558ecb659b59ff4386c
    Bug: 980774
For Brave importer profile writer added a nullptr optional for tab group.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/81999fd6a771e38cccc487364728ba91f5fc17f2

commit 81999fd6a771e38cccc487364728ba91f5fc17f2
Author: Collin Baker <collinbaker@chromium.org>
Date:   Wed Jun 5 23:12:27 2019 +0000

    Save and restore tab groups

    This implements basic session restore functionality for tab
    groups. Currently, only whole browser session restore is supported;
    restoring a window or a tab from the history menu won't restore
    groups.

    Bug: 905491
Removed const from overrides.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/4b4eed074e848347f5a5b07d4d4b3fd2f6e13820

commit 4b4eed074e848347f5a5b07d4d4b3fd2f6e13820
Author: Lucas Furukawa Gadani <lfg@chromium.org>
Date:   Tue Jun 4 23:12:04 2019 +0000

    Remove const interfaces from content/public.

    Tbr: boliu@chromium.org, dvadym@chromium.org, bengr@chromium.org
    Bug: 908139
Got flagged because .idl files aren't allowed as GN sources in
source_sets any more due to the GN change below. This particular
source_set wasn't being used anywhere and can be removed.

    GN change:

    https://gn.googlesource.com/gn/+/8730b0feb6b991fa47368566501ab9ccfb453c92

    commit  8730b0feb6b991fa47368566501ab9ccfb453c92
    author  Tom Anderson <thomasanderson@chromium.org>      Thu May 16 11:00:40 2019 -0700
    committer       Commit Bot <commit-bot@chromium.org>    Thu May 16 21:36:50 2019 +0000

    Disallow non-buildable sources in binary targets

    When adding a file that's not a source, header, or object file to a source_set,
    loadable_module, shared_library, executable, or static_library, gn will now
    generate an error like the following:

    ERROR at //third_party/protobuf/proto_library.gni:369:15: Only source, header,
    and object files belong in the sources of a
    source_set. //out/Test/pyproto/google_apis/gcm/protocol/mcs_pb2.py is not one of
    the valid types.
        sources = get_target_outputs(":$action_name")
                  ^---------------------------------
    See //google_apis/gcm/BUILD.gn:78:1: whence it was called.
    proto_library("proto") {
    ^-----------------------
    See //BUILD.gn:89:7: which caused the file to be included.
          "//google_apis/gcm:gcm_unit_tests",
          ^---------------------------------

    BUG=77
We patch NavigationRequest::OnStartChecksComplete to call
MaybeHideReferrer. One of the params to MaybeHideReferrer is top
document GURL which was available in OnStartCheckComplete. The Chromium
change below removed it. Added a chromium_src override that includes
GetTopDocumentGURL function that containes the deleted functionality.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/435bcb58bb2c75be8276f1dde69fc6c9891c45ba

commit 435bcb58bb2c75be8276f1dde69fc6c9891c45ba
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date:   Fri Jul 12 20:50:06 2019 +0000

    Store |initiator_origin| in FrameNavigationEntry.

    Changes in this CL
    ==================

    This CL:

    1. Updates FrameNavigationEntry::UpdateEntry and
       FrameNavigationEntry's constructor so that they both take
       |const base::Optional<url::Origin>& initiator_origin| which
       gets stored in a new FrameNavigationEntry::initiator_origin_ field.

    2. Updates callers of FNE::UpdateEntry and FNE's constructor to
       provide/propagate the initiator as needed.  This includes
       adding an |initiator_origin| parameter to
       - NavigationEntryImpl's constructor
       - NavigationEntryImpl::AddOrUpdateFrameEntry
       - NavigationController::CreateNavigationEntry
       (the list above is not necessarily exhaustive/complete)

    3. Uses the new |FrameNavigationEntry::initiator_origin()| from
       NavigationEntryImpl::ConstructCommonNavigationParams (which
       used to always provide |base::nullopt| initiator for history
       navigations - always treating them as browser-initiated, rather
       than replaying the original initiator).

    The changes above makes sure that the right Sec-Fetch-Site http request header is
    "replayed" during history navigations.  The CL adds browser tests and
    WPT tests to cover the new, desired behavior.

    Follow-up changes
    =================

    This CL does not:

    - Use |FrameNavigationEntry::initiator_origin()| in GetOriginForURLLoaderFactory
      in render_frame_host_impl.cc (this will be done in a follow-up CL at
      https://crrev.com/c/1672176)

    - Handle persisting |FrameNavigationEntry::initiator_origin()| for
      session restore (this is tracked in a separate https://crbug.com/976055).

    Bug: 946503
…essageLoopRun.

We used to start a number of our services in
BraveBrowserProcessImpl::ResourceDispatcherHostCreated, which was an
override of BrowserProcessImpl. However the method was removed in the
base class due to Chromium change to remove
ChromeResourceDispatcherHostDelegate.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/c098bc87fdf68370de521a35ade804d1d4ede9c2

commit c098bc87fdf68370de521a35ade804d1d4ede9c2
Author: John Abd-El-Malek <jam@chromium.org>
Date:   Fri May 31 19:33:55 2019 +0000

    Remove ChromeResourceDispatcherHostDelegate as it's not used anymore.

    Bug: 934009
Updated name in constructor of our override BravePrefProvider.

Chromim change:

https://chromium.googlesource.com/chromium/src/+/94c80d547af89125e18831420d57562117c8e348

commit 94c80d547af89125e18831420d57562117c8e348
Author: Ramin Halavati <rhalavati@chromium.org>
Date:   Tue Jun 4 06:13:36 2019 +0000

    Replace incognito with off_the_record in ContentSettingsPref*.

    ContentSettingsPref and ContentSettingsPrefProfovider classes receive
    an |incognito| argument that actually triggers the off-the-record
    behavior and is not necessarily an incognito mode specifier.
    The argument and all related items are renamed to off_the_record to
    remove ambiguity.

    Bug: 968028
The method now returns a struct instrad of having mutliple out params.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/4ed01619c8ae43d3a1ef1f8acd713aa6aaa3530b

commit 4ed01619c8ae43d3a1ef1f8acd713aa6aaa3530b
Author: Devlin Cronin <rdevlin.cronin@chromium.org>
Date:   Thu Jul 18 17:41:55 2019 +0000

    [Extensions Bindings] Return a struct from APISignature parsing methods

    Make APISignature::ParseArgumentsToJSON(),
    APISignature::ParseArgumentsToV8(), and
    APISignature::ConvertArgumentsIgnoringSchema() return a struct
    containing the parse results, including arguments, error, and
    async response type (callback if one were provided).

    This will make it easier when we need to provide additional information
    about if a promise should be returned.

    No behavior change is expected.

    Bug: 978538
Updated BraveComponentLoader to use the new constractor signature.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/be1f920bfb7aa8094f4b89efc297dc32746876d6

commit be1f920bfb7aa8094f4b89efc297dc32746876d6
Author: Michael Giuffrida <michaelpg@chromium.org>
Date:   Wed Jun 5 22:36:18 2019 +0000

    Don't add Kiosk Next Home app in normal sessions

    The Kiosk Next Home app should only be loaded in Kiosk Next Home
    sessions (using the pref as a proxy for this).

    Also removes unused local_state references.

    Bug: 937549
We were overriding base::GetFieldTrialParamValueByFeature function call
in location_bar_model_impl.cc in chromium_src to force the experiment
outcome to
OmniboxFieldTrial::kSimplifyHttpsIndicatorParameterBothToLock.
The feature is now on by default and the behavior is the same as what we
were forcing. Removed the no longer needed override.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/c26ef30d0961cbcdf2a226792922d73e6a1fc59f

commit c26ef30d0961cbcdf2a226792922d73e6a1fc59f
Author: Christopher Thompson <cthomp@chromium.org>
Date:   Fri Jun 7 01:55:45 2019 +0000

    Enable SimplifyHttpsIndicator feature by default

    This also cleans up the various old conditions, keeping the feature
    flag as a simple binary flag (enabled = lock-only). Also updates tests
    and removes the console warning and testing config.

    Bug: 803138
This flow has been removed from Chromium.

Chromium changes:

https://bugs.chromium.org/p/chromium/issues/detail?id=956680

https://chromium.googlesource.com/chromium/src/+/afd6d11e54a3682cf1e4d0476e598eb234488246

commit afd6d11e54a3682cf1e4d0476e598eb234488246
Author: Hector Carmona <hcarmona@chromium.org>
Date:   Mon Jun 24 21:07:42 2019 +0000

    Navi: Delete entry point for showing chrome://welcome-win10

    Bug: 956680

https://chromium.googlesource.com/chromium/src/+/9359944557ddce6a63516df681eb38e0a70829df

commit 9359944557ddce6a63516df681eb38e0a70829df
Author: Hector Carmona <hcarmona@chromium.org>
Date:   Wed Jun 26 17:56:25 2019 +0000

    Navi: Deprecate kHasSeenWin10PromoPage pref.

    Bug: 956680
signin_pref_names.h and other header files used in unit tests are now in
components/signin/public/base/.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/3517170ea99d55a43b030a55409ddc300846d0f9

commit 3517170ea99d55a43b030a55409ddc300846d0f9
Author: Colin Blundell <blundell@chromium.org>
Date:   Thu Jul 11 08:16:34 2019 +0000

    Signin: Restructure //components/signin/core/browser:shared

    This CL moves the files that are currently in the
    //components/signin/core/browser:shared GN target into the structure
    described in this document:

    https://docs.google.com/document/d/1p_kahITGFgv7PehQ61-thRVR3Hrdaf3tLryMytTRPYs/edit#

    Namely, files intended for usage by the entire signin component and its
    consumers are moved into a new //signin/public/base/ directory. Files
    that are conceptually part of the IdentityManager public interface are
    moved into //signin/public/identity_manager/.

    This change was done in two parts:

    1. A script that did the code moves and corresponding renames,
       include path changes, etc.
    2. Manual followup that changed GN files and DEPS to reflect the new
       structure.

    For ease of reviewing, I uploaded 1 as the original PS and 2 as PS2.

    TBR=jochen@chromium.org

    Bug: 952788
ContainsKey/Value have been removed.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/73c901e63c6f2c1cfab306f4c4873bb30bfba651

commit 73c901e63c6f2c1cfab306f4c4873bb30bfba651
Author: Jan Wilken Dörrie <jdoerrie@chromium.org>
Date:   Wed Jun 12 09:02:32 2019 +0000

    [base] Remove base::Contains{Key,Value}

    This change removes base::ContainsKey() and base::ContainsValue() from
    the codebase. In addition, it migrates remaining usages of these methods
    to using base::Contains instead. These usages were not caught by the
    search and replace CLs, because they either were added afterwards, or
    were unqualified and used ADL.

    TBR=rockot@google.com,blundell@chromium.org

    Bug: 970209
Chromium change:

https://chromium.googlesource.com/chromium/src/+/89a5f3ab57a994cd2652c45475c4b83895a40a94

commit 89a5f3ab57a994cd2652c45475c4b83895a40a94
Author: John Abd-El-Malek <jam@chromium.org>
Date:   Fri Jun 14 18:21:53 2019 +0000

    Remove IOThread class as it's not needed anymore.

    Bug: 934009
Browser tests are run from
  ChromeBrowserMainParts::PreMainMessageLoopRun
    ChromeBrowserMainParts::PreMainMessageLoopeRunImpl
      parameters().ui_task->Run() in chrome_browser_main.cc:1827

which is before ChromeBrowserMainParts::PreMainMessageLoopRun calls
PreMainMessageLoopRun on extra parts. Since our services were being
started in extra parts PreMainMessageLoopRun, the test would run prior
to services starting.
ChromeBrowserMainParts::PostBroserStart, however, is being called prior
to execution of ui_task from which the tests are run.
Chromium change:

https://chromium.googlesource.com/chromium/src/+/5b9e43d976aca377588875fc59c5348ede02a8b5

commit 5b9e43d976aca377588875fc59c5348ede02a8b5
Author: Hwanseung Lee <hs1217.lee@samsung.com>
Date:   Tue Jun 25 01:55:32 2019 +0000

    Convert enum to enum class for BoxLayout::Orientation

    Use enum class instead of enum for BoxLayout::Orientation
    enum class is more type safety.

    Bug: 940736
Removed unnecessary spellcheck/os build flags checks.

The flag was causing the include not to happen due to a this change:

https://chromium.googlesource.com/chromium/src/+/de74ce301c50fd3a4815faff207c9592416eb337

commit de74ce301c50fd3a4815faff207c9592416eb337
Author: Siye Liu <siliu@microsoft.com>
Date:   Thu Jun 20 20:44:43 2019 +0000

    windows spellchecker integration.

    This CL aims to implement windows spellchecker integration in Chromium
    project, so that user can switch to use windows spellchecker or
    hunspell spellchecker at run time. We need to implement platform
    agnostic interfaces to integrate windows spellchecker into Chromium. We
    also need to refactor some code to enable runtime switch between
    Windows spellchecker and hunspell spellchecker.

    We have outlines following steps to achieve the goal:

    (1) Implement spellcheck_platform interface.
          spellcheck_platform is an interface that platform-specific
          spellchecker needs to implement. Create spellcheck_platform_win.cc
          which contains Windows specific logic. All COM calls are happeninn
          on the background thread. spellcheck_platform API are all async.

    (2) Refactor SpellCheckHostChromeImpl.
          SpellCheckHostChromeImpl is a derived class from SpellCheckHost
          which provides basic spellcheck support. Mac has separate
          implementation located at spell_check_host_chrome_impl_mac.cc.
          Windows can share the same implementation, therefore, I move the
          code to the base derived class at spellcheck_host_chrome_impl.cc
          and delete mac specific file.

    (3) Refactor SpellingRequest.
          SpellingRequest is owned by SpellCheckHostChromeImpl and is
          currently located at spell_check_host_chrome_impl_mac.cc file.
          Created seperate files spelling_request.h and spelling_request.cc
          for defination and declaration of SpellingRequest.

    (4) Refactor CreateNativeSpellingEngine().
          CreateNativeSpellingEngine() used to live in seperate files for
          different spellcheckers. For platform specific spellchecker, it
          is located at platform_spelling_engine.cc. For hunspell
          spellchecker, it is located at hunspell_engine.cc. In order to
          enable runtime switch between those two spellcheck services, We
          need to have a uniformed definiation. Therefore, I create a new
          fine spelling_engine.cc base class and put a uniformed defination
          of CreateNativeSpellingEngine().

    (5) Define USE_RENDERER_SPELLCHECKER build flag
          We already have USE_BROWSER_SPELLCHECKER build flag. The decision
          to use platform specific spellcheck or hunspell spellcheck is
          made at build time. It's not the case anymore. We want to switch
          between spellcheck services at runtime. use browser spellcheck
          (platform specific spellcheck) and use renderer spellcheck
          (hunspll spellcheck) are no longer mutually exclusive. I created
          USE_RENDERER_SPELLCHECKER build flag to indicate usage of
          hunspell spellcheck service.

    (6) create feature flag kWinUseBrowserSpellChecker.
          In order to enable runtime switch between two spellcheck services.
          We need to have a feature flag to indicate which spellcheck
          services to use. I created kWinUseBrowserSpellChecker. The flag
          only has effect on Windows.

    (7) Create spellcheck::UseBrowserSpellChecker()
          In order to enable runtime switch between platform specific
          spellcheck and hunspell spellcheck, we need a runtime check
          instead of build time check. I created a runtime check an put it
          in file spellcheck_features.cc. For Windows, the method will check
          for feature flag kWinUseBrowserSpellChecker to determine which
          spellcheck service to use. On all other platforms, it will return
          build time flag.

    After these steps, we enabled Windows Spellcheck Services integration
    and also achieved runtime switch between platform spellchecker and
    hunspell spellchecker for windows platform.

    Bug: 463364
mkarolin added 23 commits Aug 14, 2019
ChromeNetworkDelegate has been removed and we can't subclass it any
more. It is also no longer needed when network service is used.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/3576e9bf0861248a7b3e7133b9e4c216f0e19819

commit 3576e9bf0861248a7b3e7133b9e4c216f0e19819
Author: John Abd-El-Malek <jam@chromium.org>
Date:   Thu Jun 6 22:25:50 2019 +0000

    Remove ChromeNetworkDelegate.

    The implementation is gone, but I've left the files because the IsAccessAllowed methods which aren't specific to the NetworkDelegate aspect of this are still used. I'll rename them in a followup.

    Bug: 934009
Chromium change:

https://chromium.googlesource.com/chromium/src/+/7a4dcba18df43e3200a37f4906c10348e8755148

commit 7a4dcba18df43e3200a37f4906c10348e8755148
Author: Takashi Toyoshima <toyoshim@chromium.org>
Date:   Mon Jul 22 11:28:27 2019 +0000

    Reland "mojo: Introduce StringDataSource to replace StringDataPipeProducer"

    This is a reland of 06c0387de9e47f4dcfff928b232a13854f128e3a

    Updates from the last patchset:
     - RunUntilIdle() in the SignedExchangeLoaderTest.Simple is replaced
      with QuitClosure() and Run() to fix the flakiness.

    Original change's description:
    > mojo: Introduce StringDataSource to replace StringDataPipeProducer
    >
    > This patch introduces StringDataSource to reuse DataPipeProducer
    > even for string uses.
    >
    > Now DataPipeProducer::DataSource has GetLength() interface so to
    > reduce unnecessary memory consumption for data pipe buffer.
    >
    > Bug: 983023
    > Change-Id: I03c783e571e3d75f0d6bdc19f6623c4da29853b8
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1699526
    > Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
    > Reviewed-by: Ken Rockot <rockot@google.com>
    > Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
    > Auto-Submit: Takashi Toyoshima <toyoshim@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#678606}

    Bug: 983023
These were removed from the base class (ChromeContentBrowserClient) and
we do not need them any more due to #3130.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/e7db7a21873d31f5c74a81670a3047c08757d8ed

commit e7db7a21873d31f5c74a81670a3047c08757d8ed
Author: Maks Orlovich <morlovich@chromium.org>
Date:   Thu Jul 25 01:47:46 2019 +0000

    Android MediaResourceGetterImpl: use RestrictedCookieManager for policy-following cookie access.

    This removes the last use of ContentBrowserClient::AllowGetCookie, and permits the removal
    of AllowGetCookie/AllowSetCookie which is also done in this CL.

    Bug: 965982
Looks like a bug in Chromium: bluetooth_uuid.* was moved to
//device/bluetooth/public/cpp/, but BUILD.gn in
extensions/common/api/bluetooth/ didn't get updated with the
new dependency.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/47659c4b35f4a5ca96938b56cdaa19c8064f2380

commit 47659c4b35f4a5ca96938b56cdaa19c8064f2380
Author: Jason Majors <jmajors@google.com>
Date:   Mon Jul 8 18:23:28 2019 +0000

    Refactor //device to move bluetooth_uuid.* to //device/bluetooth/public/cpp/ .

    Moving these files to public/cpp to change the dependency structure. Other
    components that need the bluetooth UUID can depend on this new library, without
    having to depend on the entire //device library.
    Moved the bluetooth UUID to //device/bluetooth/public/cpp to prevent dependency
    cycles.

    Bug: 976964
* Replaced all occurrances of paper-button with cr-button.
* Removed paper_button_style.css.
* Added cr-button template style overrides to polymer_overriding.
* Patched polymer.html to include polymer_overriding and removed
polymer_overriding from brave_settings_overrides.

Chromium change:

Removal of paper-button:
https://chromium.googlesource.com/chromium/src/+/03d1652fb3cecd58f02ce783da958901cc2c31db

commit 03d1652fb3cecd58f02ce783da958901cc2c31db
Author: Esmael El-Moslimany <aee@chromium.org>
Date:   Wed Jul 10 21:58:43 2019 +0000

    WebUI: remove paper-button from third_party/polymer

    Bug: 967793

Bug link with other commits:
https://bugs.chromium.org/p/chromium/issues/detail?id=967793
Pref needs to be supplied not only to the radio-group, but also to the
individual controlled-radio-buttons.
Updated syncer_helper to use children()[] and children().size()
instead. Updated relevant code to use size_t instead of int/uint64_t.

Chromium changes:

https://chromium.googlesource.com/chromium/src/+/5174590b09badcd86c14d322266039782e94a532

commit 5174590b09badcd86c14d322266039782e94a532
Author: Peter Kasting <pkasting@chromium.org>
Date:   Fri Jun 28 21:54:55 2019 +0000

    Remove TreeNode::GetChild().

    Bug: 956419

https://chromium.googlesource.com/chromium/src/+/b0d21f299ba5fd0c51c26f1f440fb1a006fc4753

commit b0d21f299ba5fd0c51c26f1f440fb1a006fc4753
Author: Peter Kasting <pkasting@chromium.org>
Date:   Tue Jun 25 00:26:16 2019 +0000

    Remove instances of TreeNode::child_count().

    Bug: 956419
Doesn't take encryptor param any more.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/b0294c676cb8fe3a75b26e098b15b37156e48912

commit b0294c676cb8fe3a75b26e098b15b37156e48912
Author: Maksim Moskvitin <mmoskvitin@google.com>
Date:   Mon Jul 15 17:40:20 2019 +0000

    [Sync] Remove encryptor_ member from Cryptographer

    The only reason to have Encryptor dependency inside Cryptographer is
    methods related to so-called bootstrap token. They provide logic
    related to persistence of custom passphrase keys and strictly don't
    seem to belong Cryptographer level. While we can't factor them out
    right now, because it would mean intrusive and big changes in Directory
    codepath, we reduce this dependency by replacing |encryptor_| member in
    Cryptographer class with |encryptor| parameter in corresponding methods
    family. It allows to simplify significant amount of code, related to
    plumbing Encryptor, while it's actually not needed.

    Bug: 967417
* Use `@media (prefers-color-scheme: dark)` instead of `[dark]`.
* Turn on kWebUIDarkMode feature on all platforms - this feature now
  gates the above @media directive.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/6e5a6179e616f62bb575b1cd5e1c078fd4a0bc47

commit 6e5a6179e616f62bb575b1cd5e1c078fd4a0bc47
Author: Dan Beam <dbeam@chromium.org>
Date:   Fri Jun 7 21:44:46 2019 +0000

    WebUI Dark Mode: update ui/webui to use @media queries

    This changes the implementation around how dark mode is queried in CSS.

    Bug: 965811

https://chromium.googlesource.com/chromium/src/+/f0a7e117061208634ebf1cff20c4253db53f1b7a

commit f0a7e117061208634ebf1cff20c4253db53f1b7a
Author: Dan Beam <dbeam@chromium.org>
Date:   Fri Jun 7 18:40:58 2019 +0000

    Make @media (prefers-color-scheme:) respect features::kWebUIDarkMode
    while on chrome:// URLs

    This allows us to use this mechanism in CSS:

      @media (prefers-color-scheme: dark) {
      }

    to vary styles for Chrome web UI in dark mode while also disabling via
    feature on certain platforms.

    This unblocks us from migrating to the @media query (from the existing
    [dark] attribute syntax) and later removing a bit of JS/C++ custom code
    in favor of simply using the web platform.

    R=futhark@chromium.org
    BUG=965811

https://bugs.chromium.org/p/chromium/issues/detail?id=965811
Fixes expected results. GetDisabledReasons returns a different value
from Chromium because one of the sync preferences had the initial value
flipped.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/84acadd70d0ef573faf775d712ba6cd430f931e2

commit 84acadd70d0ef573faf775d712ba6cd430f931e2
Author: Marc Treib <treib@chromium.org>
Date:   Mon Jul 8 16:02:25 2019 +0000

    SyncPrefs: Change default value of "IsSyncRequested" to false

    This is achieved by migrating the "SyncSuppressed" pref to a new
    "SyncRequested" pref.

    Before this CL, there was a pref called "sync.suppress_start", which was the
    inverse of the "IsSyncRequested" flag in SyncPrefs/SyncUserSettings. It was
    false by default, meaning Sync was considered "requested" even if the user
    had never even attempted to turn on Sync.

    This CL migrates the value over to a new "sync.requested" pref, which is the
    inverse of the old pref, and has the correct default value (not requested).

    If the old pref has an explicit value, then the migration is simply
    "sync.requested := !sync.suppress_start". If the old pref does not have a
    value, then there's generally nothing to migrate (and thus the implicit value
    of "IsSyncRequested" will change to false, which is the sane default state).
    However, as one special case of the migration, if the old pref is not
    explicitly set, but "IsFirstSetupComplete" is true, then that means Sync was
    actually enabled, but (probably through some past bug in the Sync setup flow)
    "SetSyncRequested(true)" was just never called. To correctly migrate users
    in this state, we set the new "sync.requested" pref to true.

    Apart from the migration edge case mentioned above, the different default
    value does not introduce a behavior change: All sync setup flows must anyway
    call SetSyncRequested(true) since they can't be sure what the previous value
    was.

    Bug: 906034
Now takes browser pointer instead of a location bar pointer.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/ad9765ab97dfb00c188a331852abcbf40e818a14

commit ad9765ab97dfb00c188a331852abcbf40e818a14
Author: Evan Stade <estade@chromium.org>
Date:   Tue Jul 2 17:02:41 2019 +0000

    Remove NOTIFICATION_AUTOCOMPLETE_CONTROLLER_RESULT_READY

    This was only used in tests. Those tests can instead use
    OmniboxControllerEmitter::Observer.

    This CL also combines the OmniboxApiTests that are browser tests with
    the ones that are interactive ui tests. They were split rather sloppily,
    with a common base class declared and defined in a header file they both
    included (but not mentioned in any BUILD.gn). Most of the affected tests
    are actually disabled anyway. Now they're all interactive ui tests.

    Bug: 268984
It used to be disabled by default, but enabled by experiments,
so we explicitly disabled it. When we got rid of experiments
we removed the explicit disablement as it was just disabled by
default. Now Chromium flipped it to be enabled by default, so
we need to explicitly disable it again.

Removed from being explicitly disabled by us in this commit:

commit 78c8700
Author: Pranjal Jumde <pranjal.jumde@gmail.com>
Date:   Tue May 21 00:04:17 2019 -0700

    Issue 4552: Restore features to correct state after disabling field trials

Chromium change:

https://chromium.googlesource.com/chromium/src/+/0a4ecf746ae7ffb2659ae2857a730ea17c68f754

commit 0a4ecf746ae7ffb2659ae2857a730ea17c68f754
Author: Mustafa Emre Acer <meacer@chromium.org>
Date:   Wed Jun 26 23:29:50 2019 +0000

    Enable Lookalike URLs interstitial by default

    This CL enables the interstitial by default for lookalike domains in
    user's navigation history (i.e. site engagement). Matching with top
    domains is controlled by the topsites parameter.
We populate this field from `network::ResourceRequest`s
`top_frame_origin`, but it is being phased out in favor
of `net::NetworkIsolationKey`. The transition has not fully
completed yet, so in some cases `top_frame_origin` is populated
while in others `trusted_network_isolation_key` is.

cc: @iefremov

Chromium change:

https://chromium.googlesource.com/chromium/src/+/1b5366c62c02fd6edfe83703e57e4fcd14d38f64

commit 1b5366c62c02fd6edfe83703e57e4fcd14d38f64
Author: Shivani Sharma <shivanisha@chromium.org>
Date:   Tue Jul 16 20:08:13 2019 +0000

    Split cache: Network Isolation key for navigation resources

    Adds network isolation key in the ResourceRequest for navigations to be
    propagated to net::URLRequest. The key is also updated for redirects.

    Updates NavigationRequestInfo to have a network isolation key as a
    member instead of top frame origin. Also updated the corresponding
    intercepting browser tests in navigation_browsertest.

    Added browser tests to verify if the navigation resources (both main
    frame and sub frame) are expected to be cached including the redirect use
    case.

    Also removing the code in url_request_http_job.cc that was using top frame
    origin to create NIK if it was not already populated. This is because with
    this change we would have NIK being created in browser process for subresources,
    navigation resources and dedicated worker resources which were earlier using the
    top frame origin.

    (Note that sub-resources URL requests do not use this path and have their
    network isolation key filled up in the URLLoaderFactory).

    Bug: 984130
Chromium change:

https://chromium.googlesource.com/chromium/src/+/d6b794c59f423ead8b1f2633c7fd879710aa1382

commit d6b794c59f423ead8b1f2633c7fd879710aa1382
Author: Himanshu Jaju <himanshujaju@chromium.org>
Date:   Tue Jul 16 19:31:46 2019 +0000

    Context menu for click to call
    Add tel scheme to list of schemes in url

    Screenshot for multiple devices: https://storage.cloud.google.com/chromium-translation-screenshots/d3ea7c88529dd93e5f403fa57d5df3bfadf8936a

    Screenshot for single device: https://storage.cloud.google.com/chromium-translation-screenshots/bc5be9872a3e0a2c30bbb9a80ac370cafa339988

    Bug: 972060
This function was removed along with url_request_mock_util.h.

Chromium change:

https://chromium.googlesource.com/chromium/src/+/779c64cbc9bf21539fe7b712df43b79952086704

commit 779c64cbc9bf21539fe7b712df43b79952086704
Author: Clark DuVall <cduvall@chromium.org>
Date:   Wed Jun 12 22:31:58 2019 +0000

    Cleanup unnecessary non-network service code

    Bug: 934009
…sService

Chromium change:

https://chromium.googlesource.com/chromium/src/+/06ec26ae93ec896440311c705d994d356a02897a

commit 06ec26ae93ec896440311c705d994d356a02897a
Author: Tommy C. Li <tommycli@chromium.org>
Date:   Mon Jun 10 18:01:42 2019 +0000

    [omnibox] Rename ContextualSuggestionsService => RemoteSuggestionsService

    These suggestions requests are not always contextual, but always remote.

    This CL corrects a misnomer and is a followup to:
    https://chromium-review.googlesource.com/c/chromium/src/+/1640160

    Bug: 963173
Chromium now enforces no renderer crashes assertion on browser tests. To
allow an intentional crash test ScopedAllowRendererCrashes needs to be
added.

Chromium changes:

https://chromium.googlesource.com/chromium/src/+/922389129506cc063b83ffddc7e27e0314ead777

commit 922389129506cc063b83ffddc7e27e0314ead777
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date:   Mon Jun 17 20:26:46 2019 +0000

    Start enforcing NoRendererCrashesAssertion in browser tests.

    Change-Id: Iec1b1090a675ff6af74661f5a000c41a9a8df940
    Bug: 972220

https://chromium.googlesource.com/chromium/src/+/96eca2d491cd1153b0674c8e6983312a83d55dcf

commit 96eca2d491cd1153b0674c8e6983312a83d55dcf
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date:   Thu Jun 13 20:46:42 2019 +0000

    Prepare browser tests for NoRendererCrashesAssertion.

    This CL adds ScopedAllowRendererCrashes to browser tests that
    (expectedly or unexpectedly) might trigger a renderer crash.

    Right now a browser test might pass, even if a renderer process crashed
    during the test execution.  After https://crrev.com/c/1650463 a renderer
    crash will trigger an explicit test failure, but before this enforcement
    can start, existing tests that experience renderer crashes (expectedly
    or unexpectedly) need to declare this via ScopedAllowRendererCrashes.

    This CL was uploaded by git cl split.

    R=bengr@chromium.org

    Bug: 972220
Theme switching broke due to the introduction of "preferred color
scheme" into native theme. See Chromium change below.

On top of SetDarkMode that we already were doing, added
SetPreferredColorScheme that sets preferred color scheme to our
selection.

Also, had to patch ChromeContentBrowserClient to catch switching
preferred color in web prefs when the system color is switched. That
gets triggered by the system color change, for example via control panel
on Windows. The Windows specific implementation watches a registry value
and updates preferred color scheme in the native theme. Would be great
to intercept it there, but in that layer we don't have access to our
setting stored in profile prefs, from what I can tell. Hence, the patch
to ChromeContentBrowserClient where the setting is used. Ugly.
cc: @simonhong perhaps you have better ideas?

Chromium change:

https://chromium.googlesource.com/chromium/src/+/67fd4d9f35650a079f6a636b5d19de77856bd2cf

commit 67fd4d9f35650a079f6a636b5d19de77856bd2cf
Author: Alison Maher <almaher@microsoft.com>
Date:   Fri Jul 12 18:34:21 2019 +0000

    Set preferred color scheme for high contrast

    This change adds logic to update the preferred color scheme based on
    the OS high contrast theme. If high contrast is not enabled, preferred
    color scheme will continue to be based on the OS dark mode state.

    A PreferredColorScheme enum was added to NativeTheme to keep track
    of the current high contrast/dark mode preferred color scheme.

    The updated preferred color scheme is used to evaluate the
    prefers-color-scheme media query.

    Bug: 970285
Can't use it as is right now. The proxy is commented out in
`BraveContentBrowserClient::CreateWebSocket`.

Chromium changes:

https://chromium.googlesource.com/chromium/src/+/c570adabe2a390ad16b8bbab2b9ffdd864ff7156

commit c570adabe2a390ad16b8bbab2b9ffdd864ff7156
Author: Yoichi Osato <yoichio@chromium.org>
Date:   Tue Jun 4 05:28:31 2019 +0000

    [websocket] Reland: "Split interface mojom::WebSocketClient"

    This CL splits the interface to two parts so that WebRequestProxyingWebSocket or
    extensions proxy only handshake of WebSocket:

    interface WebSocketHandshakeClient {
      OnStartOpeningHandshake(WebSocketHandshakeRequest request);
      OnFinishOpeningHandshake(WebSocketHandshakeResponse response);
      OnAddChannelResponse(string selected_protocol, string extensions);
    };

    interface WebSocketClient {
      OnDataFrame(bool fin, WebSocketMessageType type, array<uint8> data);
      OnFlowControl(int64 quota);
      OnDropChannel(bool was_clean, uint16 code, string reason);
      OnClosingHandshake();
      OnFailChannel(string reason);
    };

    Performance gain of receive-arraybuffer-1MBx100.html:
    Mine: 1050 ms
    ToT : 1221 ms

    Relanding:
     The previous patch was reverted because of a browser test
    of "--disable-features=NetworkService". This patch fixes it to adapt
    a WebRequestAPI test to both expectations.
     Reverted-change: https://chromium-review.googlesource.com/c/chromium/src/+/1628497

    Bug: 865001, 942989

https://chromium.googlesource.com/chromium/src/+/7ce089524dc096357034700d2e5b76ff29d50388

commit 7ce089524dc096357034700d2e5b76ff29d50388
Author: Yoichi Osato <yoichio@chromium.org>
Date:   Tue Jun 18 02:10:34 2019 +0000

    Reland "[WebSocket] Add --websocket-renderer-receive-quota-max command line flag."

    Reason for reland: the culprit was not this patch.

    This patch was reverted because of compile failure on android:
    https://chromium-review.googlesource.com/c/chromium/src/+/1660391

    However, relanding this don't cause compile failure.

    Bug: 865001

commit 04d43cf58c3473d83adfed27fb8dcb2ead6f4c3a
Author: Yoichi Osato <yoichio@chromium.org>
Date:   Fri Jun 14 04:04:21 2019 +0000

    [WebSocket] Add --websocket-renderer-receive-quota-max command line flag.

    This patch adds the flag that overrides default threshold value
    that the renderer calls AddReceiveFlowControlQuota() to the browser per
    receiving this amount of data so that the browser can continue sending
    remaining data to the renderer.
    Default value is 32k Bytes.

    The more the value is, browser tends the less stop sending packets
    and then consumes more memory.

    This flag will be used to investigate the performance issue.
    You can use this flag both on chrome and content_shell:
    $ ./chrome.exe --websocket-renderer-receive-quota-max=3000000
    This flag sets the threshold 3M Bytes.

    Implementation detail:
    This patch moves the default value constant from blink to
    net/websockets/websocket_channel.h so that we can pass the command line
    flag to the renderer.
    This change also enables us to modify the value while considering sent buffer
    from a server later on for further optimization.

    Bug: 865001

https://chromium.googlesource.com/chromium/src/+/6894c69a9c069d2175794c8d11743298dddd65cf

commit 6894c69a9c069d2175794c8d11743298dddd65cf
Author: Yutaka Hirano <yhirano@chromium.org>
Date:   Fri Jun 28 12:54:45 2019 +0000

    Rename WebSocketHandshakeClient messages

    In preparation to removing AddChannelRequest, rename AddChannelResponse
    to OnConnectionEstablished. OnFinishOpeningHandshake has been confusing
    because it doesn't mean successful handshake finish (i.e., connection
    establishment). Rename it to OnResponseReceived. Rename
    OnStartOpeningHandshake to OnOpeningHandshakeStarted for consistency.

    Bug: 967524

https://chromium.googlesource.com/chromium/src/+/8e0b4d43cebd21a0be442187fe33d325939857e1

commit 8e0b4d43cebd21a0be442187fe33d325939857e1
Author: Yutaka Hirano <yhirano@chromium.org>
Date:   Thu Jul 4 07:12:38 2019 +0000

    Remove mojom::WebSocket::AddChannelRequest

    ...in order to remove the unnecessary overhead on the browser process
    when downloading / uploading payloads. With this CL, both
    mojom::WebSocket and mojom::WebSocketClient only pass though the proxy
    interface implemented in extensions/browser/api/web_request.

    With this CL,

    1) NetworkContext::CreateWebSocket takes additional parameters. This
    makes the state transition in network::WebSocket a bit simpler.

    2) blink::mojom::WebSocketConnector is introduced.
    mojom::WebSocketConnector::Connector corresponds to
    mojom::WebSocket::AddChannelRequest.

    3) mojom::WebSocket is passed as a parameter of
    mojom::WebSocketHandshakeClient::OnConnectionEstablished.

    4) Instead of mojom::WebSocket, the extensions module now receives
    a function to initiate a WebSocket opening handshake.

    5) ContentBrowserClient::WillCreateWebSocket is split into three:
    WillInterceptWebSocket, GetWebSocketOptions and CreateWebSocket. This
    incurs an additional thread hop, but it will be fixed once the
    extensions module for WebSocket is moved to the UI thread.

    This improves [1] in my environment.

    Without the change: 318MB/s
    With the change   : 389MB/s

    1: third_party/blink/perf_tests/websocket/receive-arraybuffer-1MBx100.html

    Bug: 865001, 967524, 942989
@mkarolin mkarolin force-pushed the 77.0.3865.42 branch from cbef662 to ef4dad3 Aug 28, 2019
This commit is a squash of 4 commits from #3281.

- Fix setting preferred color scheme logic for brave theme change
- Fix system dark mode change affect brave theme on Win10
    When brave theme is set to dark or light, system dark mode change
    should not affect brave theme.
- CleanUp: Delete SystemThemeSupportDarkMode
    Upstream added ui::NativeTheme::SystemDarkModeSupported().
    Replace ours with upstream one.
- Add dark mode change test by modifying reg value for Windows
    This test can verify whether theme change notification is delivered
    or not.
    If brave theme option is not default, system dark theme change should
    not trigger theme change notificagtion delivery.
@mkarolin mkarolin changed the title WIP: Update patches from Chromium 76.0.3809.100 to Chromium 77.0.3865.42 WIP: Update patches from Chromium 76.0.3809.132 to Chromium 77.0.3865.42 Aug 29, 2019
@mkarolin
Copy link
Contributor Author

mkarolin commented Aug 30, 2019

Closing in favor of #3304

@mkarolin mkarolin closed this Aug 30, 2019
#endif // !defined(OS_MACOSX)

- switch (native_theme->GetPreferredColorScheme()) {
+ BRAVE_CHROMECONTENTBROWSERCLIENT_OVERRIDEWEBKITPREFS

This comment has been minimized.

Copy link
@bridiver

bridiver Aug 30, 2019

Collaborator

did this not work? This could have been done without any patching and if it works then the two patches below would not be necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.