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.100 to Chromium 77.0.3865.35 #3180

Closed
wants to merge 51 commits into from

Conversation

@mkarolin
Copy link
Contributor

mkarolin commented Aug 14, 2019

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

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 mkarolin added this to the 0.71.x - Nightly milestone Aug 14, 2019
@mkarolin mkarolin self-assigned this Aug 14, 2019
@mkarolin mkarolin force-pushed the 77.0.3865.35 branch from b1240f6 to b3a875f Aug 15, 2019
@mkarolin mkarolin changed the title Update patches from Chromium 76.0.3809.100 to Chromium 77.0.3865.35 WIP: Update patches from Chromium 76.0.3809.100 to Chromium 77.0.3865.35 Aug 15, 2019
@mkarolin mkarolin marked this pull request as ready for review Aug 15, 2019
@mkarolin mkarolin requested a review from bridiver as a code owner Aug 15, 2019
@mkarolin mkarolin force-pushed the 77.0.3865.35 branch from b3a875f to a45ec88 Aug 15, 2019
@mkarolin mkarolin force-pushed the 77.0.3865.35 branch 3 times, most recently from de98ade to f844021 Aug 16, 2019
@mkarolin mkarolin force-pushed the 77.0.3865.35 branch 8 times, most recently from c72d013 to 8396fa5 Aug 17, 2019
mkarolin added 21 commits Aug 14, 2019
ChromeContentBrowserClient.

Updated override in BraveContentBrowserClient.

Chromium change:

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

commit 1be897a02157e874bcdf889192951537a9cf90b3
Author: Dominic Farolino <dom@chromium.org>
Date:   Sat Jul 20 08:11:42 2019 +0000

    Convert old mojo types to new ones in //content loading code

    Specifically, this code updates URLLoaderFactoryBundleInfo, and
    subclasses to use the new mojo types. This CL also updates variables
    that reference this class in RenderFrameHostImpl, and follows the path
    down through ContentBrowserClient subclasses updating variables where
    necessary.

    The change is mostly mechanical, and as tightly-scoped as I could make
    it given the instances I aimed to update.

    Bug: 955171
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
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
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
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
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
* 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.
* 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
Chromium change:

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

commit b36394cad79024db5bff0935006b34d0fd20b6dd
Author: Steven Zhu <jz@chromium.org>
Date:   Tue Jun 4 16:10:46 2019 +0000

    [Chromecast] Pass in |io_task_runner| to GCM components.

    When |io_task_runner| is power managed, delayed tasks and timers running on it
    can wake up the system.

    Bug: internal b/132993317
Chromium change:

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

commit a76a6e39300b764f4a0e3824b9d17e6c2bf51b73
Author: Alex Chau <alexchau@chromium.org>
Date:   Wed Jun 26 16:20:01 2019 +0000

    Create WebPushSender for sending web-push messages

    - Created WebPushSender for sending out web-push messages using VAPID
      (https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications#using_vapid)
    - Created WebPushMessage struct to encapsulate message_id into messages
      to make callbacks easier
    - Refactored across GCMEncryptionProvider / GCMDriver to use
      WebPushMessage and provide callback mechanism

    Bug: 966037
ProfileManagerWithoutInit::CreateProfileAsyncHelper overridden in
TorUnittestProfileManager now returns unique_ptr to Profile.

Chromium change:

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

commit 8f0b748a630d30d0cdc08cd2e4b6dd64b139e97b
Author: Daniel Hosseinian <dhoss@chromium.org>
Date:   Fri Jun 7 18:21:04 2019 +0000

    ProfileManager::RegisterTestingProfile() now takes a std::unique_ptr

    This commit clarifies previously established ownership semantics of
    Profiles within ProfileManager through the use of unique pointers.
    Changes were made to the parameters of
    ProfileManager::RegisterTestingProfile() and
    ProfileManager::RegisterProfile() to take a std::unique_ptr instead of a
    raw pointer. A further change was made to the return type of
    ProfileManager::CreateProfileAsyncHelper() from a raw pointer to a
    unique pointer. All callers to the aforementioned functions (including
    unit tests) that made calls to the two functions are updated to pass in
    unique pointers.

    Bug: 968187
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
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
These features were 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

Since then all these features remained disabled by default.

However, one of the features has now been flipped to being enabled by
default: `kLookalikeUrlNavigationSuggestionsUI` cc: @jumde

Since we aren't explicitly disabling any of these features, removed them
from the test.

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.
@mkarolin mkarolin force-pushed the 77.0.3865.35 branch from f1096c2 to fd59fc1 Aug 22, 2019
mkarolin added 4 commits Aug 22, 2019
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 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
…128fb354f238bce350f9a4a643e9d
@mkarolin mkarolin force-pushed the 77.0.3865.35 branch from fd59fc1 to 8a0679d Aug 22, 2019
@mkarolin
Copy link
Contributor Author

mkarolin commented Aug 23, 2019

Closing in favor of #3247

@mkarolin mkarolin closed this Aug 23, 2019
@mkarolin mkarolin deleted the 77.0.3865.35 branch Nov 8, 2019
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.

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