Permalink
Browse files

feat: Upgrade to Chromium 71.0.3578.98 (#15966)

  • Loading branch information...
deepak1556 authored and nornagon committed Jan 12, 2019
1 parent 92ddfd0 commit 52fe92d02ef94712fc7b19b3f03d3363cfa71a4d
Showing with 2,296 additions and 1,765 deletions.
  1. +3 −0 .gitignore
  2. +41 −36 BUILD.gn
  3. +2 −2 DEPS
  4. 0 VERSION → ELECTRON_VERSION
  5. +4 −0 atom/app/atom_main_delegate.cc
  6. +1 −0 atom/app/atom_main_delegate.h
  7. +1 −1 atom/browser/api/atom_api_browser_window.cc
  8. +22 −8 atom/browser/api/atom_api_content_tracing.cc
  9. +12 −11 atom/browser/api/atom_api_cookies.cc
  10. +3 −1 atom/browser/api/atom_api_menu_mac.mm
  11. +3 −1 atom/browser/api/atom_api_net_log.cc
  12. +6 −6 atom/browser/api/atom_api_protocol.cc
  13. +6 −4 atom/browser/api/atom_api_protocol.h
  14. +17 −15 atom/browser/api/atom_api_session.cc
  15. +1 −0 atom/browser/api/atom_api_system_preferences_mac.mm
  16. +4 −2 atom/browser/api/atom_api_top_level_window.h
  17. +17 −11 atom/browser/api/atom_api_web_contents.cc
  18. +2 −1 atom/browser/api/atom_api_web_contents.h
  19. +5 −3 atom/browser/api/atom_api_web_request.cc
  20. +1 −1 atom/browser/api/frame_subscriber.cc
  21. +12 −0 atom/browser/api/gpu_info_enumerator.cc
  22. +3 −0 atom/browser/api/gpu_info_enumerator.h
  23. +10 −10 atom/browser/api/stream_subscriber.cc
  24. +6 −4 atom/browser/atom_blob_reader.cc
  25. +6 −4 atom/browser/atom_browser_client.cc
  26. +12 −9 atom/browser/atom_browser_main_parts.cc
  27. +0 −1 atom/browser/atom_browser_main_parts.h
  28. +3 −1 atom/browser/atom_browser_main_parts_posix.cc
  29. +4 −2 atom/browser/atom_resource_dispatcher_host_delegate.cc
  30. +1 −1 atom/browser/browser_process_impl.cc
  31. +10 −6 atom/browser/common_web_contents_delegate.cc
  32. +3 −2 atom/browser/common_web_contents_delegate.h
  33. +2 −2 atom/browser/lib/power_observer_linux.cc
  34. +8 −6 atom/browser/login_handler.cc
  35. +0 −7 atom/browser/mac/atom_application.h
  36. +0 −5 atom/browser/mac/atom_application.mm
  37. +4 −2 atom/browser/mac/in_app_purchase.mm
  38. +4 −2 atom/browser/mac/in_app_purchase_observer.mm
  39. +4 −2 atom/browser/mac/in_app_purchase_product.mm
  40. +1 −1 atom/browser/native_window_mac.mm
  41. +6 −4 atom/browser/net/atom_cert_verifier.cc
  42. +12 −8 atom/browser/net/atom_network_delegate.cc
  43. +4 −2 atom/browser/net/atom_network_delegate.h
  44. +34 −34 atom/browser/net/atom_url_request.cc
  45. +9 −0 atom/browser/net/system_network_context_manager.cc
  46. +10 −0 atom/browser/net/system_network_context_manager.h
  47. +5 −4 atom/browser/net/url_request_async_asar_job.cc
  48. +7 −6 atom/browser/net/url_request_buffer_job.cc
  49. +4 −3 atom/browser/net/url_request_context_getter.cc
  50. +9 −8 atom/browser/net/url_request_fetch_job.cc
  51. +12 −10 atom/browser/net/url_request_stream_job.cc
  52. +7 −6 atom/browser/net/url_request_string_job.cc
  53. +5 −4 atom/browser/node_debugger.cc
  54. +7 −7 atom/browser/notifications/platform_notification_service.cc
  55. +4 −4 atom/browser/notifications/platform_notification_service.h
  56. +0 −1 atom/browser/notifications/win/notification_presenter_win.cc
  57. +8 −6 atom/browser/notifications/win/windows_toast_notification.cc
  58. +12 −10 atom/browser/osr/osr_render_widget_host_view.cc
  59. +0 −6 atom/browser/osr/osr_web_contents_view.cc
  60. +0 −2 atom/browser/osr/osr_web_contents_view.h
  61. +7 −16 atom/browser/printing/print_preview_message_handler.cc
  62. +0 −8 atom/browser/ui/cocoa/atom_inspectable_web_contents_view.mm
  63. +4 −2 atom/browser/ui/cocoa/atom_menu_controller.mm
  64. +1 −1 atom/browser/ui/cocoa/atom_ns_window.h
  65. +1 −1 atom/browser/ui/cocoa/atom_ns_window_delegate.h
  66. +5 −7 atom/browser/ui/cocoa/atom_ns_window_delegate.mm
  67. +1 −1 atom/browser/ui/devtools_manager_delegate.cc
  68. +4 −2 atom/browser/ui/devtools_ui.cc
  69. +6 −2 atom/browser/ui/file_dialog_gtk.cc
  70. +11 −7 atom/browser/ui/inspectable_web_contents_impl.cc
  71. +3 −2 atom/browser/ui/inspectable_web_contents_impl.h
  72. +3 −3 atom/browser/ui/message_box_gtk.cc
  73. +4 −3 atom/browser/ui/message_box_win.cc
  74. +1 −1 atom/browser/ui/views/autofill_popup_view.cc
  75. +4 −2 atom/browser/ui/views/menu_delegate.cc
  76. +6 −4 atom/browser/ui/webui/pdf_viewer_ui.cc
  77. +49 −38 atom/browser/web_dialog_helper.cc
  78. +7 −3 atom/browser/web_dialog_helper.h
  79. +10 −18 atom/common/api/atom_api_asar.cc
  80. +3 −1 atom/common/api/atom_api_crash_reporter.cc
  81. +4 −4 atom/common/api/atom_api_native_image.cc
  82. +0 −14 atom/common/native_mate_converters/blink_converter.cc
  83. +0 −8 atom/common/native_mate_converters/blink_converter.h
  84. +2 −1 atom/common/node_includes.h
  85. +10 −7 atom/renderer/api/atom_api_web_frame.cc
  86. +2 −4 atom/renderer/api/atom_api_web_frame.h
  87. +2 −1 atom/renderer/atom_autofill_agent.cc
  88. +12 −21 atom/renderer/atom_renderer_client.cc
  89. +1 −1 atom/renderer/atom_renderer_client.h
  90. +14 −22 atom/renderer/atom_sandboxed_renderer_client.cc
  91. +1 −1 buildflags/buildflags.gni
  92. +6 −4 chromium_src/chrome/browser/certificate_manager_model.cc
  93. +6 −4 chromium_src/chrome/browser/process_singleton_posix.cc
  94. +0 −2 electron_paks.gni
  95. +1 −0 electron_resources.grd
  96. +2 −6 filenames.gni
  97. +12 −18 lib/common/asar_init.js
  98. +7 −6 lib/isolated_renderer/init.js
  99. +12 −9 lib/renderer/init.js
  100. +1 −1 lib/renderer/web-view/web-view-attributes.js
  101. +110 −0 lib/renderer/web-view/web-view-element.js
  102. +19 −73 lib/renderer/web-view/{web-view.js → web-view-impl.js}
  103. +4 −2 lib/sandboxed_renderer/init.js
  104. +2 −0 patches/common/boringssl/.patches
  105. +39 −0 patches/common/boringssl/add_ec_group_order_bits_for_openssl_compatibility.patch
  106. +65 −0 patches/common/boringssl/add_ec_key_key2buf_for_openssl_compatibility.patch
  107. +1 −1 patches/common/boringssl/implement_ssl_get_tlsext_status_type.patch
  108. +0 −1 patches/common/chromium/.patches
  109. +3 −3 patches/common/chromium/accelerator.patch
  110. +7 −7 patches/common/chromium/add_realloc.patch
  111. +2 −2 patches/common/chromium/allow_webview_file_url.patch
  112. +1 −1 patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch
  113. +3 −3 patches/common/chromium/blink_file_path.patch
  114. +3 −3 patches/common/chromium/blink_local_frame.patch
  115. +6 −6 patches/common/chromium/blink_world_context.patch
  116. +1 −1 patches/common/chromium/boringssl_build_gn.patch
  117. +2 −2 patches/common/chromium/browser_compositor_mac.patch
  118. +18 −18 patches/common/chromium/can_create_window.patch
  119. +2 −2 patches/common/chromium/chrome_key_systems.patch
  120. +2 −2 patches/common/chromium/color_chooser.patch
  121. +7 −7 patches/common/chromium/compositor_delegate.patch
  122. +6 −7 patches/common/chromium/content_allow_embedder_to_prevent_locking_scheme_registry.patch
  123. +2 −2 patches/common/chromium/content_browser_main_loop.patch
  124. +6 −6 patches/common/chromium/cross_site_document_resource_handler.patch
  125. +7 −7 patches/common/chromium/customizable_app_indicator_id_prefix.patch
  126. +1 −1 patches/common/chromium/dcheck.patch
  127. +12 −11 patches/common/chromium/desktop_media_list.patch
  128. +1 −1 patches/common/chromium/disable-redraw-lock.patch
  129. +2 −2 patches/common/chromium/disable_detach_webview_frame.patch
  130. +4 −4 patches/common/chromium/disable_hidden.patch
  131. +2 −2 patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch
  132. +11 −11 patches/common/chromium/dom_storage_limits.patch
  133. +8 −5 patches/common/chromium/enable_widevine.patch
  134. +3 −3 patches/common/chromium/exclude-a-few-test-files-from-build.patch
  135. +3 −3 patches/common/chromium/fix_trackpad_scrolling.patch
  136. +0 −30 patches/common/chromium/fix_zoom_display.patch
  137. +17 −18 patches/common/chromium/frame_host_manager.patch
  138. +5 −5 patches/common/chromium/gin_enable_disable_v8_platform.patch
  139. +2 −2 patches/common/chromium/gritsettings_resource_ids.patch
  140. +2 −2 patches/common/chromium/isolate_holder.patch
  141. +0 −25 patches/common/chromium/leveldb_ssize_t.patch
  142. +9 −9 patches/common/chromium/libgtkui_export.patch
  143. +2 −2 patches/common/chromium/mas-audiodeviceduck.patch
  144. +1 −1 patches/common/chromium/mas-cgdisplayusesforcetogray.patch
  145. +2 −2 patches/common/chromium/mas-lssetapplicationlaunchservicesserverconnectionstatus.patch
  146. +31 −32 patches/common/chromium/mas_no_private_api.patch
  147. +4 −4 patches/common/chromium/no_cache_storage_check.patch
  148. +23 −23 patches/common/chromium/notification_provenance.patch
  149. +2 −2 patches/common/chromium/out_of_process_instance.patch
  150. +33 −32 patches/common/chromium/pepper_flash.patch
  151. +40 −35 patches/common/chromium/printing.patch
  152. +47 −44 patches/common/chromium/proxy_config_monitor.patch
  153. +6 −6 patches/common/chromium/render_widget_host_view_base.patch
  154. +9 −9 patches/common/chromium/render_widget_host_view_mac.patch
  155. +4 −5 patches/common/chromium/resource_file_conflict.patch
  156. +2 −2 patches/common/chromium/scroll_bounce_flag.patch
  157. +2 −2 patches/common/chromium/ssl_security_state_tab_helper.patch
  158. +1 −1 patches/common/chromium/sysroot.patch
  159. +9 −8 patches/common/chromium/tts.patch
  160. +20 −22 patches/common/chromium/web_contents.patch
  161. +12 −12 patches/common/chromium/webgl_context_attributes.patch
  162. +2 −2 patches/common/chromium/webview_cross_drag.patch
  163. +12 −12 patches/common/chromium/worker_context_will_destroy.patch
  164. +4 −2 patches/common/v8/.patches
  165. +112 −0 patches/common/v8/0001-deps-cherry-pick-0483e9a-from-upstream-V8.patch
  166. +136 −0 patches/common/v8/0002-deps-cherry-pick-b87d408-from-upstream-V8.patch
  167. +180 −0 patches/common/v8/0003-deps-cherry-pick-073073b-from-upstream-V8.patch
  168. +352 −0 patches/common/v8/0004-deps-cherry-pick-88f8fe1-from-upstream-V8.patch
  169. +4 −4 patches/common/v8/add_realloc.patch
  170. +4 −4 patches/common/v8/array_buffer.patch
  171. +24 −15 patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch
  172. +3 −3 patches/common/v8/build_gn.patch
  173. +4 −4 patches/common/v8/dcheck.patch
  174. +2 −2 patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch
  175. +0 −74 patches/common/v8/deps_cherry-pick_2363cdf_from_upstream_v8.patch
  176. +27 −27 patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch
  177. +0 −409 patches/common/v8/deps_revert_9136dd8088a9_from_upstream_v8.patch
  178. +5 −5 patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch
  179. +2 −2 patches/common/v8/export_platform.patch
  180. +2 −2 patches/common/v8/expose_mksnapshot.patch
  181. +3 −3 patches/common/v8/ostreams.patch
  182. +1 −1 script/bump-version.js
  183. +1 −1 script/lib/util.py
  184. +1 −1 script/lib/version-utils.js
  185. +6 −12 script/sysroots.json
  186. +5 −2 spec/api-session-spec.js
  187. +9 −13 spec/chromium-spec.js
  188. +4 −4 spec/fixtures/api/native-window-open-native-addon.html
  189. +7 −0 spec/fixtures/module/echo-renamed.js
  190. +2 −2 spec/fixtures/module/{runas.js → echo.js}
  191. +0 −6 spec/fixtures/module/runas-renamed.js
  192. +38 −0 spec/fixtures/native-addon/echo/binding.cc
  193. +10 −0 spec/fixtures/native-addon/echo/binding.gyp
  194. +1 −0 spec/fixtures/native-addon/echo/lib/echo.js
  195. +6 −0 spec/fixtures/native-addon/echo/package.json
  196. +1 −1 spec/fixtures/pages/native-module.html
  197. +6 −3 spec/fixtures/pages/storage/cookie.html
  198. +4 −3 spec/fixtures/pages/storage/indexed_db.html
  199. +2 −5 spec/fixtures/pages/storage/local_storage.html
  200. +7 −7 spec/modules-spec.js
  201. +9 −4 spec/node-spec.js
  202. +7 −12 spec/package-lock.json
  203. +2 −2 spec/package.json
  204. +15 −31 tools/js2c.py
@@ -56,3 +56,6 @@ spec/.hash

# Eslint Cache
.eslintcache

# Generated native addon files
/spec/fixtures/native-addon/echo/build/
@@ -54,17 +54,7 @@ config("branding") {
}

npm_action("atom_browserify_sandbox") {
deps = [
":atom_js2c_copy",
]

sandbox_args = [
"lib/sandboxed_renderer/init.js",
"-r",
"./lib/sandboxed_renderer/api/exports/electron.js:electron",
"-t",
"aliasify",
]
script = "browserify"

inputs = [
# FIXME(zcbenz): The dependencies of these files are not listed here, so
@@ -73,36 +63,40 @@ npm_action("atom_browserify_sandbox") {
"lib/sandboxed_renderer/init.js",
"lib/sandboxed_renderer/api/exports/electron.js",
]

outputs = [
"$target_gen_dir/js2c/preload_bundle.js",
]

script = "browserify"
args = sandbox_args + [
"-o",
rebase_path(outputs[0]),
]
args = [
"lib/sandboxed_renderer/init.js",
"-r",
"./lib/sandboxed_renderer/api/exports/electron.js:electron",
"-t",
"aliasify",
"-o",
rebase_path(outputs[0]),
]
}

npm_action("atom_browserify_isolated") {
deps = [
":atom_js2c_copy",
]
script = "browserify"

inputs = [
"lib/isolated_renderer/init.js",
]

outputs = [
"$target_gen_dir/js2c/isolated_bundle.js",
]

script = "browserify"
args = inputs + [
"-t",
"aliasify",
"-o",
rebase_path(outputs[0]),
]
args = [
"lib/isolated_renderer/init.js",
"-t",
"aliasify",
"-o",
rebase_path(outputs[0]),
]
}

copy("atom_js2c_copy") {
@@ -122,23 +116,25 @@ action("atom_js2c") {
":atom_js2c_copy",
]

js2c_sources = filenames.js2c_sources

browserify_sources = [
"$target_gen_dir/js2c/isolated_bundle.js",
"$target_gen_dir/js2c/preload_bundle.js",
]

inputs = js2c_sources + browserify_sources
sources = browserify_sources + [
"$target_gen_dir/js2c/asar.js",
"$target_gen_dir/js2c/asar_init.js",
]

inputs = sources
outputs = [
"$target_gen_dir/atom_natives.h",
"$root_gen_dir/atom_natives.cc",
]

script = "tools/js2c.py"
args = [ rebase_path("//third_party/electron_node") ] +
rebase_path(outputs, root_build_dir) +
[ rebase_path("$target_gen_dir/js2c", root_build_dir) ]
rebase_path(sources, root_build_dir)
}

asar("js2asar") {
@@ -182,18 +178,30 @@ grit("resources") {
"electron_resources.pak",
]

# Mojo manifest overlays are generated.
source_is_generated = true
grit_flags = [
"-E",
"target_gen_dir=" + rebase_path(target_gen_dir, root_build_dir),
]

deps = [
":copy_shell_devtools_discovery_page",
":electron_content_manifest_overlays",
]

output_dir = "$target_gen_dir"
}

copy("copy_shell_devtools_discovery_page") {
sources = [
"//content/shell/resources/shell_devtools_discovery_page.html",
]
outputs = [
"$target_gen_dir/shell_devtools_discovery_page.html",
]
}

if (is_linux) {
generate_library_loader("libnotify_loader") {
name = "LibNotifyLoader"
@@ -244,7 +252,6 @@ static_library("electron_lib") {
"//content/public/browser",
"//content/public/child",
"//content/public/common:service_names",
"//content/shell:copy_shell_resources",
"//gin",
"//media/capture/mojom:video_capture",
"//media/mojo/interfaces",
@@ -326,8 +333,6 @@ static_library("electron_lib") {
sources = filenames.lib_sources
set_sources_assignment_filter(sources_assignment_filter)

sources += [ "$target_gen_dir/atom_natives.h" ]

if (is_component_build) {
defines += [ "NODE_SHARED_MODE" ]
}
@@ -576,7 +581,7 @@ if (is_mac) {
}
info_plist = "atom/common/resources/mac/Info.plist"

electron_version = read_file("VERSION", "trim string")
electron_version = read_file("ELECTRON_VERSION", "trim string")
extra_substitutions = [
"ATOM_BUNDLE_ID=$electron_mac_bundle_id.framework",
"ELECTRON_VERSION=$electron_version",
@@ -897,7 +902,7 @@ group("licenses") {

copy("electron_version") {
sources = [
"VERSION",
"ELECTRON_VERSION",
]
outputs = [
"$root_build_dir/version",
4 DEPS
@@ -10,9 +10,9 @@ gclient_gn_args = [

vars = {
'chromium_version':
'70.0.3538.110',
'71.0.3578.98',
'node_version':
'1b192088522d10d126e5bb9316adae2a97add62a',
'aeae08cda811ed122918bfd48fd9e56f8204d818',

'boto_version': 'f7574aa6cc2c819430c1f05e9a1a1a666ef8169b',
'pyyaml_version': '3.12',
File renamed without changes.
@@ -273,4 +273,8 @@ bool AtomMainDelegate::ShouldLockSchemeRegistry() {
return false;
}

bool AtomMainDelegate::ShouldCreateFeatureList() {
return false;
}

} // namespace atom
@@ -36,6 +36,7 @@ class AtomMainDelegate : public content::ContentMainDelegate {
bool DelaySandboxInitialization(const std::string& process_type) override;
#endif
bool ShouldLockSchemeRegistry() override;
bool ShouldCreateFeatureList() override;

private:
#if defined(OS_MACOSX)
@@ -231,7 +231,7 @@ void BrowserWindow::OnCloseButtonClicked(bool* prevent_default) {
return;

if (web_contents()->NeedToFireBeforeUnload())
web_contents()->DispatchBeforeUnload();
web_contents()->DispatchBeforeUnload(false /* auto_cancel */);
else
web_contents()->Close();
}
@@ -71,20 +71,34 @@ void StopRecording(const base::FilePath& path,
GetTraceDataEndpoint(path, callback));
}

bool GetCategories(
const base::RepeatingCallback<void(const std::set<std::string>&)>&
callback) {
return TracingController::GetInstance()->GetCategories(
base::BindOnce(callback));
}

bool StartTracing(const base::trace_event::TraceConfig& trace_config,
const base::RepeatingCallback<void()>& callback) {
return TracingController::GetInstance()->StartTracing(
trace_config, base::BindOnce(callback));
}

bool GetTraceBufferUsage(
const base::RepeatingCallback<void(float, size_t)>& callback) {
return TracingController::GetInstance()->GetTraceBufferUsage(
base::BindOnce(callback));
}

void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
auto controller = base::Unretained(TracingController::GetInstance());
mate::Dictionary dict(context->GetIsolate(), exports);
dict.SetMethod("getCategories",
base::Bind(&TracingController::GetCategories, controller));
dict.SetMethod("startRecording",
base::Bind(&TracingController::StartTracing, controller));
dict.SetMethod("getCategories", &GetCategories);
dict.SetMethod("startRecording", &StartTracing);
dict.SetMethod("stopRecording", &StopRecording);
dict.SetMethod(
"getTraceBufferUsage",
base::Bind(&TracingController::GetTraceBufferUsage, controller));
dict.SetMethod("getTraceBufferUsage", &GetTraceBufferUsage);
}

} // namespace
@@ -12,9 +12,11 @@
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/gurl_converter.h"
#include "atom/common/native_mate_converters/value_converter.h"
#include "base/task/post_task.h"
#include "base/time/time.h"
#include "base/values.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
@@ -136,7 +138,7 @@ inline net::CookieStore* GetCookieStore(

// Run |callback| on UI thread.
void RunCallbackInUI(const base::Closure& callback) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback);
base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI}, callback);
}

// Remove cookies from |list| not matching |filter|, and pass it to |callback|.
@@ -270,8 +272,8 @@ void Cookies::Get(const base::DictionaryValue& filter,
auto copy = base::DictionaryValue::From(
base::Value::ToUniquePtrValue(filter.Clone()));
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::IO},
base::BindOnce(GetCookiesOnIO, base::RetainedRef(getter), std::move(copy),
callback));
}
@@ -280,8 +282,8 @@ void Cookies::Remove(const GURL& url,
const std::string& name,
const base::Closure& callback) {
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::IO},
base::BindOnce(RemoveCookieOnIOThread, base::RetainedRef(getter), url,
name, callback));
}
@@ -291,18 +293,17 @@ void Cookies::Set(const base::DictionaryValue& details,
auto copy = base::DictionaryValue::From(
base::Value::ToUniquePtrValue(details.Clone()));
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::PostTaskWithTraits(
FROM_HERE, {BrowserThread::IO},
base::BindOnce(SetCookieOnIO, base::RetainedRef(getter), std::move(copy),
callback));
}

void Cookies::FlushStore(const base::Closure& callback) {
auto* getter = browser_context_->GetRequestContext();
content::BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::BindOnce(FlushCookieStoreOnIOThread, base::RetainedRef(getter),
callback));
base::PostTaskWithTraits(FROM_HERE, {BrowserThread::IO},
base::BindOnce(FlushCookieStoreOnIOThread,
base::RetainedRef(getter), callback));
}

void Cookies::OnCookieChanged(const CookieDetails* details) {
@@ -9,6 +9,8 @@
#include "base/mac/scoped_sending_event.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/sys_string_conversions.h"
#include "base/task/post_task.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"

@@ -43,7 +45,7 @@
auto popup = base::Bind(&MenuMac::PopupOnUI, weak_factory_.GetWeakPtr(),
native_window->GetWeakPtr(), window->weak_map_id(), x,
y, positioning_item, callback);
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, popup);
base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI}, popup);
}

