Browse Source

chore: bump chromium to 78.0.3896.6 (7-0-x) (#19609)

* chore: Bump 78.0.3894.0

* chore: bump chromium to 32e0bab929213da1019992bf31d29 (master) (#19488)

* chore: bump chromium to cbeb16cf544f79c1990f1eae4d4fe (master) (#19610)

Co-authored-by: Erick Zhao <[email protected]>
Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by Micha Hanselmann <[email protected]>

* chore: bump chromium to 62327c655093c821aa0fcfc6db53f5fd943e08c7 (master) (#19792)

* chore: bump chromium in DEPS to f3bf493731e868e1f5f48e7e1adc02ea5eccfbbd

* chore: bump chromium in DEPS to 4db0c87d4aa6f27ffa0b5fc77d20e10047962484

* chore: bump chromium in DEPS to d933a504c264dc8fe85267f47aef3588531875b5

* chore: bump chromium in DEPS to 34afdb68980f581ae911b85b727bc17e126cf5f9

* update disable-redraw-lock.patch

https://chromium-review.googlesource.com/c/chromium/src/+/1600387

* update desktop_media_list.patch

https://chromium-review.googlesource.com/c/chromium/src/+/1729156

* update notification_provenance.patch

https://chromium-review.googlesource.com/c/chromium/src/+/1742779

* update printing.patch

https://chromium-review.googlesource.com/c/chromium/src/+/1646772

* update verbose_generate_bpad_syms.patch

https://chromium-review.googlesource.com/c/chromium/src/+/1745986

* update patch metadata

* remove printing_compositor manifests

https://chromium-review.googlesource.com/c/chromium/src/+/1742734

* update for URLLoaderFactoryType enum

https://chromium-review.googlesource.com/c/chromium/src/+/1754716

* remove gin string16 converter

https://chromium-review.googlesource.com/c/chromium/src/+/1750093

* ClearCompositorFrame() has been removed

https://chromium-review.googlesource.com/c/chromium/src/+/1746301

* message_loop -> message_loop_current

https://chromium-review.googlesource.com/c/chromium/src/+/1738552

* include resource_response header

* pdf compositor no longer uses service manager

https://chromium-review.googlesource.com/c/chromium/src/+/1742734

* chore: bump chromium in DEPS to 00d5933101d8d8dc9546eadbe7ee1b41077e6db1

* pane focus fns aren't pure virtual anymore

https://chromium-review.googlesource.com/c/chromium/src/+/1708767

* fix: make std::hash value-non-const

broken by https://chromium-review.googlesource.com/c/chromium/src/+/1711202

* update swiftshader in zip_manifests

https://swiftshader-review.googlesource.com/c/SwiftShader/+/34911

* address feedback from @deepak1556

* don't enable kLegacyWindowsDWriteFontFallback

https://chromium-review.googlesource.com/c/chromium/src/+/1753006

* chore: bump chromium in DEPS to 84497314005e1968da06804f8fde539d9872310e

* update printing.patch

remove bottom diff owing to https://chromium-review.googlesource.com/c/chromium/src/+/1678182 and update for https://chromium-review.googlesource.com/c/chromium/src/+/1678182

* convert CookieChangeListener to new Mojo types

https://chromium-review.googlesource.com/c/chromium/src/+/1753371

* rename ui::ClipboardType -> ui::ClipboardBuffer

https://chromium-review.googlesource.com/c/chromium/src/+/1758730

* logging::LoggingSettings log_file -> log_file_path

https://chromium-review.googlesource.com/c/chromium/src/+/1699477

* roll DEPS to latest lkgr

* fix: override GetFontLookupTableCacheDir()

When Chromium goes to use its fallback font table creation code paths,
it creates the cache directory it uses by calling
GetFontLookupTableCacheDir() with a path that doesn't exist in Electron.
To ensure that a legitimate file path is created, we need to override it
with Electron's DIR_USER_DATA so it doesn't use chrome::DIR_USER_DATA.

* chore: bump chromium in DEPS to 6758a0879931bc4df630a80a36c82d7855ae3155

* update pthread_fchdir patch

https://chromium-review.googlesource.com/c/chromium/src/+/1759149

* update printing patch

* update cookie usage and fn signatures

https://chromium-review.googlesource.com/c/chromium/src/+/1758437

* chore: bump chromium in DEPS to bdaca97e1cc27fb977e56f30f74cdb906da9527e

* remove fix_make_std_hash_value-non-const.patch

https://chromium-review.googlesource.com/c/chromium/src/+/1762335

* Convert enum to enum class for FocusManager::FocusChangeReason

https://chromium-review.googlesource.com/c/chromium/src/+/1767281

* roll DEPS to latest lkgr

* update dom_storage_limits.patch

https://chromium-review.googlesource.com/c/chromium/src/+/1767556

* chore: remove pre network service classes from shell/browser/net (#19644)

* refactor: rm IOThread class

* chore: rm expose-net-observer-api.patch

* chore: rm unused shell/browser/net/ classes

* chore: mv CertVerifierClient to separate header

* chore: rm url_request_context_getter references

* chore: update patches

* Require task posters to specify an explicit destination

https://chromium-review.googlesource.com/c/chromium/src/+/1769080

* chore: Revert "Cleanup: Remove Menu Subtitles/Sublabels"

* chore: Bump chromium 78.0.3896.0

* build: add checkout_openxr=False to DEPS

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1745502

* chore: update patches

* Convert TrustedURLLoaderHeaderClient and TrustedHeaderClient to new mojo types

https://chromium-review.googlesource.com/c/chromium/src/+/1767298
https://chromium-review.googlesource.com/c/chromium/src/+/1768841

* skia: more rect api simplifications

https://skia-review.googlesource.com/c/skia/+/237038

* iwyu

* test: fix clearAuthCache test (#20015)

* fix: nws13n: make ses.setUserAgent work  (#20014)

* refactor tests to better control window creation

* fix: nws13n: make ses.setUserAgent work

* chore: update v8 patches

* Add enterprise policy for renderer CIG.

https://chromium-review.googlesource.com/c/chromium/src/+/1758589

* Convert enum to enum class for Wigdet::FrameType

https://chromium-review.googlesource.com/c/chromium/src/+/1767292

* [JJI] Convert to use string16 for data from JavaScript/Java

https://chromium-review.googlesource.com/c/chromium/src/+/1750093

* chore: Bump chromium 78.0.3896.6
Electron Bot 5 years ago
parent
commit
c7a3142bab
100 changed files with 1033 additions and 1181 deletions
  1. 4 11
      BUILD.gn
  2. 5 2
      DEPS
  3. 6 4
      chromium_src/BUILD.gn
  4. 2 46
      filenames.gni
  5. 1 5
      lib/browser/chrome-extension.js
  6. 3 6
      patches/chromium/.patches
  7. 8 7
      patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch
  8. 5 5
      patches/chromium/add_realloc.patch
  9. 0 20
      patches/chromium/allow_webview_file_url.patch
  10. 6 5
      patches/chromium/autofill_size_calculation.patch
  11. 1 1
      patches/chromium/blink-worker-enable-csp-in-file-scheme.patch
  12. 1 1
      patches/chromium/blink_initialization_order.patch
  13. 3 3
      patches/chromium/blink_local_frame.patch
  14. 6 6
      patches/chromium/blink_world_context.patch
  15. 1 1
      patches/chromium/browser_compositor_mac.patch
  16. 3 3
      patches/chromium/build_add_electron_tracing_category.patch
  17. 1 1
      patches/chromium/build_gn.patch
  18. 5 5
      patches/chromium/build_win_disable_zc_twophase.patch
  19. 18 18
      patches/chromium/can_create_window.patch
  20. 2 2
      patches/chromium/command-ismediakey.patch
  21. 2 2
      patches/chromium/content_browser_main_loop.patch
  22. 0 52
      patches/chromium/cross_site_document_resource_handler.patch
  23. 5 5
      patches/chromium/dcheck.patch
  24. 7 7
      patches/chromium/desktop_media_list.patch
  25. 5 5
      patches/chromium/disable-redraw-lock.patch
  26. 32 31
      patches/chromium/disable_color_correct_rendering.patch
  27. 1 1
      patches/chromium/disable_custom_libcxx_on_windows.patch
  28. 4 4
      patches/chromium/disable_hidden.patch
  29. 0 26
      patches/chromium/disable_network_services_by_default.patch
  30. 2 2
      patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch
  31. 5 22
      patches/chromium/dom_storage_limits.patch
  32. 1 1
      patches/chromium/dump_syms.patch
  33. 2 2
      patches/chromium/exclude-a-few-test-files-from-build.patch
  34. 0 29
      patches/chromium/expose-net-observer-api.patch
  35. 90 0
      patches/chromium/expose_setuseragent_on_networkcontext.patch
  36. 39 39
      patches/chromium/feat_offscreen_rendering_with_viz_compositor.patch
  37. 2 2
      patches/chromium/fix_breakpad_symbol_generation_on_linux_arm.patch
  38. 2 1
      patches/chromium/fix_disable_usage_of_abort_report_np_in_mas_builds.patch
  39. 24 10
      patches/chromium/fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
  40. 6 4
      patches/chromium/fix_disable_usage_of_setapplicationisdaemon_and.patch
  41. 1 1
      patches/chromium/fix_disabling_compositor_recycling.patch
  42. 0 76
      patches/chromium/fix_use_weakptr_to_detect_deletion.patch
  43. 12 12
      patches/chromium/frame_host_manager.patch
  44. 2 2
      patches/chromium/gritsettings_resource_ids.patch
  45. 2 2
      patches/chromium/ignore_rc_check.patch
  46. 6 6
      patches/chromium/libgtkui_export.patch
  47. 3 3
      patches/chromium/mas-lssetapplicationlaunchservicesserverconnectionstatus.patch
  48. 29 25
      patches/chromium/mas_no_private_api.patch
  49. 13 13
      patches/chromium/network_service_allow_remote_certificate_verification_logic.patch
  50. 1 1
      patches/chromium/no_cache_storage_check.patch
  51. 11 10
      patches/chromium/notification_provenance.patch
  52. 2 2
      patches/chromium/out_of_process_instance.patch
  53. 2 1
      patches/chromium/patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
  54. 9 9
      patches/chromium/pepper_flash.patch
  55. 12 25
      patches/chromium/picture-in-picture.patch
  56. 5 5
      patches/chromium/preconnect_feature.patch
  57. 50 49
      patches/chromium/printing.patch
  58. 18 18
      patches/chromium/put_back_deleted_colors_for_autofill.patch
  59. 2 2
      patches/chromium/render_widget_host_view_base.patch
  60. 2 2
      patches/chromium/render_widget_host_view_mac.patch
  61. 3 3
      patches/chromium/resource_file_conflict.patch
  62. 372 0
      patches/chromium/revert_cleanup_remove_menu_subtitles_sublabels.patch
  63. 2 2
      patches/chromium/scroll_bounce_flag.patch
  64. 30 13
      patches/chromium/ssl_security_state_tab_helper.patch
  65. 25 15
      patches/chromium/support_mixed_sandbox_with_zygote.patch
  66. 4 4
      patches/chromium/sysroot.patch
  67. 1 1
      patches/chromium/tts.patch
  68. 4 3
      patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch
  69. 3 3
      patches/chromium/verbose_generate_breakpad_symbols.patch
  70. 6 6
      patches/chromium/web_contents.patch
  71. 2 2
      patches/chromium/webview_cross_drag.patch
  72. 10 10
      patches/chromium/worker_context_will_destroy.patch
  73. 4 4
      patches/v8/add_realloc.patch
  74. 4 4
      patches/v8/build_gn.patch
  75. 4 4
      patches/v8/dcheck.patch
  76. 25 25
      patches/v8/deps_provide_more_v8_backwards_compatibility.patch
  77. 2 2
      patches/v8/do_not_export_private_v8_symbols_on_windows.patch
  78. 2 2
      patches/v8/export_symbols_needed_for_windows_build.patch
  79. 2 2
      patches/v8/expose_mksnapshot.patch
  80. 5 5
      patches/v8/workaround_an_undefined_symbol_error.patch
  81. 1 0
      script/node-disabled-tests.json
  82. 1 1
      script/strip-binaries.py
  83. 1 1
      script/zip_manifests/dist_zip.linux.arm.manifest
  84. 1 1
      script/zip_manifests/dist_zip.linux.arm64.manifest
  85. 1 1
      script/zip_manifests/dist_zip.linux.x64.manifest
  86. 1 1
      script/zip_manifests/dist_zip.linux.x86.manifest
  87. 2 4
      shell/app/atom_content_client.cc
  88. 1 1
      shell/app/atom_content_client.h
  89. 0 38
      shell/app/manifests.cc
  90. 0 2
      shell/app/manifests.h
  91. 0 1
      shell/browser/api/atom_api_app.cc
  92. 0 1
      shell/browser/api/atom_api_app.h
  93. 2 2
      shell/browser/api/atom_api_browser_window.cc
  94. 1 1
      shell/browser/api/atom_api_browser_window_mac.mm
  95. 4 2
      shell/browser/api/atom_api_content_tracing.cc
  96. 9 19
      shell/browser/api/atom_api_cookies.cc
  97. 1 1
      shell/browser/api/atom_api_menu_mac.mm
  98. 3 13
      shell/browser/api/atom_api_net.cc
  99. 2 3
      shell/browser/api/atom_api_net_log.cc
  100. 0 317
      shell/browser/api/atom_api_protocol.cc

+ 4 - 11
BUILD.gn

@@ -300,14 +300,6 @@ source_set("manifests") {
     "//printing/buildflags",
     "//services/service_manager/public/cpp",
   ]
-
-  if (enable_basic_printing) {
-    deps += [ "//components/services/pdf_compositor/public/cpp:manifest" ]
-  }
-
-  if (enable_print_preview) {
-    deps += [ "//chrome/services/printing/public/cpp:manifest" ]
-  }
 }
 
 npm_action("electron_version_args") {
@@ -354,6 +346,7 @@ source_set("electron_lib") {
     "//base:base_static",
     "//base/allocator:buildflags",
     "//chrome/app/resources:platform_locale_settings",
+    "//chrome/services/printing/public/mojom",
     "//components/certificate_transparency",
     "//components/net_log",
     "//components/network_hints/common",
@@ -373,7 +366,7 @@ source_set("electron_lib") {
     "//device/bluetooth/public/cpp",
     "//gin",
     "//media/capture/mojom:video_capture",
-    "//media/mojo/interfaces",
+    "//media/mojo/mojom",
     "//net:extras",
     "//net:net_resources",
     "//net:net_with_v8",
@@ -386,7 +379,7 @@ source_set("electron_lib") {
     "//services/device/public/mojom",
     "//services/proxy_resolver:lib",
     "//services/video_capture/public/mojom:constants",
-    "//services/viz/privileged/interfaces/compositing",
+    "//services/viz/privileged/mojom/compositing",
     "//skia",
     "//third_party/blink/public:blink",
     "//third_party/boringssl",
@@ -581,7 +574,7 @@ source_set("electron_lib") {
     ]
     deps += [
       "//components/viz/service",
-      "//services/viz/public/interfaces",
+      "//services/viz/public/mojom",
       "//ui/compositor",
     ]
   }

+ 5 - 2
DEPS

@@ -5,12 +5,13 @@ gclient_gn_args = [
   'checkout_android_native_support',
   'checkout_libaom',
   'checkout_nacl',
-  'checkout_oculus_sdk'
+  'checkout_oculus_sdk',
+  'checkout_openxr'
 ]
 
 vars = {
   'chromium_version':
-    '78.0.3866.0',
+    '78.0.3896.6',
   'node_version':
     'v12.8.1',
   'nan_version':
@@ -60,6 +61,8 @@ vars = {
     True,
   'checkout_oculus_sdk':
     False,
+  'checkout_openxr':
+    False,
   'build_with_chromium':
     True,
   'checkout_android':

+ 6 - 4
chromium_src/BUILD.gn

@@ -43,6 +43,8 @@ static_library("chrome") {
     "//chrome/browser/predictors/proxy_lookup_client_impl.h",
     "//chrome/browser/predictors/resolve_host_client_impl.cc",
     "//chrome/browser/predictors/resolve_host_client_impl.h",
+    "//chrome/browser/printing/printing_service.cc",
+    "//chrome/browser/printing/printing_service.h",
     "//chrome/browser/ssl/security_state_tab_helper.cc",
     "//chrome/browser/ssl/security_state_tab_helper.h",
     "//chrome/browser/ui/autofill/popup_view_common.cc",
@@ -167,16 +169,18 @@ static_library("chrome") {
       "//chrome/browser/printing/printing_message_filter.cc",
       "//chrome/browser/printing/printing_message_filter.h",
     ]
+
     public_deps += [
       "//chrome/services/printing:lib",
       "//components/printing/browser",
       "//components/printing/renderer",
-      "//components/services/pdf_compositor/public/cpp:factory",
+      "//components/services/pdf_compositor",
+      "//components/services/pdf_compositor/public/cpp",
       "//components/services/pdf_compositor/public/mojom",
     ]
+
     deps += [
       "//components/printing/common",
-      "//components/services/pdf_compositor",
       "//printing",
     ]
 
@@ -198,8 +202,6 @@ static_library("chrome") {
       "//chrome/browser/ui/views/overlay/back_to_tab_image_button.h",
       "//chrome/browser/ui/views/overlay/close_image_button.cc",
       "//chrome/browser/ui/views/overlay/close_image_button.h",
-      "//chrome/browser/ui/views/overlay/mute_image_button.cc",
-      "//chrome/browser/ui/views/overlay/mute_image_button.h",
       "//chrome/browser/ui/views/overlay/overlay_window_views.cc",
       "//chrome/browser/ui/views/overlay/overlay_window_views.h",
       "//chrome/browser/ui/views/overlay/playback_image_button.cc",

+ 2 - 46
filenames.gni

@@ -75,8 +75,6 @@ filenames = {
     "shell/browser/api/atom_api_power_monitor.h",
     "shell/browser/api/atom_api_power_save_blocker.cc",
     "shell/browser/api/atom_api_power_save_blocker.h",
-    "shell/browser/api/atom_api_protocol.cc",
-    "shell/browser/api/atom_api_protocol.h",
     "shell/browser/api/atom_api_protocol_ns.cc",
     "shell/browser/api/atom_api_protocol_ns.h",
     "shell/browser/api/atom_api_screen.cc",
@@ -91,8 +89,6 @@ filenames = {
     "shell/browser/api/atom_api_top_level_window.h",
     "shell/browser/api/atom_api_tray.cc",
     "shell/browser/api/atom_api_tray.h",
-    "shell/browser/api/atom_api_url_request.cc",
-    "shell/browser/api/atom_api_url_request.h",
     "shell/browser/api/atom_api_url_request_ns.cc",
     "shell/browser/api/atom_api_url_request_ns.h",
     "shell/browser/api/atom_api_view.cc",
@@ -103,8 +99,6 @@ filenames = {
     "shell/browser/api/atom_api_web_contents_mac.mm",
     "shell/browser/api/atom_api_web_contents_view.cc",
     "shell/browser/api/atom_api_web_contents_view.h",
-    "shell/browser/api/atom_api_web_request.cc",
-    "shell/browser/api/atom_api_web_request.h",
     "shell/browser/api/atom_api_web_request_ns.cc",
     "shell/browser/api/atom_api_web_request_ns.h",
     "shell/browser/api/atom_api_web_view_manager.cc",
@@ -116,8 +110,6 @@ filenames = {
     "shell/browser/api/event.h",
     "shell/browser/api/event_emitter.cc",
     "shell/browser/api/event_emitter.h",
-    "shell/browser/api/stream_subscriber.cc",
-    "shell/browser/api/stream_subscriber.h",
     "shell/browser/api/trackable_object.cc",
     "shell/browser/api/trackable_object.h",
     "shell/browser/api/frame_subscriber.cc",
@@ -176,8 +168,6 @@ filenames = {
     "shell/browser/common_web_contents_delegate.h",
     "shell/browser/cookie_change_notifier.cc",
     "shell/browser/cookie_change_notifier.h",
-    "shell/browser/io_thread.cc",
-    "shell/browser/io_thread.h",
     "shell/browser/javascript_environment.cc",
     "shell/browser/javascript_environment.h",
     "shell/browser/lib/bluetooth_chooser.cc",
@@ -185,8 +175,6 @@ filenames = {
     "shell/browser/lib/power_observer.h",
     "shell/browser/lib/power_observer_linux.h",
     "shell/browser/lib/power_observer_linux.cc",
-    "shell/browser/loader/layered_resource_handler.cc",
-    "shell/browser/loader/layered_resource_handler.h",
     "shell/browser/login_handler.cc",
     "shell/browser/login_handler.h",
     "shell/browser/mac/atom_application.h",
@@ -223,58 +211,26 @@ filenames = {
     "shell/browser/media/media_device_id_salt.h",
     "shell/browser/media/media_stream_devices_controller.cc",
     "shell/browser/media/media_stream_devices_controller.h",
-    "shell/browser/net/about_protocol_handler.cc",
-    "shell/browser/net/about_protocol_handler.h",
-    "shell/browser/net/asar/asar_protocol_handler.cc",
-    "shell/browser/net/asar/asar_protocol_handler.h",
     "shell/browser/net/asar/asar_url_loader.cc",
     "shell/browser/net/asar/asar_url_loader.h",
-    "shell/browser/net/asar/url_request_asar_job.cc",
-    "shell/browser/net/asar/url_request_asar_job.h",
-    "shell/browser/net/atom_cert_verifier.cc",
-    "shell/browser/net/atom_cert_verifier.h",
-    "shell/browser/net/atom_network_delegate.cc",
-    "shell/browser/net/atom_network_delegate.h",
     "shell/browser/net/atom_url_loader_factory.cc",
     "shell/browser/net/atom_url_loader_factory.h",
-    "shell/browser/net/atom_url_request.cc",
-    "shell/browser/net/atom_url_request.h",
-    "shell/browser/net/atom_url_request_job_factory.cc",
-    "shell/browser/net/atom_url_request_job_factory.h",
-    "shell/browser/net/http_protocol_handler.cc",
-    "shell/browser/net/http_protocol_handler.h",
+    "shell/browser/net/cert_verifier_client.cc",
+    "shell/browser/net/cert_verifier_client.h",
     "shell/browser/net/proxying_url_loader_factory.cc",
     "shell/browser/net/proxying_url_loader_factory.h",
-    "shell/browser/net/js_asker.cc",
-    "shell/browser/net/js_asker.h",
     "shell/browser/net/network_context_service_factory.cc",
     "shell/browser/net/network_context_service_factory.h",
     "shell/browser/net/network_context_service.cc",
     "shell/browser/net/network_context_service.h",
     "shell/browser/net/node_stream_loader.cc",
     "shell/browser/net/node_stream_loader.h",
-    "shell/browser/net/require_ct_delegate.cc",
-    "shell/browser/net/require_ct_delegate.h",
     "shell/browser/net/resolve_proxy_helper.cc",
     "shell/browser/net/resolve_proxy_helper.h",
     "shell/browser/net/system_network_context_manager.cc",
     "shell/browser/net/system_network_context_manager.h",
     "shell/browser/net/url_pipe_loader.cc",
     "shell/browser/net/url_pipe_loader.h",
-    "shell/browser/net/url_request_about_job.cc",
-    "shell/browser/net/url_request_about_job.h",
-    "shell/browser/net/url_request_async_asar_job.cc",
-    "shell/browser/net/url_request_async_asar_job.h",
-    "shell/browser/net/url_request_string_job.cc",
-    "shell/browser/net/url_request_string_job.h",
-    "shell/browser/net/url_request_buffer_job.cc",
-    "shell/browser/net/url_request_buffer_job.h",
-    "shell/browser/net/url_request_context_getter.cc",
-    "shell/browser/net/url_request_context_getter.h",
-    "shell/browser/net/url_request_fetch_job.cc",
-    "shell/browser/net/url_request_fetch_job.h",
-    "shell/browser/net/url_request_stream_job.cc",
-    "shell/browser/net/url_request_stream_job.h",
     "shell/browser/notifications/linux/libnotify_notification.cc",
     "shell/browser/notifications/linux/libnotify_notification.h",
     "shell/browser/notifications/linux/notification_presenter_linux.cc",

+ 1 - 5
lib/browser/chrome-extension.js

@@ -427,11 +427,7 @@ const chromeExtensionHandler = function (request, callback) {
 }
 
 app.on('session-created', function (ses) {
-  ses.protocol.registerBufferProtocol('chrome-extension', chromeExtensionHandler, function (error) {
-    if (error) {
-      console.error(`Unable to register chrome-extension protocol: ${error}`)
-    }
-  })
+  ses.protocol.registerBufferProtocol('chrome-extension', chromeExtensionHandler)
 })
 
 // The persistent path of "DevTools Extensions" preference file.

+ 3 - 6
patches/chromium/.patches

@@ -35,15 +35,12 @@ mas-cfisobjc.patch
 mas-cgdisplayusesforcetogray.patch
 mas-audiodeviceduck.patch
 mas-lssetapplicationlaunchservicesserverconnectionstatus.patch
-allow_webview_file_url.patch
 ignore_rc_check.patch
 enable_widevine.patch
 chrome_key_systems.patch
 allow_nested_error_trackers.patch
 blink_initialization_order.patch
-ssl_security_state_tab_helper.patch
 exclude-a-few-test-files-from-build.patch
-expose-net-observer-api.patch
 desktop_media_list.patch
 proxy_config_monitor.patch
 gritsettings_resource_ids.patch
@@ -60,7 +57,6 @@ autofill_size_calculation.patch
 fix_disable_usage_of_abort_report_np_in_mas_builds.patch
 fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
 fix_disable_usage_of_setapplicationisdaemon_and.patch
-disable_network_services_by_default.patch
 unsandboxed_ppapi_processes_skip_zygote.patch
 patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
 build_add_electron_tracing_category.patch
@@ -69,7 +65,6 @@ feat_offscreen_rendering_with_viz_compositor.patch
 worker_context_will_destroy.patch
 fix_breakpad_symbol_generation_on_linux_arm.patch
 frame_host_manager.patch
-cross_site_document_resource_handler.patch
 crashpad_pid_check.patch
 preconnect_feature.patch
 network_service_allow_remote_certificate_verification_logic.patch
@@ -77,7 +72,9 @@ put_back_deleted_colors_for_autofill.patch
 build_win_disable_zc_twophase.patch
 disable_color_correct_rendering.patch
 add_contentgpuclient_precreatemessageloop_callback.patch
-fix_use_weakptr_to_detect_deletion.patch
 fix_disabling_compositor_recycling.patch
 picture-in-picture.patch
 allow_new_privileges_in_unsandboxed_child_processes.patch
+ssl_security_state_tab_helper.patch
+revert_cleanup_remove_menu_subtitles_sublabels.patch
+expose_setuseragent_on_networkcontext.patch

+ 8 - 7
patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch

@@ -1,18 +1,19 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Milan Burda <[email protected]>
 Date: Thu, 11 Apr 2019 14:49:20 +0200
-Subject: Add ContentGpuClient::PreCreateMessageLoop() callback
+Subject: add_contentgpuclient_precreatemessageloop_callback.patch
 
+This adds a ContentGpuClient::PreCreateMessageLoop() callback.
 Invoke in GpuMain after SetErrorMode, before starting the message loop.
 Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
 
-This should be upstreamed
+This should be upstreamed.
 
 diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
-index 69cb584e3b99a6989dbb2906bfa5bdf1c5cd3df5..7d1d9f871f7a0676b040651cf5a7122ee6cf2732 100644
+index 4373f508964cb1e9fd51c952122ac2f41fb35ae9..065a7a57b77f1e3bf5e03fac900f1936d48ad4ff 100644
 --- a/content/gpu/gpu_main.cc
 +++ b/content/gpu/gpu_main.cc
-@@ -235,6 +235,10 @@ int GpuMain(const MainFunctionParams& parameters) {
+@@ -236,6 +236,10 @@ int GpuMain(const MainFunctionParams& parameters) {
  
    logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
  
@@ -23,7 +24,7 @@ index 69cb584e3b99a6989dbb2906bfa5bdf1c5cd3df5..7d1d9f871f7a0676b040651cf5a7122e
    // We are experiencing what appear to be memory-stomp issues in the GPU
    // process. These issues seem to be impacting the task executor and listeners
    // registered to it. Create the task executor on the heap to guard against
-@@ -348,7 +352,6 @@ int GpuMain(const MainFunctionParams& parameters) {
+@@ -349,7 +353,6 @@ int GpuMain(const MainFunctionParams& parameters) {
    GpuProcess gpu_process(io_thread_priority);
  #endif
  
@@ -32,10 +33,10 @@ index 69cb584e3b99a6989dbb2906bfa5bdf1c5cd3df5..7d1d9f871f7a0676b040651cf5a7122e
      client->PostIOThreadCreated(gpu_process.io_task_runner());
  
 diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
-index 20e31e1bd96395cb4350aa6ae84cc16c4ca2116b..d89af81ef9426c197a62027b514011afd10ea3ce 100644
+index 830d5e89af7bd3ddb409ac7bf9d8eb3109830d41..7d544536ec846c294deb6626f51d5de7846fc5c2 100644
 --- a/content/public/gpu/content_gpu_client.h
 +++ b/content/public/gpu/content_gpu_client.h
-@@ -35,6 +35,10 @@ class CONTENT_EXPORT ContentGpuClient {
+@@ -39,6 +39,10 @@ class CONTENT_EXPORT ContentGpuClient {
   public:
    virtual ~ContentGpuClient() {}
  

+ 5 - 5
patches/chromium/add_realloc.patch

@@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
  
    GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
 diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
-index fc77a1d2c717cbf6a4066082c4e941d73e707847..cde4f969cb799b9ede05f29148fba32d32309cc2 100644
+index b747d8afba334747787485582d89cd5599b7b8ae..581c2ffce679dd131e8b8af86f3d3a9a89485e78 100644
 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
-@@ -643,6 +643,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
+@@ -641,6 +641,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
          size, WTF::ArrayBufferContents::kDontInitialize);
    }
  
@@ -54,7 +54,7 @@ index fc77a1d2c717cbf6a4066082c4e941d73e707847..cde4f969cb799b9ede05f29148fba32d
      WTF::ArrayBufferContents::FreeMemory(data);
    }
 diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
-index 0031242152ce5190b0dfc77b53af2d984e5fad82..a6370ec793ce6c38eb7dab189583ea11cca51c1f 100644
+index ac76d127b96b80c8260a7e2cda0b669cd98787ad..dcab64586700a8740262aede8dba2755f652d8e8 100644
 --- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 +++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 @@ -130,6 +130,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
@@ -70,10 +70,10 @@ index 0031242152ce5190b0dfc77b53af2d984e5fad82..a6370ec793ce6c38eb7dab189583ea11
    Partitions::ArrayBufferPartition()->Free(data);
  }
 diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
-index 601046eca671613693d3fc083cf48a0d530c8fd3..a94b7ea29bbd6d5e6cc6fb3a850be7e1ef00c5ad 100644
+index 3f44cd2fdf648057be8defcf041574b4c91e0363..55c0e7c66649ae9d9cbef6179daac7ad771b755c 100644
 --- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
 +++ b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.h
-@@ -135,6 +135,7 @@ class WTF_EXPORT ArrayBufferContents {
+@@ -140,6 +140,7 @@ class WTF_EXPORT ArrayBufferContents {
    void CopyTo(ArrayBufferContents& other);
  
    static void* AllocateMemoryOrNull(size_t, InitializationPolicy);

+ 0 - 20
patches/chromium/allow_webview_file_url.patch

@@ -1,20 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Cheng Zhao <[email protected]>
-Date: Thu, 20 Sep 2018 17:49:42 -0700
-Subject: allow_webview_file_url.patch
-
-Allow webview to load non-web URLs.
-
-diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
-index 76bcf34f58ef62dc42927a94d1e4410c1a0bde2e..008d89fe6b46facb7b3f8ca908c76c36d19c396b 100644
---- a/content/browser/loader/resource_dispatcher_host_impl.cc
-+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
-@@ -1426,6 +1426,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
-       !policy->IsWebSafeScheme(info.common_params.url.scheme()) &&
-       !is_external_protocol;
- 
-+  non_web_url_in_guest = false;
-+
-   if (is_shutdown_ || non_web_url_in_guest) {
-     url_loader_client->OnComplete(
-         network::URLLoaderCompletionStatus(net::ERR_ABORTED));

+ 6 - 5
patches/chromium/autofill_size_calculation.patch

@@ -1,12 +1,13 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Heilig Benedek <[email protected]>
 Date: Wed, 30 Jan 2019 17:04:33 +0100
-Subject: don't call into chrome internals for autofill popup size calculations
+Subject: autofill_size_calculation.patch
 
-The default GetWindowBounds calls into chrome internal functions to
-find out the size of the window - this can be overridden but even
-then some methods call into the original. Let's just return an empty
-gfx::Rect and do the actual job in the subclass.
+We don't want to call into chrome internals for autofill popup size
+calculations. The default GetWindowBounds calls into chrome internal
+functions to find out the size of the window - this can be overridden
+but even then some methods call into the original. Let's just return
+an empty gfx::Rect and do the actual job in the subclass.
 
 diff --git a/chrome/browser/ui/autofill/popup_view_common.cc b/chrome/browser/ui/autofill/popup_view_common.cc
 index 25e2cfce4999bdf6a94d61aae4558470d18f89ed..c9880bcd639eb59ae52c38dbdabbd86ebac3b530 100644

+ 1 - 1
patches/chromium/blink-worker-enable-csp-in-file-scheme.patch

@@ -5,7 +5,7 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch
 
 
 diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
-index 873bf34f0f6fff5ee955f84a5019ddf9c6aefc9c..8fca091c4a430f7109aa59400e1ffbea533938d9 100644
+index b1b9f451951bb7b11eefe6453a71a6b44be838a5..0f62ba09ef99538a5b0b306f601d10c44a7a7abf 100644
 --- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 +++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 @@ -308,7 +308,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(

+ 1 - 1
patches/chromium/blink_initialization_order.patch

@@ -10,7 +10,7 @@ to fix electron/electron#13787.  The backport landed in Chromium 67 but the
 DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely
 
 diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
-index b6622fd132cc1b46127a2157b28c2fd2ab63e40d..1a3196aa5737e35237fd467260973fdf260587c4 100644
+index c0ec993ca6d96c5f95eb7b918ca9c37d9defff43..2522add8f9b1e3ada14fcc5c09d161b0820f4418 100644
 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 @@ -205,11 +205,10 @@ void LocalWindowProxy::Initialize() {

+ 3 - 3
patches/chromium/blink_local_frame.patch

@@ -14,10 +14,10 @@ when there is code doing that.
 This patch reverts the change to fix the crash in Electron.
 
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
-index 76286491111dc1a73ad6e268aa356c8ef668d47b..64824ceabd004c80a610c1ab414e8acbccd20157 100644
+index 1673685187012698768445d38dcda90e084f8cde..00edb7945956ff7ce62da73499fd85d3ebac4d95 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -332,10 +332,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -335,10 +335,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
    }
    CHECK(!view_ || !view_->IsAttached());
  
@@ -28,7 +28,7 @@ index 76286491111dc1a73ad6e268aa356c8ef668d47b..64824ceabd004c80a610c1ab414e8acb
    if (!Client())
      return;
  
-@@ -353,6 +349,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -356,6 +352,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
    // Notify ScriptController that the frame is closing, since its cleanup ends
    // up calling back to LocalFrameClient via WindowProxy.
    GetScriptController().ClearForClose();

+ 6 - 6
patches/chromium/blink_world_context.patch

@@ -5,10 +5,10 @@ Subject: blink_world_context.patch
 
 
 diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
-index ea92c2747104615ac876b8322bd5e7acf039924d..1a5b6c4945de6e26a163fe653fef65838431d7b0 100644
+index a781a44399a31f048419311d2317229c912752c2..131c0dcb125b00215e3ad469c11c4b47d7cb126b 100644
 --- a/third_party/blink/public/web/web_local_frame.h
 +++ b/third_party/blink/public/web/web_local_frame.h
-@@ -357,6 +357,9 @@ class WebLocalFrame : public WebFrame {
+@@ -356,6 +356,9 @@ class WebLocalFrame : public WebFrame {
    // be calling this API.
    virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
  
@@ -19,10 +19,10 @@ index ea92c2747104615ac876b8322bd5e7acf039924d..1a5b6c4945de6e26a163fe653fef6583
    // that the script evaluated to with callback. Script execution can be
    // suspend.
 diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
-index d0a05520d52a6912ed2454752d8bb7fa78d79ff5..0b8f0f03b965c156858b07d93faff5a960e493b4 100644
+index cb07cda4464d3d5a2ad59bf9fb03921e4bdedae2..6278cf7ee5d404de40114dbe87350eb8acc08289 100644
 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
 +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
-@@ -866,6 +866,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
+@@ -874,6 +874,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
    return MainWorldScriptContext()->Global();
  }
  
@@ -37,10 +37,10 @@ index d0a05520d52a6912ed2454752d8bb7fa78d79ff5..0b8f0f03b965c156858b07d93faff5a9
    return BindingSecurity::ShouldAllowAccessToFrame(
        CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
 diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
-index df0c843043e29029ccbfa51752866bbaa945e5e3..0ee2e45b7d91028720757672d1adf1636986a991 100644
+index 9fbb94efc829928a1b1e284d529dd5562619dc20..0a0904ab66d55753252ccf484c03c07c8dac002b 100644
 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
 +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
-@@ -148,6 +148,8 @@ class CORE_EXPORT WebLocalFrameImpl final
+@@ -150,6 +150,8 @@ class CORE_EXPORT WebLocalFrameImpl final
        int argc,
        v8::Local<v8::Value> argv[]) override;
    v8::Local<v8::Context> MainWorldScriptContext() const override;

+ 1 - 1
patches/chromium/browser_compositor_mac.patch

@@ -26,7 +26,7 @@ index de89d291e5cbc0981cf06170ed35502a1239136d..656f6c38d55d9f9af569bc772254ca13
        viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
    void OnDidNotProduceFrame(const viz::BeginFrameAck& ack);
 diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
-index 4b3f3c7e97e73ad6d0166ad114f4168d9ed00e11..59e58d693c971742951434f6582140d9179235f2 100644
+index 8ddd790decc43af9820c97121a3b359e7cbb49ee..18019d5794f688ca07b35a665cc9800bb1d3047a 100644
 --- a/content/browser/renderer_host/browser_compositor_view_mac.mm
 +++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
 @@ -80,6 +80,12 @@

+ 3 - 3
patches/chromium/build_add_electron_tracing_category.patch

@@ -1,14 +1,14 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Samuel Attard <[email protected]>
 Date: Tue, 23 Apr 2019 09:51:43 -0700
-Subject: build: add electron tracing category
+Subject: build_add_electron_tracing_category.patch
 
 All TRACE events in Chromium use a static assert to ensure that the
 categories in use are known / declared.  This patch is required for us
-to introduce a new Electron category.
+to introduce a new Electron category for Electron-specific tracing.
 
 diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
-index 7c0723ffd4934300fed249e2d3c98532e9382885..b0e5e3f30c2235e4bbe0bd3dc324e99d7f505e79 100644
+index b50d4123e44ddee34af0b07bfe5d067c4ccc5809..3e2c639a067fb76848783f35ec112a380da2353e 100644
 --- a/base/trace_event/builtin_categories.h
 +++ b/base/trace_event/builtin_categories.h
 @@ -61,6 +61,7 @@

+ 1 - 1
patches/chromium/build_gn.patch

@@ -5,7 +5,7 @@ Subject: build_gn.patch
 
 
 diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
-index 23695f67293383fe086ce56a7ab6fe08ed28cce7..1d01c7a33634fc749f7498377e96dc0467e698f5 100644
+index 59ab7810e71916e8f0f2d69f06e3c2c3ebc99030..b144e800c94956429ca85fc0aefe6539a6246e4b 100644
 --- a/build/config/BUILDCONFIG.gn
 +++ b/build/config/BUILDCONFIG.gn
 @@ -123,6 +123,9 @@ if (current_os == "") {

+ 5 - 5
patches/chromium/build_win_disable_zc_twophase.patch

@@ -1,14 +1,14 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: deepak1556 <[email protected]>
 Date: Tue, 16 Jul 2019 14:38:52 -0700
-Subject: build: Temporarily disable /Zc:twoPhase when libcxx is not used on
- windows.
+Subject: build_win_disable_zc_twophase.patch
 
-This is to workaround the bug in crbug.com/969698#c10
+Temporarily disable /Zc:twoPhase when libcxx is not used on
+Windows. This is to workaround the bug in crbug.com/969698#c10
 until fixes have landed in upstream.
 
 diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
-index 781aeaaf46b6de0f98f26df4ddcbd13cac527d62..254ede050920993d6b283ffb67f13d2eea633113 100644
+index edb193a5f3ac04b1ea017d3744a5ac1383fc055b..459368d9885f26f80c6bbef452a3be0706cb7c13 100644
 --- a/build/config/win/BUILD.gn
 +++ b/build/config/win/BUILD.gn
 @@ -2,6 +2,7 @@
@@ -19,7 +19,7 @@ index 781aeaaf46b6de0f98f26df4ddcbd13cac527d62..254ede050920993d6b283ffb67f13d2e
  import("//build/config/chrome_build.gni")
  import("//build/config/clang/clang.gni")
  import("//build/config/compiler/compiler.gni")
-@@ -67,9 +68,13 @@ config("compiler") {
+@@ -61,9 +62,13 @@ config("compiler") {
      "/FS",  # Preserve previous PDB behavior.
      "/bigobj",  # Some of our files are bigger than the regular limits.
      "/utf-8",  # Assume UTF-8 by default to avoid code page dependencies.

+ 18 - 18
patches/chromium/can_create_window.patch

@@ -5,10 +5,10 @@ Subject: can_create_window.patch
 
 
 diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
-index d731d6d9e2626157520ddcaf231781e723d8d2ce..583065369a21acd86b017d716f6670ff67d2e108 100644
+index f55a98595f30f718d238e0a873c9ec82610b8a41..d1369e7dbf71414905531a0b49eb9459772951e8 100644
 --- a/content/browser/frame_host/render_frame_host_impl.cc
 +++ b/content/browser/frame_host/render_frame_host_impl.cc
-@@ -3848,6 +3848,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -3947,6 +3947,7 @@ void RenderFrameHostImpl::CreateNewWindow(
            last_committed_origin_, params->window_container_type,
            params->target_url, params->referrer.To<Referrer>(),
            params->frame_name, params->disposition, *params->features,
@@ -17,10 +17,10 @@ index d731d6d9e2626157520ddcaf231781e723d8d2ce..583065369a21acd86b017d716f6670ff
            &no_javascript_access);
  
 diff --git a/content/common/frame.mojom b/content/common/frame.mojom
-index b3eb08bcfd338f0085d7576a78e158a874033f3a..819dd480af5937aaa63b63e38f4d32e4ff7ba8c6 100644
+index e227f780d720a80a13699f475757142571094cd1..6984f69e6f9a0d3058b0054df8a3aa9d46f14dbd 100644
 --- a/content/common/frame.mojom
 +++ b/content/common/frame.mojom
-@@ -311,6 +311,10 @@ struct CreateNewWindowParams {
+@@ -299,6 +299,10 @@ struct CreateNewWindowParams {
  
    // The window features to use for the new window.
    blink.mojom.WindowFeatures features;
@@ -32,10 +32,10 @@ index b3eb08bcfd338f0085d7576a78e158a874033f3a..819dd480af5937aaa63b63e38f4d32e4
  
  // Operation result when the renderer asks the browser to create a new window.
 diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
-index e2b0dcdb14075754a4a1e8a90b3cd9a14a08796b..1f469e9c1001ba63e371456d3cbbbfbddffeabb8 100644
+index 3e5ebb5c71ba2b6a3cc0f914e10c64dce06d6088..d51d21fbd09cfa2c017f85ab96c1156a6a4f74f9 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
-@@ -494,6 +494,8 @@ bool ContentBrowserClient::CanCreateWindow(
+@@ -489,6 +489,8 @@ bool ContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -45,10 +45,10 @@ index e2b0dcdb14075754a4a1e8a90b3cd9a14a08796b..1f469e9c1001ba63e371456d3cbbbfbd
      bool opener_suppressed,
      bool* no_javascript_access) {
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index a14b357dca0133d25e06b53c19926a7598258382..46399a321845e04f67d8424acddec2636b2d9cc6 100644
+index 0c80d202fe984fc8b799571a288ad7005c75afeb..6767853c179179c546bbaa6fd07ade7db9c40a82 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -175,6 +175,7 @@ class RenderFrameHost;
+@@ -178,6 +178,7 @@ class RenderFrameHost;
  class RenderProcessHost;
  class RenderViewHost;
  class ResourceContext;
@@ -56,7 +56,7 @@ index a14b357dca0133d25e06b53c19926a7598258382..46399a321845e04f67d8424acddec263
  class SerialDelegate;
  class SiteInstance;
  class SpeechRecognitionManagerDelegate;
-@@ -778,6 +779,8 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -771,6 +772,8 @@ class CONTENT_EXPORT ContentBrowserClient {
        const std::string& frame_name,
        WindowOpenDisposition disposition,
        const blink::mojom::WindowFeatures& features,
@@ -66,18 +66,18 @@ index a14b357dca0133d25e06b53c19926a7598258382..46399a321845e04f67d8424acddec263
        bool opener_suppressed,
        bool* no_javascript_access);
 diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
-index 561f409be27c004629455fc3392463fa43313a73..222db08480b15a18d50f0ef8d02ea6afb1681961 100644
+index cc63d162b378f328e1799d69c6762363f3227457..2e8eea0451b16125a75b2b3dc14be807e4413070 100644
 --- a/content/renderer/render_view_impl.cc
 +++ b/content/renderer/render_view_impl.cc
-@@ -75,6 +75,7 @@
+@@ -73,6 +73,7 @@
  #include "content/renderer/ime_event_guard.h"
  #include "content/renderer/internal_document_state_data.h"
  #include "content/renderer/loader/request_extra_data.h"
 +#include "content/renderer/loader/web_url_request_util.h"
  #include "content/renderer/media/audio/audio_device_factory.h"
- #include "content/renderer/media/stream/media_stream_device_observer.h"
- #include "content/renderer/media/video_capture/video_capture_impl_manager.h"
-@@ -1368,6 +1369,8 @@ WebView* RenderViewImpl::CreateView(
+ #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
+ #include "content/renderer/media/webrtc/rtc_peer_connection_handler.h"
+@@ -1322,6 +1323,8 @@ WebView* RenderViewImpl::CreateView(
    }
    params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
  
@@ -87,10 +87,10 @@ index 561f409be27c004629455fc3392463fa43313a73..222db08480b15a18d50f0ef8d02ea6af
    // moved on send.
    bool is_background_tab =
 diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc
-index dacecdd4d0195e999f11fd2e1dfaabe95a639263..c5b88ee2561561c0b8a8032d32255645ce30c450 100644
+index e0e6f185c567ccf96c9a4d1b62bc6b060d0d3c0c..55685e60c431d3f39edeb415cafd7070de57c746 100644
 --- a/content/shell/browser/web_test/web_test_content_browser_client.cc
 +++ b/content/shell/browser/web_test/web_test_content_browser_client.cc
-@@ -308,6 +308,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
+@@ -312,6 +312,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -100,10 +100,10 @@ index dacecdd4d0195e999f11fd2e1dfaabe95a639263..c5b88ee2561561c0b8a8032d32255645
      bool opener_suppressed,
      bool* no_javascript_access) {
 diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h
-index 4f00217da5a4f6f3d7410b82352fcb94e7f4a8fd..33e30d6a816e87dade0a26710a8f71fc6f630f34 100644
+index 1a714946de9f0dceaec008e93928d2c414ef01da..34423135e85b3ed7a54c9f22f6674f9c4026a67c 100644
 --- a/content/shell/browser/web_test/web_test_content_browser_client.h
 +++ b/content/shell/browser/web_test/web_test_content_browser_client.h
-@@ -69,6 +69,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
+@@ -67,6 +67,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
                         const std::string& frame_name,
                         WindowOpenDisposition disposition,
                         const blink::mojom::WindowFeatures& features,

+ 2 - 2
patches/chromium/command-ismediakey.patch

@@ -1,9 +1,9 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Jeremy Apthorp <[email protected]>
 Date: Wed, 10 Oct 2018 15:07:34 -0700
-Subject: define Command::IsMediaKey on mac
+Subject: command-ismediakey.patch
 
-the definition is copied from //chrome/common/extensions/command.cc,
+define Command::IsMediaKey on mac; copied from //chrome/common/extensions/command.cc,
 which also defines a bunch of other stuff that depends on extensions.
 since we only need IsMediaKey, and we don't want the extensions stuff
 (and aren't compiling command.cc), it's safe to duplicate the

+ 2 - 2
patches/chromium/content_browser_main_loop.patch

@@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
 in atom::CommonWebContentsDelegate::ResetManageWebContents.
 
 diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
-index 5b9d42a924bdd121a3eab7145d3f62679e44b09e..78d3ce1ab15ffd1fba2a4a4c1d6447c7627ddb50 100644
+index d97e75b486252348deb30a14f95f668728fab15b..0700cb7ef1eefdb661e46652e239f3aef86d29ea 100644
 --- a/content/browser/browser_main_loop.cc
 +++ b/content/browser/browser_main_loop.cc
-@@ -1508,7 +1508,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
+@@ -1483,7 +1483,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
    NOTREACHED();
  #else
    base::RunLoop run_loop;

+ 0 - 52
patches/chromium/cross_site_document_resource_handler.patch

@@ -1,52 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: deepak1556 <[email protected]>
-Date: Mon, 3 Jun 2019 14:07:40 -0700
-Subject: cross_site_document_resource_handler.patch
-
-Add a content layer hook to disable CORB for a renderer process,
-this patch can be removed once we switch to network service,
-where the embedders have a chance to design their URLLoaders.
-
-diff --git a/content/browser/loader/cross_site_document_resource_handler.cc b/content/browser/loader/cross_site_document_resource_handler.cc
-index b74bbef56038e29ca35403affd284a7a8868c201..d6887e576ac197f80a7e5261bd251cd761d1d814 100644
---- a/content/browser/loader/cross_site_document_resource_handler.cc
-+++ b/content/browser/loader/cross_site_document_resource_handler.cc
-@@ -582,6 +582,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders(
-       request()->initiator()->scheme() == url::kFileScheme)
-     return false;
- 
-+  if (GetContentClient()->browser()->ShouldBypassCORB(info->GetChildID()))
-+    return false;
-+
-   return true;
- }
- 
-diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
-index 511c839d818fee430132efbd1e53a81f44c458a7..4cee1fc221d96e79b96659081c119a06cc53dfd5 100644
---- a/content/public/browser/content_browser_client.cc
-+++ b/content/public/browser/content_browser_client.cc
-@@ -72,6 +72,10 @@ std::unique_ptr<BrowserMainParts> ContentBrowserClient::CreateBrowserMainParts(
-   return nullptr;
- }
- 
-+bool ContentBrowserClient::ShouldBypassCORB(int render_process_id) const {
-+  return false;
-+}
-+
- void ContentBrowserClient::PostAfterStartupTask(
-     const base::Location& from_here,
-     const scoped_refptr<base::TaskRunner>& task_runner,
-diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 6e745308646bf79a192a0e81e1cf89eece8c21eb..3fda12f1edf9d0586bcab891e4e2a3b8d1218070 100644
---- a/content/public/browser/content_browser_client.h
-+++ b/content/public/browser/content_browser_client.h
-@@ -253,6 +253,9 @@ class CONTENT_EXPORT ContentBrowserClient {
-   virtual std::unique_ptr<BrowserMainParts> CreateBrowserMainParts(
-       const MainFunctionParams& parameters);
- 
-+  // Electron: Allows bypassing CORB checks for a renderer process.
-+  virtual bool ShouldBypassCORB(int render_process_id) const;
-+
-   // Allows the embedder to change the default behavior of
-   // BrowserThread::PostAfterStartupTask to better match whatever
-   // definition of "startup" the embedder has in mind. This may be

+ 5 - 5
patches/chromium/dcheck.patch

@@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the
 failing checks and allow the rest of the target to have them enabled.
 
 diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
-index 6a3cca0f846c944f23afe91ca149a0aa28bc18aa..20b3f2ef31d2f036fb0a08d5d7678bb9e67532e6 100644
+index cb86fa407c6f084070841ef65db9b31f264706d3..5d5ddcb77ba102489182c44e9580d750450f899f 100644
 --- a/content/browser/frame_host/navigation_controller_impl.cc
 +++ b/content/browser/frame_host/navigation_controller_impl.cc
-@@ -1211,8 +1211,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
+@@ -1210,8 +1210,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
      return NAVIGATION_TYPE_NEW_SUBFRAME;
    }
  
@@ -33,7 +33,7 @@ index 6a3cca0f846c944f23afe91ca149a0aa28bc18aa..20b3f2ef31d2f036fb0a08d5d7678bb9
  
    if (rfh->GetParent()) {
      // All manual subframes would be did_create_new_entry and handled above, so
-@@ -1464,7 +1466,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
+@@ -1463,7 +1465,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
      new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
    }
  
@@ -46,10 +46,10 @@ index 6a3cca0f846c944f23afe91ca149a0aa28bc18aa..20b3f2ef31d2f036fb0a08d5d7678bb9
    // navigation. Now we know that the renderer has updated its state accordingly
    // and it is safe to also clear the browser side history.
 diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
-index 82bdc4eccf06b7c636dd48cfffebe2606c2cff38..c4385984ebc23bc0a89e7e6ae7d42715a707177d 100644
+index 34c13c28117fe5fced5ca3190c5f948168cd010f..554ddabee8952e578a61a9b9c3f358b2475abd69 100644
 --- a/ui/base/clipboard/clipboard_win.cc
 +++ b/ui/base/clipboard/clipboard_win.cc
-@@ -729,9 +729,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
+@@ -730,9 +730,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
  }
  
  void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) {

+ 7 - 7
patches/chromium/desktop_media_list.patch

@@ -36,7 +36,7 @@ index 8e02a8a95eb07516162eacdf5b361231d3a02975..3497b85428a52c6019cfb5d30229071f
    virtual content::DesktopMediaID::Type GetMediaListType() const = 0;
  };
 diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc
-index 983a8303b11527cdab449d03485653b8c27102de..1362161da462be4eb70f9e698eb274c1890ac0ab 100644
+index 7346429314858b4ce7e5caaea7c3328ca22b1b02..fd98c0eb68f04f9f3bdbe8c77cfeb523d685ba87 100644
 --- a/chrome/browser/media/webrtc/desktop_media_list_base.cc
 +++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
 @@ -21,6 +21,11 @@ DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period)
@@ -94,9 +94,9 @@ index 983a8303b11527cdab449d03485653b8c27102de..1362161da462be4eb70f9e698eb274c1
  void DesktopMediaListBase::ScheduleNextRefresh() {
 +  if (!observer_->ShouldScheduleNextRefresh(this))
 +    return;
-   base::PostDelayedTaskWithTraits(FROM_HERE, {BrowserThread::UI},
-                                   base::BindOnce(&DesktopMediaListBase::Refresh,
-                                                  weak_factory_.GetWeakPtr()),
+   base::PostDelayedTask(FROM_HERE, {BrowserThread::UI},
+                         base::BindOnce(&DesktopMediaListBase::Refresh,
+                                        weak_factory_.GetWeakPtr()),
 diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
 index 29ef83096f7a7c69c67e9ad1bee2c45723e58f3f..ec228a826b298eb590f15c843e3346460ae13321 100644
 --- a/chrome/browser/media/webrtc/desktop_media_list_base.h
@@ -133,12 +133,12 @@ index 47401abc984e6fe26c7f4c5399aa565c687060b0..ca6a527ffac877c27aac94337ec5a7b5
   protected:
    virtual ~DesktopMediaListObserver() {}
 diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
-index 872152cededb29ca3c04b2deb3fe6491be001af9..4ca62f03abf11bf9d0a48c85a79e098fb6758a30 100644
+index b2005c70acbc1c05c59bb2059b190ab78fb63a68..1a7188e2df76672d66da3206d4448df35a065754 100644
 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
 +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
-@@ -7,14 +7,15 @@
- #include "base/bind.h"
+@@ -8,14 +8,15 @@
  #include "base/hash/hash.h"
+ #include "base/message_loop/message_pump_type.h"
  #include "base/single_thread_task_runner.h"
 +#include "base/strings/string_number_conversions.h"
  #include "base/strings/utf_string_conversions.h"

+ 5 - 5
patches/chromium/disable-redraw-lock.patch

@@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue
 can be found at https://github.com/electron/electron/issues/1821
 
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index 9b683f301913f85b6849439dd230cc4cf32eca1d..44dbae9b1ed1486a0119666eae8a531b7d9c50d3 100644
+index 8cde33ad0e4e81534f3e808aa37f7135fb994719..743c7d2ae18cc17e509ffa253dc25c64762d8902 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
 @@ -331,6 +331,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
@@ -37,7 +37,7 @@ index 9b683f301913f85b6849439dd230cc4cf32eca1d..44dbae9b1ed1486a0119666eae8a531b
                       (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
                        !ui::win::IsAeroGlassEnabled())) {
      if (should_lock_)
-@@ -989,6 +994,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
+@@ -992,6 +997,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
        hwnd());
  }
  
@@ -49,12 +49,12 @@ index 9b683f301913f85b6849439dd230cc4cf32eca1d..44dbae9b1ed1486a0119666eae8a531b
  // HWNDMessageHandler, gfx::WindowImpl overrides:
  
 diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
-index 9f0a1a8698838cd797f22cbc4fb100b024758927..2733d8d0220ef92458ca295484525006ddb9d5e8 100644
+index d85486af34da6bcc11c0bc0ccd6349b161b1dac3..c59cd6f26a4ed39cff294316a9771f063712a8c0 100644
 --- a/ui/views/win/hwnd_message_handler.h
 +++ b/ui/views/win/hwnd_message_handler.h
-@@ -193,6 +193,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
+@@ -194,6 +194,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
    using TouchIDs = std::set<DWORD>;
-   enum class DwmFrameState { OFF, ON };
+   enum class DwmFrameState { kOff, kOn };
  
 +  bool HasNativeFrame();
 +

+ 32 - 31
patches/chromium/disable_color_correct_rendering.patch

@@ -1,9 +1,10 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Birunthan Mohanathas <[email protected]>
 Date: Fri, 30 Nov 2018 12:44:12 +0200
-Subject: Add --disable-color-correct-rendering switch
+Subject: disable_color_correct_rendering.patch
 
-In Electron 2.0, `--disable-features=ColorCorrectRendering` could be
+This adds a --disable-color-correct-rendering switch. In Electron 2.0,
+`--disable-features=ColorCorrectRendering` could be
 used to make the app use the display color space (e.g. P3 on Macs)
 instead of color correcting to sRGB. Because color correct rendering is
 always enabled on Chromium 62 and later and because
@@ -19,7 +20,7 @@ to deal with color spaces. That is being tracked at
 https://crbug.com/634542 and https://crbug.com/711107.
 
 diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
-index d62c52b53268b4ffab702a0dac3652edc472ccb9..f1ed520f123802469d94c98c418b9f5c5d2032e0 100644
+index 8fdcc4194291910c42c103b77cf4e8267b81f566..1ad01316f2e5aca2bdd3c2ce752bd5a478a920ee 100644
 --- a/cc/trees/layer_tree_settings.h
 +++ b/cc/trees/layer_tree_settings.h
 @@ -95,6 +95,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -32,7 +33,7 @@ index d62c52b53268b4ffab702a0dac3652edc472ccb9..f1ed520f123802469d94c98c418b9f5c
    // Image Decode Service and raster tiles without images until the decode is
    // ready.
 diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h
-index e33255364c18298192cf26a783204235f2daedb5..eec7c487ce0bf2d36a48402773c35556c7fddb67 100644
+index 389f2ed29bd85c35b38df92346a8d6c76ce22fd6..02cf492fa4068d10c4b8b2addee8102b35aac3e0 100644
 --- a/components/viz/common/display/renderer_settings.h
 +++ b/components/viz/common/display/renderer_settings.h
 @@ -23,6 +23,7 @@ class VIZ_COMMON_EXPORT RendererSettings {
@@ -44,12 +45,12 @@ index e33255364c18298192cf26a783204235f2daedb5..eec7c487ce0bf2d36a48402773c35556
    bool force_antialiasing = false;
    bool force_blending_with_shaders = false;
 diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc
-index cf3b10af046e7ac0607b1935369e963d969c0b82..6a6c3520fe11511ee3855944091deeb882240d0f 100644
+index f17aa1fa451f1b99d7f083e07edd49b11f7639e4..09f7c5d6a92d89c199b296771a8ff60c89a07083 100644
 --- a/components/viz/host/renderer_settings_creation.cc
 +++ b/components/viz/host/renderer_settings_creation.cc
-@@ -12,6 +12,7 @@
- #include "components/viz/common/display/renderer_settings.h"
+@@ -13,6 +13,7 @@
  #include "components/viz/common/features.h"
+ #include "components/viz/common/switches.h"
  #include "ui/base/ui_base_switches.h"
 +#include "ui/gfx/switches.h"
  
@@ -65,7 +66,7 @@ index cf3b10af046e7ac0607b1935369e963d969c0b82..6a6c3520fe11511ee3855944091deeb8
        !command_line->HasSwitch(switches::kUIDisablePartialSwap);
  #if defined(OS_MACOSX)
 diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
-index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb59dd15052 100644
+index 8c67161c4a4b970fb9393a9a73a239b5aecb95cf..99ea5a9832aca67030e92e4761209872190388eb 100644
 --- a/components/viz/service/display/gl_renderer.cc
 +++ b/components/viz/service/display/gl_renderer.cc
 @@ -81,6 +81,9 @@
@@ -90,7 +91,7 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
  
    // Use the full quad_rect for debug quads to not move the edges based on
    // partial swaps.
-@@ -1406,7 +1410,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
+@@ -1455,7 +1459,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
            params->use_color_matrix, tint_gl_composited_content_,
            params->apply_shader_based_rounded_corner &&
                ShouldApplyRoundedCorner(params->quad)),
@@ -100,7 +101,7 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
  }
  
  void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
-@@ -1877,8 +1882,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
+@@ -1926,8 +1931,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
    SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
                                         tint_gl_composited_content_,
                                         ShouldApplyRoundedCorner(quad)),
@@ -111,7 +112,7 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
    SetShaderColor(color, opacity);
    if (current_program_->rounded_corner_rect_location() != -1) {
      SetShaderRoundedCorner(
-@@ -2033,8 +2038,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
+@@ -2082,8 +2087,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
                                                : NON_PREMULTIPLIED_ALPHA,
                         false, false, tint_gl_composited_content_,
                         ShouldApplyRoundedCorner(quad)),
@@ -122,7 +123,7 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
  
    if (current_program_->tint_color_matrix_location() != -1) {
      auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
-@@ -2130,8 +2135,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
+@@ -2179,8 +2184,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
                         !quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
                         tint_gl_composited_content_,
                         ShouldApplyRoundedCorner(quad)),
@@ -133,16 +134,16 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
  
    if (current_program_->tint_color_matrix_location() != -1) {
      auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
-@@ -2234,7 +2239,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
+@@ -2283,7 +2288,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
    DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
  
    gfx::ColorSpace dst_color_space =
 -      current_frame()->current_render_pass->color_space;
 +      PATCH_CS(current_frame()->current_render_pass->color_space);
- 
- #if defined(OS_WIN)
    // Force sRGB output on Windows for overlay candidate video quads to match
-@@ -2393,8 +2398,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
+   // DirectComposition behavior in case these switch between overlays and
+   // compositing. See https://crbug.com/811118 for details.
+@@ -2439,8 +2444,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
  
    SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
                                          ShouldApplyRoundedCorner(quad)),
@@ -153,7 +154,7 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
  
    DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
    gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
-@@ -2451,8 +2456,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
+@@ -2497,8 +2502,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
        draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
  
    // Bind the program to the GL state.
@@ -164,7 +165,7 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
  
    if (current_program_->rounded_corner_rect_location() != -1) {
      SetShaderRoundedCorner(
-@@ -3153,7 +3158,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
+@@ -3195,7 +3200,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
  void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
                                 const gfx::ColorSpace& src_color_space,
                                 const gfx::ColorSpace& dst_color_space) {
@@ -175,7 +176,7 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
  
    gfx::ColorSpace adjusted_color_space = src_color_space;
    float sdr_white_level = current_frame()->sdr_white_level;
-@@ -3540,7 +3547,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
+@@ -3574,7 +3581,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
  
    *overlay_texture = FindOrCreateOverlayTexture(
        params.quad->render_pass_id, iosurface_width, iosurface_height,
@@ -184,7 +185,7 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
    *new_bounds = gfx::RectF(updated_dst_rect.origin(),
                             gfx::SizeF((*overlay_texture)->texture.size()));
  
-@@ -3759,8 +3766,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
+@@ -3792,8 +3799,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
  
    PrepareGeometry(SHARED_BINDING);
  
@@ -195,17 +196,17 @@ index 2fb123aa60201bfa912d0ec1e797a734f351b608..bf2bad3fce525df6e565e0387ffbefb5
  
    gfx::Transform render_matrix;
    render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
-@@ -3920,3 +3927,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
+@@ -3953,3 +3960,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
  }
  
  }  // namespace viz
 +
 +#undef PATCH_CS
 diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
-index a22390afced20c3a898aa5e84c403f90b1eb0fe2..d15b9978f6e9a2e0b51d1cf4c57a7fc5472b2b0c 100644
+index 350e8aa2ed6cb7b5725b23795a25edc710b3c6be..4c6e78f9dba1e607bee61842a884201ad085cfbe 100644
 --- a/content/browser/gpu/gpu_process_host.cc
 +++ b/content/browser/gpu/gpu_process_host.cc
-@@ -192,6 +192,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
+@@ -193,6 +193,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
  
  // Command-line switches to propagate to the GPU process.
  static const char* const kSwitchNames[] = {
@@ -214,10 +215,10 @@ index a22390afced20c3a898aa5e84c403f90b1eb0fe2..d15b9978f6e9a2e0b51d1cf4c57a7fc5
      service_manager::switches::kGpuSandboxAllowSysVShm,
      service_manager::switches::kGpuSandboxFailuresFatal,
 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
-index 6f0671a753879d7b327681979090508e610cc129..f1beaf3433d67014cff527a686fd3239862eb537 100644
+index 299acbb8973f8b603575b006cfd1d296869f7c2a..32e4c105256e5d1a8930766433f8c1b28d88166d 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -219,6 +219,7 @@
+@@ -218,6 +218,7 @@
  #include "ui/base/ui_base_switches.h"
  #include "ui/base/ui_base_switches_util.h"
  #include "ui/display/display_switches.h"
@@ -225,7 +226,7 @@ index 6f0671a753879d7b327681979090508e610cc129..f1beaf3433d67014cff527a686fd3239
  #include "ui/gl/gl_switches.h"
  #include "ui/native_theme/native_theme_features.h"
  #include "url/url_constants.h"
-@@ -2933,6 +2934,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
+@@ -2903,6 +2904,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
    // Propagate the following switches to the renderer command line (along
    // with any associated values) if present in the browser command line.
    static const char* const kSwitchNames[] = {
@@ -234,10 +235,10 @@ index 6f0671a753879d7b327681979090508e610cc129..f1beaf3433d67014cff527a686fd3239
      network::switches::kExplicitlyAllowedPorts,
      service_manager::switches::kDisableInProcessStackTraces,
 diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
-index 2c96d679729d6ceac7d2b5077b8bbf2b6d951fa5..61ef919b51a1712fb2c0d8eecee8f5b953532b32 100644
+index f15823dd27ae8f91257afd8ae81a9c3915c50059..c8d239ff9a5a66f02248ef6b9e202e7c347c356c 100644
 --- a/content/renderer/render_widget.cc
 +++ b/content/renderer/render_widget.cc
-@@ -2854,6 +2854,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
+@@ -2861,6 +2861,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
    settings.main_frame_before_activation_enabled =
        cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
  
@@ -248,7 +249,7 @@ index 2c96d679729d6ceac7d2b5077b8bbf2b6d951fa5..61ef919b51a1712fb2c0d8eecee8f5b9
    // is what the renderer uses if its not threaded.
    settings.enable_checker_imaging =
 diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
-index 3d936357343e9829768891a45b6459d6a1bbb4f1..55062c91722b900bbbc775c0c88cfc6e57ddc04b 100644
+index 41f7fcbdd63af315f4b4e768bfef3b5004807a0b..398a4fdea3cc0ab4f5132deeb9365189f9c928c3 100644
 --- a/ui/gfx/mac/io_surface.cc
 +++ b/ui/gfx/mac/io_surface.cc
 @@ -16,6 +16,7 @@
@@ -259,7 +260,7 @@ index 3d936357343e9829768891a45b6459d6a1bbb4f1..55062c91722b900bbbc775c0c88cfc6e
  
  namespace gfx {
  
-@@ -191,6 +192,11 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
+@@ -186,6 +187,11 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
  
    // Ensure that all IOSurfaces start as sRGB.
    CGColorSpaceRef color_space = base::mac::GetSRGBColorSpace();
@@ -271,7 +272,7 @@ index 3d936357343e9829768891a45b6459d6a1bbb4f1..55062c91722b900bbbc775c0c88cfc6e
    base::ScopedCFTypeRef<CFDataRef> color_space_icc(
        CGColorSpaceCopyICCProfile(color_space));
    IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc);
-@@ -202,6 +208,14 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
+@@ -197,6 +203,14 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
  
  void IOSurfaceSetColorSpace(IOSurfaceRef io_surface,
                              const ColorSpace& color_space) {

+ 1 - 1
patches/chromium/disable_custom_libcxx_on_windows.patch

@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Nitish Sakhawalkar <[email protected]>
 Date: Mon, 13 May 2019 15:48:36 -0700
-Subject: Disable custom libcxx on windows
+Subject: disable_custom_libcxx_on_windows.patch
 
 
 diff --git a/build/config/c++/c++.gni b/build/config/c++/c++.gni

+ 4 - 4
patches/chromium/disable_hidden.patch

@@ -5,10 +5,10 @@ Subject: disable_hidden.patch
 
 
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index 8278ff4f07e5a18941521c92c819d099636b96b4..8606461c0422460e5d2d6adab0fea4ad8060ece5 100644
+index 3925586d55cb79a26b231781a821c510dfe17bd4..1ccff96eccde8dbff2b972d53c05486fb160c5db 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -670,6 +670,9 @@ void RenderWidgetHostImpl::WasHidden() {
+@@ -675,6 +675,9 @@ void RenderWidgetHostImpl::WasHidden() {
    if (is_hidden_)
      return;
  
@@ -19,10 +19,10 @@ index 8278ff4f07e5a18941521c92c819d099636b96b4..8606461c0422460e5d2d6adab0fea4ad
  
    TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
 diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
-index 350770092301beffa86a658a5c42276b238d0800..9296c0ad7f83cd4a5dce041de2fb97a537e44858 100644
+index ef6276238004ff6e12de90d03be1f720c1ac266c..b8d981a45edb22a60cc439e881a4bc81854b35cd 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
-@@ -156,6 +156,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
+@@ -183,6 +183,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
    // RenderWidgetHostImpl.
    static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
  

+ 0 - 26
patches/chromium/disable_network_services_by_default.patch

@@ -1,26 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Cheng Zhao <[email protected]>
-Date: Tue, 9 Apr 2019 14:57:02 -0700
-Subject: disable_network_services_by_default.patch
-
-Disable NetworkService by default.
-
-This allows us to enable NetworkService with command line flags, which makes it
-easier to work on NetworkService migration.
-
-We should remove this patch after all Electron's code has been migrated to the
-NetworkService.
-
-diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
-index d10016967b1ac607166e593fbddf39a8fc533fe0..2f8d69091a3eeb46e52d48c015d76df9fe41e350 100644
---- a/services/network/public/cpp/features.cc
-+++ b/services/network/public/cpp/features.cc
-@@ -23,7 +23,7 @@ const base::Feature kNetworkService {
- #else
-   "NetworkServiceNotSupported",
- #endif
--      base::FEATURE_ENABLED_BY_DEFAULT
-+      base::FEATURE_DISABLED_BY_DEFAULT
- };
- 
- // Out of Blink CORS

+ 2 - 2
patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch

@@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch
 See https://github.com/electron/electron/issues/10754
 
 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
-index 14e41abcabba4d881ee8016833662d4cd8ba420b..2499bbcfd67c362166c1ea7e0f4a692784a4bc4c 100644
+index 6a99225ce1f53582c1ce578f9ae7f5eb40544b95..05f9d5da2b819b0f15fe021dccaeff9480aaa827 100644
 --- a/third_party/blink/renderer/core/dom/document.cc
 +++ b/third_party/blink/renderer/core/dom/document.cc
-@@ -4065,7 +4065,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
+@@ -4139,7 +4139,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
          "frame that never had a user gesture since its load. "
          "https://www.chromestatus.com/feature/5082396709879808";
      Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message);

+ 5 - 22
patches/chromium/dom_storage_limits.patch

@@ -31,27 +31,10 @@ With that in mind, an acceptable alternative to disabling the limit at compile-t
 for a given `BrowserWindow` via a `webPreferences` option,
 similar to [`nodeIntegration`](https://electronjs.org/docs/tutorial/security#2-disable-nodejs-integration-for-remote-content).
 
-diff --git a/content/common/dom_storage/dom_storage_map.cc b/content/common/dom_storage/dom_storage_map.cc
-index fd088fb170bead6452ded14016f21f0c29659e03..b90b6cf9132d16bc3b2076c3fa313916e2b5ea7d 100644
---- a/content/common/dom_storage/dom_storage_map.cc
-+++ b/content/common/dom_storage/dom_storage_map.cc
-@@ -185,10 +185,12 @@ bool DOMStorageMap::SetItemInternal(MapType* map_type,
-   size_t new_item_size = size_in_storage(key, value);
-   size_t new_storage_used = storage_used_ - old_item_size + new_item_size;
- 
-+#if 0
-   // Only check quota if the size is increasing, this allows
-   // shrinking changes to pre-existing files that are over budget.
-   if (new_item_size > old_item_size && new_storage_used > quota_)
-     return false;
-+#endif
- 
-   (*map_type)[key] = value;
-   ResetKeyIterator();
-diff --git a/content/common/dom_storage/dom_storage_types.h b/content/common/dom_storage/dom_storage_types.h
-index e87afe5b8ee07f7038a7cc9c40832b6cd27884da..61c9a0dfff60f79c7b36ff5c7d741c06dca03ada 100644
---- a/content/common/dom_storage/dom_storage_types.h
-+++ b/content/common/dom_storage/dom_storage_types.h
+diff --git a/content/browser/dom_storage/dom_storage_types.h b/content/browser/dom_storage/dom_storage_types.h
+index 6c0b831ebaaa2c1749bbc7436ce1025656588310..b67767751cadc6072c133297c7a6cdcc6bfd0c98 100644
+--- a/content/browser/dom_storage/dom_storage_types.h
++++ b/content/browser/dom_storage/dom_storage_types.h
 @@ -21,6 +21,7 @@ typedef std::map<base::string16, base::NullableString16> DOMStorageValuesMap;
  
  // The quota for each storage area.
@@ -61,7 +44,7 @@ index e87afe5b8ee07f7038a7cc9c40832b6cd27884da..61c9a0dfff60f79c7b36ff5c7d741c06
  
  // In the browser process we allow some overage to
 diff --git a/third_party/blink/renderer/modules/storage/cached_storage_area.cc b/third_party/blink/renderer/modules/storage/cached_storage_area.cc
-index 4b976b74490234cd9ad5ac7a0a63708b6edbbae3..183ed46369dc0f0026c53521d19209011d2d0eea 100644
+index d91fdc2a7d52307126bc04d44167edadb8c743a8..630acfca527aaec44742d45e47ce29d7754e3385 100644
 --- a/third_party/blink/renderer/modules/storage/cached_storage_area.cc
 +++ b/third_party/blink/renderer/modules/storage/cached_storage_area.cc
 @@ -107,11 +107,13 @@ bool CachedStorageArea::SetItem(const String& key,

+ 1 - 1
patches/chromium/dump_syms.patch

@@ -8,7 +8,7 @@ this but it is not a blocker for releasing Electron.  This patch removes
 the hard fail on dylib resolve failure from dump_syms
 
 diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
-index 937548cc0303d67402f42a6910cfc57bf0e53d64..dce68b1bd1ef58a5dfddb2bbdb56930ed943ad1d 100755
+index cdd374c33a3edc12db9c9496a4ca765d2ba0ab5d..db04d39f8d263dc2b3b67b7f84470f557b519cfa 100755
 --- a/components/crash/content/tools/generate_breakpad_symbols.py
 +++ b/components/crash/content/tools/generate_breakpad_symbols.py
 @@ -175,7 +175,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path):

+ 2 - 2
patches/chromium/exclude-a-few-test-files-from-build.patch

@@ -7,10 +7,10 @@ Compilation of those files fails with the Chromium 68.
 Remove the patch during the Chromium 69 upgrade.
 
 diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
-index 72177b83dec57c6b9497d59304076f60cf96552a..8856846e1a366f224dd8eefdaf3eb75b1e83b76f 100644
+index a4d738446b0cc23397adc4cf9518ff96f378e35a..4d643c011d17c63db33a39d0b4e5aa4c2ee435fa 100644
 --- a/third_party/blink/renderer/platform/BUILD.gn
 +++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -1717,7 +1717,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
+@@ -1746,7 +1746,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
      "graphics/paint/drawing_display_item_test.cc",
      "graphics/paint/drawing_recorder_test.cc",
      "graphics/paint/float_clip_rect_test.cc",

+ 0 - 29
patches/chromium/expose-net-observer-api.patch

@@ -1,29 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jeremy Apthorp <[email protected]>
-Date: Thu, 18 Oct 2018 17:06:56 -0700
-Subject: expose-net-observer-api.patch
-
-Expose URLRequestContextGetter::{Add,Remove}Observer.
-This patch should be removed once we switch to using the net service (cc @robo)
-
-diff --git a/net/url_request/url_request_context_getter.h b/net/url_request/url_request_context_getter.h
-index def76d3902f30ae1384ae5f629fa116b3975fa86..e5ee0bfa93f497f18bdb3ad7cd51a6726dc87f3e 100644
---- a/net/url_request/url_request_context_getter.h
-+++ b/net/url_request/url_request_context_getter.h
-@@ -79,11 +79,16 @@ class NET_EXPORT URLRequestContextGetter
-   friend class web::NetworkContextOwner;
- #endif  // defined(OS_IOS)
- 
-+  // NOTE(nornagon/robo): electron currently depends on this deprecated API
-+  // from net/, but will be removing it soon when we switch to using the
-+  // network service.
-+ public:
-   // Adds / removes an observer to watch for shutdown of |this|'s context. Must
-   // only be called on network thread. May not be called once
-   // GetURLRequestContext() starts returning nullptr.
-   void AddObserver(URLRequestContextGetterObserver* observer);
-   void RemoveObserver(URLRequestContextGetterObserver* observer);
-+ private:
- 
-   // OnDestruct is used to ensure deletion on the thread on which the request
-   // IO happens.

+ 90 - 0
patches/chromium/expose_setuseragent_on_networkcontext.patch

@@ -0,0 +1,90 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jeremy Apthorp <[email protected]>
+Date: Wed, 28 Aug 2019 12:21:25 -0700
+Subject: expose SetUserAgent on NetworkContext
+
+Applying
+https://chromium-review.googlesource.com/c/chromium/src/+/1585083 before
+it's merged. There may end up being a better way of doing this, or the
+patch may be merged upstream, at which point this patch should be
+removed.
+
+diff --git a/net/url_request/static_http_user_agent_settings.h b/net/url_request/static_http_user_agent_settings.h
+index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a289703d8b0577 100644
+--- a/net/url_request/static_http_user_agent_settings.h
++++ b/net/url_request/static_http_user_agent_settings.h
+@@ -26,13 +26,17 @@ class NET_EXPORT StaticHttpUserAgentSettings : public HttpUserAgentSettings {
+     accept_language_ = new_accept_language;
+   }
+ 
++  void set_user_agent(const std::string& new_user_agent) {
++    user_agent_ = new_user_agent;
++  }
++
+   // HttpUserAgentSettings implementation
+   std::string GetAcceptLanguage() const override;
+   std::string GetUserAgent() const override;
+ 
+  private:
+   std::string accept_language_;
+-  const std::string user_agent_;
++  std::string user_agent_;
+ 
+   DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
+ };
+diff --git a/services/network/network_context.cc b/services/network/network_context.cc
+index 13fcd399516c7c26cf89a15dda083faea97ea969..7feed6ef9374d37430584f58272790e0e801f148 100644
+--- a/services/network/network_context.cc
++++ b/services/network/network_context.cc
+@@ -1095,6 +1095,13 @@ void NetworkContext::SetNetworkConditions(
+                                       std::move(network_conditions));
+ }
+ 
++void NetworkContext::SetUserAgent(const std::string& new_user_agent) {
++  // This may only be called on NetworkContexts created with a constructor that
++  // calls ApplyContextParamsToBuilder.
++  DCHECK(user_agent_settings_);
++  user_agent_settings_->set_user_agent(new_user_agent);
++}
++
+ void NetworkContext::SetAcceptLanguage(const std::string& new_accept_language) {
+   // This may only be called on NetworkContexts created with the constructor
+   // that calls MakeURLRequestContext().
+diff --git a/services/network/network_context.h b/services/network/network_context.h
+index f765e5e232de56f070d404e16149abd6627159cd..ce9955126f84f0cd7c7b7961c6dc6f0709359b17 100644
+--- a/services/network/network_context.h
++++ b/services/network/network_context.h
+@@ -214,6 +214,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+   void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
+   void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
+                             mojom::NetworkConditionsPtr conditions) override;
++  void SetUserAgent(const std::string& new_user_agent) override;
+   void SetAcceptLanguage(const std::string& new_accept_language) override;
+   void SetEnableReferrers(bool enable_referrers) override;
+ #if defined(OS_CHROMEOS)
+diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
+index 4e21a1276d83ce0154aa06e169e4b4394d215164..79b2088852fc9d930935e86de029d654749e7d6a 100644
+--- a/services/network/public/mojom/network_context.mojom
++++ b/services/network/public/mojom/network_context.mojom
+@@ -859,6 +859,9 @@ interface NetworkContext {
+   SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
+                        NetworkConditions? conditions);
+ 
++  // Updates the user agent to be used for requests.
++  SetUserAgent(string new_user_agent);
++
+   // Updates the Accept-Language header to be used for requests.
+   SetAcceptLanguage(string new_accept_language);
+ 
+diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
+index 0608e512432bc3426714d78bddd87bf537ddebae..7bed7ebc5e52660fff7cb6b93a618e0a16376ab8 100644
+--- a/services/network/test/test_network_context.h
++++ b/services/network/test/test_network_context.h
+@@ -94,6 +94,7 @@ class TestNetworkContext : public mojom::NetworkContext {
+   void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
+   void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
+                             mojom::NetworkConditionsPtr conditions) override {}
++  void SetUserAgent(const std::string& new_user_agent) override {}
+   void SetAcceptLanguage(const std::string& new_accept_language) override {}
+   void SetEnableReferrers(bool enable_referrers) override {}
+ #if defined(OS_CHROMEOS)

+ 39 - 39
patches/chromium/feat_offscreen_rendering_with_viz_compositor.patch

@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Heilig Benedek <[email protected]>
 Date: Wed, 20 Mar 2019 20:30:44 +0100
-Subject: feat: offscreen rendering with viz compositor
+Subject: feat_offscreen_rendering_with_viz_compositor.patch
 
 
 diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc
@@ -45,7 +45,7 @@ index f5e18df4e06e24d3bdd51308abde48e217444848..41017d9d53b1c0d563ea0901f5cae407
  #if defined(USE_X11)
  void HostDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) {
 diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h
-index 5e5c5da4a3cfc927df3fb120fcab647e927271c1..8c6ec95f309660fb83012a13c7b9bb64b782e7d9 100644
+index b8177277ebca471fc147f2d5b53521cbadd8fa2d..72a807e138f80b4ab37cb1d368bc968e299d903f 100644
 --- a/components/viz/host/host_display_client.h
 +++ b/components/viz/host/host_display_client.h
 @@ -30,17 +30,17 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
@@ -85,7 +85,7 @@ index 65c26e2f7ae813e50f6740f73a4d145467da4366..39c04c4d6b644a4ad7b13b4e932b085f
  
    if (!canvas_) {
 diff --git a/components/viz/host/layered_window_updater_impl.h b/components/viz/host/layered_window_updater_impl.h
-index d9a9730a78b9aec833c64282ca868dbba5594d82..d98426e9f78931bd43061ec994559d594c96151c 100644
+index ced30727ab67e557265c3a61f7c213763da973ce..f422786fe6cd9cab47494fe6028f3c3be8bc763e 100644
 --- a/components/viz/host/layered_window_updater_impl.h
 +++ b/components/viz/host/layered_window_updater_impl.h
 @@ -33,7 +33,7 @@ class VIZ_HOST_EXPORT LayeredWindowUpdaterImpl
@@ -98,10 +98,10 @@ index d9a9730a78b9aec833c64282ca868dbba5594d82..d98426e9f78931bd43061ec994559d59
   private:
    const HWND hwnd_;
 diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
-index fdd358f741e6bfc1eb0cd67c3bb113e64250400c..fe0e53fd43fc762e2d6c096fbccc5676bc14bfde 100644
+index a3fc1b3bdc9c22f4ac4b1ae8ddd992f419d04d55..0da7bf23e0f5309887c9038a14c33d2d80095d0b 100644
 --- a/components/viz/service/BUILD.gn
 +++ b/components/viz/service/BUILD.gn
-@@ -113,6 +113,8 @@ viz_component("service") {
+@@ -118,6 +118,8 @@ viz_component("service") {
      "display_embedder/output_surface_provider_impl.h",
      "display_embedder/server_shared_bitmap_manager.cc",
      "display_embedder/server_shared_bitmap_manager.h",
@@ -111,7 +111,7 @@ index fdd358f741e6bfc1eb0cd67c3bb113e64250400c..fe0e53fd43fc762e2d6c096fbccc5676
      "display_embedder/software_output_surface.h",
      "display_embedder/viz_process_context_provider.cc",
 diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
-index 7f61cb7c847bae88b50f2c32bbe9be6525a4c587..f059762b2c39c927b6bc6e40ad1c0641913082f2 100644
+index e3c8e9dbca69f2665e8dbbd798d45c3b7199e04c..d9fa2d536e977ac966065a9058661f887e995320 100644
 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
 +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
 @@ -20,6 +20,7 @@
@@ -122,15 +122,15 @@ index 7f61cb7c847bae88b50f2c32bbe9be6525a4c587..f059762b2c39c927b6bc6e40ad1c0641
  #include "components/viz/service/display_embedder/software_output_surface.h"
  #include "components/viz/service/display_embedder/viz_process_context_provider.h"
  #include "components/viz/service/gl/gpu_service_impl.h"
-@@ -32,6 +33,7 @@
- #include "gpu/ipc/common/surface_handle.h"
+@@ -33,6 +34,7 @@
+ #include "gpu/ipc/scheduler_sequence.h"
  #include "gpu/ipc/service/gpu_channel_manager_delegate.h"
  #include "gpu/ipc/service/image_transport_surface.h"
-+#include "services/viz/privileged/interfaces/compositing/layered_window_updater.mojom.h"
++#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h"
  #include "ui/base/ui_base_switches.h"
  #include "ui/gl/gl_context.h"
  #include "ui/gl/init/gl_factory.h"
-@@ -219,6 +221,19 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
+@@ -223,6 +225,19 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
    if (headless_)
      return std::make_unique<SoftwareOutputDevice>();
  
@@ -185,7 +185,7 @@ index f3867356e3d641416e00e6d115ae9ae2a0be90ab..b1d192d2b20ccb63fba07093101d745e
  
 diff --git a/components/viz/service/display_embedder/software_output_device_proxy.cc b/components/viz/service/display_embedder/software_output_device_proxy.cc
 new file mode 100644
-index 0000000000000000000000000000000000000000..f5fc4f37c10bdc8aca8c1618985d46d10c830437
+index 0000000000000000000000000000000000000000..c17b03e00089bfd301c63910426bb16afb8cdae7
 --- /dev/null
 +++ b/components/viz/service/display_embedder/software_output_device_proxy.cc
 @@ -0,0 +1,156 @@
@@ -200,7 +200,7 @@ index 0000000000000000000000000000000000000000..f5fc4f37c10bdc8aca8c1618985d46d1
 +#include "components/viz/common/resources/resource_sizes.h"
 +#include "components/viz/service/display_embedder/output_device_backing.h"
 +#include "mojo/public/cpp/system/platform_handle.h"
-+#include "services/viz/privileged/interfaces/compositing/layered_window_updater.mojom.h"
++#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h"
 +#include "skia/ext/platform_canvas.h"
 +#include "third_party/skia/include/core/SkCanvas.h"
 +#include "ui/gfx/skia_util.h"
@@ -347,7 +347,7 @@ index 0000000000000000000000000000000000000000..f5fc4f37c10bdc8aca8c1618985d46d1
 +}  // namespace viz
 diff --git a/components/viz/service/display_embedder/software_output_device_proxy.h b/components/viz/service/display_embedder/software_output_device_proxy.h
 new file mode 100644
-index 0000000000000000000000000000000000000000..ff3c0217812a8370a20aa528f117e928fd1b95f4
+index 0000000000000000000000000000000000000000..3865939d0445a23a468770f57207ba5ef23277ed
 --- /dev/null
 +++ b/components/viz/service/display_embedder/software_output_device_proxy.h
 @@ -0,0 +1,88 @@
@@ -367,8 +367,8 @@ index 0000000000000000000000000000000000000000..ff3c0217812a8370a20aa528f117e928
 +#include "components/viz/host/host_display_client.h"
 +#include "components/viz/service/display/software_output_device.h"
 +#include "components/viz/service/viz_service_export.h"
-+#include "services/viz/privileged/interfaces/compositing/display_private.mojom.h"
-+#include "services/viz/privileged/interfaces/compositing/layered_window_updater.mojom.h"
++#include "services/viz/privileged/mojom/compositing/display_private.mojom.h"
++#include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h"
 +
 +namespace viz {
 +
@@ -440,7 +440,7 @@ index 0000000000000000000000000000000000000000..ff3c0217812a8370a20aa528f117e928
 +
 +#endif  // COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_
 diff --git a/components/viz/service/display_embedder/software_output_device_win.cc b/components/viz/service/display_embedder/software_output_device_win.cc
-index 73ea1986b2140a3ffb87c5e23c7ab2174bac0a10..3ba3657ba12ec47cc3db3fec218496ffe817d35b 100644
+index 74316edc0e0bd28b1772e9d7cf34327d113462c4..9cbe5400458ce6e0b8ea9edfa3f0969fb936ee1e 100644
 --- a/components/viz/service/display_embedder/software_output_device_win.cc
 +++ b/components/viz/service/display_embedder/software_output_device_win.cc
 @@ -11,6 +11,7 @@
@@ -449,7 +449,7 @@ index 73ea1986b2140a3ffb87c5e23c7ab2174bac0a10..3ba3657ba12ec47cc3db3fec218496ff
  #include "components/viz/service/display_embedder/output_device_backing.h"
 +#include "components/viz/service/display_embedder/software_output_device_proxy.h"
  #include "mojo/public/cpp/system/platform_handle.h"
- #include "services/viz/privileged/interfaces/compositing/layered_window_updater.mojom.h"
+ #include "services/viz/privileged/mojom/compositing/layered_window_updater.mojom.h"
  #include "skia/ext/platform_canvas.h"
 @@ -265,7 +266,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
    if (!canvas_)
@@ -476,10 +476,10 @@ index 73ea1986b2140a3ffb87c5e23c7ab2174bac0a10..3ba3657ba12ec47cc3db3fec218496ff
    } else {
      return std::make_unique<SoftwareOutputDeviceWinDirect>(hwnd, backing);
    }
-diff --git a/services/viz/privileged/interfaces/compositing/display_private.mojom b/services/viz/privileged/interfaces/compositing/display_private.mojom
-index d5d0f0eaab04ccfedf6c01ae565c1ddc3f518cd0..b186708c6a3443806236a565496c5e55019ae9fb 100644
---- a/services/viz/privileged/interfaces/compositing/display_private.mojom
-+++ b/services/viz/privileged/interfaces/compositing/display_private.mojom
+diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
+index 5c6292cfb3b8b46802c772d202d19c78e4782488..ed27af3ab0b383553b4d9492d29cec2b91bee807 100644
+--- a/services/viz/privileged/mojom/compositing/display_private.mojom
++++ b/services/viz/privileged/mojom/compositing/display_private.mojom
 @@ -79,12 +79,14 @@ interface DisplayPrivate {
  };
  
@@ -496,10 +496,10 @@ index d5d0f0eaab04ccfedf6c01ae565c1ddc3f518cd0..b186708c6a3443806236a565496c5e55
    CreateLayeredWindowUpdater(LayeredWindowUpdater& layered_window_updater);
  
    // Notifies that a swap has occurred and provides information about the pixel
-diff --git a/services/viz/privileged/interfaces/compositing/layered_window_updater.mojom b/services/viz/privileged/interfaces/compositing/layered_window_updater.mojom
+diff --git a/services/viz/privileged/mojom/compositing/layered_window_updater.mojom b/services/viz/privileged/mojom/compositing/layered_window_updater.mojom
 index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a285498c3f8e72 100644
---- a/services/viz/privileged/interfaces/compositing/layered_window_updater.mojom
-+++ b/services/viz/privileged/interfaces/compositing/layered_window_updater.mojom
+--- a/services/viz/privileged/mojom/compositing/layered_window_updater.mojom
++++ b/services/viz/privileged/mojom/compositing/layered_window_updater.mojom
 @@ -26,5 +26,5 @@ interface LayeredWindowUpdater {
    // Draws to the HWND by copying pixels from shared memory. Callback must be
    // called after draw operation is complete to signal shared memory can be
@@ -508,7 +508,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
 +  Draw(gfx.mojom.Rect damage_rect) => ();
  };
 diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
-index 5158731bd8512fcd2ee859b1e5eeff3a9a32ca9a..4d3592e939c45eec86cd4c7e328de247e9374419 100644
+index 359e7d21a4a5e7acaed9bd7f42f40019e650a182..cd90aab9d3a7b5335c829d964d92e3fa62401408 100644
 --- a/ui/compositor/compositor.h
 +++ b/ui/compositor/compositor.h
 @@ -23,6 +23,7 @@
@@ -517,7 +517,7 @@ index 5158731bd8512fcd2ee859b1e5eeff3a9a32ca9a..4d3592e939c45eec86cd4c7e328de247
  #include "components/viz/common/surfaces/frame_sink_id.h"
 +#include "components/viz/host/host_display_client.h"
  #include "components/viz/host/host_frame_sink_client.h"
- #include "services/viz/privileged/interfaces/compositing/vsync_parameter_observer.mojom-forward.h"
+ #include "services/viz/privileged/mojom/compositing/vsync_parameter_observer.mojom-forward.h"
  #include "third_party/skia/include/core/SkColor.h"
 @@ -194,6 +195,15 @@ class COMPOSITOR_EXPORT ContextFactory {
    virtual bool SyncTokensRequiredForDisplayCompositor() = 0;
@@ -555,10 +555,10 @@ index 5158731bd8512fcd2ee859b1e5eeff3a9a32ca9a..4d3592e939c45eec86cd4c7e328de247
    Layer* root_layer_ = nullptr;
  
 diff --git a/ui/compositor/host/host_context_factory_private.cc b/ui/compositor/host/host_context_factory_private.cc
-index 1c84de621781d0d7cf41866fc033b78881c5e972..112a1a6c2a0f24ee9ace05d7c38247b22fb4ed4c 100644
+index 747d01865657b0bd055c7bb1515dfc84ddbe92aa..0453999f6513176bd8e835741292ecf3ad51f5b1 100644
 --- a/ui/compositor/host/host_context_factory_private.cc
 +++ b/ui/compositor/host/host_context_factory_private.cc
-@@ -99,8 +99,12 @@ void HostContextFactoryPrivate::ConfigureCompositor(
+@@ -98,8 +98,12 @@ void HostContextFactoryPrivate::ConfigureCompositor(
        mojo::MakeRequest(&root_params->compositor_frame_sink_client);
    root_params->display_private =
        mojo::MakeRequest(&compositor_data.display_private);
@@ -594,10 +594,10 @@ index 4014e64a75da88cf66c02e8adb71171c2666cab7..25e57784e1a1ffc546b003daa4cd0059
    // The geometry of the frame.
    gfx::Size pixel_size;
    float scale_factor = 1.f;
-diff --git a/ui/gfx/mojo/ca_layer_params.mojom b/ui/gfx/mojo/ca_layer_params.mojom
+diff --git a/ui/gfx/mojom/ca_layer_params.mojom b/ui/gfx/mojom/ca_layer_params.mojom
 index a73b2e678ffe0a682d0aa5409724fb441768bec5..6c36626d204c77ef51278b9e8f6fc6ee24a7a9ab 100644
---- a/ui/gfx/mojo/ca_layer_params.mojom
-+++ b/ui/gfx/mojo/ca_layer_params.mojom
+--- a/ui/gfx/mojom/ca_layer_params.mojom
++++ b/ui/gfx/mojom/ca_layer_params.mojom
 @@ -18,5 +18,6 @@ struct CALayerParams {
    bool is_empty;
    CALayerContent content;
@@ -605,10 +605,10 @@ index a73b2e678ffe0a682d0aa5409724fb441768bec5..6c36626d204c77ef51278b9e8f6fc6ee
 +  gfx.mojom.Rect damage;
    float scale_factor;
  };
-diff --git a/ui/gfx/mojo/ca_layer_params_struct_traits.cc b/ui/gfx/mojo/ca_layer_params_struct_traits.cc
-index 5be5a3547f8eb826faaa4a18455b18ee22ec0bf9..beb94400a0d7a30c2aae0b3821f011853c8b6c58 100644
---- a/ui/gfx/mojo/ca_layer_params_struct_traits.cc
-+++ b/ui/gfx/mojo/ca_layer_params_struct_traits.cc
+diff --git a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
+index 843d5c24ec33de07c12d4417eb111f91dbcd42fe..0ea594950fcd2686f1b07248dbc8ceb257d89dca 100644
+--- a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
++++ b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
 @@ -52,6 +52,9 @@ bool StructTraits<gfx::mojom::CALayerParamsDataView, gfx::CALayerParams>::Read(
    if (!data.ReadPixelSize(&out->pixel_size))
      return false;
@@ -619,10 +619,10 @@ index 5be5a3547f8eb826faaa4a18455b18ee22ec0bf9..beb94400a0d7a30c2aae0b3821f01185
    out->scale_factor = data.scale_factor();
    return true;
  }
-diff --git a/ui/gfx/mojo/ca_layer_params_struct_traits.h b/ui/gfx/mojo/ca_layer_params_struct_traits.h
-index 94127a0d5b50b052318e9e5a360755fe771f87e9..348fa26c5c95a13d1ddd0ff2545aca3a35841a77 100644
---- a/ui/gfx/mojo/ca_layer_params_struct_traits.h
-+++ b/ui/gfx/mojo/ca_layer_params_struct_traits.h
+diff --git a/ui/gfx/mojom/ca_layer_params_mojom_traits.h b/ui/gfx/mojom/ca_layer_params_mojom_traits.h
+index 4cac766eae3161baedac4202f694129cd90c80de..0821495ad22944d8856bb750cac8912a2f8328c3 100644
+--- a/ui/gfx/mojom/ca_layer_params_mojom_traits.h
++++ b/ui/gfx/mojom/ca_layer_params_mojom_traits.h
 @@ -20,6 +20,10 @@ struct StructTraits<gfx::mojom::CALayerParamsDataView, gfx::CALayerParams> {
      return ca_layer_params.pixel_size;
    }

+ 2 - 2
patches/chromium/fix_breakpad_symbol_generation_on_linux_arm.patch

@@ -1,13 +1,13 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Shelley Vohr <[email protected]>
 Date: Tue, 28 May 2019 18:12:17 -0700
-Subject: fix: breakpad symbol generation on linux arm
+Subject: fix_breakpad_symbol_generation_on_linux_arm.patch
 
 Fixes broken Linux ARM breakpad symbol generation by patching
 out an `ldd`-related call that was throwing.
 
 diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
-index 4249d7b26f9037b60a40e073f56037f9ff036138..0ad9ff9b9bc7dd535655b37013270ad504aa6a34 100755
+index edb3fa5c125fae7858a1f36495410baf47d58484..05a1385e13d282a63975143cbc6e157984bbd992 100755
 --- a/components/crash/content/tools/generate_breakpad_symbols.py
 +++ b/components/crash/content/tools/generate_breakpad_symbols.py
 @@ -67,7 +67,8 @@ def GetSharedLibraryDependenciesLinux(binary, options):

+ 2 - 1
patches/chromium/fix_disable_usage_of_abort_report_np_in_mas_builds.patch

@@ -1,8 +1,9 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Samuel Attard <[email protected]>
 Date: Mon, 4 Mar 2019 14:43:36 -0800
-Subject: fix: disable usage of abort_report_np in MAS builds
+Subject: fix_disable_usage_of_abort_report_np_in_mas_builds.patch
 
+Disable usage of abort_report_np in MAS builds.
 
 diff --git a/sandbox/mac/sandbox_logging.cc b/sandbox/mac/sandbox_logging.cc
 index 4eebcea13d17093a685cc79b8a8f61fb3894c71b..d704dced154f1d5db097e566a9c681438f94475d 100644

+ 24 - 10
patches/chromium/fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch

@@ -1,27 +1,27 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Samuel Attard <[email protected]>
 Date: Mon, 4 Mar 2019 14:46:48 -0800
-Subject: fix: disable usage of pthread_fchdir_np and pthread_chdir_np in MAS
- builds
+Subject: 
+ fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_MAS.patch
+
+Disable usage of pthread_fchdir_np and pthread_chdir_np in MAS builds.
 
 diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
-index c6d5cbbd5417a1b18a6cf94a681de6c671089e35..92d683619e8de505d5172a8ae09e6e67f28da96f 100644
+index 1119fb3f97b116028d78fdf42c1d336440a1681f..264178186f3f780b2b33de7649b1321b23964515 100644
 --- a/base/process/launch_mac.cc
 +++ b/base/process/launch_mac.cc
-@@ -25,10 +25,12 @@
+@@ -26,8 +26,10 @@ extern "C" {
  // descriptor. libpthread only exposes a syscall wrapper starting in
  // macOS 10.12, but the system call dates back to macOS 10.5. On older OSes,
  // the syscall is issued directly.
 +#if !defined(MAS_BUILD)
- extern "C" {
- int pthread_chdir_np(const char*) API_AVAILABLE(macosx(10.12));
+ int pthread_chdir_np(const char* dir) API_AVAILABLE(macosx(10.12));
  int pthread_fchdir_np(int fd) API_AVAILABLE(macosx(10.12));
- }
 +#endif
  
- namespace base {
- 
-@@ -95,21 +97,29 @@ class PosixSpawnFileActions {
+ int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim)
+     API_AVAILABLE(macosx(10.14));
+@@ -98,21 +100,29 @@ class PosixSpawnFileActions {
  };
  
  int ChangeCurrentThreadDirectory(const char* path) {
@@ -51,3 +51,17 @@ index c6d5cbbd5417a1b18a6cf94a681de6c671089e35..92d683619e8de505d5172a8ae09e6e67
  }
  
  struct GetAppOutputOptions {
+@@ -228,11 +238,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
+     file_actions.Inherit(STDERR_FILENO);
+   }
+ 
++#if 0
+   if (options.disclaim_responsibility) {
+     if (__builtin_available(macOS 10.14, *)) {
+       DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
+     }
+   }
++#endif
+ 
+   std::vector<char*> argv_cstr;
+   argv_cstr.reserve(argv.size() + 1);

+ 6 - 4
patches/chromium/fix_disable_usage_of_setapplicationisdaemon_and.patch

@@ -1,14 +1,16 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Samuel Attard <[email protected]>
 Date: Mon, 4 Mar 2019 14:51:45 -0800
-Subject: fix: disable usage of SetApplicationIsDaemon and
- _LSSetApplicationLaunchServicesServerConnectionStatus in MAS builds
+Subject: fix_disable_usage_of_setapplicationisdaemon_and.patch
+
+Disable usage of SetApplicationIsDaemon and
+_LSSetApplicationLaunchServicesServerConnectionStatus in MAS builds
 
 diff --git a/content/utility/utility_service_factory.cc b/content/utility/utility_service_factory.cc
-index e4c8405fb17e37fd843eb9a962e0c5360524a693..1d5ee0a13a837efd0befe2ec02b38fbf4dcbc572 100644
+index 9b0759ab820ddb0e2a9e609b88bbc1673607c4e3..2392fd01736550f404304df324da9d81dfb3d446 100644
 --- a/content/utility/utility_service_factory.cc
 +++ b/content/utility/utility_service_factory.cc
-@@ -198,7 +198,7 @@ void UtilityServiceFactory::RunService(
+@@ -196,7 +196,7 @@ void UtilityServiceFactory::RunService(
  std::unique_ptr<service_manager::Service>
  UtilityServiceFactory::CreateAudioService(
      mojo::PendingReceiver<service_manager::mojom::Service> receiver) {

+ 1 - 1
patches/chromium/fix_disabling_compositor_recycling.patch

@@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling
 Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
 
 diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
-index 59e58d693c971742951434f6582140d9179235f2..135e7a384a560f55e5201f108fe1ac2db621fbca 100644
+index 18019d5794f688ca07b35a665cc9800bb1d3047a..60c7e980dd322ba012c564fca68848c3188ca5dc 100644
 --- a/content/browser/renderer_host/browser_compositor_view_mac.mm
 +++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
 @@ -209,7 +209,7 @@

+ 0 - 76
patches/chromium/fix_use_weakptr_to_detect_deletion.patch

@@ -1,76 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: John Kleinschmidt <[email protected]>
-Date: Wed, 31 Jul 2019 14:36:27 -0400
-Subject: fix: use WeakPtr to detect deletion
-
-
-diff --git a/ui/compositor/callback_layer_animation_observer.cc b/ui/compositor/callback_layer_animation_observer.cc
-index 639caf4d1411b867a31ce29e6c6ec4ae846359a8..6296afa55e38494cf0232f8bcd05811bfd4ebe38 100644
---- a/ui/compositor/callback_layer_animation_observer.cc
-+++ b/ui/compositor/callback_layer_animation_observer.cc
-@@ -38,22 +38,18 @@ CallbackLayerAnimationObserver::CallbackLayerAnimationObserver(
-           &CallbackLayerAnimationObserver::DummyAnimationStartedCallback)),
-       animation_ended_callback_(animation_ended_callback) {}
- 
--CallbackLayerAnimationObserver::~CallbackLayerAnimationObserver() {
--  if (destroyed_)
--    *destroyed_ = true;
--}
-+CallbackLayerAnimationObserver::~CallbackLayerAnimationObserver() {}
- 
- void CallbackLayerAnimationObserver::SetActive() {
-   active_ = true;
- 
--  bool destroyed = false;
--  destroyed_ = &destroyed;
-+  base::WeakPtr<CallbackLayerAnimationObserver> weak_this =
-+      weak_factory_.GetWeakPtr();
- 
-   CheckAllSequencesStarted();
- 
--  if (destroyed)
-+  if (!weak_this)
-     return;
--  destroyed_ = nullptr;
- 
-   CheckAllSequencesCompleted();
- }
-@@ -110,19 +106,17 @@ void CallbackLayerAnimationObserver::CheckAllSequencesStarted() {
- void CallbackLayerAnimationObserver::CheckAllSequencesCompleted() {
-   if (active_ && GetNumSequencesCompleted() == attached_sequence_count_) {
-     active_ = false;
--    bool destroyed = false;
--    destroyed_ = &destroyed;
--
-+    base::WeakPtr<CallbackLayerAnimationObserver> weak_this =
-+        weak_factory_.GetWeakPtr();
-     bool should_delete = animation_ended_callback_.Run(*this);
- 
--    if (destroyed) {
-+    if (!weak_this) {
-       if (should_delete)
-         LOG(WARNING) << "CallbackLayerAnimationObserver was explicitly "
-                         "destroyed AND was requested to be destroyed via the "
-                         "AnimationEndedCallback's return value.";
-       return;
-     }
--    destroyed_ = nullptr;
- 
-     if (should_delete)
-       delete this;
-diff --git a/ui/compositor/callback_layer_animation_observer.h b/ui/compositor/callback_layer_animation_observer.h
-index fc631cc21ccc83a74955cd1af8bf43b879b6bc80..9b3448eecbc6a9bc75719c8df08586fe8870fa96 100644
---- a/ui/compositor/callback_layer_animation_observer.h
-+++ b/ui/compositor/callback_layer_animation_observer.h
-@@ -167,9 +167,8 @@ class COMPOSITOR_EXPORT CallbackLayerAnimationObserver
-   // The callback to invoke once all the animation sequences have finished.
-   AnimationEndedCallback animation_ended_callback_;
- 
--  // Set to true in the destructor (if non-NULL). Used to detect deletion while
--  // calling out.
--  bool* destroyed_ = nullptr;
-+  // Used to detect deletion while calling out.
-+  base::WeakPtrFactory<CallbackLayerAnimationObserver> weak_factory_{this};
- 
-   DISALLOW_COPY_AND_ASSIGN(CallbackLayerAnimationObserver);
- };

+ 12 - 12
patches/chromium/frame_host_manager.patch

@@ -42,10 +42,10 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2
    // another SiteInstance for the same site.
    void RegisterSiteInstance(SiteInstanceImpl* site_instance);
 diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
-index 37593f39cecfe34fcbb7f0e9911175facdd87ea8..2702cab24f86d850829709bbc664695432bb9c0e 100644
+index ba10b76c4cdec0137aeb39c7edbfed723ed7426f..eadf6a06d22a345776fd832827ba9b3d44738ce4 100644
 --- a/content/browser/frame_host/render_frame_host_manager.cc
 +++ b/content/browser/frame_host/render_frame_host_manager.cc
-@@ -2180,6 +2180,21 @@ bool RenderFrameHostManager::InitRenderView(
+@@ -2228,6 +2228,21 @@ bool RenderFrameHostManager::InitRenderView(
  scoped_refptr<SiteInstance>
  RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      const NavigationRequest& request) {
@@ -67,7 +67,7 @@ index 37593f39cecfe34fcbb7f0e9911175facdd87ea8..2702cab24f86d850829709bbc6646954
    SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
  
    // All children of MHTML documents must be MHTML documents. They all live in
-@@ -2217,6 +2232,59 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2265,6 +2280,59 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
                                                request.common_params().url);
      no_renderer_swap_allowed |=
          request.from_begin_navigation() && !can_renderer_initiate_transfer;
@@ -127,7 +127,7 @@ index 37593f39cecfe34fcbb7f0e9911175facdd87ea8..2702cab24f86d850829709bbc6646954
    } else {
      // Subframe navigations will use the current renderer, unless specifically
      // allowed to swap processes.
-@@ -2228,23 +2296,28 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2276,23 +2344,28 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
    if (no_renderer_swap_allowed && !should_swap_for_error_isolation)
      return scoped_refptr<SiteInstance>(current_site_instance);
  
@@ -159,10 +159,10 @@ index 37593f39cecfe34fcbb7f0e9911175facdd87ea8..2702cab24f86d850829709bbc6646954
  }
  
 diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
-index a805b110c378d0584a361f3a499be57c7826a63a..00c1f807033a76390c12335e5a647a6f951372c2 100644
+index d0d4e89f4190752fa00a575bb91842a72f4c0070..7b8d9af4005c6c7b7f4ebf0090d718fd276d012b 100644
 --- a/content/browser/site_instance_impl.cc
 +++ b/content/browser/site_instance_impl.cc
-@@ -367,6 +367,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
+@@ -368,6 +368,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
    return browsing_instance_->HasSiteInstance(url);
  }
  
@@ -186,12 +186,12 @@ index 1edb9fd6b0c383f291735dd1a952fcb7b17cc87f..23967f040eb346be265faa2a92562e1f
    size_t GetRelatedActiveContentsCount() override;
    bool RequiresDedicatedProcess() override;
 diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
-index 1f469e9c1001ba63e371456d3cbbbfbddffeabb8..511c839d818fee430132efbd1e53a81f44c458a7 100644
+index d51d21fbd09cfa2c017f85ab96c1156a6a4f74f9..5459d566e37866f247452a7f88d884760ec5e608 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
-@@ -52,6 +52,21 @@ void OverrideOnBindInterface(const service_manager::BindSourceInfo& remote_info,
-                                                          handle);
- }
+@@ -44,6 +44,21 @@
+ 
+ namespace content {
  
 +bool ContentBrowserClient::CanUseCustomSiteInstance() {
 +  return false;
@@ -212,10 +212,10 @@ index 1f469e9c1001ba63e371456d3cbbbfbddffeabb8..511c839d818fee430132efbd1e53a81f
      const MainFunctionParams& parameters) {
    return nullptr;
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 46399a321845e04f67d8424acddec2636b2d9cc6..6e745308646bf79a192a0e81e1cf89eece8c21eb 100644
+index 6767853c179179c546bbaa6fd07ade7db9c40a82..4ef8220f88c13b4c19a885245d1f0fa91d293f2a 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -208,8 +208,45 @@ CONTENT_EXPORT void OverrideOnBindInterface(
+@@ -205,8 +205,45 @@ struct WebPreferences;
  // the observer interfaces.)
  class CONTENT_EXPORT ContentBrowserClient {
   public:

+ 2 - 2
patches/chromium/gritsettings_resource_ids.patch

@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
 Add electron resources file to the list of resource ids generation.
 
 diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids
-index e43847961df964f2de96075a4aed90c233c9babe..bb7f9bf1fc01fa61421baffd344dcae2ac28b0d5 100644
+index a4c39b1f6b141056b35ff8b7d9283863d057d0a2..b3a6bb5c948d7ebe6d9746e9210d97344c8a5c9e 100644
 --- a/tools/gritsettings/resource_ids
 +++ b/tools/gritsettings/resource_ids
-@@ -462,6 +462,11 @@
+@@ -465,6 +465,11 @@
      "includes": [28880],
    },
  

+ 2 - 2
patches/chromium/ignore_rc_check.patch

@@ -7,10 +7,10 @@ Dont compare RC.exe and RC.py output.
 FIXME: It has to be reverted once the script is fixed.
 
 diff --git a/build/toolchain/win/tool_wrapper.py b/build/toolchain/win/tool_wrapper.py
-index 926086670dac3ccf85f4085b513740aec1ebe9e5..cbb32f1143420d47af23f1ad92ee8656543a93e0 100644
+index 3834cf2c01a9c63bfe7a6fc9e7549930a5eda01c..454b831a37c13fdd2fe4d8953d60dab661386f9a 100644
 --- a/build/toolchain/win/tool_wrapper.py
 +++ b/build/toolchain/win/tool_wrapper.py
-@@ -224,7 +224,11 @@ class WinTool(object):
+@@ -250,7 +250,11 @@ class WinTool(object):
        if rc_exe_exit_code == 0:
          import filecmp
          # Strip "/fo" prefix.

+ 6 - 6
patches/chromium/libgtkui_export.patch

@@ -6,7 +6,7 @@ Subject: libgtkui_export.patch
 Export libgtkui symbols for the GN component build.
 
 diff --git a/chrome/browser/ui/libgtkui/gtk_util.h b/chrome/browser/ui/libgtkui/gtk_util.h
-index adea4a859d96e219acc92c9178574f089a57944c..df615a91c00d22cabafffebe151728010fe9c1c4 100644
+index d75427b5d5a0aca237cacc9654a8298e26285a81..8608d083a3eb6fe6b22e059cd68834ec4ded0458 100644
 --- a/chrome/browser/ui/libgtkui/gtk_util.h
 +++ b/chrome/browser/ui/libgtkui/gtk_util.h
 @@ -11,6 +11,7 @@
@@ -28,9 +28,9 @@ index adea4a859d96e219acc92c9178574f089a57944c..df615a91c00d22cabafffebe15172801
 -std::string GetDesktopName(base::Environment* env);
 +LIBGTKUI_EXPORT std::string GetDesktopName(base::Environment* env);
  
- guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator);
- 
-@@ -51,7 +52,7 @@ void TurnButtonBlue(GtkWidget* button);
+ GdkModifierType GetGdkModifierForAccelerator(
+     const ui::Accelerator& accelerator);
+@@ -49,7 +50,7 @@ void TurnButtonBlue(GtkWidget* button);
  
  // Sets |dialog| as transient for |parent|, which will keep it on top and center
  // it above |parent|. Do nothing if |parent| is nullptr.
@@ -39,7 +39,7 @@ index adea4a859d96e219acc92c9178574f089a57944c..df615a91c00d22cabafffebe15172801
  
  // Gets the transient parent aura window for |dialog|.
  aura::Window* GetAuraTransientParent(GtkWidget* dialog);
-@@ -157,7 +158,7 @@ void ApplyCssToContext(GtkStyleContext* context, const std::string& css);
+@@ -155,7 +156,7 @@ void ApplyCssToContext(GtkStyleContext* context, const std::string& css);
  
  // Get the 'color' property from the style context created by
  // GetStyleContextFromCss(|css_selector|).
@@ -48,7 +48,7 @@ index adea4a859d96e219acc92c9178574f089a57944c..df615a91c00d22cabafffebe15172801
  
  ScopedCssProvider GetCssProvider(const std::string& css);
  
-@@ -170,7 +171,7 @@ void RenderBackground(const gfx::Size& size,
+@@ -168,7 +169,7 @@ void RenderBackground(const gfx::Size& size,
  // Renders a background from the style context created by
  // GetStyleContextFromCss(|css_selector|) into a 24x24 bitmap and
  // returns the average color.

+ 3 - 3
patches/chromium/mas-lssetapplicationlaunchservicesserverconnectionstatus.patch

@@ -7,12 +7,12 @@ Removes usage of the _LSSetApplicationLaunchServicesServerConnectionStatus
 private API.
 
 diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
-index de80e1023c948a347440eeb960079f498e43fb87..69cb584e3b99a6989dbb2906bfa5bdf1c5cd3df5 100644
+index d257830f5943937a634aa85539ad654310579e2c..4373f508964cb1e9fd51c952122ac2f41fb35ae9 100644
 --- a/content/gpu/gpu_main.cc
 +++ b/content/gpu/gpu_main.cc
-@@ -285,8 +285,10 @@ int GpuMain(const MainFunctionParams& parameters) {
+@@ -286,8 +286,10 @@ int GpuMain(const MainFunctionParams& parameters) {
          std::make_unique<base::SingleThreadTaskExecutor>(
-             base::MessagePump::Type::NS_RUNLOOP);
+             base::MessagePumpType::NS_RUNLOOP);
  
 +#ifndef MAS_BUILD
      // Tell LaunchServices to continue without a connection to the daemon.

+ 29 - 25
patches/chromium/mas_no_private_api.patch

@@ -38,10 +38,10 @@ index 743d1364bcd13e24ecbe5ced730161d15b8c3e93..a7e81072194c00baa0aa3159a6bfe374
  // is concerned.
  @property(nonatomic, readonly) NSString* subrole;
 diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
-index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f9503948665d8d 100644
+index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c7012e53122 100644
 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm
 +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
-@@ -141,6 +141,7 @@
+@@ -219,6 +219,7 @@
  // VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
  const int kAXResultsLimitNoLimit = -1;
  
@@ -49,7 +49,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
  extern "C" {
  
  // The following are private accessibility APIs required for cursor navigation
-@@ -342,6 +343,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
+@@ -420,6 +421,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
    AddMisspelledTextAttributes(ax_range, attributed_text);
    return attributed_text;
  }
@@ -57,7 +57,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
  
  // Returns an autoreleased copy of the AXNodeData's attribute.
  NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
-@@ -609,7 +611,9 @@ + (void)initialize {
+@@ -687,7 +689,9 @@ + (void)initialize {
        {NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
        {NSAccessibilityElementBusyAttribute, @"elementBusy"},
        {NSAccessibilityEnabledAttribute, @"enabled"},
@@ -67,7 +67,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
        {NSAccessibilityExpandedAttribute, @"expanded"},
        {NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
        {NSAccessibilityFocusedAttribute, @"focused"},
-@@ -644,13 +648,17 @@ + (void)initialize {
+@@ -722,13 +726,17 @@ + (void)initialize {
        {NSAccessibilityRowsAttribute, @"rows"},
        // TODO(aboxhall): expose
        // NSAccessibilityServesAsTitleForUIElementsAttribute
@@ -85,7 +85,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
        {NSAccessibilitySizeAttribute, @"size"},
        {NSAccessibilitySortDirectionAttribute, @"sortDirection"},
        {NSAccessibilitySubroleAttribute, @"subrole"},
-@@ -1148,6 +1156,7 @@ - (NSNumber*)enabled {
+@@ -1226,6 +1234,7 @@ - (NSNumber*)enabled {
                                    ax::mojom::Restriction::kDisabled];
  }
  
@@ -93,7 +93,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
  // Returns a text marker that points to the last character in the document that
  // can be selected with VoiceOver.
  - (id)endTextMarker {
-@@ -1158,6 +1167,7 @@ - (id)endTextMarker {
+@@ -1236,6 +1245,7 @@ - (id)endTextMarker {
    BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
    return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
  }
@@ -101,7 +101,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
  
  - (NSNumber*)expanded {
    if (![self instanceActive])
-@@ -2029,6 +2039,7 @@ - (NSValue*)selectedTextRange {
+@@ -2107,6 +2117,7 @@ - (NSValue*)selectedTextRange {
    return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
  }
  
@@ -109,7 +109,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
  - (id)selectedTextMarkerRange {
    if (![self instanceActive])
      return nil;
-@@ -2064,6 +2075,7 @@ - (id)selectedTextMarkerRange {
+@@ -2142,6 +2153,7 @@ - (id)selectedTextMarkerRange {
        CreateAXPlatformRange(*anchorObject, anchorOffset, anchorAffinity,
                              *focusObject, focusOffset, focusAffinity));
  }
@@ -117,7 +117,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
  
  - (NSValue*)size {
    if (![self instanceActive])
-@@ -2096,6 +2108,7 @@ - (NSString*)sortDirection {
+@@ -2174,6 +2186,7 @@ - (NSString*)sortDirection {
    return nil;
  }
  
@@ -125,7 +125,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
  // Returns a text marker that points to the first character in the document that
  // can be selected with VoiceOver.
  - (id)startTextMarker {
-@@ -2106,6 +2119,7 @@ - (id)startTextMarker {
+@@ -2184,6 +2197,7 @@ - (id)startTextMarker {
    BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
    return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
  }
@@ -133,7 +133,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
  
  // Returns a subrole based upon the role.
  - (NSString*)subrole {
-@@ -2409,11 +2423,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
+@@ -2475,11 +2489,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
    NSMutableAttributedString* attributedValue =
        [[[NSMutableAttributedString alloc] initWithString:value] autorelease];
  
@@ -147,23 +147,27 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
  
    return [attributedValue attributedSubstringFromRange:range];
  }
-@@ -2496,6 +2512,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+@@ -2562,9 +2578,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
        return ToBrowserAccessibilityCocoa(cell);
    }
  
+-  if ([attribute
+-          isEqualToString:
+-              NSAccessibilityUIElementForTextMarkerParameterizedAttribute]) {
 +#ifndef MAS_BUILD
-   if ([attribute isEqualToString:@"AXUIElementForTextMarker"]) {
++  if ([attribute isEqualToString:NSAccessibilityUIElementForTextMarkerParameterizedAttribute]) {
      BrowserAccessibilityPositionInstance position =
          CreatePositionFromTextMarker(parameter);
-@@ -2673,6 +2690,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
-     NSString* text = GetTextForTextMarkerRange(parameter);
-     return [NSNumber numberWithInt:[text length]];
+     if (!position->IsNullPosition())
+@@ -2854,6 +2869,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+ 
+     return CreateTextMarker(root->CreatePositionAt(index));
    }
 +#endif
  
    if ([attribute isEqualToString:
                       NSAccessibilityBoundsForRangeParameterizedAttribute]) {
-@@ -2706,6 +2724,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+@@ -2887,6 +2903,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
      return nil;
    }
  
@@ -171,7 +175,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
    if ([attribute
            isEqualToString:
                NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
-@@ -2786,6 +2805,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
+@@ -2967,6 +2984,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
  
      return @(child->GetIndexInParent());
    }
@@ -180,7 +184,7 @@ index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f95039
    return nil;
  }
 diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
-index cd447453b5a8877a9b1da7eab28130a795e3015b..9ef9a7aa5733b8591ed96511e9cdbc8f51875d04 100644
+index 851da832bd30e05974317601712f309b2d542ab6..dd6d4c50468ec5f3364213e43b9336f13b153a19 100644
 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
 +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
 @@ -493,6 +493,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -232,7 +236,7 @@ index e59ac93d0e1554a2df5d8c74db2beba25d090228..6657c48664bdec4964b382f80309d1bf
  
  }  // namespace
 diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
-index b6bea74d9f9c2fcfba381477895e4c15741318fc..4a02e5659e85c507d480d7fb9b63ee10bad1fe85 100644
+index 8e4a469b6f0675dc7b82543d5758f0c2ec226809..2fcfb6edb5f57bd25756257b77361d25768f9abf 100644
 --- a/device/bluetooth/bluetooth_adapter_mac.mm
 +++ b/device/bluetooth/bluetooth_adapter_mac.mm
 @@ -36,6 +36,7 @@
@@ -276,7 +280,7 @@ index b6bea74d9f9c2fcfba381477895e4c15741318fc..4a02e5659e85c507d480d7fb9b63ee10
  
  void BluetoothAdapterMac::RemovePairingDelegateInternal(
 diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
-index d8ae83ce63aafdd0fcd1994a144465791e94ba4a..d19096f9afd606bb7bfd6c377f8a976417d3bff2 100644
+index 35fd1d7da0adfb8c8bef3d2ff3aa9ac25285421a..b7eda4e11c464e733e4ddb1cbf009ba811fc332a 100644
 --- a/media/audio/BUILD.gn
 +++ b/media/audio/BUILD.gn
 @@ -180,6 +180,12 @@ source_set("audio") {
@@ -306,10 +310,10 @@ index 7ec6dab821b542cb0096e7f8875ba21703463087..3e26c9dd0a296b8d9c99ca1ee9d9faba
  }
  
 diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
-index ee2d5721425c86124de6396b77a564d55e89a212..954812b9dda506b16483c37e9ed938716aa560d1 100644
+index 2e0f06b0c1e4b1670bfe8145b3c5abb178b47d62..2f9483283a789a69d7e85536620daa2e35ee9155 100644
 --- a/net/dns/dns_config_service_posix.cc
 +++ b/net/dns/dns_config_service_posix.cc
-@@ -244,6 +244,7 @@ class DnsConfigServicePosix::Watcher {
+@@ -246,6 +246,7 @@ class DnsConfigServicePosix::Watcher {
  
    bool Watch() {
      bool success = true;
@@ -317,7 +321,7 @@ index ee2d5721425c86124de6396b77a564d55e89a212..954812b9dda506b16483c37e9ed93871
      if (!config_watcher_.Watch(base::Bind(&Watcher::OnConfigChanged,
                                            base::Unretained(this)))) {
        LOG(ERROR) << "DNS config watch failed to start.";
-@@ -265,6 +266,7 @@ class DnsConfigServicePosix::Watcher {
+@@ -267,6 +268,7 @@ class DnsConfigServicePosix::Watcher {
                                  DNS_CONFIG_WATCH_MAX);
      }
  #endif  // !defined(OS_ANDROID) && !defined(OS_IOS)

+ 13 - 13
patches/chromium/network_service_allow_remote_certificate_verification_logic.patch

@@ -1,14 +1,14 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Jeremy Apthorp <[email protected]>
 Date: Wed, 8 May 2019 17:25:55 -0700
-Subject: network service: allow remote certificate verification logic
+Subject: network_service_allow_remote_certificate_verification_logic.patch
 
 
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index dffa1299b1cfce8609313435769189495fd8ccb5..ddea6f6e60b6f5ec4c0fdaddf825870f6b4db419 100644
+index ace1397d74dc49d730fd635aed0206febf8711f4..13fcd399516c7c26cf89a15dda083faea97ea969 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -91,6 +91,11 @@
+@@ -90,6 +90,11 @@
  #include "services/network/url_loader.h"
  #include "services/network/url_request_context_builder_mojo.h"
  
@@ -20,7 +20,7 @@ index dffa1299b1cfce8609313435769189495fd8ccb5..ddea6f6e60b6f5ec4c0fdaddf825870f
  #if BUILDFLAG(IS_CT_SUPPORTED)
  #include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
  #include "components/certificate_transparency/chrome_require_ct_delegate.h"
-@@ -319,6 +324,75 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
+@@ -318,6 +323,75 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
  
  }  // namespace
  
@@ -96,7 +96,7 @@ index dffa1299b1cfce8609313435769189495fd8ccb5..ddea6f6e60b6f5ec4c0fdaddf825870f
  constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
  constexpr bool NetworkContext::enable_resource_scheduler_;
  
-@@ -676,6 +750,12 @@ void NetworkContext::SetClient(mojom::NetworkContextClientPtr client) {
+@@ -649,6 +723,12 @@ void NetworkContext::SetClient(mojom::NetworkContextClientPtr client) {
    client_ = std::move(client);
  }
  
@@ -109,7 +109,7 @@ index dffa1299b1cfce8609313435769189495fd8ccb5..ddea6f6e60b6f5ec4c0fdaddf825870f
  void NetworkContext::CreateURLLoaderFactory(
      mojom::URLLoaderFactoryRequest request,
      mojom::URLLoaderFactoryParamsPtr params) {
-@@ -2151,12 +2231,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
+@@ -1723,12 +1803,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
                    cert_net_fetcher_, /*system_trust_store_provider=*/nullptr)));
      }
  #endif
@@ -134,7 +134,7 @@ index dffa1299b1cfce8609313435769189495fd8ccb5..ddea6f6e60b6f5ec4c0fdaddf825870f
    std::unique_ptr<net::NetworkDelegate> network_delegate =
        std::make_unique<NetworkServiceNetworkDelegate>(this);
 diff --git a/services/network/network_context.h b/services/network/network_context.h
-index 297289317efc82b61379c7800e1039eaaf49dc6b..40ba50148d10f16afd9f386917966a6f797b1d92 100644
+index 936ed0637758cb8b0b39d04dc0bf84a80b38eeec..f765e5e232de56f070d404e16149abd6627159cd 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -80,6 +80,7 @@ class DomainReliabilityMonitor;
@@ -145,7 +145,7 @@ index 297289317efc82b61379c7800e1039eaaf49dc6b..40ba50148d10f16afd9f386917966a6f
  class CookieManager;
  class ExpectCTReporter;
  class HostResolver;
-@@ -182,6 +183,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -165,6 +166,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
  
    // mojom::NetworkContext implementation:
    void SetClient(mojom::NetworkContextClientPtr client) override;
@@ -153,7 +153,7 @@ index 297289317efc82b61379c7800e1039eaaf49dc6b..40ba50148d10f16afd9f386917966a6f
    void CreateURLLoaderFactory(mojom::URLLoaderFactoryRequest request,
                                mojom::URLLoaderFactoryParamsPtr params) override;
    void ResetURLLoaderFactories() override;
-@@ -576,6 +578,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -557,6 +559,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
  #endif
  
@@ -163,11 +163,11 @@ index 297289317efc82b61379c7800e1039eaaf49dc6b..40ba50148d10f16afd9f386917966a6f
    // CertNetFetcher is not used by the current platform.
    scoped_refptr<net::CertNetFetcherImpl> cert_net_fetcher_;
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index 58b18e0c3c2beea5f22af3c0b2ad206798ad33a9..4dcb94d32a9928d70f061dbc12dc7b7e672025b8 100644
+index bd03a47acefb77d0271f58ba28866f689ac21ad3..4e21a1276d83ce0154aa06e169e4b4394d215164 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -161,6 +161,17 @@ interface TrustedURLLoaderHeaderClient {
-   OnLoaderCreated(int32 request_id, TrustedHeaderClient& header_client);
+@@ -164,6 +164,17 @@ interface TrustedURLLoaderHeaderClient {
+                   pending_receiver<TrustedHeaderClient> header_client);
  };
  
 +interface CertVerifierClient {
@@ -184,7 +184,7 @@ index 58b18e0c3c2beea5f22af3c0b2ad206798ad33a9..4dcb94d32a9928d70f061dbc12dc7b7e
  // Parameters for constructing a network context.
  struct NetworkContextParams {
    // Name used by memory tools to identify the context.
-@@ -576,6 +587,9 @@ interface NetworkContext {
+@@ -697,6 +708,9 @@ interface NetworkContext {
    // Sets a client for this network context.
    SetClient(NetworkContextClient client);
  

+ 1 - 1
patches/chromium/no_cache_storage_check.patch

@@ -7,7 +7,7 @@ Do not check for unique origin in CacheStorage, in Electron we may have
 scripts running without an origin.
 
 diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage.cc b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
-index a064cef489d6dbb86c1fd1da2bd2e918316326ed..9408cf6ec682bc917555a328926d0f57e49c61a1 100644
+index b1a4d62c9230fd11e74d4fa959b0d89f30a27e83..225c31ec025d73eb581dee9a05cb17cd70ee4be8 100644
 --- a/content/browser/cache_storage/legacy/legacy_cache_storage.cc
 +++ b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
 @@ -104,7 +104,7 @@ class LegacyCacheStorage::CacheLoader {

+ 11 - 10
patches/chromium/notification_provenance.patch

@@ -1,12 +1,13 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Jeremy Apthorp <[email protected]>
 Date: Fri, 5 Oct 2018 14:22:06 -0700
-Subject: pass RenderProcessHost through to PlatformNotificationService
+Subject: notification_provenance.patch
 
-this is so Electron can identify which renderer a notification came from
+Pass RenderProcessHost through to PlatformNotificationService
+so Electron can identify which renderer a notification came from.
 
 diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
-index ceb4bc6248a961bd907e35e9f758cebdbd0ae62b..c85acbb33b7b467716b717159816a00e67d46119 100644
+index a717d9f3539dc0fe86b743c6e29e4311b8b5cec3..1351217319c57be414e6c66f8a01f71fe46d2c04 100644
 --- a/content/browser/notifications/blink_notification_service_impl.cc
 +++ b/content/browser/notifications/blink_notification_service_impl.cc
 @@ -88,9 +88,11 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
@@ -54,7 +55,7 @@ index 5253f6be778cc78571b3df0a33d364a9b1e6ef52..dc5307e6500b0bfb5da83e8d8ff8886b
  
    scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
 diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
-index f64eb733ede38501c34b2af89f42255189abd982..3c2dfad7ac9ba64b0b49ebef41a303edd1470cb1 100644
+index ce997528ce2973b54dbbf965220cc30bcb19a094..e84b0b62d853b044e590a0c764f1b21ad3210886 100644
 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
 +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
 @@ -138,7 +138,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
@@ -67,7 +68,7 @@ index f64eb733ede38501c34b2af89f42255189abd982..3c2dfad7ac9ba64b0b49ebef41a303ed
          notification_service_remote_.BindNewPipeAndPassReceiver());
  
 diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
-index 564d4fdb4d414bdb49d74dc8066dd3de86339dda..32d0ab7f8049dc13e83deac925ef9d10fc1554c1 100644
+index 93ae69a720d4d24b5fd11508a9f6ec3c17f559d5..93768924cf442ef4cb36addfe279852b9c0dd444 100644
 --- a/content/browser/notifications/platform_notification_context_impl.cc
 +++ b/content/browser/notifications/platform_notification_context_impl.cc
 @@ -207,12 +207,13 @@ void PlatformNotificationContextImpl::Shutdown() {
@@ -87,7 +88,7 @@ index 564d4fdb4d414bdb49d74dc8066dd3de86339dda..32d0ab7f8049dc13e83deac925ef9d10
  
  void PlatformNotificationContextImpl::RemoveService(
 diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
-index 83d7c93482bf68ca98ee58de537711dad5844699..edd488efa643e80659cceab476cf53e12f10a1fb 100644
+index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a5978d8ea9c 100644
 --- a/content/browser/notifications/platform_notification_context_impl.h
 +++ b/content/browser/notifications/platform_notification_context_impl.h
 @@ -24,6 +24,7 @@
@@ -107,10 +108,10 @@ index 83d7c93482bf68ca98ee58de537711dad5844699..edd488efa643e80659cceab476cf53e1
        mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
  
 diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc
-index cfdfae7e861ca6d5025f9478363e063afae326ef..b5dacb158e01091228aa97bb85db1efb24ceb6f7 100644
+index 39321f13c6b906ab9a3dab1f62d2eaa951a763a8..ac15adcd060fd2dfc7a1fc472ca617cac6319227 100644
 --- a/content/browser/renderer_interface_binders.cc
 +++ b/content/browser/renderer_interface_binders.cc
-@@ -196,7 +196,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
+@@ -253,7 +253,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
           RenderProcessHost* host, const url::Origin& origin) {
          static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
              ->GetPlatformNotificationContext()
@@ -118,7 +119,7 @@ index cfdfae7e861ca6d5025f9478363e063afae326ef..b5dacb158e01091228aa97bb85db1efb
 +            ->CreateService(host, origin, std::move(request));
        }));
    parameterized_binder_registry_.AddInterface(
-       base::BindRepeating(&BackgroundFetchServiceImpl::CreateForWorker));
+       base::BindRepeating(&QuotaDispatcherHost::CreateForWorker));
 diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h
 index ca61088079c4150fcf389504ddcf26bcf6bf69cd..d9c034c39890eef1fe3d95c6d7c0ae68eb711a89 100644
 --- a/content/public/browser/platform_notification_service.h
@@ -141,7 +142,7 @@ index ca61088079c4150fcf389504ddcf26bcf6bf69cd..d9c034c39890eef1fe3d95c6d7c0ae68
        const GURL& origin,
        const blink::PlatformNotificationData& notification_data,
 diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc
-index faa8e541d9cb530f9212420a4dfd0318069320db..0a244000e60daf8e6bd8e783b41124528a117026 100644
+index ba5982883a3821b42c47c80187af2e4d1b3f0ffb..720965aa1df6b415e12a85dd2b2e4475facab019 100644
 --- a/content/test/mock_platform_notification_service.cc
 +++ b/content/test/mock_platform_notification_service.cc
 @@ -29,6 +29,7 @@ MockPlatformNotificationService::MockPlatformNotificationService(

+ 2 - 2
patches/chromium/out_of_process_instance.patch

@@ -5,10 +5,10 @@ Subject: out_of_process_instance.patch
 
 
 diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
-index fa1ad2c48fac29d2f5ca93c83943878b3fc1a33f..1e97399067dcb8da735f70b1351ea1d08fb2e0e0 100644
+index 9c77f6422edbb42da34abb4320e0d5103cca5eea..8419b1ce6ed543b150c31d41dc8575e98c203427 100644
 --- a/pdf/out_of_process_instance.cc
 +++ b/pdf/out_of_process_instance.cc
-@@ -466,7 +466,9 @@ bool OutOfProcessInstance::Init(uint32_t argc,
+@@ -477,7 +477,9 @@ bool OutOfProcessInstance::Init(uint32_t argc,
    std::string document_url = document_url_var.AsString();
    base::StringPiece document_url_piece(document_url);
    is_print_preview_ = IsPrintPreviewUrl(document_url_piece);

+ 2 - 1
patches/chromium/patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch

@@ -1,8 +1,9 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Jeremy Apthorp <[email protected]>
 Date: Fri, 12 Apr 2019 12:47:57 -0700
-Subject: patch the ensure_gn_version.py script to work on mac CI
+Subject: patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
 
+This patches the ensure_gn_version_py script to work on macOS CI.
 This script is temporary until https://crbug.com/944667 is resolved. We need to
 patch it because on mac CI, we check out the source code on Linux, which
 confuses the script.

+ 9 - 9
patches/chromium/pepper_flash.patch

@@ -28,7 +28,7 @@ index 735da93c3cabb8c6139971295740ba14a30d1b69..533f53fbc42397608e3762e370cc935c
    // Non-owning pointer to the filter must outlive this class.
    explicit ChromeBrowserPepperHostFactory(content::BrowserPpapiHost* host);
 diff --git a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
-index 83cedb4c9e1323259afd041e571240cd971e1241..3686ae2fab5f400cf119a54aea547a72655c2b0a 100644
+index 37245c48cacbc5db164c61e4499f34ee83e0fce7..0fef12892e965e319e45f5dd1a9c5c9fc606aa9a 100644
 --- a/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
 +++ b/chrome/browser/renderer_host/pepper/pepper_broker_message_filter.cc
 @@ -7,10 +7,12 @@
@@ -61,7 +61,7 @@ index 83cedb4c9e1323259afd041e571240cd971e1241..3686ae2fab5f400cf119a54aea547a72
 +  return PP_OK;
  }
 diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
-index 9d28e920676edd065f735b8939854468321e99ca..6c086a792e343cf537e46f2c97c21b6257d7268e 100644
+index c6c2ac11fd5551fe03978b947d2dda4c016e59ae..2dc392a6eab17b048df730e294398a3a0fb2eb8d 100644
 --- a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
 +++ b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
 @@ -8,9 +8,11 @@
@@ -179,7 +179,7 @@ index f2f40b636a41649199a38c663f03e6182df82520..41d11d1f1f9921d4b4deaaf4b2d8ab4b
  
    DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHost);
 diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
-index 0a727e8c438462a293db629da07d5aef2b25a9ee..b49303e2c19329715f72d8926cb765289224d000 100644
+index 2e51425cb66f25f240ad7f4a052bcf6eb76f2062..240fa299b1160ebb2f9b20c7361405c9b84d5d2f 100644
 --- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
 +++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
 @@ -20,6 +20,7 @@
@@ -258,7 +258,7 @@ index b9d2ce7f7f6837ee7b304daac82d21a3147c6faf..4d4b023d62d12b4d119acbfdee64f415
  
    base::WeakPtrFactory<PepperFlashDRMHost> weak_factory_{this};
 diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
-index 0d083bb09ff17a691c6399d2a5746b44e3196873..2023dc0240220362a1b503da07aa9fab4cb4b434 100644
+index 00db4e2fa2ac89d89ecd31174e192dcb17f3e912..df5a53c162059270ad673fffebbd432f6df0d212 100644
 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
 +++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
 @@ -8,17 +8,21 @@
@@ -316,7 +316,7 @@ index 0d083bb09ff17a691c6399d2a5746b44e3196873..2023dc0240220362a1b503da07aa9fab
  }
  
  PepperIsolatedFileSystemMessageFilter::
-@@ -96,6 +102,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived(
+@@ -95,6 +101,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnResourceMessageReceived(
    return PP_ERROR_FAILED;
  }
  
@@ -324,7 +324,7 @@ index 0d083bb09ff17a691c6399d2a5746b44e3196873..2023dc0240220362a1b503da07aa9fab
  Profile* PepperIsolatedFileSystemMessageFilter::GetProfile() {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
    ProfileManager* profile_manager = g_browser_process->profile_manager();
-@@ -122,6 +129,7 @@ PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(Profile* profile) {
+@@ -121,6 +128,7 @@ PepperIsolatedFileSystemMessageFilter::CreateCrxFileSystem(Profile* profile) {
    return storage::IsolatedContext::ScopedFSHandle();
  #endif
  }
@@ -332,7 +332,7 @@ index 0d083bb09ff17a691c6399d2a5746b44e3196873..2023dc0240220362a1b503da07aa9fab
  
  int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
      ppapi::host::HostMessageContext* context,
-@@ -130,7 +138,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
+@@ -129,7 +137,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
      case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_INVALID:
        break;
      case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_CRX:
@@ -341,7 +341,7 @@ index 0d083bb09ff17a691c6399d2a5746b44e3196873..2023dc0240220362a1b503da07aa9fab
      case PP_ISOLATEDFILESYSTEMTYPE_PRIVATE_PLUGINPRIVATE:
        return OpenPluginPrivateFileSystem(context);
    }
-@@ -140,6 +148,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
+@@ -139,6 +147,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OnOpenFileSystem(
    return PP_ERROR_FAILED;
  }
  
@@ -349,7 +349,7 @@ index 0d083bb09ff17a691c6399d2a5746b44e3196873..2023dc0240220362a1b503da07aa9fab
  int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem(
      ppapi::host::HostMessageContext* context) {
  #if BUILDFLAG(ENABLE_EXTENSIONS)
-@@ -180,6 +189,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem(
+@@ -179,6 +188,7 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenCrxFileSystem(
    return PP_ERROR_NOTSUPPORTED;
  #endif
  }

+ 12 - 25
patches/chromium/picture-in-picture.patch

@@ -9,45 +9,32 @@ index 8e4deafa1746eeb48802a0503fefb37bedb33d04..127c62efd2327e1f3f09e9b93a0b8344
 --- a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
 +++ b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
 @@ -4,7 +4,7 @@
-
+ 
  #include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"
-
+ 
 -#include "chrome/grit/generated_resources.h"
 +#include "electron/grit/electron_resources.h"
  #include "third_party/skia/include/core/SkColor.h"
  #include "ui/base/l10n/l10n_util.h"
  #include "ui/gfx/color_palette.h"
 diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
-index 0aca25164dcad26cc000e289d6eb9010e336e6fc..70114b5aa865b96d3ace898d1faf515b9098abd9 100644
+index e9b64a823ae7e25361f37190d247af0fa6a6f68a..43fdb0ad50d2b11a1bc28aa0f358c6dd6feb72b8 100644
 --- a/chrome/browser/ui/views/overlay/close_image_button.cc
 +++ b/chrome/browser/ui/views/overlay/close_image_button.cc
 @@ -4,7 +4,7 @@
-
+ 
  #include "chrome/browser/ui/views/overlay/close_image_button.h"
-
+ 
 -#include "chrome/grit/generated_resources.h"
 +#include "electron/grit/electron_resources.h"
  #include "third_party/skia/include/core/SkColor.h"
  #include "ui/base/l10n/l10n_util.h"
  #include "ui/gfx/color_palette.h"
-diff --git a/chrome/browser/ui/views/overlay/mute_image_button.cc b/chrome/browser/ui/views/overlay/mute_image_button.cc
-index 8c88ef08dd5165c0429dd90e8a76b711ac15a4df..ebdb06a6391b8108fa51796a4ad5f3a8ca489b60 100644
---- a/chrome/browser/ui/views/overlay/mute_image_button.cc
-+++ b/chrome/browser/ui/views/overlay/mute_image_button.cc
-@@ -5,7 +5,7 @@
- #include "chrome/browser/ui/views/overlay/mute_image_button.h"
-
- #include "chrome/app/vector_icons/vector_icons.h"
--#include "chrome/grit/generated_resources.h"
-+#include "electron/grit/electron_resources.h"
- #include "components/vector_icons/vector_icons.h"
- #include "third_party/skia/include/core/SkColor.h"
- #include "ui/base/l10n/l10n_util.h"
 diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
-index 780863193ca12ec1295752969dfc47ac06a9ae64..e2947b893cfcdb1beaa27beac80a1885ed011ce4 100644
+index 39d6339bd2b954b55ed8a4b16657c00a860e79a6..8c82fbe734be172fa124ba0348a46a3c7dfef3dc 100644
 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
 +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
-@@ -20,7 +20,7 @@
+@@ -19,7 +19,7 @@
  #include "chrome/browser/ui/views/overlay/resize_handle_button.h"
  #include "chrome/browser/ui/views/overlay/skip_ad_label_button.h"
  #include "chrome/browser/ui/views/overlay/track_image_button.h"
@@ -62,7 +49,7 @@ index d9e5174ed622fb030bc37d32fbb40b132d7c4c23..1bf19c344721e74bb29c11a4c5c762a7
 +++ b/chrome/browser/ui/views/overlay/playback_image_button.cc
 @@ -5,7 +5,7 @@
  #include "chrome/browser/ui/views/overlay/playback_image_button.h"
-
+ 
  #include "chrome/app/vector_icons/vector_icons.h"
 -#include "chrome/grit/generated_resources.h"
 +#include "electron/grit/electron_resources.h"
@@ -75,7 +62,7 @@ index ee6b3612d7bdda591e05e5af338a80167ce6cd53..af093f14f1ef49c6de7228b296c32532
 +++ b/chrome/browser/ui/views/overlay/resize_handle_button.cc
 @@ -5,7 +5,7 @@
  #include "chrome/browser/ui/views/overlay/resize_handle_button.h"
-
+ 
  #include "chrome/app/vector_icons/vector_icons.h"
 -#include "chrome/grit/generated_resources.h"
 +#include "electron/grit/electron_resources.h"
@@ -87,9 +74,9 @@ index da780c96bb757d7382df5f419e2c0fd644ac72b0..ae520bcf73cf6c39ca428c03975746e2
 --- a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
 +++ b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
 @@ -4,7 +4,7 @@
-
+ 
  #include "chrome/browser/ui/views/overlay/skip_ad_label_button.h"
-
+ 
 -#include "chrome/grit/generated_resources.h"
 +#include "electron/grit/electron_resources.h"
  #include "ui/base/l10n/l10n_util.h"
@@ -101,7 +88,7 @@ index 8f42277409a216f81d21723eb03045ac54525b0e..f7a15bfde9a43c15b18e8afbd60a0b19
 +++ b/chrome/browser/ui/views/overlay/track_image_button.cc
 @@ -5,7 +5,7 @@
  #include "chrome/browser/ui/views/overlay/track_image_button.h"
-
+ 
  #include "chrome/app/vector_icons/vector_icons.h"
 -#include "chrome/grit/generated_resources.h"
 +#include "electron/grit/electron_resources.h"

+ 5 - 5
patches/chromium/preconnect_feature.patch

@@ -8,10 +8,10 @@ this patch removes that dependency so we can reuse it.
 Ideally we would change this class in upstream to not depend on Profile.
 
 diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc
-index cdee4d11f2d2..7312fb4e4ea5 100644
+index c3c7d4220f7ea612e5b86645854e4f426066e18c..969dd6659bfdc0fa3cf3edf494f1623ba10134a5 100644
 --- a/chrome/browser/predictors/preconnect_manager.cc
 +++ b/chrome/browser/predictors/preconnect_manager.cc
-@@ -71,7 +71,7 @@ PreresolveJob::PreresolveJob(PreresolveJob&& other) = default;
+@@ -70,7 +70,7 @@ PreresolveJob::PreresolveJob(PreresolveJob&& other) = default;
  PreresolveJob::~PreresolveJob() = default;
  
  PreconnectManager::PreconnectManager(base::WeakPtr<Delegate> delegate,
@@ -20,7 +20,7 @@ index cdee4d11f2d2..7312fb4e4ea5 100644
      : delegate_(std::move(delegate)),
        profile_(profile),
        inflight_preresolves_count_(0) {
-@@ -327,11 +327,13 @@ network::mojom::NetworkContext* PreconnectManager::GetNetworkContext() const {
+@@ -317,11 +317,13 @@ network::mojom::NetworkContext* PreconnectManager::GetNetworkContext() const {
    if (network_context_)
      return network_context_;
  
@@ -35,7 +35,7 @@ index cdee4d11f2d2..7312fb4e4ea5 100644
    return content::BrowserContext::GetDefaultStoragePartition(profile_)
        ->GetNetworkContext();
 diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h
-index 51a842d2e44f..097316e0cfb6 100644
+index e35163576b55d772098ae2a2138c4c1cf8438eac..70cad725f9476175b31859867c640ca8c66816a8 100644
 --- a/chrome/browser/predictors/preconnect_manager.h
 +++ b/chrome/browser/predictors/preconnect_manager.h
 @@ -22,6 +22,10 @@
@@ -58,7 +58,7 @@ index 51a842d2e44f..097316e0cfb6 100644
    virtual ~PreconnectManager();
  
    // Starts preconnect and preresolve jobs keyed by |url|.
-@@ -202,7 +206,7 @@ class PreconnectManager {
+@@ -196,7 +200,7 @@ class PreconnectManager {
    network::mojom::NetworkContext* GetNetworkContext() const;
  
    base::WeakPtr<Delegate> delegate_;

+ 50 - 49
patches/chromium/printing.patch

@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Shelley Vohr <[email protected]>
 Date: Fri, 7 Jun 2019 13:59:37 -0700
-Subject: fix: printing
+Subject: printing.patch
 
 Add changeset that was previously applied to sources in chromium_src. The
 majority of changes originally come from these PRs:
@@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
 This patch also fixes callback for manual user cancellation and success.
 
 diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
-index 63f432b58371cfa0f8079fa78a51c8865a00c183..d20d803f55ca67fb6993facc69c3431767786053 100644
+index 13f9d7af3ae796ecec3a9189aa59f4b20171fd7a..9c35b294340cce070a9f428dac6aa587c93ccc6c 100644
 --- a/chrome/browser/printing/print_job_worker.cc
 +++ b/chrome/browser/printing/print_job_worker.cc
 @@ -21,12 +21,12 @@
@@ -28,7 +28,7 @@ index 63f432b58371cfa0f8079fa78a51c8865a00c183..d20d803f55ca67fb6993facc69c34317
  #include "printing/print_job_constants.h"
  #include "printing/printed_document.h"
  #include "printing/printing_utils.h"
-@@ -206,9 +206,14 @@ void PrintJobWorker::SetSettingsFromPOD(
+@@ -203,9 +203,14 @@ void PrintJobWorker::SetSettingsFromPOD(
  void PrintJobWorker::UpdatePrintSettings(base::Value new_settings,
                                           SettingsCallback callback) {
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -46,7 +46,7 @@ index 63f432b58371cfa0f8079fa78a51c8865a00c183..d20d803f55ca67fb6993facc69c34317
  }
  
  #if defined(OS_CHROMEOS)
-@@ -224,6 +229,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
+@@ -221,6 +226,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
  
  void PrintJobWorker::GetSettingsDone(SettingsCallback callback,
                                       PrintingContext::Result result) {
@@ -57,11 +57,11 @@ index 63f432b58371cfa0f8079fa78a51c8865a00c183..d20d803f55ca67fb6993facc69c34317
 +                    JobEventDetails::USER_INIT_CANCELED, 0,
 +                    base::RetainedRef(document_)));
 +  }
-   std::move(callback).Run(printing_context_->settings(), result);
+   std::move(callback).Run(printing_context_->TakeAndResetSettings(), result);
  }
  
 diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
-index c4e0992f6265b34659514ef5f15eb8d78645161c..1aca2f88da5d8e96a0f16a667a8a86a7873dfdf9 100644
+index da3383624ff83c20fd94578a80e94d00689bfefc..fcf7264c590f72b26cbcea328cc1f0e718a8c791 100644
 --- a/chrome/browser/printing/print_view_manager_base.cc
 +++ b/chrome/browser/printing/print_view_manager_base.cc
 @@ -27,10 +27,7 @@
@@ -133,7 +133,7 @@ index c4e0992f6265b34659514ef5f15eb8d78645161c..1aca2f88da5d8e96a0f16a667a8a86a7
  }
  
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
-@@ -244,9 +249,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
+@@ -242,9 +247,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
  void PrintViewManagerBase::UpdatePrintingEnabled() {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
    // The Unretained() is safe because ForEachFrame() is synchronous.
@@ -146,7 +146,7 @@ index c4e0992f6265b34659514ef5f15eb8d78645161c..1aca2f88da5d8e96a0f16a667a8a86a7
  }
  
  void PrintViewManagerBase::NavigationStopped() {
-@@ -338,7 +343,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
+@@ -347,7 +352,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
    PrintManager::OnPrintingFailed(cookie);
  
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -155,7 +155,7 @@ index c4e0992f6265b34659514ef5f15eb8d78645161c..1aca2f88da5d8e96a0f16a667a8a86a7
  #endif
  
    ReleasePrinterQuery();
-@@ -438,9 +443,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
+@@ -445,9 +450,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
            content::NotificationService::NoDetails());
        break;
      }
@@ -171,7 +171,7 @@ index c4e0992f6265b34659514ef5f15eb8d78645161c..1aca2f88da5d8e96a0f16a667a8a86a7
        NOTREACHED();
        break;
      }
-@@ -535,8 +544,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
+@@ -542,8 +551,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
    DCHECK(!quit_inner_loop_);
    DCHECK(query);
  
@@ -180,16 +180,17 @@ index c4e0992f6265b34659514ef5f15eb8d78645161c..1aca2f88da5d8e96a0f16a667a8a86a7
  
    // We can't print if there is no renderer.
    if (!web_contents()->GetRenderViewHost() ||
-@@ -547,8 +554,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
-   DCHECK(!print_job_);
-   print_job_ = base::MakeRefCounted<PrintJob>();
-   print_job_->Initialize(std::move(query), RenderSourceName(), number_pages_);
+@@ -557,9 +564,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
+ #if defined(OS_CHROMEOS)
+   print_job_->SetSource(PrintJob::Source::PRINT_PREVIEW, /*source_id=*/"");
+ #endif  // defined(OS_CHROMEOS)
+-
 -  registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
 -                 content::Source<PrintJob>(print_job_.get()));
    printing_succeeded_ = false;
    return true;
  }
-@@ -597,6 +602,13 @@ void PrintViewManagerBase::ReleasePrintJob() {
+@@ -608,6 +612,13 @@ void PrintViewManagerBase::ReleasePrintJob() {
    content::RenderFrameHost* rfh = printing_rfh_;
    printing_rfh_ = nullptr;
  
@@ -203,7 +204,7 @@ index c4e0992f6265b34659514ef5f15eb8d78645161c..1aca2f88da5d8e96a0f16a667a8a86a7
    if (!print_job_)
      return;
  
-@@ -606,8 +618,9 @@ void PrintViewManagerBase::ReleasePrintJob() {
+@@ -617,8 +628,9 @@ void PrintViewManagerBase::ReleasePrintJob() {
      rfh->Send(msg.release());
    }
  
@@ -215,7 +216,7 @@ index c4e0992f6265b34659514ef5f15eb8d78645161c..1aca2f88da5d8e96a0f16a667a8a86a7
    // Don't close the worker thread.
    print_job_ = nullptr;
  }
-@@ -677,6 +690,9 @@ bool PrintViewManagerBase::PrintNowInternal(
+@@ -688,6 +700,9 @@ bool PrintViewManagerBase::PrintNowInternal(
    // Don't print / print preview interstitials or crashed tabs.
    if (web_contents()->ShowingInterstitialPage() || web_contents()->IsCrashed())
      return false;
@@ -226,10 +227,10 @@ index c4e0992f6265b34659514ef5f15eb8d78645161c..1aca2f88da5d8e96a0f16a667a8a86a7
  }
  
 diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
-index 925736d379c34ac7ddc07032305d24e1ae65e4b3..a8b2b31ec8bcb04d83df368b12d124dcdbb8b55d 100644
+index 9dc22fa933edc33017e4b1491f710c45c111ad19..3a4f7ee98c5a611a27ae1126d6b7d67f11b8530e 100644
 --- a/chrome/browser/printing/print_view_manager_base.h
 +++ b/chrome/browser/printing/print_view_manager_base.h
-@@ -39,6 +39,8 @@ class PrintJob;
+@@ -33,6 +33,8 @@ class PrintJob;
  class PrintQueriesQueue;
  class PrinterQuery;
  
@@ -238,7 +239,7 @@ index 925736d379c34ac7ddc07032305d24e1ae65e4b3..a8b2b31ec8bcb04d83df368b12d124dc
  // Base class for managing the print commands for a WebContents.
  class PrintViewManagerBase : public content::NotificationObserver,
                               public PrintManager {
-@@ -48,7 +50,9 @@ class PrintViewManagerBase : public content::NotificationObserver,
+@@ -42,7 +44,9 @@ class PrintViewManagerBase : public content::NotificationObserver,
    // Prints the current document immediately. Since the rendering is
    // asynchronous, the actual printing will not be completed on the return of
    // this function. Returns false if printing is impossible at the moment.
@@ -249,7 +250,7 @@ index 925736d379c34ac7ddc07032305d24e1ae65e4b3..a8b2b31ec8bcb04d83df368b12d124dc
  
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
    // Prints the document in |print_data| with settings specified in
-@@ -195,9 +199,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
+@@ -202,9 +206,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
    // The current RFH that is printing with a system printing dialog.
    content::RenderFrameHost* printing_rfh_;
  
@@ -266,10 +267,10 @@ index 925736d379c34ac7ddc07032305d24e1ae65e4b3..a8b2b31ec8bcb04d83df368b12d124dc
    // This means we are _blocking_ until all the necessary pages have been
    // rendered or the print settings are being loaded.
 diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc
-index 706617b7924cfbf25e4f3a04a40d9ee977e6fd69..92b46562ef36bbfe874d39d706ab589d98f37cda 100644
+index 40762a36024bc48dfe5259520161dc203197bfd0..e38aa442df858ce362645230f7642b2eb48262ce 100644
 --- a/chrome/browser/printing/printing_message_filter.cc
 +++ b/chrome/browser/printing/printing_message_filter.cc
-@@ -21,6 +21,7 @@
+@@ -22,6 +22,7 @@
  #include "components/keyed_service/content/browser_context_keyed_service_shutdown_notifier_factory.h"
  #include "components/printing/browser/print_manager_utils.h"
  #include "components/printing/common/print_messages.h"
@@ -277,7 +278,7 @@ index 706617b7924cfbf25e4f3a04a40d9ee977e6fd69..92b46562ef36bbfe874d39d706ab589d
  #include "content/public/browser/browser_task_traits.h"
  #include "content/public/browser/render_frame_host.h"
  #include "content/public/browser/web_contents.h"
-@@ -89,20 +90,23 @@ void PrintingMessageFilter::SetDelegateForTesting(TestDelegate* delegate) {
+@@ -90,20 +91,23 @@ void PrintingMessageFilter::SetDelegateForTesting(TestDelegate* delegate) {
    g_test_delegate = delegate;
  }
  
@@ -299,12 +300,12 @@ index 706617b7924cfbf25e4f3a04a40d9ee977e6fd69..92b46562ef36bbfe874d39d706ab589d
 +  #if 0
    is_printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs());
    is_printing_enabled_.MoveToSequence(
-       base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}));
+       base::CreateSingleThreadTaskRunner({BrowserThread::IO}));
 +  #endif
  }
  
  PrintingMessageFilter::~PrintingMessageFilter() {
-@@ -137,11 +141,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
+@@ -138,11 +142,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) {
  
  void PrintingMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) {
    DCHECK_CURRENTLY_ON(BrowserThread::IO);
@@ -318,7 +319,7 @@ index 706617b7924cfbf25e4f3a04a40d9ee977e6fd69..92b46562ef36bbfe874d39d706ab589d
    std::unique_ptr<PrinterQuery> printer_query = queue_->PopPrinterQuery(0);
    if (!printer_query) {
      printer_query =
-@@ -227,11 +233,13 @@ void PrintingMessageFilter::OnScriptedPrintReply(
+@@ -228,11 +234,13 @@ void PrintingMessageFilter::OnScriptedPrintReply(
  void PrintingMessageFilter::OnUpdatePrintSettings(int document_cookie,
                                                    base::Value job_settings,
                                                    IPC::Message* reply_msg) {
@@ -332,7 +333,7 @@ index 706617b7924cfbf25e4f3a04a40d9ee977e6fd69..92b46562ef36bbfe874d39d706ab589d
    std::unique_ptr<PrinterQuery> printer_query =
        queue_->PopPrinterQuery(document_cookie);
    if (!printer_query) {
-@@ -257,7 +265,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
+@@ -258,7 +266,9 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
      std::unique_ptr<PrinterQuery> printer_query,
      IPC::Message* reply_msg) {
    PrintMsg_PrintPages_Params params;
@@ -343,7 +344,7 @@ index 706617b7924cfbf25e4f3a04a40d9ee977e6fd69..92b46562ef36bbfe874d39d706ab589d
      params.Reset();
    } else {
      RenderParamsFromPrintSettings(printer_query->settings(), &params.params);
-@@ -295,7 +305,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
+@@ -296,7 +306,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
  void PrintingMessageFilter::OnCheckForCancel(const PrintHostMsg_PreviewIds& ids,
                                               bool* cancel) {
@@ -378,7 +379,7 @@ index 9fbea6d0a2dbe55b1d600fbc217dee5aa8ae8cd5..de9bd267e408c02fd4da7d903523c0e6
    // content::BrowserMessageFilter:
    bool OnMessageReceived(const IPC::Message& message) override;
 diff --git a/components/printing/common/print_messages.h b/components/printing/common/print_messages.h
-index 1802034a6e15a6ad8b0d9591cfb79ba5873dc982..331ac71d925c056d3b7577123251514c35f30fde 100644
+index a134a000bd3ccb229a26b3e2cb3425f91a85618e..fd768d372ac15be9b0553fd7d98ce5e27ed19f5a 100644
 --- a/components/printing/common/print_messages.h
 +++ b/components/printing/common/print_messages.h
 @@ -368,7 +368,9 @@ IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu)
@@ -393,7 +394,7 @@ index 1802034a6e15a6ad8b0d9591cfb79ba5873dc982..331ac71d925c056d3b7577123251514c
  // Like PrintMsg_PrintPages, but using the print preview document's frame/node.
  IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog)
 diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
-index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c914d07648e 100644
+index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708eeea0a4aa 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
 @@ -37,6 +37,7 @@
@@ -404,7 +405,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
  #include "printing/units.h"
  #include "third_party/blink/public/common/frame/frame_owner_element_type.h"
  #include "third_party/blink/public/common/frame/sandbox_flags.h"
-@@ -1116,7 +1117,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
+@@ -1122,7 +1123,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
      web_frame->DispatchBeforePrintEvent();
      if (!weak_this)
        return;
@@ -414,7 +415,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
      if (weak_this)
        web_frame->DispatchAfterPrintEvent();
    }
-@@ -1164,7 +1166,9 @@ void PrintRenderFrameHelper::OnDestruct() {
+@@ -1170,7 +1172,9 @@ void PrintRenderFrameHelper::OnDestruct() {
    delete this;
  }
  
@@ -425,7 +426,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
    if (ipc_nesting_level_ > 1)
      return;
  
-@@ -1177,7 +1181,8 @@ void PrintRenderFrameHelper::OnPrintPages() {
+@@ -1183,7 +1187,8 @@ void PrintRenderFrameHelper::OnPrintPages() {
    // If we are printing a PDF extension frame, find the plugin node and print
    // that instead.
    auto plugin = delegate_->GetPdfElement(frame);
@@ -435,7 +436,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
    if (weak_this)
      frame->DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1194,7 +1199,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
+@@ -1200,7 +1205,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
    }
    auto weak_this = weak_ptr_factory_.GetWeakPtr();
    Print(frame, print_preview_context_.source_node(),
@@ -444,7 +445,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
    if (weak_this)
      frame->DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1230,6 +1235,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
+@@ -1236,6 +1241,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
    if (ipc_nesting_level_ > 1)
      return;
  
@@ -453,7 +454,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
    print_preview_context_.OnPrintPreview();
  
    UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent",
-@@ -1622,7 +1629,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1628,7 +1635,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
      auto self = weak_ptr_factory_.GetWeakPtr();
      Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -464,7 +465,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -1633,7 +1642,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1639,7 +1648,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
  void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
                                     const blink::WebNode& node,
@@ -475,7 +476,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
    // If still not finished with earlier print request simply ignore.
    if (prep_frame_view_)
      return;
-@@ -1641,7 +1652,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1647,7 +1658,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
    FrameReference frame_ref(frame);
  
    int expected_page_count = 0;
@@ -484,7 +485,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
      DidFinishPrinting(FAIL_PRINT_INIT);
      return;  // Failed to init print page settings.
    }
-@@ -1661,8 +1672,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1667,8 +1678,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
  
      PrintMsg_PrintPages_Params print_settings;
      auto self = weak_ptr_factory_.GetWeakPtr();
@@ -498,7 +499,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -1867,10 +1881,23 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
+@@ -1875,10 +1889,23 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
    return printed_pages;
  }
  
@@ -525,7 +526,7 @@ index ef580254bd8feba84ac02924b77b9b4feaf14d96..3cdaf40b6e5aeee7193a49a31f824c91
    // Check if the printer returned any settings, if the settings is empty, we
    // can safely assume there are no printer drivers configured. So we safely
    // terminate.
-@@ -1890,12 +1917,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
+@@ -1898,12 +1925,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
    return result;
  }
  
@@ -587,10 +588,10 @@ index 71c0c15217b62cd7a6087c6d9ae50481f9041d5f..18d853d7f808aaf816de86e8c5b82317
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
    // Set options for print preset from source PDF document.
 diff --git a/printing/print_settings_conversion.cc b/printing/print_settings_conversion.cc
-index 2563ae6a87b2354ff2f2b45c17f61d2f44910efa..a7c61e5286659c51579c6b50cf5cc52c10433062 100644
+index 17c363ff9aa2e2262cacd0c9baea3820334bf67b..5b02461c2e9afe254405ddacd904e4bdbddd0b8b 100644
 --- a/printing/print_settings_conversion.cc
 +++ b/printing/print_settings_conversion.cc
-@@ -190,11 +190,12 @@ bool PrintSettingsFromJobSettings(const base::Value& job_settings,
+@@ -184,11 +184,12 @@ bool PrintSettingsFromJobSettings(const base::Value& job_settings,
  
    settings->set_dpi_xy(dpi_horizontal.value(), dpi_vertical.value());
  #endif
@@ -605,23 +606,23 @@ index 2563ae6a87b2354ff2f2b45c17f61d2f44910efa..a7c61e5286659c51579c6b50cf5cc52c
    settings->set_color(static_cast<ColorModel>(color.value()));
    settings->set_scale_factor(static_cast<double>(scale_factor.value()) / 100.0);
 diff --git a/printing/printing_context.cc b/printing/printing_context.cc
-index 78e3c3b2e1bea0f3626838eab14267847a556470..b1c16e6eb1d0d9c0a8b700d9faf408d602f962ea 100644
+index cd5c27c87df175676504a06b4e1904f6b836dc90..c4f6acf66bc69f1e7db633aa5b3b03a913ffb666 100644
 --- a/printing/printing_context.cc
 +++ b/printing/printing_context.cc
-@@ -77,8 +77,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() {
+@@ -93,8 +93,6 @@ PrintingContext::Result PrintingContext::UsePdfSettings() {
  
  PrintingContext::Result PrintingContext::UpdatePrintSettings(
      base::Value job_settings) {
 -  ResetSettings();
 -
-   if (!PrintSettingsFromJobSettings(job_settings, &settings_)) {
+   if (!PrintSettingsFromJobSettings(job_settings, settings_.get())) {
      NOTREACHED();
      return OnError();
 diff --git a/printing/printing_context.h b/printing/printing_context.h
-index 9ccc1a6680bcedd452cade7f7531924ace7876cf..4e1c330c01a1d6d1ba702337f16d8f8a70cd76f5 100644
+index 6a5a7c90ef5ba82837095c7bb934881b108797f7..a033c58076ff229ae45ed7c454fc60a57e5707b7 100644
 --- a/printing/printing_context.h
 +++ b/printing/printing_context.h
-@@ -129,12 +129,12 @@ class PRINTING_EXPORT PrintingContext {
+@@ -131,12 +131,12 @@ class PRINTING_EXPORT PrintingContext {
  
    int job_id() const { return job_id_; }
  

+ 18 - 18
patches/chromium/put_back_deleted_colors_for_autofill.patch

@@ -1,17 +1,17 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: John Kleinschmidt <[email protected]>
 Date: Thu, 20 Jun 2019 16:49:25 -0400
-Subject: put back deleted colors for autofill
+Subject: put_back_deleted_colors_for_autofill.patch
 
 https://chromium-review.googlesource.com/c/chromium/src/+/1652925 removed colors as they are no longer
 needed in chromium but our autofill implementation uses them.  This patch can be removed if we refactor
-our autofill implementation to work like chromium.
+our autofill implementation to work like Chromium's.
 
 diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk.cc b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
-index 3044d7b1829397a97b9a1ef9f115587bab74339d..c578d16c995c11daf90484593b5f9649d37b7041 100644
+index 80542c2cab345f991079453b66f58439d0f214eb..d460eb8d2432df1209412a28cecc22f2db9af99b 100644
 --- a/chrome/browser/ui/libgtkui/native_theme_gtk.cc
 +++ b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
-@@ -280,6 +280,27 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
+@@ -279,6 +279,27 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
      case ui::NativeTheme::kColorId_TableHeaderSeparator:
        return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
  
@@ -40,10 +40,10 @@ index 3044d7b1829397a97b9a1ef9f115587bab74339d..c578d16c995c11daf90484593b5f9649
      // TODO(thomasanderson): Render GtkSpinner directly.
      case ui::NativeTheme::kColorId_ThrobberSpinningColor:
 diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
-index 489369300d48dbfacb8c5489e06b77218f526bf4..340026b3dac4e833d3448d83db7b92c136134726 100644
+index 7fd49a2e26968daaa16ed3322b516f53ff60fb56..f902910ecc8e5b4945187e836655362ebba49204 100644
 --- a/ui/native_theme/common_theme.cc
 +++ b/ui/native_theme/common_theme.cc
-@@ -51,6 +51,14 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
+@@ -56,6 +56,14 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
        case NativeTheme::kColorId_BubbleFooterBackground:
          return SkColorSetRGB(0x32, 0x36, 0x39);
  
@@ -58,7 +58,7 @@ index 489369300d48dbfacb8c5489e06b77218f526bf4..340026b3dac4e833d3448d83db7b92c1
        // FocusableBorder
        case NativeTheme::kColorId_FocusedBorderColor:
          return SkColorSetA(gfx::kGoogleBlue300, 0x66);
-@@ -351,6 +359,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
+@@ -359,6 +367,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
      case NativeTheme::kColorId_UnfocusedBorderColor:
        return SkColorSetA(SK_ColorBLACK, 0x66);
  
@@ -78,10 +78,10 @@ index 489369300d48dbfacb8c5489e06b77218f526bf4..340026b3dac4e833d3448d83db7b92c1
      case NativeTheme::kColorId_ThrobberSpinningColor:
        return gfx::kGoogleBlue600;
 diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
-index 97ced9d2495c33aad710d8ec5208b8107cd94ed9..62dc2fdad120e0cee44b15848d1ebb813ccb8559 100644
+index 3604105e43ee1866a8517c52ed05205b3ed10b56..70389e0245993faa2c17e9deefeb000280ef2368 100644
 --- a/ui/native_theme/native_theme.h
 +++ b/ui/native_theme/native_theme.h
-@@ -367,6 +367,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
+@@ -389,6 +389,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
      kColorId_TableHeaderText,
      kColorId_TableHeaderBackground,
      kColorId_TableHeaderSeparator,
@@ -94,24 +94,24 @@ index 97ced9d2495c33aad710d8ec5208b8107cd94ed9..62dc2fdad120e0cee44b15848d1ebb81
      kColorId_ThrobberSpinningColor,
      kColorId_ThrobberWaitingColor,
 diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
-index c6a0c1b9775f9d7e7a9be15d6f15ce84acf68b68..3b3a909bd920a7bf8f54fac4c00f29ce9556c20c 100644
+index 257206023976b889590bc225f6542881e8a5d463..3003643bfb78cec2f5e84fc9e1471e1ef54aae41 100644
 --- a/ui/native_theme/native_theme_win.cc
 +++ b/ui/native_theme/native_theme_win.cc
-@@ -548,6 +548,17 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
+@@ -559,6 +559,17 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id,
      case kColorId_TableGroupingIndicatorColor:
-       return system_colors_[COLOR_GRAYTEXT];
+       return system_colors_[SystemThemeColor::kGrayText];
  
 +    // Results Tables
 +    case kColorId_ResultsTableNormalBackground:
-+      return system_colors_[COLOR_WINDOW];
++      return system_colors_[SystemThemeColor::kWindow];
 +    case kColorId_ResultsTableHoveredBackground:
-+      return color_utils::AlphaBlend(system_colors_[COLOR_HIGHLIGHT],
-+                                     system_colors_[COLOR_WINDOW], 0.25f);
++      return color_utils::AlphaBlend(system_colors_[SystemThemeColor::kWindowText],
++                                     system_colors_[SystemThemeColor::kWindow], 0.25f);
 +    case kColorId_ResultsTableNormalText:
-+      return system_colors_[COLOR_WINDOWTEXT];
++      return system_colors_[SystemThemeColor::kWindowText];
 +    case kColorId_ResultsTableDimmedText:
-+      return color_utils::AlphaBlend(system_colors_[COLOR_WINDOWTEXT],
-+                                     system_colors_[COLOR_WINDOW], 0.5f);
++      return color_utils::AlphaBlend(system_colors_[SystemThemeColor::kWindowText],
++                                     system_colors_[SystemThemeColor::kWindow], 0.5f);
      default:
        break;
    }

+ 2 - 2
patches/chromium/render_widget_host_view_base.patch

@@ -25,7 +25,7 @@ index f41270e262784602c90b79b7aefbcd1a7af43dd8..a28ea7ee72fbf596b2b1d10cacaad406
      const blink::WebMouseEvent& event,
      const ui::LatencyInfo& latency) {
 diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
-index 8e523d78e7655262b18e1b52d8365120df387908..cf9e284267d767ed35013a7aa5f675cebb3c68bb 100644
+index 41288f633262f49ed7fb174c1af4e1834061c940..7fac11ee38f50165a0089473de5be601b1edf040 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.h
 +++ b/content/browser/renderer_host/render_widget_host_view_base.h
 @@ -24,9 +24,11 @@
@@ -62,7 +62,7 @@ index 8e523d78e7655262b18e1b52d8365120df387908..cf9e284267d767ed35013a7aa5f675ce
    // This only needs to be overridden by RenderWidgetHostViewBase subclasses
    // that handle content embedded within other RenderWidgetHostViews.
    gfx::PointF TransformPointToRootCoordSpaceF(
-@@ -353,6 +360,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
+@@ -348,6 +355,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
    virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
                                     const ui::LatencyInfo& latency);
  

+ 2 - 2
patches/chromium/render_widget_host_view_mac.patch

@@ -5,7 +5,7 @@ Subject: render_widget_host_view_mac.patch
 
 
 diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
-index 5d8727b36c015c5136a3a24c463821ff6ae46994..fa73828627fcea54d12fd6eb6c489248bf2af8d7 100644
+index a9654d8c1a9e15a3f90ec54a0b8e1bc61ce1f803..6c1e802fda70968cbcbea157fc982653de1c70c7 100644
 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
 +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
 @@ -152,6 +152,11 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -66,7 +66,7 @@ index 5d8727b36c015c5136a3a24c463821ff6ae46994..fa73828627fcea54d12fd6eb6c489248
    return validAttributesForMarkedText_.get();
  }
 diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
-index 66edee6f3dd734b86f6c63b037a19937e5b8ca86..d98f25ac7748b82c77e47d318437ae3de4ea6d42 100644
+index f52e0750f337dde0a1f3e7d6d36bac8a62094316..0aac157ae84f975acd6a944c63194bf2ed233188 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
 @@ -63,6 +63,7 @@

+ 3 - 3
patches/chromium/resource_file_conflict.patch

@@ -52,10 +52,10 @@ Some alternatives to this patch:
 None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
 
 diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
-index 1b355b2404bca740edc422693c482ceae5d13b9d..93b5810ec10466625b11e7e1d19abfd78589786a 100644
+index dd3a098632d49d82d20a1dba87cc151e626a4966..6b05e6b8565cb62761be89b9c1ce0db48140fcfc 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -1717,7 +1717,7 @@ if (is_chrome_branded && !is_android) {
+@@ -1613,7 +1613,7 @@ if (is_chrome_branded && !is_android) {
    }
  }
  
@@ -64,7 +64,7 @@ index 1b355b2404bca740edc422693c482ceae5d13b9d..93b5810ec10466625b11e7e1d19abfd7
    chrome_paks("packed_resources") {
      if (is_mac) {
        output_dir = "$root_gen_dir/repack"
-@@ -1741,6 +1741,12 @@ if (!is_android) {
+@@ -1637,6 +1637,12 @@ if (!is_android) {
    }
  }
  

+ 372 - 0
patches/chromium/revert_cleanup_remove_menu_subtitles_sublabels.patch

@@ -0,0 +1,372 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: deepak1556 <[email protected]>
+Date: Wed, 28 Aug 2019 16:40:26 -0700
+Subject: Revert "Cleanup: Remove Menu Subtitles/Sublabels"
+
+This reverts commit 27a7b3648684204ccb16ede5cf3947579bd6c222.
+
+diff --git a/ui/base/models/menu_model.cc b/ui/base/models/menu_model.cc
+index 73f0ab6d84d2cab6732866a6dc4b781faf630c0e..3319d058e8303066e0159d02d27ee2e8a46b38ec 100644
+--- a/ui/base/models/menu_model.cc
++++ b/ui/base/models/menu_model.cc
+@@ -46,6 +46,10 @@ bool MenuModel::GetModelAndIndexForCommandId(int command_id,
+   return false;
+ }
+ 
++base::string16 MenuModel::GetSublabelAt(int index) const {
++  return base::string16();
++}
++
+ base::string16 MenuModel::GetMinorTextAt(int index) const {
+   return base::string16();
+ }
+diff --git a/ui/base/models/menu_model.h b/ui/base/models/menu_model.h
+index e0324ff11fb8c6b578ea7e902488235c33ec5485..690aa082b6be0bd576770d03ac94075183c1f9d6 100644
+--- a/ui/base/models/menu_model.h
++++ b/ui/base/models/menu_model.h
+@@ -64,6 +64,10 @@ class UI_BASE_EXPORT MenuModel {
+   // Returns the label of the item at the specified index.
+   virtual base::string16 GetLabelAt(int index) const = 0;
+ 
++  // Returns the sublabel of the item at the specified index. The sublabel
++  // is rendered beneath the label and using the font GetLabelFontAt().
++  virtual base::string16 GetSublabelAt(int index) const;
++
+   // Returns the minor text of the item at the specified index. The minor text
+   // is rendered to the right of the label and using the font GetLabelFontAt().
+   virtual base::string16 GetMinorTextAt(int index) const;
+diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
+index 0aeeb3e47074590834de6d9ca7e3eb7dbf6a7793..5efc0589644e243a095765710302af992d53f5b8 100644
+--- a/ui/base/models/simple_menu_model.cc
++++ b/ui/base/models/simple_menu_model.cc
+@@ -42,6 +42,11 @@ base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId(
+   return base::string16();
+ }
+ 
++base::string16 SimpleMenuModel::Delegate::GetSublabelForCommandId(
++    int command_id) const {
++  return base::string16();
++}
++
+ base::string16 SimpleMenuModel::Delegate::GetMinorTextForCommandId(
+     int command_id) const {
+   return base::string16();
+@@ -324,6 +329,11 @@ void SimpleMenuModel::SetLabel(int index, const base::string16& label) {
+   MenuItemsChanged();
+ }
+ 
++void SimpleMenuModel::SetSublabel(int index, const base::string16& sublabel) {
++  items_[ValidateItemIndex(index)].sublabel = sublabel;
++  MenuItemsChanged();
++}
++
+ void SimpleMenuModel::SetMinorText(int index,
+                                    const base::string16& minor_text) {
+   items_[ValidateItemIndex(index)].minor_text = minor_text;
+@@ -398,6 +408,12 @@ base::string16 SimpleMenuModel::GetLabelAt(int index) const {
+   return items_[ValidateItemIndex(index)].label;
+ }
+ 
++base::string16 SimpleMenuModel::GetSublabelAt(int index) const {
++  if (IsItemDynamicAt(index))
++    return delegate_->GetSublabelForCommandId(GetCommandIdAt(index));
++  return items_[ValidateItemIndex(index)].sublabel;
++}
++
+ base::string16 SimpleMenuModel::GetMinorTextAt(int index) const {
+   if (IsItemDynamicAt(index))
+     return delegate_->GetMinorTextForCommandId(GetCommandIdAt(index));
+diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
+index 3cc9d686da8f64ddc8bdc66df40b1866bdd20607..dfacbdd4a55b5f5aa4d8c67136c607f75a880278 100644
+--- a/ui/base/models/simple_menu_model.h
++++ b/ui/base/models/simple_menu_model.h
+@@ -44,10 +44,11 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
+     // Delegate should return true if |command_id| should be visible.
+     virtual bool IsCommandIdVisible(int command_id) const;
+ 
+-    // Some command ids have labels, minor text and icons that change over
+-    // time.
++    // Some command ids have labels, sublabels, minor text and icons that change
++    // over time.
+     virtual bool IsItemForCommandIdDynamic(int command_id) const;
+     virtual base::string16 GetLabelForCommandId(int command_id) const;
++    virtual base::string16 GetSublabelForCommandId(int command_id) const;
+     virtual base::string16 GetMinorTextForCommandId(int command_id) const;
+     // Gets the icon for the item with the specified id, returning true if there
+     // is an icon, false otherwise.
+@@ -175,6 +176,9 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
+   // Sets the label for the item at |index|.
+   void SetLabel(int index, const base::string16& label);
+ 
++  // Sets the sublabel for the item at |index|.
++  void SetSublabel(int index, const base::string16& sublabel);
++
+   // Sets the minor text for the item at |index|.
+   void SetMinorText(int index, const base::string16& minor_text);
+ 
+@@ -201,6 +205,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
+   ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
+   int GetCommandIdAt(int index) const override;
+   base::string16 GetLabelAt(int index) const override;
++  base::string16 GetSublabelAt(int index) const override;
+   base::string16 GetMinorTextAt(int index) const override;
+   const gfx::VectorIcon* GetMinorIconAt(int index) const override;
+   bool IsItemDynamicAt(int index) const override;
+@@ -236,6 +241,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
+     int command_id = 0;
+     ItemType type = TYPE_COMMAND;
+     base::string16 label;
++    base::string16 sublabel;
+     base::string16 minor_text;
+     const gfx::VectorIcon* minor_icon = nullptr;
+     gfx::Image icon;
+diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
+index a37e13686535aad2c12085bf8e387add46100f14..93dbbe0628daa667d0b7d290cb63c25315ea27f7 100644
+--- a/ui/views/controls/menu/menu_item_view.cc
++++ b/ui/views/controls/menu/menu_item_view.cc
+@@ -275,6 +275,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
+     int index,
+     int item_id,
+     const base::string16& label,
++    const base::string16& sublabel,
+     const base::string16& minor_text,
+     const gfx::VectorIcon* minor_icon,
+     const gfx::ImageSkia& icon,
+@@ -295,6 +296,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
+     item->SetTitle(GetDelegate()->GetLabel(item_id));
+   else
+     item->SetTitle(label);
++  item->SetSubtitle(sublabel);
+   item->SetMinorText(minor_text);
+   item->SetMinorIcon(minor_icon);
+   if (vector_icon) {
+@@ -336,21 +338,23 @@ void MenuItemView::RemoveAllMenuItems() {
+ MenuItemView* MenuItemView::AppendMenuItem(int item_id,
+                                            const base::string16& label,
+                                            Type type) {
+-  return AppendMenuItemImpl(item_id, label, base::string16(), nullptr,
+-                            gfx::ImageSkia(), type, ui::NORMAL_SEPARATOR);
++  return AppendMenuItemImpl(item_id, label, base::string16(), base::string16(),
++                            nullptr, gfx::ImageSkia(), type,
++                            ui::NORMAL_SEPARATOR);
+ }
+ 
+ MenuItemView* MenuItemView::AppendSubMenu(int item_id,
+                                           const base::string16& label) {
+-  return AppendMenuItemImpl(item_id, label, base::string16(), nullptr,
+-                            gfx::ImageSkia(), SUBMENU, ui::NORMAL_SEPARATOR);
++  return AppendMenuItemImpl(item_id, label, base::string16(), base::string16(),
++                            nullptr, gfx::ImageSkia(), SUBMENU,
++                            ui::NORMAL_SEPARATOR);
+ }
+ 
+ MenuItemView* MenuItemView::AppendSubMenuWithIcon(int item_id,
+                                                   const base::string16& label,
+                                                   const gfx::ImageSkia& icon) {
+-  return AppendMenuItemImpl(item_id, label, base::string16(), nullptr, icon,
+-                            SUBMENU, ui::NORMAL_SEPARATOR);
++  return AppendMenuItemImpl(item_id, label, base::string16(), base::string16(),
++                            nullptr, icon, SUBMENU, ui::NORMAL_SEPARATOR);
+ }
+ 
+ MenuItemView* MenuItemView::AppendMenuItemWithLabel(
+@@ -364,12 +368,14 @@ MenuItemView* MenuItemView::AppendDelegateMenuItem(int item_id) {
+ }
+ 
+ void MenuItemView::AppendSeparator() {
+-  AppendMenuItemImpl(0, base::string16(), base::string16(), nullptr,
+-                     gfx::ImageSkia(), SEPARATOR, ui::NORMAL_SEPARATOR);
++  AppendMenuItemImpl(0, base::string16(), base::string16(), base::string16(),
++                     nullptr, gfx::ImageSkia(), SEPARATOR,
++                     ui::NORMAL_SEPARATOR);
+ }
+ 
+ void MenuItemView::AddSeparatorAt(int index) {
+   AddMenuItemAt(index, /*item_id=*/0, /*label=*/base::string16(),
++                /*sub_label=*/base::string16(),
+                 /*minor_text=*/base::string16(), /*minor_icon=*/nullptr,
+                 /*icon=*/gfx::ImageSkia(), /*vector_icon=*/nullptr,
+                 /*type=*/SEPARATOR,
+@@ -379,21 +385,22 @@ void MenuItemView::AddSeparatorAt(int index) {
+ MenuItemView* MenuItemView::AppendMenuItemWithIcon(int item_id,
+                                                    const base::string16& label,
+                                                    const gfx::ImageSkia& icon) {
+-  return AppendMenuItemImpl(item_id, label, base::string16(), nullptr, icon,
+-                            NORMAL, ui::NORMAL_SEPARATOR);
++  return AppendMenuItemImpl(item_id, label, base::string16(), base::string16(),
++                            nullptr, icon, NORMAL, ui::NORMAL_SEPARATOR);
+ }
+ 
+ MenuItemView* MenuItemView::AppendMenuItemImpl(
+     int item_id,
+     const base::string16& label,
++    const base::string16& sublabel,
+     const base::string16& minor_text,
+     const gfx::VectorIcon* minor_icon,
+     const gfx::ImageSkia& icon,
+     Type type,
+     ui::MenuSeparatorType separator_style) {
+   const int index = submenu_ ? int{submenu_->children().size()} : 0;
+-  return AddMenuItemAt(index, item_id, label, minor_text, minor_icon, icon,
+-                       nullptr, type, separator_style);
++  return AddMenuItemAt(index, item_id, label, sublabel, minor_text, minor_icon,
++                       icon, nullptr, type, separator_style);
+ }
+ 
+ SubmenuView* MenuItemView::CreateSubmenu() {
+@@ -425,6 +432,11 @@ void MenuItemView::SetTitle(const base::string16& title) {
+   invalidate_dimensions();  // Triggers preferred size recalculation.
+ }
+ 
++void MenuItemView::SetSubtitle(const base::string16& subtitle) {
++  subtitle_ = subtitle;
++  invalidate_dimensions();  // Triggers preferred size recalculation.
++}
++
+ void MenuItemView::SetMinorText(const base::string16& minor_text) {
+   minor_text_ = minor_text;
+   invalidate_dimensions();  // Triggers preferred size recalculation.
+@@ -1014,13 +1026,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
+       (!delegate ||
+        delegate->ShouldReserveSpaceForSubmenuIndicator() ?
+            item_right_margin_ : config.arrow_to_edge_padding);
+-  gfx::Rect text_bounds(label_start, top_margin, width, available_height);
++  gfx::Rect text_bounds(label_start, top_margin, width,
++                        subtitle_.empty() ? available_height
++                                          : available_height / 2);
+   text_bounds.set_x(GetMirroredXForRect(text_bounds));
+   int flags = GetDrawStringFlags();
+   if (mode == PB_FOR_DRAG)
+     flags |= gfx::Canvas::NO_SUBPIXEL_RENDERING;
+   canvas->DrawStringRectWithFlags(title(), style.font_list, style.foreground,
+                                   text_bounds, flags);
++  if (!subtitle_.empty()) {
++    canvas->DrawStringRectWithFlags(
++        subtitle_, style.font_list,
++        GetNativeTheme()->GetSystemColor(
++            ui::NativeTheme::kColorId_MenuItemMinorTextColor),
++        text_bounds + gfx::Vector2d(0, style.font_list.GetHeight()), flags);
++  }
++
+   PaintMinorIconAndText(canvas, style);
+ 
+   // Set the submenu indicator (arrow) image and color.
+@@ -1273,6 +1295,11 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
+ 
+   // Determine the length of the label text.
+   int string_width = gfx::GetStringWidth(title_, style.font_list);
++  if (!subtitle_.empty()) {
++    string_width =
++        std::max(string_width, gfx::GetStringWidth(subtitle_, style.font_list));
++  }
++
+   dimensions.standard_width = string_width + label_start +
+       item_right_margin_;
+   // Determine the length of the right-side text.
+@@ -1280,9 +1307,10 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
+       minor_text.empty() ? 0 : gfx::GetStringWidth(minor_text, style.font_list);
+ 
+   // Determine the height to use.
+-  dimensions.height =
+-      std::max(dimensions.height, style.font_list.GetHeight() +
+-                                      GetBottomMargin() + GetTopMargin());
++  dimensions.height = std::max(
++      dimensions.height, (subtitle_.empty() ? 0 : style.font_list.GetHeight()) +
++                             style.font_list.GetHeight() + GetBottomMargin() +
++                             GetTopMargin());
+   dimensions.height =
+       std::max(dimensions.height, MenuConfig::instance().item_min_height);
+ 
+diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h
+index 0e97c35a8a452e8c602f08e2f2b72fc71becfa4b..332b11faae5eb05291dfd268f1b951a134b559c4 100644
+--- a/ui/views/controls/menu/menu_item_view.h
++++ b/ui/views/controls/menu/menu_item_view.h
+@@ -151,6 +151,7 @@ class VIEWS_EXPORT MenuItemView : public View {
+   MenuItemView* AddMenuItemAt(int index,
+                               int item_id,
+                               const base::string16& label,
++                              const base::string16& sublabel,
+                               const base::string16& minor_text,
+                               const gfx::VectorIcon* minor_icon,
+                               const gfx::ImageSkia& icon,
+@@ -214,6 +215,7 @@ class VIEWS_EXPORT MenuItemView : public View {
+   // All the AppendXXX methods funnel into this.
+   MenuItemView* AppendMenuItemImpl(int item_id,
+                                    const base::string16& label,
++                                   const base::string16& sublabel,
+                                    const base::string16& minor_text,
+                                    const gfx::VectorIcon* minor_icon,
+                                    const gfx::ImageSkia& icon,
+@@ -241,6 +243,9 @@ class VIEWS_EXPORT MenuItemView : public View {
+   void SetTitle(const base::string16& title);
+   const base::string16& title() const { return title_; }
+ 
++  // Sets the subtitle.
++  void SetSubtitle(const base::string16& subtitle);
++
+   // Sets the minor text.
+   void SetMinorText(const base::string16& minor_text);
+ 
+@@ -451,7 +456,7 @@ class VIEWS_EXPORT MenuItemView : public View {
+   void DestroyAllMenuHosts();
+ 
+   // Returns the text that should be displayed on the end (right) of the menu
+-  // item. This will be the accelerator (if one exists).
++  // item. This will be the accelerator (if one exists), otherwise |subtitle_|.
+   base::string16 GetMinorText() const;
+ 
+   // Returns the icon that should be displayed to the left of the minor text.
+@@ -542,6 +547,9 @@ class VIEWS_EXPORT MenuItemView : public View {
+   // Title.
+   base::string16 title_;
+ 
++  // Subtitle/sublabel.
++  base::string16 subtitle_;
++
+   // Minor text.
+   base::string16 minor_text_;
+ 
+diff --git a/ui/views/controls/menu/menu_item_view_unittest.cc b/ui/views/controls/menu/menu_item_view_unittest.cc
+index 6b6cadd38483078191920d161193aa19e09635ba..4704af36102e8620b0e5f1788a8e7ae050dc7aa1 100644
+--- a/ui/views/controls/menu/menu_item_view_unittest.cc
++++ b/ui/views/controls/menu/menu_item_view_unittest.cc
+@@ -322,10 +322,10 @@ class MenuItemViewPaintUnitTest : public ViewsTestBase {
+ // Provides assertion coverage for painting minor text and icons.
+ TEST_F(MenuItemViewPaintUnitTest, MinorTextAndIconAssertionCoverage) {
+   auto AddItem = [this](auto label, auto minor_label, auto minor_icon) {
+-    menu_item_view()->AddMenuItemAt(0, 1000, base::ASCIIToUTF16(label),
+-                                    minor_label, minor_icon, gfx::ImageSkia(),
+-                                    nullptr, views::MenuItemView::NORMAL,
+-                                    ui::NORMAL_SEPARATOR);
++    menu_item_view()->AddMenuItemAt(
++        0, 1000, base::ASCIIToUTF16(label), base::string16(), minor_label,
++        minor_icon, gfx::ImageSkia(), nullptr, views::MenuItemView::NORMAL,
++        ui::NORMAL_SEPARATOR);
+   };
+   AddItem("No minor content", base::string16(), nullptr);
+   AddItem("Minor text only", base::ASCIIToUTF16("minor text"), nullptr);
+diff --git a/ui/views/controls/menu/menu_model_adapter.cc b/ui/views/controls/menu/menu_model_adapter.cc
+index 09b72733e66d1e13182730e475b781ffefe649c0..e45e249f2a89e1bfd31cc82341a65341571ffc21 100644
+--- a/ui/views/controls/menu/menu_model_adapter.cc
++++ b/ui/views/controls/menu/menu_model_adapter.cc
+@@ -96,8 +96,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
+ 
+   if (*type == MenuItemView::SEPARATOR) {
+     return menu->AddMenuItemAt(menu_index, item_id, base::string16(),
+-                               base::string16(), nullptr, gfx::ImageSkia(),
+-                               nullptr, *type,
++                               base::string16(), base::string16(), nullptr,
++                               gfx::ImageSkia(), nullptr, *type,
+                                model->GetSeparatorTypeAt(model_index));
+   }
+ 
+@@ -105,7 +105,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
+   model->GetIconAt(model_index, &icon);
+   return menu->AddMenuItemAt(
+       menu_index, item_id, model->GetLabelAt(model_index),
+-      model->GetMinorTextAt(model_index), model->GetMinorIconAt(model_index),
++      model->GetSublabelAt(model_index), model->GetMinorTextAt(model_index),
++      model->GetMinorIconAt(model_index),
+       icon.IsEmpty() ? gfx::ImageSkia() : *icon.ToImageSkia(),
+       icon.IsEmpty() ? model->GetVectorIconAt(model_index) : nullptr, *type,
+       ui::NORMAL_SEPARATOR);

+ 2 - 2
patches/chromium/scroll_bounce_flag.patch

@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
 Patch to make scrollBounce option work.
 
 diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
-index 02fb86dce91aab3385c9ee2acacf6a9a40cc1642..0a2cf06d6aa03dafc922912a2c4788bc43e00fae 100644
+index fd8be9bfe830e40c1c1ad3c718d8c48182691c14..8633aa335e42f3cb9d19a47d961fa31895bbc4e3 100644
 --- a/content/renderer/render_thread_impl.cc
 +++ b/content/renderer/render_thread_impl.cc
-@@ -1506,7 +1506,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
+@@ -1509,7 +1509,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
  }
  
  bool RenderThreadImpl::IsElasticOverscrollEnabled() {

+ 30 - 13
patches/chromium/ssl_security_state_tab_helper.patch

@@ -1,20 +1,21 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: deepak1556 <[email protected]>
-Date: Thu, 20 Sep 2018 17:50:34 -0700
+Date: Tue, 27 Aug 2019 15:11:55 -0700
 Subject: ssl_security_state_tab_helper.patch
 
 Allows populating security tab info for devtools in Electron.
 
 diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
-index f271b01fad91c169afb06795d9b8aa7207744139..6c3fcf193d5f47670c6642a5643b639dd7ed99a7 100644
+index 17a01036811666c92e066d5b5cbe8cd9068f2d2c..ecbf7530d405e399a2421b2855126a3be070ad14 100644
 --- a/chrome/browser/ssl/security_state_tab_helper.cc
 +++ b/chrome/browser/ssl/security_state_tab_helper.cc
-@@ -13,14 +13,18 @@
+@@ -13,16 +13,20 @@
  #include "base/strings/pattern.h"
  #include "base/strings/string_util.h"
  #include "build/build_config.h"
 +#if 0
  #include "chrome/browser/browser_process.h"
+ #include "chrome/browser/lookalikes/safety_tips/reputation_web_contents_observer.h"
  #include "chrome/browser/profiles/profile.h"
  #include "chrome/browser/safe_browsing/safe_browsing_service.h"
  #include "chrome/browser/safe_browsing/ui_manager.h"
@@ -24,33 +25,49 @@ index f271b01fad91c169afb06795d9b8aa7207744139..6c3fcf193d5f47670c6642a5643b639d
  #include "components/omnibox/browser/omnibox_field_trial.h"
  #include "components/omnibox/common/omnibox_features.h"
  #include "components/password_manager/core/browser/password_manager_metrics_util.h"
-+#endif
  #include "components/safe_browsing/buildflags.h"
++#endif
  #include "components/security_state/content/content_utils.h"
  #include "content/public/browser/browser_context.h"
-@@ -44,8 +48,10 @@
+ #include "content/public/browser/navigation_entry.h"
+@@ -44,7 +48,7 @@
+ #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
  #endif  // defined(OS_CHROMEOS)
  
- #if BUILDFLAG(FULL_SAFE_BROWSING)
+-#if BUILDFLAG(FULL_SAFE_BROWSING)
 +#if 0
  #include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
  #endif
-+#endif
- 
- namespace {
  
-@@ -65,8 +71,9 @@ void RecordSecurityLevel(
+@@ -66,8 +70,11 @@ void RecordSecurityLevel(
  
  }  // namespace
  
++
 +#if 0
  using password_manager::metrics_util::PasswordType;
--using safe_browsing::SafeBrowsingUIManager;
+ using safe_browsing::SafeBrowsingUIManager;
 +#endif
  
  SecurityStateTabHelper::SecurityStateTabHelper(
      content::WebContents* web_contents)
-@@ -154,6 +161,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
+@@ -89,6 +96,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() const {
+   // information is still being initialized, thus no need to check for that.
+   state->malicious_content_status = GetMaliciousContentStatus();
+ 
++#if 0
+   safety_tips::ReputationWebContentsObserver* reputation_web_contents_observer =
+       safety_tips::ReputationWebContentsObserver::FromWebContents(
+           web_contents());
+@@ -97,6 +105,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() const {
+           ? reputation_web_contents_observer
+                 ->GetSafetyTipStatusForVisibleNavigation()
+           : security_state::SafetyTipStatus::kUnknown;
++  #endif
+   return state;
+ }
+ 
+@@ -165,6 +174,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
        web_contents()->GetController().GetVisibleEntry();
    if (!entry)
      return security_state::MALICIOUS_CONTENT_STATUS_NONE;
@@ -58,7 +75,7 @@ index f271b01fad91c169afb06795d9b8aa7207744139..6c3fcf193d5f47670c6642a5643b639d
    safe_browsing::SafeBrowsingService* sb_service =
        g_browser_process->safe_browsing_service();
    if (!sb_service)
-@@ -220,6 +228,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
+@@ -243,6 +253,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
          break;
      }
    }

+ 25 - 15
patches/chromium/support_mixed_sandbox_with_zygote.patch

@@ -1,7 +1,7 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Jeremy Apthorp <[email protected]>
 Date: Wed, 28 Nov 2018 13:20:27 -0800
-Subject: support mixed-sandbox with zygote
+Subject: support_mixed_sandbox_with_zygote.patch
 
 On Linux, Chromium launches all new renderer processes via a "zygote"
 process which has the sandbox pre-initialized (see
@@ -22,21 +22,28 @@ However, the patch would need to be reviewed by the security team, as it
 does touch a security-sensitive class.
 
 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
-index 9b15d22bc109751516999e7d8449430143eaef5d..6f0671a753879d7b327681979090508e610cc129 100644
+index cbdff071f830cf31f4ed985e3c202b0fcb46f68c..299acbb8973f8b603575b006cfd1d296869f7c2a 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -399,6 +399,10 @@ class RendererSandboxedProcessLauncherDelegate
-     : public SandboxedProcessLauncherDelegate {
-  public:
-   RendererSandboxedProcessLauncherDelegate() {}
+@@ -389,6 +389,17 @@ class RendererSandboxedProcessLauncherDelegate
+   {
+   }
+ 
 +#if BUILDFLAG(USE_ZYGOTE_HANDLE)
-+  RendererSandboxedProcessLauncherDelegate(bool use_zygote):
-+    use_zygote_(use_zygote) {}
++  RendererSandboxedProcessLauncherDelegate(bool use_zygote)
++      : use_zygote_(use_zygote)
++#if defined(OS_WIN)
++      , renderer_code_integrity_enabled_(
++            GetContentClient()->browser()->IsRendererCodeIntegrityEnabled())
 +#endif
- 
++  {
++  }
++#endif
++
    ~RendererSandboxedProcessLauncherDelegate() override {}
  
-@@ -418,6 +422,9 @@ class RendererSandboxedProcessLauncherDelegate
+ #if defined(OS_WIN)
+@@ -410,6 +421,9 @@ class RendererSandboxedProcessLauncherDelegate
  
  #if BUILDFLAG(USE_ZYGOTE_HANDLE)
    service_manager::ZygoteHandle GetZygote() override {
@@ -46,19 +53,22 @@ index 9b15d22bc109751516999e7d8449430143eaef5d..6f0671a753879d7b327681979090508e
      const base::CommandLine& browser_command_line =
          *base::CommandLine::ForCurrentProcess();
      base::CommandLine::StringType renderer_prefix =
-@@ -431,6 +438,11 @@ class RendererSandboxedProcessLauncherDelegate
-   service_manager::SandboxType GetSandboxType() override {
+@@ -424,10 +438,13 @@ class RendererSandboxedProcessLauncherDelegate
      return service_manager::SANDBOX_TYPE_RENDERER;
    }
-+
-+ private:
+ 
+-#if defined(OS_WIN)
+  private:
++#if defined(OS_WIN)
+   const bool renderer_code_integrity_enabled_;
+ #endif
 +#if BUILDFLAG(USE_ZYGOTE_HANDLE)
 +  bool use_zygote_ = true;
 +#endif
  };
  
  const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
-@@ -1745,11 +1757,18 @@ bool RenderProcessHostImpl::Init() {
+@@ -1688,11 +1705,18 @@ bool RenderProcessHostImpl::Init() {
        cmd_line->PrependWrapper(renderer_prefix);
      AppendRendererCommandLine(cmd_line.get());
  

+ 4 - 4
patches/chromium/sysroot.patch

@@ -7,11 +7,11 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds,
 which include extra deps that Electron needs (e.g. libnotify)
 
 diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
-index 858589ae0a6774d6c34a51e1db1ef852f40ad68d..c4a0ac5c9e16a217634602233bd709af6943470e 100755
+index 2e756f75d243c558c03c720a1a9c90911f2bb121..5b8cc02c3cb9b257bbe9c93cf7ce329272403607 100755
 --- a/build/linux/sysroot_scripts/install-sysroot.py
 +++ b/build/linux/sysroot_scripts/install-sysroot.py
-@@ -32,9 +32,11 @@ import sys
- import urllib2
+@@ -37,9 +37,11 @@ except ImportError:
+     from urllib2 import urlopen
  
  SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
 +SRC_DIR = os.path.dirname(os.path.dirname(os.path.dirname(SCRIPT_DIR)))
@@ -24,7 +24,7 @@ index 858589ae0a6774d6c34a51e1db1ef852f40ad68d..c4a0ac5c9e16a217634602233bd709af
  
  VALID_ARCHS = ('arm', 'arm64', 'i386', 'amd64', 'mips', 'mips64el')
  
-@@ -98,7 +100,7 @@ def GetSysrootDict(target_platform, target_arch):
+@@ -103,7 +105,7 @@ def GetSysrootDict(target_platform, target_arch):
    if target_arch not in VALID_ARCHS:
      raise Error('Unknown architecture: %s' % target_arch)
  

+ 1 - 1
patches/chromium/tts.patch

@@ -30,7 +30,7 @@ index e96b0cef21bec8925d4adf1e8692dc00f5ec6f5f..7ec07534aa3628873c9fe784fa0235f3
  }
  
 diff --git a/chrome/browser/speech/tts_message_filter.cc b/chrome/browser/speech/tts_message_filter.cc
-index a7df91b0f6568215313899b577600feaa8c7ba31..8bccd503bb1648ef1ba07b7ff0fded6caaff8a65 100644
+index cf0841622b99ad6637314284bcdbd83060a404cc..779b51992c180a76ed8a2c492297416aa557d214 100644
 --- a/chrome/browser/speech/tts_message_filter.cc
 +++ b/chrome/browser/speech/tts_message_filter.cc
 @@ -10,8 +10,11 @@

+ 4 - 3
patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch

@@ -1,14 +1,15 @@
 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Jeremy Apthorp <[email protected]>
 Date: Tue, 16 Apr 2019 11:25:08 -0700
-Subject: unsandboxed ppapi processes skip zygote
+Subject: unsandboxed_ppapi_processes_skip_zygote.patch
 
+Unsandboxed ppapi processes should skip zygote.
 
 diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
-index 68a9f8568d242fafd104c47ad67a7fb1d0b593e7..fa6492acd3d4c12fbebbef94540c675aeda99cdc 100644
+index e1a977f1a7162b750f4b6ea7f79431facb0796d0..984d63592b140ffbab0063b863d65d0ea2db015e 100644
 --- a/content/browser/ppapi_plugin_process_host.cc
 +++ b/content/browser/ppapi_plugin_process_host.cc
-@@ -121,6 +121,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate
+@@ -128,6 +128,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate
    service_manager::ZygoteHandle GetZygote() override {
      const base::CommandLine& browser_command_line =
          *base::CommandLine::ForCurrentProcess();

+ 3 - 3
patches/chromium/verbose_generate_breakpad_symbols.patch

@@ -7,7 +7,7 @@ Temporarily add additional debugging statements to
 generate_breakpad_symbols.py to determine why it is hanging.
 
 diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
-index dce68b1bd1ef58a5dfddb2bbdb56930ed943ad1d..4249d7b26f9037b60a40e073f56037f9ff036138 100755
+index db04d39f8d263dc2b3b67b7f84470f557b519cfa..edb3fa5c125fae7858a1f36495410baf47d58484 100755
 --- a/components/crash/content/tools/generate_breakpad_symbols.py
 +++ b/components/crash/content/tools/generate_breakpad_symbols.py
 @@ -60,7 +60,10 @@ def Resolve(path, exe_path, loader_path, rpaths):
@@ -41,7 +41,7 @@ index dce68b1bd1ef58a5dfddb2bbdb56930ed943ad1d..4249d7b26f9037b60a40e073f56037f9
    elif options.platform == 'android':
      deps = GetSharedLibraryDependenciesAndroid(binary)
    elif options.platform == 'darwin':
-@@ -257,7 +263,8 @@ def CreateSymbolDir(options, output_dir):
+@@ -257,7 +263,8 @@ def CreateSymbolDir(options, output_dir, relative_hash_dir):
  
  def GenerateSymbols(options, binaries):
    """Dumps the symbols of binary and places them in the given directory."""
@@ -80,5 +80,5 @@ index dce68b1bd1ef58a5dfddb2bbdb56930ed943ad1d..4249d7b26f9037b60a40e073f56037f9
 +              with print_lock:
 +                print "Got symbol_info for %s." % (potential_symbol_file)
            if symbol_info == binary_info:
-             CreateSymbolDir(options, output_dir)
+             CreateSymbolDir(options, output_dir, binary_info.hash)
              shutil.copyfile(potential_symbol_file, output_path)

+ 6 - 6
patches/chromium/web_contents.patch

@@ -5,10 +5,10 @@ Subject: web_contents.patch
 
 
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index ae1bcfa7db7ddd09f59d9ecae61a504d0f325b3b..b691f5868c5b363a34df2627dec801d8942dd77f 100644
+index f504a515efe294355de2c436f8dce4a677525346..773139f63090ee0ccc7578040093e5cc5c0e2551 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -2131,6 +2131,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2137,6 +2137,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
    std::string unique_name;
    frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
  
@@ -21,7 +21,7 @@ index ae1bcfa7db7ddd09f59d9ecae61a504d0f325b3b..b691f5868c5b363a34df2627dec801d8
    WebContentsViewDelegate* delegate =
        GetContentClient()->browser()->GetWebContentsViewDelegate(this);
  
-@@ -2146,6 +2152,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2152,6 +2158,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
            &render_view_host_delegate_view_);
      }
    }
@@ -92,10 +92,10 @@ index ecaf30bcb7b916a92a69641dd7b96a3633d407c0..0af625928ca6227a21cd4263a14a42b7
  
  RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForChildWidget(
 diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
-index 50236e972100b41d55f0d8acb03fbcb5ce8520c6..4b855a7af4b7ef34d0d8a1c76f8485e565a523b9 100644
+index a8b79ba4e6604d829939fc960fae3b20210b70cc..118728ee9144bbf67695ec780be11611ab5723c5 100644
 --- a/content/public/browser/web_contents.h
 +++ b/content/public/browser/web_contents.h
-@@ -76,9 +76,12 @@ class BrowserPluginGuestDelegate;
+@@ -77,9 +77,12 @@ class BrowserPluginGuestDelegate;
  class InterstitialPage;
  class RenderFrameHost;
  class RenderViewHost;
@@ -108,7 +108,7 @@ index 50236e972100b41d55f0d8acb03fbcb5ce8520c6..4b855a7af4b7ef34d0d8a1c76f8485e5
  struct CustomContextMenuContext;
  struct DropData;
  struct MHTMLGenerationParams;
-@@ -214,6 +217,10 @@ class WebContents : public PageNavigator,
+@@ -215,6 +218,10 @@ class WebContents : public PageNavigator,
        kInitializeAndWarmupRendererProcess,
      } desired_renderer_state;
  

+ 2 - 2
patches/chromium/webview_cross_drag.patch

@@ -5,10 +5,10 @@ Subject: webview_cross_drag.patch
 
 
 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
-index ab27502c3509d0827b09bcb84c7921b432749dce..515ef47bcfc22b74e9f05c9db885e92f773ec84c 100644
+index dda92e4006db1d9a1b68459644d252a3e1dfa4a2..3ed0b3ec3badc9f558f78adbdb31c680ff2631f4 100644
 --- a/content/browser/web_contents/web_contents_view_aura.cc
 +++ b/content/browser/web_contents/web_contents_view_aura.cc
-@@ -776,6 +776,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
+@@ -777,6 +777,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
  
  bool WebContentsViewAura::IsValidDragTarget(
      RenderWidgetHostImpl* target_rwh) const {

+ 10 - 10
patches/chromium/worker_context_will_destroy.patch

@@ -5,10 +5,10 @@ Subject: worker_context_will_destroy.patch
 
 
 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
-index bfc62d1766686981ded5e62ad7da466d3afb9bab..5fa60ba975561626ae3ccecd9968278c547710a0 100644
+index 76d775b20307a3c9a779489e754c6849a0f21d64..533a1621e82461d8611ba1d8f2ed2fc527085a03 100644
 --- a/content/public/renderer/content_renderer_client.h
 +++ b/content/public/renderer/content_renderer_client.h
-@@ -385,6 +385,11 @@ class CONTENT_EXPORT ContentRendererClient {
+@@ -384,6 +384,11 @@ class CONTENT_EXPORT ContentRendererClient {
    virtual void DidInitializeWorkerContextOnWorkerThread(
        v8::Local<v8::Context> context) {}
  
@@ -21,10 +21,10 @@ index bfc62d1766686981ded5e62ad7da466d3afb9bab..5fa60ba975561626ae3ccecd9968278c
    // An empty URL is returned if the URL is not overriden.
    virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
 diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
-index 379ca75ac50388ddb8338f2dabc78faaa68a8088..fe6d379868953918892712da387da1a134cdbd50 100644
+index 944011afc9acf8ed9b46d9a1c6ccfe052d3536c0..43fa87dcfa985f5a63a1205bb1e3f4b2b7d9b19f 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -947,6 +947,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
+@@ -934,6 +934,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
    WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
  }
  
@@ -38,10 +38,10 @@ index 379ca75ac50388ddb8338f2dabc78faaa68a8088..fe6d379868953918892712da387da1a1
      const v8::Local<v8::Context>& worker) {
    GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
 diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
-index a58c51ee026ead91af050541a8663dc070388e45..01f170553ac95dfeb34f91290c39845ce349b1c8 100644
+index b772dfa6a64827253d63c922259cbc3c213daeb1..52fa6521b95974380ef2a5028c2875a9b88f01c6 100644
 --- a/content/renderer/renderer_blink_platform_impl.h
 +++ b/content/renderer/renderer_blink_platform_impl.h
-@@ -191,6 +191,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
+@@ -189,6 +189,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
    void DidStartWorkerThread() override;
    void WillStopWorkerThread() override;
    void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -50,10 +50,10 @@ index a58c51ee026ead91af050541a8663dc070388e45..01f170553ac95dfeb34f91290c39845c
        const blink::WebString& header_name) override;
  
 diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
-index 049aac2befd99a746fbe667a69fd1873333fcdba..f089b63da4b1150151877edb257d959401b1319c 100644
+index 00724bc9b4fdc8b4507818683aaf2e1c9b923cdb..190b177ab5bec090ae90c56bea915f826449e93f 100644
 --- a/third_party/blink/public/platform/platform.h
 +++ b/third_party/blink/public/platform/platform.h
-@@ -656,6 +656,7 @@ class BLINK_PLATFORM_EXPORT Platform {
+@@ -679,6 +679,7 @@ class BLINK_PLATFORM_EXPORT Platform {
    virtual void DidStartWorkerThread() {}
    virtual void WillStopWorkerThread() {}
    virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@@ -62,10 +62,10 @@ index 049aac2befd99a746fbe667a69fd1873333fcdba..f089b63da4b1150151877edb257d9594
        const WebSecurityOrigin& script_origin) {
      return false;
 diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
-index 440dbcee21a94516a9225e6de35cb9354942faeb..4085b60943b09a6c1f66d3dc2c49d05f757dfa5b 100644
+index 391a9d1099ac3226c6c0d42e74e672f958e5a58b..3d66c80a190a533fade36d452f8093116a0d6c1b 100644
 --- a/third_party/blink/renderer/core/workers/worker_thread.cc
 +++ b/third_party/blink/renderer/core/workers/worker_thread.cc
-@@ -640,6 +640,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
+@@ -658,6 +658,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
      nested_runner_->QuitNow();
    }
  

+ 4 - 4
patches/v8/add_realloc.patch

@@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
 Realloc on the v8 side.
 
 diff --git a/include/v8.h b/include/v8.h
-index ca96c32088df3983c796a807b2ce76017e0fa2df..db972ab5ce249927d9f6e738263600c30c2e176c 100644
+index da0ad413bdee2c89ea6f4b07944a2ddde20b2bca..01344fec995e38d741b89a062f5fa5c7a9d9b821 100644
 --- a/include/v8.h
 +++ b/include/v8.h
-@@ -4651,6 +4651,13 @@ class V8_EXPORT ArrayBuffer : public Object {
+@@ -4711,6 +4711,13 @@ class V8_EXPORT ArrayBuffer : public Object {
       */
      virtual void* AllocateUninitialized(size_t length) = 0;
  
@@ -30,10 +30,10 @@ index ca96c32088df3983c796a807b2ce76017e0fa2df..db972ab5ce249927d9f6e738263600c3
       * Free the memory block of size |length|, pointed to by |data|.
       * That memory is guaranteed to be previously allocated by |Allocate|.
 diff --git a/src/api/api.cc b/src/api/api.cc
-index e02c74416b81c67e2bcdfa6bca5d06efd261153a..c41692ca40057efa39440239cda217ae1e39afe8 100644
+index c9f3860fb92be616a3087e55eed045322225eeab..fc8246b47c4cc6b5b3a22570c37840cbeafa7811 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -507,6 +507,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
+@@ -513,6 +513,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
    i::V8::SetSnapshotBlob(snapshot_blob);
  }
  

+ 4 - 4
patches/v8/build_gn.patch

@@ -5,10 +5,10 @@ Subject: build_gn.patch
 
 
 diff --git a/BUILD.gn b/BUILD.gn
-index c4dbe902d8bc2b7fd9f41af3e4920ce4cdd8257b..a8fd0b407b6519db82b3599a8d77bb415e0c9c86 100644
+index 3b22ed0cca91ae6f07ae8f756604a9a8944a2627..4b852fdb298f47ee3bce814c243a6cd4671cdb81 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -271,7 +271,7 @@ config("internal_config") {
+@@ -284,7 +284,7 @@ config("internal_config") {
      ":v8_header_features",
    ]
  
@@ -17,7 +17,7 @@ index c4dbe902d8bc2b7fd9f41af3e4920ce4cdd8257b..a8fd0b407b6519db82b3599a8d77bb41
      defines += [ "BUILDING_V8_SHARED" ]
    }
  }
-@@ -3784,7 +3784,7 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -3826,7 +3826,7 @@ if (current_toolchain == v8_generator_toolchain) {
        "src/interpreter/bytecodes.h",
      ]
  
@@ -26,7 +26,7 @@ index c4dbe902d8bc2b7fd9f41af3e4920ce4cdd8257b..a8fd0b407b6519db82b3599a8d77bb41
  
      deps = [
        ":v8_libbase",
-@@ -3815,6 +3815,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
+@@ -3857,6 +3857,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
  
      configs = [ ":internal_config" ]
  

+ 4 - 4
patches/v8/dcheck.patch

@@ -5,10 +5,10 @@ Subject: dcheck.patch
 
 
 diff --git a/src/api/api.cc b/src/api/api.cc
-index 848a692d963720a30265f210ebd20159cb3e955a..2750ef2bcddfea8a6ddd5cbadb1ae88df7b5d639 100644
+index 01e47df41cd1d3d1a59b495d60688ee035845e06..d8cec37cf4744f1bced3e426caae9e29837cce02 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -8311,7 +8311,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
+@@ -8353,7 +8353,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
  }
  
  void Isolate::RunMicrotasks() {
@@ -18,10 +18,10 @@ index 848a692d963720a30265f210ebd20159cb3e955a..2750ef2bcddfea8a6ddd5cbadb1ae88d
    isolate->default_microtask_queue()->RunMicrotasks(isolate);
  }
 diff --git a/src/heap/heap.cc b/src/heap/heap.cc
-index 7feb1c11ba90cb5896d85e9bdd9b693a6f9ee788..cc80dfb9af080539c01bdb3b201cd3554534bbc6 100644
+index 2fc041effd710c8797df846de7b16cf086deb6be..b1b0a2631d66c79c23431a9f7ae918848f97fc05 100644
 --- a/src/heap/heap.cc
 +++ b/src/heap/heap.cc
-@@ -5311,9 +5311,9 @@ void Heap::TearDown() {
+@@ -5304,9 +5304,9 @@ void Heap::TearDown() {
  void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
                                   GCType gc_type, void* data) {
    DCHECK_NOT_NULL(callback);

+ 25 - 25
patches/v8/deps_provide_more_v8_backwards_compatibility.patch

@@ -22,10 +22,10 @@ Reviewed-By: Yang Guo <[email protected]>
 Reviewed-By: Michaël Zasso <[email protected]>
 
 diff --git a/include/v8.h b/include/v8.h
-index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52c4b18b4c 100644
+index 01344fec995e38d741b89a062f5fa5c7a9d9b821..7b183a64e71be4916f721c1b804f4882d08e2aaf 100644
 --- a/include/v8.h
 +++ b/include/v8.h
-@@ -1108,6 +1108,10 @@ class V8_EXPORT PrimitiveArray {
+@@ -1167,6 +1167,10 @@ class V8_EXPORT PrimitiveArray {
   public:
    static Local<PrimitiveArray> New(Isolate* isolate, int length);
    int Length() const;
@@ -36,7 +36,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
    void Set(Isolate* isolate, int index, Local<Primitive> item);
    Local<Primitive> Get(Isolate* isolate, int index);
  };
-@@ -1848,6 +1852,8 @@ class V8_EXPORT StackTrace {
+@@ -1907,6 +1911,8 @@ class V8_EXPORT StackTrace {
    /**
     * Returns a StackFrame at a particular index.
     */
@@ -45,7 +45,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
    Local<StackFrame> GetFrame(Isolate* isolate, uint32_t index) const;
  
    /**
-@@ -2541,6 +2547,13 @@ class V8_EXPORT Value : public Data {
+@@ -2601,6 +2607,13 @@ class V8_EXPORT Value : public Data {
  
    Local<Boolean> ToBoolean(Isolate* isolate) const;
  
@@ -59,7 +59,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
    /**
     * Attempts to convert a string to an array index.
     * Returns an empty handle if the conversion fails.
-@@ -2557,7 +2570,14 @@ class V8_EXPORT Value : public Data {
+@@ -2617,7 +2630,14 @@ class V8_EXPORT Value : public Data {
        Local<Context> context) const;
    V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  
@@ -74,7 +74,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
    V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
                                             Local<Value> that) const;
    bool StrictEquals(Local<Value> that) const;
-@@ -2664,6 +2684,8 @@ class V8_EXPORT String : public Name {
+@@ -2724,6 +2744,8 @@ class V8_EXPORT String : public Name {
     * Returns the number of bytes in the UTF-8 encoded
     * representation of this string.
     */
@@ -83,7 +83,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
    int Utf8Length(Isolate* isolate) const;
  
    /**
-@@ -2720,12 +2742,23 @@ class V8_EXPORT String : public Name {
+@@ -2780,12 +2802,23 @@ class V8_EXPORT String : public Name {
    // 16-bit character codes.
    int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1,
              int options = NO_OPTIONS) const;
@@ -107,7 +107,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
  
    /**
     * A zero length string.
-@@ -2893,6 +2926,9 @@ class V8_EXPORT String : public Name {
+@@ -2953,6 +2986,9 @@ class V8_EXPORT String : public Name {
     */
    static Local<String> Concat(Isolate* isolate, Local<String> left,
                                Local<String> right);
@@ -117,7 +117,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
  
    /**
     * Creates a new external string using the data defined in the given
-@@ -2957,6 +2993,8 @@ class V8_EXPORT String : public Name {
+@@ -3017,6 +3053,8 @@ class V8_EXPORT String : public Name {
     */
    class V8_EXPORT Utf8Value {
     public:
@@ -126,7 +126,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
      Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      ~Utf8Value();
      char* operator*() { return str_; }
-@@ -2980,6 +3018,7 @@ class V8_EXPORT String : public Name {
+@@ -3040,6 +3078,7 @@ class V8_EXPORT String : public Name {
     */
    class V8_EXPORT Value {
     public:
@@ -134,7 +134,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
      Value(Isolate* isolate, Local<v8::Value> obj);
      ~Value();
      uint16_t* operator*() { return str_; }
-@@ -5308,6 +5347,8 @@ class V8_EXPORT BooleanObject : public Object {
+@@ -5368,6 +5407,8 @@ class V8_EXPORT BooleanObject : public Object {
  class V8_EXPORT StringObject : public Object {
   public:
    static Local<Value> New(Isolate* isolate, Local<String> value);
@@ -143,7 +143,7 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
  
    Local<String> ValueOf() const;
  
-@@ -10496,6 +10537,29 @@ template <class T> Value* Value::Cast(T* value) {
+@@ -10688,6 +10729,29 @@ template <class T> Value* Value::Cast(T* value) {
  }
  
  
@@ -174,10 +174,10 @@ index db972ab5ce249927d9f6e738263600c30c2e176c..ae41288f4188a81458ad2503b75fae52
  #ifdef V8_ENABLE_CHECKS
    CheckCast(value);
 diff --git a/src/api/api.cc b/src/api/api.cc
-index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159cb3e955a 100644
+index fc8246b47c4cc6b5b3a22570c37840cbeafa7811..01e47df41cd1d3d1a59b495d60688ee035845e06 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -2184,6 +2184,10 @@ int PrimitiveArray::Length() const {
+@@ -2196,6 +2196,10 @@ int PrimitiveArray::Length() const {
    return array->length();
  }
  
@@ -188,7 +188,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  void PrimitiveArray::Set(Isolate* v8_isolate, int index,
                           Local<Primitive> item) {
    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
-@@ -2197,6 +2201,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
+@@ -2209,6 +2213,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
    array->set(index, *i_item);
  }
  
@@ -199,7 +199,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  Local<Primitive> PrimitiveArray::Get(Isolate* v8_isolate, int index) {
    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
    i::Handle<i::FixedArray> array = Utils::OpenHandle(this);
-@@ -2937,6 +2945,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
+@@ -2950,6 +2958,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
  
  // --- S t a c k T r a c e ---
  
@@ -210,7 +210,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  Local<StackFrame> StackTrace::GetFrame(Isolate* v8_isolate,
                                         uint32_t index) const {
    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
-@@ -3524,6 +3536,34 @@ MaybeLocal<BigInt> Value::ToBigInt(Local<Context> context) const {
+@@ -3537,6 +3549,34 @@ MaybeLocal<BigInt> Value::ToBigInt(Local<Context> context) const {
    RETURN_ESCAPED(result);
  }
  
@@ -245,7 +245,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  bool Value::BooleanValue(Isolate* v8_isolate) const {
    return Utils::OpenHandle(this)->BooleanValue(
        reinterpret_cast<i::Isolate*>(v8_isolate));
-@@ -3871,6 +3911,11 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
+@@ -3884,6 +3924,11 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
    return Local<Uint32>();
  }
  
@@ -257,7 +257,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  Maybe<bool> Value::Equals(Local<Context> context, Local<Value> that) const {
    i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate();
    auto self = Utils::OpenHandle(this);
-@@ -5083,6 +5128,10 @@ bool String::ContainsOnlyOneByte() const {
+@@ -5096,6 +5141,10 @@ bool String::ContainsOnlyOneByte() const {
    return helper.Check(*str);
  }
  
@@ -268,7 +268,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  int String::Utf8Length(Isolate* isolate) const {
    i::Handle<i::String> str = Utils::OpenHandle(this);
    str = i::String::Flatten(reinterpret_cast<i::Isolate*>(isolate), str);
-@@ -5235,6 +5284,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start,
+@@ -5248,6 +5297,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start,
  }
  }  // anonymous namespace
  
@@ -283,7 +283,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  int String::WriteUtf8(Isolate* v8_isolate, char* buffer, int capacity,
                        int* nchars_ref, int options) const {
    i::Handle<i::String> str = Utils::OpenHandle(this);
-@@ -5273,6 +5330,17 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
+@@ -5286,6 +5343,17 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
    return end - start;
  }
  
@@ -301,7 +301,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start,
                           int length, int options) const {
    return WriteHelper(reinterpret_cast<i::Isolate*>(isolate), this, buffer,
-@@ -6190,6 +6258,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
+@@ -6203,6 +6271,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
    return result;
  }
  
@@ -313,7 +313,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  Local<String> v8::String::Concat(Isolate* v8_isolate, Local<String> left,
                                   Local<String> right) {
    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
-@@ -6460,6 +6533,10 @@ bool v8::BooleanObject::ValueOf() const {
+@@ -6473,6 +6546,10 @@ bool v8::BooleanObject::ValueOf() const {
    return js_primitive_wrapper->value().IsTrue(isolate);
  }
  
@@ -324,7 +324,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  Local<v8::Value> v8::StringObject::New(Isolate* v8_isolate,
                                         Local<String> value) {
    i::Handle<i::String> string = Utils::OpenHandle(*value);
-@@ -8672,6 +8749,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8_isolate) {
+@@ -8726,6 +8803,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8_isolate) {
    return microtask_queue->IsRunningMicrotasks();
  }
  
@@ -334,7 +334,7 @@ index c41692ca40057efa39440239cda217ae1e39afe8..848a692d963720a30265f210ebd20159
  String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
      : str_(nullptr), length_(0) {
    if (obj.IsEmpty()) return;
-@@ -8689,6 +8769,9 @@ String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
+@@ -8743,6 +8823,9 @@ String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
  
  String::Utf8Value::~Utf8Value() { i::DeleteArray(str_); }
  

+ 2 - 2
patches/v8/do_not_export_private_v8_symbols_on_windows.patch

@@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
 contain any standard C++ library exports (e.g. `std::ostringstream`).
 
 diff --git a/BUILD.gn b/BUILD.gn
-index a016ebcbf46316e57c9ec9f64cec0cc8af3fb847..bee77efc1d575fc9cfdf18a1976f741ddfc8757e 100644
+index 5abaa35c6d9de73e69c26e298335446b9e6f3ef6..c2c36f3be95b5882066e462dfcd552858babec6e 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -271,6 +271,10 @@ config("internal_config") {
+@@ -284,6 +284,10 @@ config("internal_config") {
      ":v8_header_features",
    ]
  

+ 2 - 2
patches/v8/export_symbols_needed_for_windows_build.patch

@@ -6,10 +6,10 @@ Subject: Export symbols needed for Windows build
 These symbols are required to build v8 with BUILD_V8_SHARED on Windows.
 
 diff --git a/src/objects/objects.h b/src/objects/objects.h
-index d706b2dfb7b51adcc3e8d85e17e9e7376af52ba6..c2889dc332c6de4f41eb02d1d91198edad4f79a8 100644
+index b4e78a19377df73051c2e6e650d5b654ca435c6b..93de4136f2a0498038d17866f99f72ea8e217b2f 100644
 --- a/src/objects/objects.h
 +++ b/src/objects/objects.h
-@@ -794,7 +794,7 @@ enum class KeyCollectionMode {
+@@ -796,7 +796,7 @@ enum class KeyCollectionMode {
  // Utility superclass for stack-allocated objects that must be updated
  // on gc.  It provides two ways for the gc to update instances, either
  // iterating or updating after gc.

+ 2 - 2
patches/v8/expose_mksnapshot.patch

@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
 Needed in order to target mksnapshot for mksnapshot zip.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index a8fd0b407b6519db82b3599a8d77bb415e0c9c86..a016ebcbf46316e57c9ec9f64cec0cc8af3fb847 100644
+index 4b852fdb298f47ee3bce814c243a6cd4671cdb81..5abaa35c6d9de73e69c26e298335446b9e6f3ef6 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -3795,7 +3795,6 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -3837,7 +3837,6 @@ if (current_toolchain == v8_generator_toolchain) {
  
  if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
    v8_executable("mksnapshot") {

+ 5 - 5
patches/v8/workaround_an_undefined_symbol_error.patch

@@ -12,10 +12,10 @@ By moving some functions out of the the arm64-assembler header file,
 this error no longer seems to happen.
 
 diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc
-index 159e763ba2602639b4499af7b7869ead58b267d4..ac529e78a8a6ae8cffb0fef26e4bce9f258517ee 100644
+index c798d3a8a03ed9ed49c4562ef3968fae38c55fbe..7369b80c0762bc86d7e763674479bbd426c0a1fa 100644
 --- a/src/codegen/arm64/assembler-arm64.cc
 +++ b/src/codegen/arm64/assembler-arm64.cc
-@@ -3564,6 +3564,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
+@@ -3589,6 +3589,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
         ImmMoveWide(static_cast<int>(imm)) | ShiftMoveWide(shift));
  }
  
@@ -39,10 +39,10 @@ index 159e763ba2602639b4499af7b7869ead58b267d4..ac529e78a8a6ae8cffb0fef26e4bce9f
                         const Operand& operand, FlagsUpdate S, AddSubOp op) {
    DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits());
 diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h
-index 6a6bf633c13ec6d94bbc145eae6daa9ce0d9b2ce..42a77d305b17ffaac6fd3f07c5290c1d61f31065 100644
+index 04ee6d8b750e052344ff20e8285e68c21bb18951..707b67d0f720c42f4f1f98f49ae28390e88a4294 100644
 --- a/src/codegen/arm64/assembler-arm64.h
 +++ b/src/codegen/arm64/assembler-arm64.h
-@@ -2079,11 +2079,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
+@@ -2099,11 +2099,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
      return rm.code() << Rm_offset;
    }
  
@@ -55,7 +55,7 @@ index 6a6bf633c13ec6d94bbc145eae6daa9ce0d9b2ce..42a77d305b17ffaac6fd3f07c5290c1d
  
    static Instr Ra(CPURegister ra) {
      DCHECK_NE(ra.code(), kSPRegInternalCode);
-@@ -2107,15 +2103,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
+@@ -2127,15 +2123,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
  
    // These encoding functions allow the stack pointer to be encoded, and
    // disallow the zero register.

+ 1 - 0
script/node-disabled-tests.json

@@ -1,4 +1,5 @@
 [
+  "parallel/test-assert",
   "parallel/test-async-hooks-close-during-destroy",
   "parallel/test-async-hooks-promise",
   "parallel/test-async-hooks-promise-triggerid",

+ 1 - 1
script/strip-binaries.py

@@ -13,7 +13,7 @@ LINUX_BINARIES_TO_STRIP = [
   'libEGL.so',
   'swiftshader/libGLESv2.so',
   'swiftshader/libEGL.so',
-  'swiftshader/libvulkan.so'
+  'swiftshader/libvk_swiftshader.so'
 ]
 
 def strip_binaries(directory, target_cpu):

+ 1 - 1
script/zip_manifests/dist_zip.linux.arm.manifest

@@ -67,6 +67,6 @@ resources/default_app.asar
 snapshot_blob.bin
 swiftshader/libEGL.so
 swiftshader/libGLESv2.so
-swiftshader/libvulkan.so
+swiftshader/libvk_swiftshader.so
 v8_context_snapshot.bin
 version

+ 1 - 1
script/zip_manifests/dist_zip.linux.arm64.manifest

@@ -67,6 +67,6 @@ resources/default_app.asar
 snapshot_blob.bin
 swiftshader/libEGL.so
 swiftshader/libGLESv2.so
-swiftshader/libvulkan.so
+swiftshader/libvk_swiftshader.so
 v8_context_snapshot.bin
 version

+ 1 - 1
script/zip_manifests/dist_zip.linux.x64.manifest

@@ -67,6 +67,6 @@ resources/default_app.asar
 snapshot_blob.bin
 swiftshader/libEGL.so
 swiftshader/libGLESv2.so
-swiftshader/libvulkan.so
+swiftshader/libvk_swiftshader.so
 v8_context_snapshot.bin
 version

+ 1 - 1
script/zip_manifests/dist_zip.linux.x86.manifest

@@ -67,6 +67,6 @@ resources/default_app.asar
 snapshot_blob.bin
 swiftshader/libEGL.so
 swiftshader/libGLESv2.so
-swiftshader/libvulkan.so
+swiftshader/libvk_swiftshader.so
 v8_context_snapshot.bin
 version

+ 2 - 4
shell/app/atom_content_client.cc

@@ -10,6 +10,7 @@
 
 #include "base/command_line.h"
 #include "base/files/file_util.h"
+#include "base/path_service.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -17,6 +18,7 @@
 #include "content/public/common/pepper_plugin_info.h"
 #include "electron/buildflags/buildflags.h"
 #include "ppapi/shared_impl/ppapi_permissions.h"
+#include "shell/browser/atom_paths.h"
 #include "shell/common/options_switches.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
@@ -263,8 +265,4 @@ void AtomContentClient::AddContentDecryptionModules(
   }
 }
 
-bool AtomContentClient::IsDataResourceGzipped(int resource_id) {
-  return ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id);
-}
-
 }  // namespace electron

+ 1 - 1
shell/app/atom_content_client.h

@@ -9,6 +9,7 @@
 #include <string>
 #include <vector>
 
+#include "base/files/file_path.h"
 #include "content/public/common/content_client.h"
 
 namespace electron {
@@ -30,7 +31,6 @@ class AtomContentClient : public content::ContentClient {
   void AddContentDecryptionModules(
       std::vector<content::CdmInfo>* cdms,
       std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
-  bool IsDataResourceGzipped(int resource_id) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(AtomContentClient);

+ 0 - 38
shell/app/manifests.cc

@@ -9,37 +9,12 @@
 #include "printing/buildflags/buildflags.h"
 #include "services/service_manager/public/cpp/manifest_builder.h"
 
-#if BUILDFLAG(ENABLE_PRINTING)
-#include "components/services/pdf_compositor/public/cpp/manifest.h"
-#endif
-
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
-#include "chrome/services/printing/public/cpp/manifest.h"
-#endif
-
-namespace {
-
-// TODO(https://crbug.com/781334): Remove these helpers and just update the
-// manifest definitions to be marked out-of-process. This is here only to avoid
-// extra churn when transitioning away from content_packaged_services.
-service_manager::Manifest MakeOutOfProcess(
-    const service_manager::Manifest& manifest) {
-  // cpplint.py emits a false positive [build/include_what_you_use]
-  service_manager::Manifest copy(manifest);  // NOLINT
-  copy.options.execution_mode =
-      service_manager::Manifest::ExecutionMode::kOutOfProcessBuiltin;
-  return copy;
-}
-
-}  // namespace
-
 const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
   static base::NoDestructor<service_manager::Manifest> manifest{
       service_manager::ManifestBuilder()
           .WithDisplayName("Electron (browser process)")
           .RequireCapability("device", "device:geolocation_control")
           .RequireCapability("chrome_printing", "converter")
-          .RequireCapability("pdf_compositor", "compositor")
           .ExposeInterfaceFilterCapability_Deprecated(
               "navigation:frame", "renderer",
               service_manager::Manifest::InterfaceList<
@@ -47,16 +22,3 @@ const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
           .Build()};
   return *manifest;
 }
-
-const std::vector<service_manager::Manifest>&
-GetElectronBuiltinServiceManifests() {
-  static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{
-#if BUILDFLAG(ENABLE_PRINTING)
-      MakeOutOfProcess(printing::GetPdfCompositorManifest()),
-#endif
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
-      MakeOutOfProcess(GetChromePrintingManifest()),
-#endif
-  }};
-  return *manifests;
-}

+ 0 - 2
shell/app/manifests.h

@@ -10,7 +10,5 @@
 #include "services/service_manager/public/cpp/manifest.h"
 
 const service_manager::Manifest& GetElectronContentBrowserOverlayManifest();
-const std::vector<service_manager::Manifest>&
-GetElectronBuiltinServiceManifests();
 
 #endif  // SHELL_APP_MANIFESTS_H_

+ 0 - 1
shell/browser/api/atom_api_app.cc

@@ -724,7 +724,6 @@ void App::AllowCertificateError(
     const GURL& request_url,
     bool is_main_frame_request,
     bool strict_enforcement,
-    bool expired_previous_decision,
     const base::RepeatingCallback<void(content::CertificateRequestResultType)>&
         callback) {
   v8::Locker locker(isolate());

+ 0 - 1
shell/browser/api/atom_api_app.h

@@ -120,7 +120,6 @@ class App : public AtomBrowserClient::Delegate,
       const GURL& request_url,
       bool is_main_frame_request,
       bool strict_enforcement,
-      bool expired_previous_decision,
       const base::RepeatingCallback<
           void(content::CertificateRequestResultType)>& callback) override;
   base::OnceClosure SelectClientCertificate(

+ 2 - 2
shell/browser/api/atom_api_browser_window.cc

@@ -385,8 +385,8 @@ std::unique_ptr<SkRegion> BrowserWindow::DraggableRegionsToSkRegion(
   auto sk_region = std::make_unique<SkRegion>();
   for (const auto& region : regions) {
     sk_region->op(
-        region->bounds.x(), region->bounds.y(), region->bounds.right(),
-        region->bounds.bottom(),
+        {region->bounds.x(), region->bounds.y(), region->bounds.right(),
+         region->bounds.bottom()},
         region->draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
   }
   return sk_region;

+ 1 - 1
shell/browser/api/atom_api_browser_window_mac.mm

@@ -47,7 +47,7 @@ std::vector<gfx::Rect> CalculateNonDraggableRegions(
     int height) {
   std::vector<gfx::Rect> result;
   SkRegion non_draggable;
-  non_draggable.op(0, 0, width, height, SkRegion::kUnion_Op);
+  non_draggable.op({0, 0, width, height}, SkRegion::kUnion_Op);
   non_draggable.op(*draggable, SkRegion::kDifference_Op);
   for (SkRegion::Iterator it(non_draggable); !it.done(); it.next()) {
     result.push_back(gfx::SkIRectToRect(it.rect()));

+ 4 - 2
shell/browser/api/atom_api_content_tracing.cc

@@ -88,8 +88,10 @@ v8::Local<v8::Promise> StopRecording(mate::Arguments* args) {
     StopTracing(std::move(promise), base::make_optional(path));
   } else {
     // use a temporary file.
-    base::PostTaskWithTraitsAndReplyWithResult(
-        FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE},
+    base::PostTaskAndReplyWithResult(
+        FROM_HERE,
+        {base::ThreadPool(), base::MayBlock(),
+         base::TaskPriority::USER_VISIBLE},
         base::BindOnce(CreateTemporaryFileOnIO),
         base::BindOnce(StopTracing, std::move(promise)));
   }

+ 9 - 19
shell/browser/api/atom_api_cookies.cc

@@ -18,8 +18,6 @@
 #include "net/cookies/canonical_cookie.h"
 #include "net/cookies/cookie_store.h"
 #include "net/cookies/cookie_util.h"
-#include "net/url_request/url_request_context.h"
-#include "net/url_request/url_request_context_getter.h"
 #include "shell/browser/atom_browser_context.h"
 #include "shell/browser/cookie_change_notifier.h"
 #include "shell/common/native_mate_converters/callback.h"
@@ -124,10 +122,11 @@ bool MatchesCookie(const base::Value& filter,
 // Remove cookies from |list| not matching |filter|, and pass it to |callback|.
 void FilterCookies(const base::Value& filter,
                    util::Promise promise,
-                   const net::CookieList& list,
+                   const net::CookieStatusList& list,
                    const net::CookieStatusList& excluded_list) {
   net::CookieList result;
-  for (const auto& cookie : list) {
+  net::CookieList stripped_cookies = net::cookie_util::StripStatuses(list);
+  for (const auto& cookie : stripped_cookies) {
     if (MatchesCookie(filter, cookie))
       result.push_back(cookie);
   }
@@ -186,22 +185,13 @@ v8::Local<v8::Promise> Cookies::Get(const base::DictionaryValue& filter) {
       browser_context_.get());
   auto* manager = storage_partition->GetCookieManagerForBrowserProcess();
 
-  if (url.is_empty()) {
-    // GetAllCookies has a different callback signature than GetCookieList, but
-    // can be treated as the same, just returning no excluded cookies.
-    // |AddCookieStatusList| takes a |GetCookieListCallback| and returns a
-    // callback that calls the input callback with an empty excluded list.
-    manager->GetAllCookies(
-        net::cookie_util::AddCookieStatusList(std::move(callback)));
-  } else {
-    net::CookieOptions options;
-    options.set_include_httponly();
-    options.set_same_site_cookie_context(
-        net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT);
-    options.set_do_not_update_access_time();
+  net::CookieOptions options;
+  options.set_include_httponly();
+  options.set_same_site_cookie_context(
+      net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT);
+  options.set_do_not_update_access_time();
 
-    manager->GetCookieList(url, options, std::move(callback));
-  }
+  manager->GetCookieList(url, options, std::move(callback));
 
   return handle;
 }

+ 1 - 1
shell/browser/api/atom_api_menu_mac.mm

@@ -8,7 +8,7 @@
 #include <utility>
 
 #include "base/mac/scoped_sending_event.h"
-#include "base/message_loop/message_loop.h"
+#include "base/message_loop/message_loop_current.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/task/post_task.h"
 #include "content/public/browser/browser_task_traits.h"

+ 3 - 13
shell/browser/api/atom_api_net.cc

@@ -5,8 +5,8 @@
 #include "shell/browser/api/atom_api_net.h"
 
 #include "native_mate/dictionary.h"
+#include "native_mate/handle.h"
 #include "services/network/public/cpp/features.h"
-#include "shell/browser/api/atom_api_url_request.h"
 #include "shell/browser/api/atom_api_url_request_ns.h"
 
 #include "shell/common/node_includes.h"
@@ -36,10 +36,7 @@ void Net::BuildPrototype(v8::Isolate* isolate,
 
 v8::Local<v8::Value> Net::URLRequest(v8::Isolate* isolate) {
   v8::Local<v8::FunctionTemplate> constructor;
-  if (base::FeatureList::IsEnabled(network::features::kNetworkService))
-    constructor = URLRequestNS::GetConstructor(isolate);
-  else
-    constructor = URLRequest::GetConstructor(isolate);
+  constructor = URLRequestNS::GetConstructor(isolate);
   return constructor->GetFunction(isolate->GetCurrentContext())
       .ToLocalChecked();
 }
@@ -51,7 +48,6 @@ v8::Local<v8::Value> Net::URLRequest(v8::Isolate* isolate) {
 namespace {
 
 using electron::api::Net;
-using electron::api::URLRequest;
 using electron::api::URLRequestNS;
 
 void Initialize(v8::Local<v8::Object> exports,
@@ -60,18 +56,12 @@ void Initialize(v8::Local<v8::Object> exports,
                 void* priv) {
   v8::Isolate* isolate = context->GetIsolate();
 
-  if (base::FeatureList::IsEnabled(network::features::kNetworkService))
-    URLRequestNS::SetConstructor(isolate,
-                                 base::BindRepeating(URLRequestNS::New));
-  else
-    URLRequest::SetConstructor(isolate, base::BindRepeating(URLRequest::New));
+  URLRequestNS::SetConstructor(isolate, base::BindRepeating(URLRequestNS::New));
 
   mate::Dictionary dict(isolate, exports);
   dict.Set("net", Net::Create(isolate));
   dict.Set("Net",
            Net::GetConstructor(isolate)->GetFunction(context).ToLocalChecked());
-  dict.Set("isNetworkServiceEnabled",
-           base::FeatureList::IsEnabled(network::features::kNetworkService));
 }
 
 }  // namespace

+ 2 - 3
shell/browser/api/atom_api_net_log.cc

@@ -14,7 +14,6 @@
 #include "native_mate/converter.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/handle.h"
-#include "net/url_request/url_request_context_getter.h"
 #include "shell/browser/atom_browser_context.h"
 #include "shell/browser/net/system_network_context_manager.h"
 #include "shell/common/native_mate_converters/callback.h"
@@ -55,8 +54,8 @@ scoped_refptr<base::SequencedTaskRunner> CreateFileTaskRunner() {
   //
   // These operations can be skipped on shutdown since FileNetLogObserver's API
   // doesn't require things to have completed until notified of completion.
-  return base::CreateSequencedTaskRunnerWithTraits(
-      {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
+  return base::CreateSequencedTaskRunner(
+      {base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_VISIBLE,
        base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
 }
 

+ 0 - 317
shell/browser/api/atom_api_protocol.cc

@@ -1,317 +0,0 @@
-// Copyright (c) 2013 GitHub, Inc.
-// Use of this source code is governed by the MIT license that can be
-// found in the LICENSE file.
-
-#include "shell/browser/api/atom_api_protocol.h"
-
-#include "base/command_line.h"
-#include "base/strings/string_util.h"
-#include "content/public/browser/child_process_security_policy.h"
-#include "native_mate/dictionary.h"
-#include "shell/browser/atom_browser_client.h"
-#include "shell/browser/atom_browser_main_parts.h"
-#include "shell/browser/browser.h"
-#include "shell/browser/net/url_request_async_asar_job.h"
-#include "shell/browser/net/url_request_buffer_job.h"
-#include "shell/browser/net/url_request_fetch_job.h"
-#include "shell/browser/net/url_request_stream_job.h"
-#include "shell/browser/net/url_request_string_job.h"
-#include "shell/common/native_mate_converters/callback.h"
-#include "shell/common/native_mate_converters/value_converter.h"
-#include "shell/common/node_includes.h"
-#include "shell/common/options_switches.h"
-#include "url/url_util.h"
-
-using content::BrowserThread;
-
-namespace {
-
-// List of registered custom standard schemes.
-std::vector<std::string> g_standard_schemes;
-
-struct SchemeOptions {
-  bool standard = false;
-  bool secure = false;
-  bool bypassCSP = false;
-  bool allowServiceWorkers = false;
-  bool supportFetchAPI = false;
-  bool corsEnabled = false;
-};
-
-struct CustomScheme {
-  std::string scheme;
-  SchemeOptions options;
-};
-
-}  // namespace
-
-namespace mate {
-
-template <>
-struct Converter<CustomScheme> {
-  static bool FromV8(v8::Isolate* isolate,
-                     v8::Local<v8::Value> val,
-                     CustomScheme* out) {
-    mate::Dictionary dict;
-    if (!ConvertFromV8(isolate, val, &dict))
-      return false;
-    if (!dict.Get("scheme", &(out->scheme)))
-      return false;
-    mate::Dictionary opt;
-    // options are optional. Default values specified in SchemeOptions are used
-    if (dict.Get("privileges", &opt)) {
-      opt.Get("standard", &(out->options.standard));
-      opt.Get("supportFetchAPI", &(out->options.supportFetchAPI));
-      opt.Get("secure", &(out->options.secure));
-      opt.Get("bypassCSP", &(out->options.bypassCSP));
-      opt.Get("allowServiceWorkers", &(out->options.allowServiceWorkers));
-      opt.Get("supportFetchAPI", &(out->options.supportFetchAPI));
-      opt.Get("corsEnabled", &(out->options.corsEnabled));
-    }
-    return true;
-  }
-};
-
-}  // namespace mate
-
-namespace electron {
-
-namespace api {
-
-std::vector<std::string> GetStandardSchemes() {
-  return g_standard_schemes;
-}
-
-void RegisterSchemesAsPrivileged(v8::Local<v8::Value> val,
-                                 mate::Arguments* args) {
-  std::vector<CustomScheme> custom_schemes;
-  if (!mate::ConvertFromV8(args->isolate(), val, &custom_schemes)) {
-    args->ThrowError("Argument must be an array of custom schemes.");
-    return;
-  }
-
-  std::vector<std::string> secure_schemes, cspbypassing_schemes, fetch_schemes,
-      service_worker_schemes, cors_schemes;
-  for (const auto& custom_scheme : custom_schemes) {
-    // Register scheme to privileged list (https, wss, data, chrome-extension)
-    if (custom_scheme.options.standard) {
-      auto* policy = content::ChildProcessSecurityPolicy::GetInstance();
-      url::AddStandardScheme(custom_scheme.scheme.c_str(),
-                             url::SCHEME_WITH_HOST);
-      g_standard_schemes.push_back(custom_scheme.scheme);
-      policy->RegisterWebSafeScheme(custom_scheme.scheme);
-    }
-    if (custom_scheme.options.secure) {
-      secure_schemes.push_back(custom_scheme.scheme);
-      url::AddSecureScheme(custom_scheme.scheme.c_str());
-    }
-    if (custom_scheme.options.bypassCSP) {
-      cspbypassing_schemes.push_back(custom_scheme.scheme);
-      url::AddCSPBypassingScheme(custom_scheme.scheme.c_str());
-    }
-    if (custom_scheme.options.corsEnabled) {
-      cors_schemes.push_back(custom_scheme.scheme);
-      url::AddCorsEnabledScheme(custom_scheme.scheme.c_str());
-    }
-    if (custom_scheme.options.supportFetchAPI) {
-      fetch_schemes.push_back(custom_scheme.scheme);
-    }
-    if (custom_scheme.options.allowServiceWorkers) {
-      service_worker_schemes.push_back(custom_scheme.scheme);
-    }
-  }
-
-  const auto AppendSchemesToCmdLine = [](const char* switch_name,
-                                         std::vector<std::string> schemes) {
-    // Add the schemes to command line switches, so child processes can also
-    // register them.
-    base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
-        switch_name, base::JoinString(schemes, ","));
-  };
-
-  AppendSchemesToCmdLine(electron::switches::kSecureSchemes, secure_schemes);
-  AppendSchemesToCmdLine(electron::switches::kBypassCSPSchemes,
-                         cspbypassing_schemes);
-  AppendSchemesToCmdLine(electron::switches::kCORSSchemes, cors_schemes);
-  AppendSchemesToCmdLine(electron::switches::kFetchSchemes, fetch_schemes);
-  AppendSchemesToCmdLine(electron::switches::kServiceWorkerSchemes,
-                         service_worker_schemes);
-  AppendSchemesToCmdLine(electron::switches::kStandardSchemes,
-                         g_standard_schemes);
-}
-
-Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context)
-    : browser_context_(browser_context), weak_factory_(this) {
-  Init(isolate);
-}
-
-Protocol::~Protocol() {}
-void Protocol::UnregisterProtocol(const std::string& scheme,
-                                  mate::Arguments* args) {
-  CompletionCallback callback;
-  args->GetNext(&callback);
-  auto* getter = static_cast<URLRequestContextGetter*>(
-      browser_context_->GetRequestContext());
-  base::PostTaskWithTraitsAndReplyWithResult(
-      FROM_HERE, {content::BrowserThread::IO},
-      base::BindOnce(&Protocol::UnregisterProtocolInIO,
-                     base::RetainedRef(getter), scheme),
-      base::BindOnce(&Protocol::OnIOCompleted, GetWeakPtr(), callback));
-}
-
-// static
-Protocol::ProtocolError Protocol::UnregisterProtocolInIO(
-    scoped_refptr<URLRequestContextGetter> request_context_getter,
-    const std::string& scheme) {
-  auto* job_factory = request_context_getter->job_factory();
-  if (!job_factory->HasProtocolHandler(scheme))
-    return ProtocolError::NOT_REGISTERED;
-  job_factory->SetProtocolHandler(scheme, nullptr);
-  return ProtocolError::OK;
-}
-
-bool IsProtocolHandledInIO(
-    scoped_refptr<URLRequestContextGetter> request_context_getter,
-    const std::string& scheme) {
-  bool is_handled =
-      request_context_getter->job_factory()->IsHandledProtocol(scheme);
-  return is_handled;
-}
-
-v8::Local<v8::Promise> Protocol::IsProtocolHandled(const std::string& scheme) {
-  util::Promise promise(isolate());
-  v8::Local<v8::Promise> handle = promise.GetHandle();
-  auto* getter = static_cast<URLRequestContextGetter*>(
-      browser_context_->GetRequestContext());
-
-  base::PostTaskWithTraitsAndReplyWithResult(
-      FROM_HERE, {content::BrowserThread::IO},
-      base::BindOnce(&IsProtocolHandledInIO, base::RetainedRef(getter), scheme),
-      base::BindOnce(util::Promise::ResolvePromise<bool>, std::move(promise)));
-
-  return handle;
-}
-
-void Protocol::UninterceptProtocol(const std::string& scheme,
-                                   mate::Arguments* args) {
-  CompletionCallback callback;
-  args->GetNext(&callback);
-  auto* getter = static_cast<URLRequestContextGetter*>(
-      browser_context_->GetRequestContext());
-  base::PostTaskWithTraitsAndReplyWithResult(
-      FROM_HERE, {content::BrowserThread::IO},
-      base::BindOnce(&Protocol::UninterceptProtocolInIO,
-                     base::RetainedRef(getter), scheme),
-      base::BindOnce(&Protocol::OnIOCompleted, GetWeakPtr(), callback));
-}
-
-// static
-Protocol::ProtocolError Protocol::UninterceptProtocolInIO(
-    scoped_refptr<URLRequestContextGetter> request_context_getter,
-    const std::string& scheme) {
-  return request_context_getter->job_factory()->UninterceptProtocol(scheme)
-             ? ProtocolError::OK
-             : ProtocolError::NOT_INTERCEPTED;
-}
-
-void Protocol::OnIOCompleted(const CompletionCallback& callback,
-                             ProtocolError error) {
-  // The completion callback is optional.
-  if (callback.is_null())
-    return;
-
-  v8::Locker locker(isolate());
-  v8::HandleScope handle_scope(isolate());
-
-  if (error == ProtocolError::OK) {
-    callback.Run(v8::Null(isolate()));
-  } else {
-    std::string str = ErrorCodeToString(error);
-    callback.Run(v8::Exception::Error(mate::StringToV8(isolate(), str)));
-  }
-}
-
-std::string Protocol::ErrorCodeToString(ProtocolError error) {
-  switch (error) {
-    case ProtocolError::FAIL:
-      return "Failed to manipulate protocol factory";
-    case ProtocolError::REGISTERED:
-      return "The scheme has been registered";
-    case ProtocolError::NOT_REGISTERED:
-      return "The scheme has not been registered";
-    case ProtocolError::INTERCEPTED:
-      return "The scheme has been intercepted";
-    case ProtocolError::NOT_INTERCEPTED:
-      return "The scheme has not been intercepted";
-    default:
-      return "Unexpected error";
-  }
-}
-
-// static
-mate::Handle<Protocol> Protocol::Create(v8::Isolate* isolate,
-                                        AtomBrowserContext* browser_context) {
-  return mate::CreateHandle(isolate, new Protocol(isolate, browser_context));
-}
-
-// static
-void Protocol::BuildPrototype(v8::Isolate* isolate,
-                              v8::Local<v8::FunctionTemplate> prototype) {
-  prototype->SetClassName(mate::StringToV8(isolate, "Protocol"));
-  mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
-      .SetMethod("registerStringProtocol",
-                 &Protocol::RegisterProtocol<URLRequestStringJob>)
-      .SetMethod("registerBufferProtocol",
-                 &Protocol::RegisterProtocol<URLRequestBufferJob>)
-      .SetMethod("registerFileProtocol",
-                 &Protocol::RegisterProtocol<URLRequestAsyncAsarJob>)
-      .SetMethod("registerHttpProtocol",
-                 &Protocol::RegisterProtocol<URLRequestFetchJob>)
-      .SetMethod("registerStreamProtocol",
-                 &Protocol::RegisterProtocol<URLRequestStreamJob>)
-      .SetMethod("unregisterProtocol", &Protocol::UnregisterProtocol)
-      .SetMethod("isProtocolHandled", &Protocol::IsProtocolHandled)
-      .SetMethod("interceptStringProtocol",
-                 &Protocol::InterceptProtocol<URLRequestStringJob>)
-      .SetMethod("interceptBufferProtocol",
-                 &Protocol::InterceptProtocol<URLRequestBufferJob>)
-      .SetMethod("interceptFileProtocol",
-                 &Protocol::InterceptProtocol<URLRequestAsyncAsarJob>)
-      .SetMethod("interceptHttpProtocol",
-                 &Protocol::InterceptProtocol<URLRequestFetchJob>)
-      .SetMethod("interceptStreamProtocol",
-                 &Protocol::InterceptProtocol<URLRequestStreamJob>)
-      .SetMethod("uninterceptProtocol", &Protocol::UninterceptProtocol);
-}
-
-}  // namespace api
-
-}  // namespace electron
-
-namespace {
-
-void RegisterSchemesAsPrivileged(v8::Local<v8::Value> val,
-                                 mate::Arguments* args) {
-  if (electron::Browser::Get()->is_ready()) {
-    args->ThrowError(
-        "protocol.registerSchemesAsPrivileged should be called before "
-        "app is ready");
-    return;
-  }
-
-  electron::api::RegisterSchemesAsPrivileged(val, args);
-}
-
-void Initialize(v8::Local<v8::Object> exports,
-                v8::Local<v8::Value> unused,
-                v8::Local<v8::Context> context,
-                void* priv) {
-  v8::Isolate* isolate = context->GetIsolate();
-  mate::Dictionary dict(isolate, exports);
-  dict.SetMethod("registerSchemesAsPrivileged", &RegisterSchemesAsPrivileged);
-  dict.SetMethod("getStandardSchemes", &electron::api::GetStandardSchemes);
-}
-
-}  // namespace
-
-NODE_LINKED_MODULE_CONTEXT_AWARE(atom_browser_protocol, Initialize)

Some files were not shown because too many files changed in this diff