void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
@@ -7,6 +7,7 @@
#include <utility>

#include "atom/browser/atom_browser_context.h"
#include "atom/browser/net/system_network_context_manager.h"
#include "atom/common/native_mate_converters/callback.h"
#include "atom/common/native_mate_converters/file_path_converter.h"
#include "base/command_line.h"
@@ -27,7 +28,8 @@ NetLog::NetLog(v8::Isolate* isolate, AtomBrowserContext* browser_context)
: browser_context_(browser_context) {
Init(isolate);

net_log_writer_ = g_browser_process->net_log()->net_export_file_writer();
net_log_writer_ = g_browser_process->system_network_context_manager()
->GetNetExportFileWriter();
net_log_writer_->AddObserver(this);
}

@@ -85,8 +85,8 @@ void Protocol::UnregisterProtocol(const std::string& scheme,
args->GetNext(&callback);
auto* getter = static_cast<URLRequestContextGetter*>(
browser_context_->GetRequestContext());
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::IO, FROM_HERE,
base::PostTaskWithTraitsAndReplyWithResult(
FROM_HERE, {content::BrowserThread::IO},
base::BindOnce(&Protocol::UnregisterProtocolInIO,
base::RetainedRef(getter), scheme),
base::BindOnce(&Protocol::OnIOCompleted, GetWeakPtr(), callback));
@@ -107,8 +107,8 @@ void Protocol::IsProtocolHandled(const std::string& scheme,
const BooleanCallback& callback) {
auto* getter = static_cast<URLRequestContextGetter*>(
browser_context_->GetRequestContext());
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::IO, FROM_HERE,
base::PostTaskWithTraitsAndReplyWithResult(
FROM_HERE, {content::BrowserThread::IO},
base::Bind(&Protocol::IsProtocolHandledInIO, base::RetainedRef(getter),
scheme),
callback);
@@ -127,8 +127,8 @@ void Protocol::UninterceptProtocol(const std::string& scheme,
args->GetNext(&callback);
auto* getter = static_cast<URLRequestContextGetter*>(
browser_context_->GetRequestContext());
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::IO, FROM_HERE,
base::PostTaskWithTraitsAndReplyWithResult(
FROM_HERE, {content::BrowserThread::IO},
base::BindOnce(&Protocol::UninterceptProtocolInIO,
base::RetainedRef(getter), scheme),
base::BindOnce(&Protocol::OnIOCompleted, GetWeakPtr(), callback));
Oops, something went wrong.

0 comments on commit 52fe92d

Please sign in to comment.