pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Update to 54.0.2840.100



Module Name:	pkgsrc-wip
Committed By:	Ryo ONODERA <ryoon%NetBSD.org@localhost>
Pushed By:	ryoon
Date:		Tue Nov 29 20:33:33 2016 +0900
Changeset:	4297afb3162728bba8bd4a1c8db61c3f60a695e6

Modified Files:
	chromium-new/Makefile
	chromium-new/PLIST
	chromium-new/TODO
	chromium-new/distinfo
	chromium-new/patches/patch-base_base__paths__posix.cc
	chromium-new/patches/patch-base_debug_debugger__posix.cc
	chromium-new/patches/patch-base_debug_stack__trace__posix.cc
	chromium-new/patches/patch-base_files_file__path__watcher__kqueue.h
	chromium-new/patches/patch-base_linux__util.cc
	chromium-new/patches/patch-base_posix_unix__domain__socket__linux.cc
	chromium-new/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc
	chromium-new/patches/patch-base_process_internal__linux.h
	chromium-new/patches/patch-base_process_launch.cc
	chromium-new/patches/patch-base_process_launch.h
	chromium-new/patches/patch-base_process_launch__posix.cc
	chromium-new/patches/patch-base_process_memory.h
	chromium-new/patches/patch-base_process_memory__stubs.cc
	chromium-new/patches/patch-base_process_memory__unittest.cc
	chromium-new/patches/patch-base_process_process__handle__netbsd.cc
	chromium-new/patches/patch-base_process_process__info__linux.cc
	chromium-new/patches/patch-base_process_process__iterator.h
	chromium-new/patches/patch-base_process_process__iterator__freebsd.cc
	chromium-new/patches/patch-base_process_process__iterator__netbsd.cc
	chromium-new/patches/patch-base_process_process__metrics.h
	chromium-new/patches/patch-base_process_process__metrics__freebsd.cc
	chromium-new/patches/patch-base_process_process__metrics__netbsd.cc
	chromium-new/patches/patch-base_process_process__metrics__posix.cc
	chromium-new/patches/patch-base_process_process__posix.cc
	chromium-new/patches/patch-base_security__unittest.cc
	chromium-new/patches/patch-base_strings_safe__sprintf.cc
	chromium-new/patches/patch-base_sys__info__freebsd.cc
	chromium-new/patches/patch-base_sys__info__netbsd.cc
	chromium-new/patches/patch-base_sys__info__posix.cc
	chromium-new/patches/patch-base_test_launcher_test__launcher.cc
	chromium-new/patches/patch-base_threading_platform__thread__posix.cc
	chromium-new/patches/patch-base_trace__event_process__memory__dump.cc
	chromium-new/patches/patch-base_trace__event_process__memory__dump.h
	chromium-new/patches/patch-cc_layers_scrollbar__layer__impl__base.cc
	chromium-new/patches/patch-cc_trees_property__tree.cc
	chromium-new/patches/patch-chrome_app_chrome__main__delegate.cc
	chromium-new/patches/patch-chrome_app_chrome__main__delegate.h
	chromium-new/patches/patch-chrome_app_chromium__strings.grd
	chromium-new/patches/patch-chrome_app_generated__resources.grd
	chromium-new/patches/patch-chrome_app_resources_locale__settings.grd
	chromium-new/patches/patch-chrome_browser_about__flags.cc
	chromium-new/patches/patch-chrome_browser_browser__resources.grd
	chromium-new/patches/patch-chrome_browser_chrome__browser__main.cc
	chromium-new/patches/patch-chrome_browser_chrome__browser__main__linux.cc
	chromium-new/patches/patch-chrome_browser_chrome__browser__main__posix.cc
	chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.cc
	chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.h
	chromium-new/patches/patch-chrome_browser_defaults.cc
	chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc
	chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
	chromium-new/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
	chromium-new/patches/patch-chrome_browser_download_download__commands.cc
	chromium-new/patches/patch-chrome_browser_download_download__commands.h
	chromium-new/patches/patch-chrome_browser_download_download__prefs.cc
	chromium-new/patches/patch-chrome_browser_download_download__prefs.h
	chromium-new/patches/patch-chrome_browser_download_download__query.cc
	chromium-new/patches/patch-chrome_browser_download_download__shelf__context__menu.cc
	chromium-new/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc
	chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc
	chromium-new/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
	chromium-new/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc
	chromium-new/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc
	chromium-new/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
	chromium-new/patches/patch-chrome_browser_extensions_external__provider__impl.cc
	chromium-new/patches/patch-chrome_browser_gpu_gl__string__manager.cc
	chromium-new/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc
	chromium-new/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc
	chromium-new/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
	chromium-new/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
	chromium-new/patches/patch-chrome_browser_media_webrtc__log__uploader.cc
	chromium-new/patches/patch-chrome_browser_memory__details.cc
	chromium-new/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
	chromium-new/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc
	chromium-new/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
	chromium-new/patches/patch-chrome_browser_plugins_plugins__resource__service.cc
	chromium-new/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc
	chromium-new/patches/patch-chrome_browser_process__singleton__posix.cc
	chromium-new/patches/patch-chrome_browser_renderer__preferences__util.cc
	chromium-new/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
	chromium-new/patches/patch-chrome_browser_search_local__files__ntp__source.cc
	chromium-new/patches/patch-chrome_browser_sync_chrome__sync__client.cc
	chromium-new/patches/patch-chrome_browser_tracing_crash__service__uploader.cc
	chromium-new/patches/patch-chrome_browser_ui_browser__command__controller.cc
	chromium-new/patches/patch-chrome_browser_ui_browser__view__prefs.cc
	chromium-new/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
	chromium-new/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
	chromium-new/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
	chromium-new/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc
	chromium-new/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
	chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc
	chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
	chromium-new/patches/patch-chrome_browser_ui_views_first__run__dialog.cc
	chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
	chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
	chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
	chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
	chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
	chromium-new/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
	chromium-new/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc
	chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
	chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc
	chromium-new/patches/patch-chrome_browser_ui_webui_about__ui.cc
	chromium-new/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
	chromium-new/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
	chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc
	chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h
	chromium-new/patches/patch-chrome_browser_web__applications_web__app.cc
	chromium-new/patches/patch-chrome_browser_web__applications_web__app.h
	chromium-new/patches/patch-chrome_common_chrome__paths.cc
	chromium-new/patches/patch-chrome_common_chrome__paths.h
	chromium-new/patches/patch-chrome_common_chrome__paths__internal.h
	chromium-new/patches/patch-chrome_common_chrome__switches.cc
	chromium-new/patches/patch-chrome_common_chrome__switches.h
	chromium-new/patches/patch-chrome_common_extensions_command.cc
	chromium-new/patches/patch-chrome_common_pref__names.cc
	chromium-new/patches/patch-chrome_common_pref__names.h
	chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc
	chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h
	chromium-new/patches/patch-chrome_test_base_in__process__browser__test.cc
	chromium-new/patches/patch-chrome_test_base_testing__browser__process.h
	chromium-new/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
	chromium-new/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
	chromium-new/patches/patch-components_autofill_core_browser_form__structure.cc
	chromium-new/patches/patch-components_cookie__config_cookie__store__util.cc
	chromium-new/patches/patch-components_dom__distiller_core_page__features.cc
	chromium-new/patches/patch-components_drive_drive__api__util.cc
	chromium-new/patches/patch-components_feedback_anonymizer__tool.cc
	chromium-new/patches/patch-components_flags__ui_flags__state.cc
	chromium-new/patches/patch-components_json__schema_json__schema__validator.cc
	chromium-new/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc
	chromium-new/patches/patch-components_metrics_drive__metrics__provider__linux.cc
	chromium-new/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc
	chromium-new/patches/patch-components_neterror_resources_neterror.js
	chromium-new/patches/patch-components_password__manager_core_browser_import_csv__reader.cc
	chromium-new/patches/patch-components_plugins_renderer_plugin__placeholder.cc
	chromium-new/patches/patch-components_policy_core_common_schema.cc
	chromium-new/patches/patch-components_policy_resources_policy__templates.json
	chromium-new/patches/patch-components_policy_tools_generate__policy__source.py
	chromium-new/patches/patch-components_storage__monitor_storage__monitor.cc
	chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc
	chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.h
	chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc
	chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.h
	chromium-new/patches/patch-components_update__client_update__query__params.cc
	chromium-new/patches/patch-components_url__matcher_regex__set__matcher.cc
	chromium-new/patches/patch-components_url__matcher_url__matcher__factory.cc
	chromium-new/patches/patch-components_webcrypto_algorithms_test__helpers.cc
	chromium-new/patches/patch-content_app_content__main__runner.cc
	chromium-new/patches/patch-content_browser_accessibility_browser__accessibility.h
	chromium-new/patches/patch-content_browser_accessibility_browser__accessibility__manager.h
	chromium-new/patches/patch-content_browser_browser__main__loop.cc
	chromium-new/patches/patch-content_browser_child__process__launcher.cc
	chromium-new/patches/patch-content_browser_download_base__file.cc
	chromium-new/patches/patch-content_browser_download_base__file__linux.cc
	chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
	chromium-new/patches/patch-content_browser_gpu_gpu__internals__ui.cc
	chromium-new/patches/patch-content_browser_indexed__db_indexed__db__backing__store.cc
	chromium-new/patches/patch-content_browser_ppapi__plugin__process__host.cc
	chromium-new/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
	chromium-new/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
	chromium-new/patches/patch-content_browser_time__zone__monitor.cc
	chromium-new/patches/patch-content_browser_time__zone__monitor__linux.cc
	chromium-new/patches/patch-content_browser_utility__process__host__impl.cc
	chromium-new/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc
	chromium-new/patches/patch-content_common_set__process__title__linux.cc
	chromium-new/patches/patch-content_common_set__process__title__linux.h
	chromium-new/patches/patch-content_gpu_gpu__child__thread.cc
	chromium-new/patches/patch-content_gpu_gpu__main.cc
	chromium-new/patches/patch-content_public_common_content__switches.cc
	chromium-new/patches/patch-content_public_common_content__switches.h
	chromium-new/patches/patch-content_public_test_browser__test__base.cc
	chromium-new/patches/patch-content_renderer_devtools_v8__sampling__profiler.cc
	chromium-new/patches/patch-content_renderer_render__thread__impl.cc
	chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.cc
	chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.h
	chromium-new/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
	chromium-new/patches/patch-content_renderer_webscrollbarbehavior__impl__gtkoraura.cc
	chromium-new/patches/patch-content_shell_browser_shell__browser__context.cc
	chromium-new/patches/patch-content_shell_browser_shell__browser__main__parts.cc
	chromium-new/patches/patch-crypto_nss__util.cc
	chromium-new/patches/patch-device_serial_serial__io__handler__posix.cc
	chromium-new/patches/patch-device_serial_serial__service__impl.cc
	chromium-new/patches/patch-device_usb_usb__context.cc
	chromium-new/patches/patch-device_usb_usb__context__unittest.cc
	chromium-new/patches/patch-device_usb_usb__device__handle__impl.cc
	chromium-new/patches/patch-device_usb_usb__device__handle__impl.h
	chromium-new/patches/patch-device_usb_usb__device__impl.cc
	chromium-new/patches/patch-device_usb_usb__error.cc
	chromium-new/patches/patch-device_usb_usb__service__impl.cc
	chromium-new/patches/patch-device_usb_usb__service__impl.h
	chromium-new/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc
	chromium-new/patches/patch-extensions_browser_api_serial_serial__api.cc
	chromium-new/patches/patch-extensions_browser_api_web__request_form__data__parser.cc
	chromium-new/patches/patch-extensions_common_image__util.cc
	chromium-new/patches/patch-extensions_common_stack__frame.cc
	chromium-new/patches/patch-gpu_command__buffer_service_program__manager.cc
	chromium-new/patches/patch-gpu_config_gpu__control__list.cc
	chromium-new/patches/patch-gpu_config_gpu__control__list__unittest.cc
	chromium-new/patches/patch-gpu_config_gpu__info__collector.cc
	chromium-new/patches/patch-gpu_config_gpu__test__config.cc
	chromium-new/patches/patch-ipc_ipc__message__utils.cc
	chromium-new/patches/patch-ipc_ipc__message__utils.h
	chromium-new/patches/patch-ipc_unix__domain__socket__util.cc
	chromium-new/patches/patch-media_audio_alsa_audio__manager__alsa.cc
	chromium-new/patches/patch-media_audio_audio__manager.cc
	chromium-new/patches/patch-media_audio_audio__manager.h
	chromium-new/patches/patch-media_base_audio__splicer.cc
	chromium-new/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
	chromium-new/patches/patch-media_capture_video_file__video__capture__device__factory.cc
	chromium-new/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
	chromium-new/patches/patch-media_capture_video_video__capture__device__factory.cc
	chromium-new/patches/patch-media_filters_decrypting__audio__decoder.cc
	chromium-new/patches/patch-media_filters_vp9__parser.h
	chromium-new/patches/patch-media_formats_common_offset__byte__queue.cc
	chromium-new/patches/patch-media_formats_common_offset__byte__queue.h
	chromium-new/patches/patch-media_formats_mp2t_es__parser__adts.cc
	chromium-new/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc
	chromium-new/patches/patch-net_base_address__tracker__linux.cc
	chromium-new/patches/patch-net_base_address__tracker__linux.h
	chromium-new/patches/patch-net_base_address__tracker__linux__unittest.cc
	chromium-new/patches/patch-net_base_mime__util__unittest.cc
	chromium-new/patches/patch-net_base_network__change__notifier.cc
	chromium-new/patches/patch-net_base_network__interfaces__linux.cc
	chromium-new/patches/patch-net_base_network__interfaces__posix.cc
	chromium-new/patches/patch-net_dns_address__sorter__posix.cc
	chromium-new/patches/patch-net_dns_dns__config__service__posix__unittest.cc
	chromium-new/patches/patch-net_dns_dns__reloader.cc
	chromium-new/patches/patch-net_dns_dns__session.cc
	chromium-new/patches/patch-net_http_http__auth__gssapi__posix.cc
	chromium-new/patches/patch-net_net.gyp
	chromium-new/patches/patch-net_proxy_proxy__config__service__linux.cc
	chromium-new/patches/patch-net_proxy_proxy__service.cc
	chromium-new/patches/patch-net_socket_socks5__client__socket.cc
	chromium-new/patches/patch-net_udp_udp__socket__posix.cc
	chromium-new/patches/patch-net_udp_udp__socket__unittest.cc
	chromium-new/patches/patch-pdf_pdfium_pdfium__engine.cc
	chromium-new/patches/patch-ppapi_proxy_file__io__resource.cc
	chromium-new/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc
	chromium-new/patches/patch-skia_ext_SkMemory__new__handler.cpp
	chromium-new/patches/patch-skia_ext_platform__canvas.h
	chromium-new/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h
	chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h
	chromium-new/patches/patch-third__party_boringssl_src_include_openssl_thread.h
	chromium-new/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h
	chromium-new/patches/patch-third__party_ffmpeg_chromium_scripts_generate__gyp.py
	chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
	chromium-new/patches/patch-third__party_leveldatabase_env__chromium.cc
	chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
	chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
	chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
	chromium-new/patches/patch-third__party_libyuv_include_libyuv_row.h
	chromium-new/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc
	chromium-new/patches/patch-third__party_ots_include_opentype-sanitiser.h
	chromium-new/patches/patch-third__party_pdfium_core_fxcrt_include_fx__system.h
	chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
	chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
	chromium-new/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
	chromium-new/patches/patch-third__party_webrtc_base_httpcommon.cc
	chromium-new/patches/patch-third__party_webrtc_base_ifaddrs__converter.h
	chromium-new/patches/patch-third__party_webrtc_base_ipaddress.h
	chromium-new/patches/patch-third__party_webrtc_base_linux.cc
	chromium-new/patches/patch-third__party_webrtc_base_linux.h
	chromium-new/patches/patch-third__party_webrtc_base_network.cc
	chromium-new/patches/patch-third__party_webrtc_base_network.h
	chromium-new/patches/patch-third__party_webrtc_base_physicalsocketserver.cc
	chromium-new/patches/patch-third__party_webrtc_base_platform__thread.cc
	chromium-new/patches/patch-third__party_webrtc_base_stringutils.h
	chromium-new/patches/patch-third__party_webrtc_base_systeminfo.cc
	chromium-new/patches/patch-third__party_webrtc_common__audio_wav__file.h
	chromium-new/patches/patch-third__party_webrtc_modules_remote__bitrate__estimator_overuse__detector.cc
	chromium-new/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc
	chromium-new/patches/patch-third__party_webrtc_modules_video__coding_receiver.cc
	chromium-new/patches/patch-ui_accessibility_platform_ax__platform__node.h
	chromium-new/patches/patch-ui_app__list_app__list__constants.cc
	chromium-new/patches/patch-ui_app__list_app__list__constants.h
	chromium-new/patches/patch-ui_app__list_app__list__menu.cc
	chromium-new/patches/patch-ui_app__list_views_app__list__view.cc
	chromium-new/patches/patch-ui_base_BUILD.gn
	chromium-new/patches/patch-ui_base_ime_ime__engine__handler__interface.h
	chromium-new/patches/patch-ui_base_ime_input__method__factory.cc
	chromium-new/patches/patch-ui_base_ime_input__method__initializer.cc
	chromium-new/patches/patch-ui_base_resource_resource__bundle.cc
	chromium-new/patches/patch-ui_base_webui_web__ui__util.cc
	chromium-new/patches/patch-ui_events_event__switches.cc
	chromium-new/patches/patch-ui_events_event__switches.h
	chromium-new/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
	chromium-new/patches/patch-ui_gfx_canvas__skia.cc
	chromium-new/patches/patch-ui_gfx_font__fallback__linux.cc
	chromium-new/patches/patch-ui_gfx_font__render__params.h
	chromium-new/patches/patch-ui_gfx_render__text.cc
	chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.cc
	chromium-new/patches/patch-ui_message__center_message__center__style.h
	chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.cc
	chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.h
	chromium-new/patches/patch-ui_resources_ui__resources.grd
	chromium-new/patches/patch-ui_views_accessibility_native__view__accessibility.h
	chromium-new/patches/patch-ui_views_controls_textfield_textfield.cc
	chromium-new/patches/patch-ui_views_examples_widget__example.cc
	chromium-new/patches/patch-ui_views_style_platform__style.cc
	chromium-new/patches/patch-ui_views_views__delegate.cc
	chromium-new/patches/patch-ui_views_views__delegate.h
	chromium-new/patches/patch-ui_views_views__switches.cc
	chromium-new/patches/patch-ui_views_window_custom__frame__view.cc
	chromium-new/patches/patch-ui_views_window_dialog__delegate.cc
	chromium-new/patches/patch-ui_webui_resources_js_cr.js
	chromium-new/patches/patch-v8_src_base_platform_platform-posix.cc
	chromium-new/patches/patch-v8_src_base_platform_platform.h
	chromium-new/patches/patch-v8_tools_run-llprof.sh
Added Files:
	chromium-new/options.mk
	chromium-new/patches/patch-BUILD.gn
	chromium-new/patches/patch-base_BUILD.gn
	chromium-new/patches/patch-base_allocator_BUILD.gn
	chromium-new/patches/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
	chromium-new/patches/patch-base_allocator_allocator__shim__override__libc__symbols.h
	chromium-new/patches/patch-base_allocator_allocator__shim__unittest.cc
	chromium-new/patches/patch-base_debug_proc__maps__linux.cc
	chromium-new/patches/patch-base_files_file__path__unittest.cc
	chromium-new/patches/patch-base_files_file__util.h
	chromium-new/patches/patch-base_native__library__posix.cc
	chromium-new/patches/patch-base_process_process__handle__freebsd.cc
	chromium-new/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
	chromium-new/patches/patch-base_test_BUILD.gn
	chromium-new/patches/patch-base_test_test__file__util__posix.cc
	chromium-new/patches/patch-base_third__party_libevent_BUILD.gn
	chromium-new/patches/patch-base_third__party_libevent_event-config.h
	chromium-new/patches/patch-base_third__party_libevent_netbsd_config.h
	chromium-new/patches/patch-base_third__party_libevent_netbsd_event-config.h
	chromium-new/patches/patch-base_threading_platform__thread__netbsd.cc
	chromium-new/patches/patch-base_trace__event_malloc__dump__provider.cc
	chromium-new/patches/patch-breakpad_BUILD.gn
	chromium-new/patches/patch-build_config_BUILD.gn
	chromium-new/patches/patch-build_config_BUILDCONFIG.gn
	chromium-new/patches/patch-build_config_allocator.gni
	chromium-new/patches/patch-build_config_clang_BUILD.gn
	chromium-new/patches/patch-build_config_compiler_BUILD.gn
	chromium-new/patches/patch-build_config_crypto.gni
	chromium-new/patches/patch-build_config_features.gni
	chromium-new/patches/patch-build_config_linux_gtk2_BUILD.gn
	chromium-new/patches/patch-build_config_linux_gtk3_BUILD.gn
	chromium-new/patches/patch-build_config_linux_pkg-config.py
	chromium-new/patches/patch-build_config_sanitizers_BUILD.gn
	chromium-new/patches/patch-build_config_sanitizers_sanitizers.gni
	chromium-new/patches/patch-build_config_ui.gni
	chromium-new/patches/patch-build_linux_libpci_BUILD.gn
	chromium-new/patches/patch-build_secondary_third__party_nss_BUILD.gn
	chromium-new/patches/patch-build_toolchain_gcc__toolchain.gni
	chromium-new/patches/patch-build_toolchain_get__concurrent__links.py
	chromium-new/patches/patch-chrome_BUILD.gn
	chromium-new/patches/patch-chrome_app_chrome__command__ids.h
	chromium-new/patches/patch-chrome_browser_BUILD.gn
	chromium-new/patches/patch-chrome_browser_browser__process__impl.cc
	chromium-new/patches/patch-chrome_browser_browser__process__impl.h
	chromium-new/patches/patch-chrome_browser_extensions_BUILD.gn
	chromium-new/patches/patch-chrome_browser_platform__util.h
	chromium-new/patches/patch-chrome_browser_resources_safe__browsing_BUILD.gn
	chromium-new/patches/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
	chromium-new/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc
	chromium-new/patches/patch-chrome_browser_ui_BUILD.gn
	chromium-new/patches/patch-chrome_browser_ui_libgtk2ui_BUILD.gn
	chromium-new/patches/patch-chrome_common_BUILD.gn
	chromium-new/patches/patch-chrome_common_extensions_api_schemas.gni
	chromium-new/patches/patch-chrome_common_features.gni
	chromium-new/patches/patch-chrome_common_variations_BUILD.gn
	chromium-new/patches/patch-chrome_test_BUILD.gn
	chromium-new/patches/patch-chromecast_BUILD.gn
	chromium-new/patches/patch-chromecast_browser_BUILD.gn
	chromium-new/patches/patch-chromecast_browser_metrics_BUILD.gn
	chromium-new/patches/patch-chromecast_crash_BUILD.gn
	chromium-new/patches/patch-components_BUILD.gn
	chromium-new/patches/patch-components_arc_metrics_oom__kills__monitor.cc
	chromium-new/patches/patch-components_autofill_core_browser_address__rewriter.cc
	chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.cc
	chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.h
	chromium-new/patches/patch-components_crash_content_app_BUILD.gn
	chromium-new/patches/patch-components_crash_content_browser_BUILD.gn
	chromium-new/patches/patch-components_gcm__driver_gcm__client.h
	chromium-new/patches/patch-components_gcm__driver_gcm__client__impl.cc
	chromium-new/patches/patch-components_metrics_BUILD.gn
	chromium-new/patches/patch-components_os__crypt_os__crypt.h
	chromium-new/patches/patch-components_plugins_renderer_BUILD.gn
	chromium-new/patches/patch-components_policy_BUILD.gn
	chromium-new/patches/patch-components_storage__monitor_BUILD.gn
	chromium-new/patches/patch-components_sync_base_get__session__name__linux.cc
	chromium-new/patches/patch-components_variations_proto_study.proto
	chromium-new/patches/patch-content_app_BUILD.gn
	chromium-new/patches/patch-content_browser_BUILD.gn
	chromium-new/patches/patch-content_browser_device__sensors_data__fetcher__shared__memory.h
	chromium-new/patches/patch-content_browser_devtools_protocol_color__picker.cc
	chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
	chromium-new/patches/patch-content_browser_gpu_gpu__process__host.cc
	chromium-new/patches/patch-content_browser_media_media__internals.cc
	chromium-new/patches/patch-content_browser_renderer__host_media_video__capture__device__client.cc
	chromium-new/patches/patch-content_browser_tracing_tracing__controller__impl.cc
	chromium-new/patches/patch-content_common_BUILD.gn
	chromium-new/patches/patch-content_gpu_BUILD.gn
	chromium-new/patches/patch-content_public_common_child__process__host.h
	chromium-new/patches/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
	chromium-new/patches/patch-content_shell_BUILD.gn
	chromium-new/patches/patch-content_test_BUILD.gn
	chromium-new/patches/patch-device_BUILD.gn
	chromium-new/patches/patch-device_battery_BUILD.gn
	chromium-new/patches/patch-device_geolocation_BUILD.gn
	chromium-new/patches/patch-device_geolocation_location__arbitrator__impl.cc
	chromium-new/patches/patch-device_hid_BUILD.gn
	chromium-new/patches/patch-device_media__transfer__protocol_media__transfer__protocol__manager.h
	chromium-new/patches/patch-device_serial_BUILD.gn
	chromium-new/patches/patch-extensions_browser_BUILD.gn
	chromium-new/patches/patch-gpu_BUILD.gn
	chromium-new/patches/patch-gpu_config_BUILD.gn
	chromium-new/patches/patch-gpu_gles2__conform__support_BUILD.gn
	chromium-new/patches/patch-gpu_gles2__conform__support_native_BUILD.gn
	chromium-new/patches/patch-gpu_ipc_client_BUILD.gn
	chromium-new/patches/patch-gpu_ipc_service_BUILD.gn
	chromium-new/patches/patch-gpu_tools_compositor__model__bench_BUILD.gn
	chromium-new/patches/patch-gpu_vulkan_BUILD.gn
	chromium-new/patches/patch-ipc_ipc__channel.h
	chromium-new/patches/patch-ipc_ipc__channel__posix.cc
	chromium-new/patches/patch-ipc_ipc__channel__posix.h
	chromium-new/patches/patch-media_audio_BUILD.gn
	chromium-new/patches/patch-media_base_BUILD.gn
	chromium-new/patches/patch-media_capture_BUILD.gn
	chromium-new/patches/patch-media_cast_BUILD.gn
	chromium-new/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni
	chromium-new/patches/patch-mojo_BUILD.gn
	chromium-new/patches/patch-mojo_edk_test_BUILD.gn
	chromium-new/patches/patch-native__client__sdk_src_BUILD.gn
	chromium-new/patches/patch-net_BUILD.gn
	chromium-new/patches/patch-net_base_network__change__notifier.h
	chromium-new/patches/patch-ppapi_tests_extensions_BUILD.gn
	chromium-new/patches/patch-printing_BUILD.gn
	chromium-new/patches/patch-printing_cups__config__helper.py
	chromium-new/patches/patch-remoting_host_BUILD.gn
	chromium-new/patches/patch-sdch_BUILD.gn
	chromium-new/patches/patch-services_shell_standalone_context.cc
	chromium-new/patches/patch-services_ui_ws_BUILD.gn
	chromium-new/patches/patch-skia_BUILD.gn
	chromium-new/patches/patch-third__party_WebKit_Source_core_BUILD.gn
	chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h
	chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_wtf_Atomics.h
	chromium-new/patches/patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h
	chromium-new/patches/patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp
	chromium-new/patches/patch-third__party_angle_src_tests_BUILD.gn
	chromium-new/patches/patch-third__party_boringssl_BUILD.gn
	chromium-new/patches/patch-third__party_cython_rules.gni
	chromium-new/patches/patch-third__party_expat_BUILD.gn
	chromium-new/patches/patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h
	chromium-new/patches/patch-third__party_fontconfig_BUILD.gn
	chromium-new/patches/patch-third__party_freetype2_BUILD.gn
	chromium-new/patches/patch-third__party_glslang_BUILD.gn
	chromium-new/patches/patch-third__party_harfbuzz-ng_BUILD.gn
	chromium-new/patches/patch-third__party_icu_android_patch__locale.sh
	chromium-new/patches/patch-third__party_icu_source_configure
	chromium-new/patches/patch-third__party_libusb_BUILD.gn
	chromium-new/patches/patch-third__party_mesa_BUILD.gn
	chromium-new/patches/patch-third__party_minigbm_BUILD.gn
	chromium-new/patches/patch-third__party_opus_BUILD.gn
	chromium-new/patches/patch-third__party_pdfium_skia_BUILD.gn
	chromium-new/patches/patch-third__party_protobuf_post__process__dist.sh
	chromium-new/patches/patch-third__party_sqlite_BUILD.gn
	chromium-new/patches/patch-third__party_swiftshader_third__party_LLVM_utils_buildit_build__llvm
	chromium-new/patches/patch-third__party_usrsctp_BUILD.gn
	chromium-new/patches/patch-third__party_webrtc_BUILD.gn
	chromium-new/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn
	chromium-new/patches/patch-third__party_widevine_cdm_BUILD.gn
	chromium-new/patches/patch-third__party_widevine_cdm_stub_widevine__cdm__version.h
	chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal
	chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal.in
	chromium-new/patches/patch-third__party_yasm_BUILD.gn
	chromium-new/patches/patch-third__party_zlib_BUILD.gn
	chromium-new/patches/patch-tools_battor__agent_BUILD.gn
	chromium-new/patches/patch-tools_gn_args.cc
	chromium-new/patches/patch-tools_gn_bootstrap_bootstrap.py
	chromium-new/patches/patch-tools_gn_gn__unittests.isolate
	chromium-new/patches/patch-ui_app__list_views_app__list__item__view.cc
	chromium-new/patches/patch-ui_aura_BUILD.gn
	chromium-new/patches/patch-ui_base_ime_BUILD.gn
	chromium-new/patches/patch-ui_base_ui__features.gni
	chromium-new/patches/patch-ui_compositor_BUILD.gn
	chromium-new/patches/patch-ui_gfx_BUILD.gn
	chromium-new/patches/patch-ui_gl_BUILD.gn
	chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.h
	chromium-new/patches/patch-ui_message__center_views_message__view__factory.cc
	chromium-new/patches/patch-ui_views_BUILD.gn
	chromium-new/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc
	chromium-new/patches/patch-ui_views_controls_webview_BUILD.gn
	chromium-new/patches/patch-ui_webui_resources_js_icon.js
	chromium-new/patches/patch-v8_BUILD.gn
	chromium-new/patches/patch-v8_src_base_platform_platform-netbsd.cc
Removed Files:
	chromium-new/patches/patch-base_base.gyp
	chromium-new/patches/patch-base_base.gypi
	chromium-new/patches/patch-base_files_file__path__watcher__kqueue.cc
	chromium-new/patches/patch-base_i18n_icu__util.cc
	chromium-new/patches/patch-base_i18n_icu__util.h
	chromium-new/patches/patch-base_process_memory.cc
	chromium-new/patches/patch-base_threading_platform__thread__linux.cc
	chromium-new/patches/patch-build_build__config.h
	chromium-new/patches/patch-build_common.gypi
	chromium-new/patches/patch-build_filename__rules.gypi
	chromium-new/patches/patch-build_linux_system.gyp
	chromium-new/patches/patch-build_linux_unbundle_libwebp.gyp
	chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
	chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.h
	chromium-new/patches/patch-chrome_browser_extensions_window__open__apitest.cc
	chromium-new/patches/patch-chrome_browser_ui_panels_panel__manager.cc
	chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__root__view.cc
	chromium-new/patches/patch-chrome_browser_ui_views_panels_panel__frame__view.cc
	chromium-new/patches/patch-chrome_chrome__browser.gypi
	chromium-new/patches/patch-chrome_chrome__browser__extensions.gypi
	chromium-new/patches/patch-chrome_chrome__browser__ui.gypi
	chromium-new/patches/patch-chrome_chrome__common.gypi
	chromium-new/patches/patch-chrome_chrome__exe.gypi
	chromium-new/patches/patch-chrome_common_channel__info__posix.cc
	chromium-new/patches/patch-chrome_common_component__flash__hint__file__linux.h
	chromium-new/patches/patch-chrome_common_extensions_api_schemas.gypi
	chromium-new/patches/patch-chrome_common_variations_fieldtrial__testing__config.gyp
	chromium-new/patches/patch-components_storage__monitor.gypi
	chromium-new/patches/patch-content_browser_browser__shutdown__profile__dumper.cc
	chromium-new/patches/patch-content_browser_geolocation_location__arbitrator__impl.cc
	chromium-new/patches/patch-content_browser_geolocation_wifi__data__provider__freebsd.cc
	chromium-new/patches/patch-content_browser_geolocation_wifi__data__provider__freebsd.h
	chromium-new/patches/patch-content_browser_web__contents_web__contents__impl.cc
	chromium-new/patches/patch-content_content__browser.gypi
	chromium-new/patches/patch-content_content__common.gypi
	chromium-new/patches/patch-content_content__tests.gypi
	chromium-new/patches/patch-content_public_common_child__process__sandbox__support__linux.h
	chromium-new/patches/patch-content_renderer_media_webrtc__audio__capturer.cc
	chromium-new/patches/patch-device_hid_hid.gyp
	chromium-new/patches/patch-device_serial_serial.gyp
	chromium-new/patches/patch-device_usb_usb.gyp
	chromium-new/patches/patch-gpu_command__buffer_service_error__state.cc
	chromium-new/patches/patch-gpu_gpu__config.gypi
	chromium-new/patches/patch-gpu_gpu__ipc__service.gypi
	chromium-new/patches/patch-media_audio_audio__output__device.cc
	chromium-new/patches/patch-media_audio_audio__output__stream__sink.cc
	chromium-new/patches/patch-media_base_audio__renderer__mixer.cc
	chromium-new/patches/patch-media_base_audio__renderer__mixer__input.cc
	chromium-new/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
	chromium-new/patches/patch-media_capture_video_linux_v4l2__capture__delegate.h
	chromium-new/patches/patch-media_capture_video_linux_video__capture__device__factory__linux.cc
	chromium-new/patches/patch-media_capture_video_video__capture__device.cc
	chromium-new/patches/patch-media_capture_video_video__capture__device.h
	chromium-new/patches/patch-media_filters_audio__clock.cc
	chromium-new/patches/patch-media_filters_audio__clock.h
	chromium-new/patches/patch-media_filters_file__data__source.h
	chromium-new/patches/patch-media_media.gyp
	chromium-new/patches/patch-mojo_shell_public_cpp_initialize__base__and__icu.cc
	chromium-new/patches/patch-mojo_shell_runner_init.cc
	chromium-new/patches/patch-native__client_build_common.gypi
	chromium-new/patches/patch-native__client_src_shared_platform_platform.gyp
	chromium-new/patches/patch-net_dns_dns__config_-service__posix.cc
	chromium-new/patches/patch-net_dns_host__resolver__impl.cc
	chromium-new/patches/patch-net_dns_host__resolver__proc.cc
	chromium-new/patches/patch-net_net.gypi
	chromium-new/patches/patch-net_net__common.gypi
	chromium-new/patches/patch-net_quic_congestion__control_rtt__stats.cc
	chromium-new/patches/patch-printing_printing.gyp
	chromium-new/patches/patch-remoting_remoting__host.gypi
	chromium-new/patches/patch-skia_skia__chrome.gypi
	chromium-new/patches/patch-skia_skia__common.gypi
	chromium-new/patches/patch-sync_util_get__session__name.cc
	chromium-new/patches/patch-sync_util_get__session__name__linux.cc
	chromium-new/patches/patch-testing_gtest_src_gtest.cc
	chromium-new/patches/patch-testing_perf_perf__test.cc
	chromium-new/patches/patch-third__party_WebKit_Source_core_core.gyp
	chromium-new/patches/patch-third__party_WebKit_Source_modules_battery_battery__status.h
	chromium-new/patches/patch-third__party_WebKit_Source_platform_blink__platform.gyp
	chromium-new/patches/patch-third__party_WebKit_Source_platform_image-decoders_png_PNGImageDecoder.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_platform_text_Character.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_platform_text_CharacterPropertyDataGenerator.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_web_web.gyp
	chromium-new/patches/patch-third__party_WebKit_Source_wtf_wtf.gyp
	chromium-new/patches/patch-third__party_boringssl_src_crypto_bio_internal.h
	chromium-new/patches/patch-third__party_boringssl_src_crypto_cipher_e__chacha20poly1305.c
	chromium-new/patches/patch-third__party_boringssl_src_crypto_internal.h
	chromium-new/patches/patch-third__party_boringssl_src_crypto_mem.c
	chromium-new/patches/patch-third__party_boringssl_src_crypto_poly1305_poly1305__vec.c
	chromium-new/patches/patch-third__party_ffmpeg_ffmpeg.gyp
	chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gypi
	chromium-new/patches/patch-third__party_ffmpeg_libavutil_autorename__libavutil__cpu.c
	chromium-new/patches/patch-third__party_ffmpeg_libavutil_cpu.c
	chromium-new/patches/patch-third__party_ffmpeg_libavutil_mem.c
	chromium-new/patches/patch-third__party_khronos_khronos.gyp
	chromium-new/patches/patch-third__party_libXNVCtrl_libXNVCtrl.gyp
	chromium-new/patches/patch-third__party_libjingle_libjingle.gyp
	chromium-new/patches/patch-third__party_libphonenumber_libphonenumber.gyp
	chromium-new/patches/patch-third__party_libpng_libpng.gyp
	chromium-new/patches/patch-third__party_mesa_src_src_mesa_main_arrayobj.c
	chromium-new/patches/patch-third__party_pdfium_build_standalone.gypi
	chromium-new/patches/patch-third__party_pdfium_pdfium.gyp
	chromium-new/patches/patch-third__party_pdfium_third__party_base_logging.h
	chromium-new/patches/patch-third__party_sfntly_sfntly.gyp
	chromium-new/patches/patch-third__party_skia_src_opts_opts__check__x86.cpp
	chromium-new/patches/patch-third__party_sqlite_sqlite.gyp
	chromium-new/patches/patch-third__party_usrsctp_usrsctp.gyp
	chromium-new/patches/patch-third__party_webrtc_build_common.gypi
	chromium-new/patches/patch-third__party_webrtc_modules_audio__device_audio__device.gypi
	chromium-new/patches/patch-third__party_webrtc_modules_desktop__capture_desktop__capture.gypi
	chromium-new/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__posix.cc
	chromium-new/patches/patch-third__party_webrtc_voice__engine_voice__engine__defines.h
	chromium-new/patches/patch-tools_gyp_pylib_gyp_generator_make.py
	chromium-new/patches/patch-tools_gyp_test_additional-targets_src_dir1_actions.gyp
	chromium-new/patches/patch-tools_gyp_test_library_src_library.gyp
	chromium-new/patches/patch-ui_accessibility_accessibility.gyp
	chromium-new/patches/patch-ui_base_ui__base.gyp
	chromium-new/patches/patch-ui_gfx_codec_jpeg__codec.cc
	chromium-new/patches/patch-ui_gfx_color__utils.cc
	chromium-new/patches/patch-ui_gl_gl.gyp
	chromium-new/patches/patch-ui_gl_gl__gl__api__implementation.cc
	chromium-new/patches/patch-ui_gl_gl__implementation__x11.cc
	chromium-new/patches/patch-ui_gl_gl__surface__glx.cc
	chromium-new/patches/patch-ui_message__center_views_message__center__view.cc
	chromium-new/patches/patch-ui_message__center_views_notification__view.cc
	chromium-new/patches/patch-ui_views_bubble_bubble__delegate.cc
	chromium-new/patches/patch-ui_views_controls_button_label__button.cc
	chromium-new/patches/patch-ui_views_controls_scrollbar_base__scroll__bar.cc
	chromium-new/patches/patch-ui_views_controls_webview_webview.gyp
	chromium-new/patches/patch-ui_views_views.gyp
	chromium-new/patches/patch-ui_webui_resources_js_util.js
	chromium-new/patches/patch-v8_src_compiler_graph-visualizer.cc
	chromium-new/patches/patch-v8_src_compiler_graph-visualizer.h
	chromium-new/patches/patch-v8_src_log-utils.h

Log Message:
Update to 54.0.2840.100

* Audio playback has problem.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4297afb3162728bba8bd4a1c8db61c3f60a695e6

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 chromium-new/Makefile                              | 415 +++++----
 chromium-new/PLIST                                 | 167 ++--
 chromium-new/TODO                                  |   3 -
 chromium-new/distinfo                              | 951 +++++++++++----------
 chromium-new/options.mk                            |  20 +
 chromium-new/patches/patch-BUILD.gn                | 166 ++++
 chromium-new/patches/patch-base_BUILD.gn           |  85 ++
 chromium-new/patches/patch-base_allocator_BUILD.gn |  14 +
 ...llocator__shim__default__dispatch__to__glibc.cc |  90 ++
 ...ator_allocator__shim__override__libc__symbols.h |  13 +
 ...tch-base_allocator_allocator__shim__unittest.cc |  63 ++
 chromium-new/patches/patch-base_base.gyp           |  25 -
 chromium-new/patches/patch-base_base.gypi          |  66 --
 .../patches/patch-base_base__paths__posix.cc       |   2 +-
 .../patches/patch-base_debug_debugger__posix.cc    |   2 +-
 .../patches/patch-base_debug_proc__maps__linux.cc  |  13 +
 .../patch-base_debug_stack__trace__posix.cc        |   6 +-
 .../patch-base_files_file__path__unittest.cc       |  13 +
 ...patch-base_files_file__path__watcher__kqueue.cc |  19 -
 .../patch-base_files_file__path__watcher__kqueue.h |   6 +-
 chromium-new/patches/patch-base_files_file__util.h |  13 +
 chromium-new/patches/patch-base_i18n_icu__util.cc  |  15 -
 chromium-new/patches/patch-base_i18n_icu__util.h   |  15 -
 chromium-new/patches/patch-base_linux__util.cc     |  13 +-
 .../patches/patch-base_native__library__posix.cc   |  13 +
 ...patch-base_posix_unix__domain__socket__linux.cc |  13 +-
 ..._posix_unix__domain__socket__linux__unittest.cc |   2 +-
 .../patches/patch-base_process_internal__linux.h   |   2 +-
 chromium-new/patches/patch-base_process_launch.cc  |  23 +-
 chromium-new/patches/patch-base_process_launch.h   |  10 +-
 .../patches/patch-base_process_launch__posix.cc    |   4 +-
 chromium-new/patches/patch-base_process_memory.cc  |  50 --
 chromium-new/patches/patch-base_process_memory.h   |  15 +-
 .../patches/patch-base_process_memory__stubs.cc    |   6 +-
 .../patches/patch-base_process_memory__unittest.cc |  29 +-
 .../patch-base_process_process__handle__freebsd.cc |  13 +
 .../patch-base_process_process__handle__netbsd.cc  |   5 +-
 .../patch-base_process_process__info__linux.cc     |   2 +-
 .../patches/patch-base_process_process__iterator.h |  14 +-
 ...atch-base_process_process__iterator__freebsd.cc |   2 +-
 ...patch-base_process_process__iterator__netbsd.cc |   2 +-
 .../patches/patch-base_process_process__metrics.h  |   9 +-
 ...patch-base_process_process__metrics__freebsd.cc |   8 +-
 .../patch-base_process_process__metrics__netbsd.cc |  10 +-
 .../patch-base_process_process__metrics__posix.cc  |  12 +-
 .../patches/patch-base_process_process__posix.cc   |  35 +-
 ...profiler_stack__sampling__profiler__unittest.cc |  13 +
 .../patches/patch-base_security__unittest.cc       |   2 +-
 .../patches/patch-base_strings_safe__sprintf.cc    |   2 +-
 .../patches/patch-base_sys__info__freebsd.cc       |  21 +-
 .../patches/patch-base_sys__info__netbsd.cc        |  47 +-
 .../patches/patch-base_sys__info__posix.cc         |  15 +-
 chromium-new/patches/patch-base_test_BUILD.gn      |  13 +
 .../patch-base_test_launcher_test__launcher.cc     |   4 +-
 .../patch-base_test_test__file__util__posix.cc     |  13 +
 .../patch-base_third__party_libevent_BUILD.gn      |  17 +
 ...patch-base_third__party_libevent_event-config.h |  13 +
 ...atch-base_third__party_libevent_netbsd_config.h | 271 ++++++
 ...ase_third__party_libevent_netbsd_event-config.h | 289 +++++++
 ...patch-base_threading_platform__thread__linux.cc |  23 -
 ...atch-base_threading_platform__thread__netbsd.cc | 102 +++
 ...patch-base_threading_platform__thread__posix.cc |   4 +-
 ...tch-base_trace__event_malloc__dump__provider.cc |  13 +
 ...atch-base_trace__event_process__memory__dump.cc |   4 +-
 ...patch-base_trace__event_process__memory__dump.h |   4 +-
 chromium-new/patches/patch-breakpad_BUILD.gn       |  23 +
 chromium-new/patches/patch-build_build__config.h   |  31 -
 chromium-new/patches/patch-build_common.gypi       | 137 ---
 chromium-new/patches/patch-build_config_BUILD.gn   |  22 +
 .../patches/patch-build_config_BUILDCONFIG.gn      | 146 ++++
 .../patches/patch-build_config_allocator.gni       |  13 +
 .../patches/patch-build_config_clang_BUILD.gn      |  22 +
 .../patches/patch-build_config_compiler_BUILD.gn   | 102 +++
 chromium-new/patches/patch-build_config_crypto.gni |  10 +
 .../patches/patch-build_config_features.gni        |  39 +
 .../patches/patch-build_config_linux_gtk2_BUILD.gn |  13 +
 .../patches/patch-build_config_linux_gtk3_BUILD.gn |  13 +
 .../patches/patch-build_config_linux_pkg-config.py |  28 +
 .../patches/patch-build_config_sanitizers_BUILD.gn |  22 +
 .../patch-build_config_sanitizers_sanitizers.gni   |  15 +
 chromium-new/patches/patch-build_config_ui.gni     |  45 +
 .../patches/patch-build_filename__rules.gypi       |  31 -
 .../patches/patch-build_linux_libpci_BUILD.gn      |  56 ++
 chromium-new/patches/patch-build_linux_system.gyp  |  18 -
 .../patches/patch-build_linux_unbundle_libwebp.gyp |  19 -
 ...patch-build_secondary_third__party_nss_BUILD.gn |  13 +
 .../patch-build_toolchain_gcc__toolchain.gni       |  50 ++
 ...patch-build_toolchain_get__concurrent__links.py |  19 +
 ...patch-cc_layers_scrollbar__layer__impl__base.cc |   4 +-
 .../patches/patch-cc_trees_property__tree.cc       |   4 +-
 chromium-new/patches/patch-chrome_BUILD.gn         |  31 +
 .../patch-chrome_app_chrome__command__ids.h        |  13 +
 .../patch-chrome_app_chrome__main__delegate.cc     |  18 +-
 .../patch-chrome_app_chrome__main__delegate.h      |   4 +-
 .../patches/patch-chrome_app_chromium__strings.grd |   4 +-
 .../patch-chrome_app_generated__resources.grd      |  61 +-
 ...patch-chrome_app_resources_locale__settings.grd |   2 +-
 chromium-new/patches/patch-chrome_browser_BUILD.gn |  54 ++
 .../patches/patch-chrome_browser_about__flags.cc   |   8 +-
 .../patch-chrome_browser_browser__process__impl.cc |  22 +
 .../patch-chrome_browser_browser__process__impl.h  |  13 +
 .../patch-chrome_browser_browser__resources.grd    |   4 +-
 .../patch-chrome_browser_chrome__browser__main.cc  |   6 +-
 ...-chrome_browser_chrome__browser__main__linux.cc |   6 +-
 ...-chrome_browser_chrome__browser__main__posix.cc |  10 +-
 ...ome_browser_chrome__content__browser__client.cc |  22 +-
 ...rome_browser_chrome__content__browser__client.h |   4 +-
 .../patches/patch-chrome_browser_defaults.cc       |   2 +-
 ...rome_browser_diagnostics_diagnostics__writer.cc |   2 +-
 ...hrome_browser_diagnostics_diagnostics__writer.h |   4 +-
 ...download_chrome__download__manager__delegate.cc |   6 +-
 ...h-chrome_browser_download_download__commands.cc |  10 +-
 ...ch-chrome_browser_download_download__commands.h |   4 +-
 ...atch-chrome_browser_download_download__prefs.cc |  16 +-
 ...patch-chrome_browser_download_download__prefs.h |   2 +-
 ...atch-chrome_browser_download_download__query.cc |   2 +-
 ...wser_download_download__shelf__context__menu.cc |   4 +-
 .../patch-chrome_browser_extensions_BUILD.gn       |  26 +
 ...owser_extensions_activity__log_activity__log.cc |   6 +-
 ..._writer__private_image__writer__private__api.cc |   4 +-
 ...writer__private_removable__storage__provider.cc |  18 -
 ..._writer__private_removable__storage__provider.h |  16 -
 ...ser_extensions_api_input__ime_input__ime__api.h |   2 +-
 ...er_extensions_api_messaging_message__service.cc |  12 +-
 ...pi_music__manager__private_device__id__linux.cc |   2 +-
 ..._browser__context__keyed__service__factories.cc |   6 +-
 ..._browser_extensions_external__provider__impl.cc |   6 +-
 ...ome_browser_extensions_window__open__apitest.cc |  13 -
 ...patch-chrome_browser_gpu_gl__string__manager.cc |   4 +-
 ...tch-chrome_browser_gpu_gpu__feature__checker.cc |   2 +-
 ...ser_interstitials_chrome__controller__client.cc |   2 +-
 ..._galleries_fileapi_mtp__device__map__service.cc |   4 +-
 ...dia__galleries_media__file__system__registry.cc |   2 +-
 ...h-chrome_browser_media_webrtc__log__uploader.cc |   2 +-
 .../patch-chrome_browser_memory__details.cc        |   2 +-
 ...chrome__browser__main__extra__parts__metrics.cc |   4 +-
 ...tions_message__center__notification__manager.cc |   6 +-
 ...d__manager_chrome__password__manager__client.cc |   8 +-
 .../patches/patch-chrome_browser_platform__util.h  |  13 +
 ...e_browser_plugins_plugins__resource__service.cc |   2 +-
 ...me_browser_policy_policy__prefs__browsertest.cc |   4 +-
 ...tch-chrome_browser_process__singleton__posix.cc |   6 +-
 ...h-chrome_browser_renderer__preferences__util.cc |  10 +-
 ...hrome_browser_resources_safe__browsing_BUILD.gn |  13 +
 ...ources_safe__browsing_gen__file__type__proto.py |  21 +
 ..._incident__reporting_incident__handler__util.cc |   2 +-
 ..._browser_safe__browsing_permission__reporter.cc |  13 +
 ...ome_browser_search_local__files__ntp__source.cc |   4 +-
 ...tch-chrome_browser_sync_chrome__sync__client.cc |   4 +-
 ...ome_browser_tracing_crash__service__uploader.cc |   4 +-
 .../patches/patch-chrome_browser_ui_BUILD.gn       |  13 +
 ...rome_browser_ui_browser__command__controller.cc |  12 +-
 ...patch-chrome_browser_ui_browser__view__prefs.cc |  12 +-
 ..._exclusive__access_exclusive__access__bubble.cc |   2 +-
 ...ui_input__method_input__method__engine__base.cc |   2 +-
 .../patch-chrome_browser_ui_libgtk2ui_BUILD.gn     |  13 +
 ...atch-chrome_browser_ui_panels_panel__manager.cc |  13 -
 ...browser_ui_startup_startup__browser__creator.cc |   4 +-
 ...h-chrome_browser_ui_toolbar_app__menu__model.cc |   4 +-
 ...pps_chrome__native__app__window__views__aura.cc |   2 +-
 ...ome_browser_ui_views_chrome__views__delegate.cc |   8 +-
 ...rome_browser_ui_views_chrome__views__delegate.h |   2 +-
 ...h-chrome_browser_ui_views_first__run__dialog.cc |  25 +-
 ...chrome_browser_ui_views_frame_browser__frame.cc |   6 +-
 ...e_browser_ui_views_frame_browser__root__view.cc |  17 -
 ...-chrome_browser_ui_views_frame_browser__view.cc |   8 +-
 ..._ui_views_frame_opaque__browser__frame__view.cc |   6 +-
 ...s_frame_opaque__browser__frame__view__layout.cc |   4 +-
 ...ue__browser__frame__view__platform__specific.cc |   2 +-
 ..._ui_views_frame_system__menu__model__builder.cc |   2 +-
 ...message__center_message__center__frame__view.cc |   2 +-
 ...e_browser_ui_views_panels_panel__frame__view.cc |  13 -
 ..._browser_ui_views_tabs_tab__drag__controller.cc |   8 +-
 ...atch-chrome_browser_ui_views_tabs_tab__strip.cc |   4 +-
 .../patch-chrome_browser_ui_webui_about__ui.cc     |  42 +-
 ...i_webui_chrome__web__ui__controller__factory.cc |   4 +-
 ..._webui_extensions_extension__loader__handler.cc |   4 +-
 ...r_ui_webui_options_browser__options__handler.cc |  10 +-
 ...er_ui_webui_options_browser__options__handler.h |   4 +-
 ...ch-chrome_browser_web__applications_web__app.cc |   4 +-
 ...tch-chrome_browser_web__applications_web__app.h |   4 +-
 .../patches/patch-chrome_chrome__browser.gypi      |  53 --
 .../patch-chrome_chrome__browser__extensions.gypi  |  25 -
 .../patches/patch-chrome_chrome__browser__ui.gypi  |  22 -
 .../patches/patch-chrome_chrome__common.gypi       |  24 -
 chromium-new/patches/patch-chrome_chrome__exe.gypi |  13 -
 chromium-new/patches/patch-chrome_common_BUILD.gn  |  18 +
 .../patch-chrome_common_channel__info__posix.cc    |  13 -
 .../patches/patch-chrome_common_chrome__paths.cc   |  12 +-
 .../patches/patch-chrome_common_chrome__paths.h    |   8 +-
 .../patch-chrome_common_chrome__paths__internal.h  |   2 +-
 .../patch-chrome_common_chrome__switches.cc        |  10 +-
 .../patches/patch-chrome_common_chrome__switches.h |   6 +-
 ...me_common_component__flash__hint__file__linux.h |  16 -
 .../patch-chrome_common_extensions_api_schemas.gni |  13 +
 ...patch-chrome_common_extensions_api_schemas.gypi |  13 -
 .../patch-chrome_common_extensions_command.cc      |   4 +-
 .../patches/patch-chrome_common_features.gni       |  13 +
 .../patches/patch-chrome_common_pref__names.cc     |  21 +-
 .../patches/patch-chrome_common_pref__names.h      |  19 +-
 .../patch-chrome_common_variations_BUILD.gn        |  13 +
 ...mmon_variations_fieldtrial__testing__config.gyp |  13 -
 ...derer_pepper_pepper__flash__font__file__host.cc |   6 +-
 ...nderer_pepper_pepper__flash__font__file__host.h |   6 +-
 chromium-new/patches/patch-chrome_test_BUILD.gn    | 178 ++++
 ...-chrome_test_base_in__process__browser__test.cc |   4 +-
 ...ch-chrome_test_base_testing__browser__process.h |   4 +-
 ...rome_test_chromedriver_chrome_chrome__finder.cc |   2 +-
 chromium-new/patches/patch-chromecast_BUILD.gn     |  13 +
 .../patches/patch-chromecast_browser_BUILD.gn      |  13 +
 .../patch-chromecast_browser_metrics_BUILD.gn      |  13 +
 .../patches/patch-chromecast_crash_BUILD.gn        |  13 +
 chromium-new/patches/patch-components_BUILD.gn     |  15 +
 ...h-components_arc_metrics_oom__kills__monitor.cc |  18 +
 ...t_renderer_password__form__conversion__utils.cc |   2 +-
 ...ents_autofill_core_browser_address__rewriter.cc |  16 +
 ...onents_autofill_core_browser_form__structure.cc |   2 +-
 ...ngs_core_browser_website__settings__registry.cc |  14 +
 ...ings_core_browser_website__settings__registry.h |  17 +
 ...omponents_cookie__config_cookie__store__util.cc |   2 +-
 .../patch-components_crash_content_app_BUILD.gn    |  13 +
 ...patch-components_crash_content_browser_BUILD.gn |  23 +
 ...omponents_dom__distiller_core_page__features.cc |  13 +-
 .../patch-components_drive_drive__api__util.cc     |   2 +-
 .../patch-components_feedback_anonymizer__tool.cc  |   4 +-
 .../patch-components_flags__ui_flags__state.cc     |   4 +-
 .../patch-components_gcm__driver_gcm__client.h     |  12 +
 ...tch-components_gcm__driver_gcm__client__impl.cc |  14 +
 ...ponents_json__schema_json__schema__validator.cc |   4 +-
 ...ed__service_core_dependency__graph__unittest.cc |   2 +-
 .../patches/patch-components_metrics_BUILD.gn      |  36 +
 ...ents_metrics_drive__metrics__provider__linux.cc |   2 +-
 ...trics_system__memory__stats__recorder__linux.cc |   6 +-
 ...patch-components_neterror_resources_neterror.js |   2 +-
 .../patches/patch-components_os__crypt_os__crypt.h |  22 +
 ...ord__manager_core_browser_import_csv__reader.cc |   2 +-
 .../patch-components_plugins_renderer_BUILD.gn     |  19 +
 ...ponents_plugins_renderer_plugin__placeholder.cc |   2 +-
 .../patches/patch-components_policy_BUILD.gn       |  13 +
 .../patch-components_policy_core_common_schema.cc  |   4 +-
 ...ponents_policy_resources_policy__templates.json |  32 +-
 ...onents_policy_tools_generate__policy__source.py |   4 +-
 .../patches/patch-components_storage__monitor.gypi |  37 -
 .../patch-components_storage__monitor_BUILD.gn     |  42 +
 ...components_storage__monitor_storage__monitor.cc |   2 +-
 ...s_storage__monitor_storage__monitor__freebsd.cc |   2 +-
 ...ts_storage__monitor_storage__monitor__freebsd.h |   5 +-
 ...ts_storage__monitor_storage__monitor__netbsd.cc |   2 +-
 ...nts_storage__monitor_storage__monitor__netbsd.h |   2 +-
 ...mponents_sync_base_get__session__name__linux.cc |  24 +
 ...ponents_update__client_update__query__params.cc |   2 +-
 ...-components_url__matcher_regex__set__matcher.cc |   2 +-
 ...omponents_url__matcher_url__matcher__factory.cc |   4 +-
 .../patch-components_variations_proto_study.proto  |  12 +
 ...omponents_webcrypto_algorithms_test__helpers.cc |   4 +-
 chromium-new/patches/patch-content_app_BUILD.gn    |  13 +
 .../patch-content_app_content__main__runner.cc     |  10 +-
 .../patches/patch-content_browser_BUILD.gn         |  60 ++
 ..._browser_accessibility_browser__accessibility.h |   2 +-
 ...accessibility_browser__accessibility__manager.h |  10 +-
 .../patch-content_browser_browser__main__loop.cc   |  19 +-
 ...t_browser_browser__shutdown__profile__dumper.cc |  13 -
 ...tch-content_browser_child__process__launcher.cc |  12 +-
 ...device__sensors_data__fetcher__shared__memory.h |  13 +
 ...tent_browser_devtools_protocol_color__picker.cc |  13 +
 .../patch-content_browser_download_base__file.cc   |   4 +-
 ...h-content_browser_download_base__file__linux.cc |   2 +-
 ...owser_geolocation_location__arbitrator__impl.cc |  13 -
 ...er_geolocation_wifi__data__provider__freebsd.cc | 206 -----
 ...ser_geolocation_wifi__data__provider__freebsd.h |  35 -
 ...rowser_gpu_gpu__data__manager__impl__private.cc |  39 +-
 ...browser_gpu_gpu__data__manager__impl__private.h |  13 +
 ...patch-content_browser_gpu_gpu__internals__ui.cc |  14 +-
 ...patch-content_browser_gpu_gpu__process__host.cc |  13 +
 ...wser_indexed__db_indexed__db__backing__store.cc |   4 +-
 ...patch-content_browser_media_media__internals.cc |  13 +
 ...content_browser_ppapi__plugin__process__host.cc |  17 +-
 ...r__host_media_video__capture__device__client.cc |  13 +
 ...r_renderer__host_render__process__host__impl.cc |  17 +-
 ...derer__host_render__widget__host__view__aura.cc |  25 +-
 .../patch-content_browser_time__zone__monitor.cc   |   6 +-
 ...h-content_browser_time__zone__monitor__linux.cc |   2 +-
 ...nt_browser_tracing_tracing__controller__impl.cc |  13 +
 ...content_browser_utility__process__host__impl.cc |  25 +-
 ...nt_browser_web__contents_web__contents__impl.cc |  13 -
 chromium-new/patches/patch-content_common_BUILD.gn |  29 +
 ...ndbox__linux_sandbox__debug__handling__linux.cc |   2 +-
 ...ch-content_common_set__process__title__linux.cc |   2 +-
 ...tch-content_common_set__process__title__linux.h |   2 +-
 .../patches/patch-content_content__browser.gypi    |  84 --
 .../patches/patch-content_content__common.gypi     |  26 -
 .../patches/patch-content_content__tests.gypi      |  20 -
 chromium-new/patches/patch-content_gpu_BUILD.gn    |  12 +
 .../patch-content_gpu_gpu__child__thread.cc        |  12 +-
 .../patches/patch-content_gpu_gpu__main.cc         |  20 +-
 ...ch-content_public_common_child__process__host.h |  22 +
 ...ommon_child__process__sandbox__support__linux.h |  12 -
 ...atch-content_public_common_content__switches.cc |   6 +-
 ...patch-content_public_common_content__switches.h |   6 +-
 ...atch-content_public_test_browser__test__base.cc |   2 +-
 ...ent_renderer_devtools_v8__sampling__profiler.cc |   4 +-
 ...ntent_renderer_media_webrtc__audio__capturer.cc |  15 -
 ...media_webrtc_processed__local__audio__source.cc |  15 +
 .../patch-content_renderer_render__thread__impl.cc |  16 +-
 ...ent_renderer_renderer__blink__platform__impl.cc |  30 +-
 ...tent_renderer_renderer__blink__platform__impl.h |   8 +-
 ...er_renderer__main__platform__delegate__linux.cc |   2 +-
 ...nderer_webscrollbarbehavior__impl__gtkoraura.cc |   8 +-
 chromium-new/patches/patch-content_shell_BUILD.gn  |  40 +
 ...ontent_shell_browser_shell__browser__context.cc |   6 +-
 ...nt_shell_browser_shell__browser__main__parts.cc |   8 +-
 chromium-new/patches/patch-content_test_BUILD.gn   |  51 ++
 chromium-new/patches/patch-crypto_nss__util.cc     |  17 +-
 chromium-new/patches/patch-device_BUILD.gn         |  13 +
 chromium-new/patches/patch-device_battery_BUILD.gn |  13 +
 .../patches/patch-device_geolocation_BUILD.gn      |  13 +
 ...evice_geolocation_location__arbitrator__impl.cc |  13 +
 chromium-new/patches/patch-device_hid_BUILD.gn     |  18 +
 chromium-new/patches/patch-device_hid_hid.gyp      |  23 -
 ...__protocol_media__transfer__protocol__manager.h |  13 +
 chromium-new/patches/patch-device_serial_BUILD.gn  |  26 +
 .../patches/patch-device_serial_serial.gyp         |  17 -
 ...tch-device_serial_serial__io__handler__posix.cc |   2 +-
 .../patch-device_serial_serial__service__impl.cc   |   4 +-
 chromium-new/patches/patch-device_usb_usb.gyp      |  21 -
 .../patches/patch-device_usb_usb__context.cc       |   4 +-
 .../patch-device_usb_usb__context__unittest.cc     |   2 +-
 .../patch-device_usb_usb__device__handle__impl.cc  |   4 +-
 .../patch-device_usb_usb__device__handle__impl.h   |   4 +-
 .../patches/patch-device_usb_usb__device__impl.cc  |   8 +-
 .../patches/patch-device_usb_usb__error.cc         |   2 +-
 .../patches/patch-device_usb_usb__service__impl.cc |  23 +-
 .../patches/patch-device_usb_usb__service__impl.h  |   6 +-
 .../patches/patch-extensions_browser_BUILD.gn      |  13 +
 ...i_declarative__webrequest_webrequest__action.cc |   2 +-
 ...ch-extensions_browser_api_serial_serial__api.cc |   9 +-
 ..._browser_api_web__request_form__data__parser.cc |   2 +-
 .../patches/patch-extensions_common_image__util.cc |   2 +-
 .../patch-extensions_common_stack__frame.cc        |   2 +-
 chromium-new/patches/patch-gpu_BUILD.gn            |  13 +
 ...tch-gpu_command__buffer_service_error__state.cc |  32 -
 ...gpu_command__buffer_service_program__manager.cc |   2 +-
 chromium-new/patches/patch-gpu_config_BUILD.gn     |  29 +
 .../patches/patch-gpu_config_gpu__control__list.cc |  22 +-
 ...atch-gpu_config_gpu__control__list__unittest.cc |   2 +-
 .../patch-gpu_config_gpu__info__collector.cc       |   6 +-
 .../patches/patch-gpu_config_gpu__test__config.cc  |  10 +-
 .../patch-gpu_gles2__conform__support_BUILD.gn     |  22 +
 ...tch-gpu_gles2__conform__support_native_BUILD.gn |  13 +
 chromium-new/patches/patch-gpu_gpu__config.gypi    |  25 -
 .../patches/patch-gpu_gpu__ipc__service.gypi       |  13 -
 chromium-new/patches/patch-gpu_ipc_client_BUILD.gn |  12 +
 .../patches/patch-gpu_ipc_service_BUILD.gn         |  18 +
 ...tch-gpu_tools_compositor__model__bench_BUILD.gn |  13 +
 chromium-new/patches/patch-gpu_vulkan_BUILD.gn     |  13 +
 chromium-new/patches/patch-ipc_ipc__channel.h      |  13 +
 .../patches/patch-ipc_ipc__channel__posix.cc       |  66 ++
 .../patches/patch-ipc_ipc__channel__posix.h        |  30 +
 .../patches/patch-ipc_ipc__message__utils.cc       |   2 +-
 .../patches/patch-ipc_ipc__message__utils.h        |   4 +-
 .../patch-ipc_unix__domain__socket__util.cc        |   4 +-
 chromium-new/patches/patch-media_audio_BUILD.gn    |  27 +
 .../patch-media_audio_alsa_audio__manager__alsa.cc |  12 +-
 .../patches/patch-media_audio_audio__manager.cc    |  16 +-
 .../patches/patch-media_audio_audio__manager.h     |   4 +-
 .../patch-media_audio_audio__output__device.cc     |  13 -
 ...atch-media_audio_audio__output__stream__sink.cc |  13 -
 chromium-new/patches/patch-media_base_BUILD.gn     |  22 +
 .../patch-media_base_audio__renderer__mixer.cc     |  13 -
 ...tch-media_base_audio__renderer__mixer__input.cc |  13 -
 .../patches/patch-media_base_audio__splicer.cc     |   4 +-
 chromium-new/patches/patch-media_capture_BUILD.gn  |  21 +
 ..._video_fake__video__capture__device__factory.cc |  10 +-
 ..._video_file__video__capture__device__factory.cc |  12 +-
 ..._capture_video_linux_v4l2__capture__delegate.cc |  20 -
 ...a_capture_video_linux_v4l2__capture__delegate.h |  13 -
 ...linux_video__capture__device__factory__linux.cc |  47 -
 ...re_video_linux_video__capture__device__linux.cc |  70 +-
 ...h-media_capture_video_video__capture__device.cc |  33 -
 ...ch-media_capture_video_video__capture__device.h |  40 -
 ...apture_video_video__capture__device__factory.cc |  25 +-
 chromium-new/patches/patch-media_cast_BUILD.gn     |  31 +
 .../patch-media_cdm_ppapi_ppapi__cdm__adapter.gni  |  22 +
 .../patches/patch-media_filters_audio__clock.cc    |  13 -
 .../patches/patch-media_filters_audio__clock.h     |  18 -
 ...tch-media_filters_decrypting__audio__decoder.cc |   2 +-
 .../patch-media_filters_file__data__source.h       |  12 -
 .../patches/patch-media_filters_vp9__parser.h      |   2 +-
 ...tch-media_formats_common_offset__byte__queue.cc |   2 +-
 ...atch-media_formats_common_offset__byte__queue.h |   2 +-
 .../patch-media_formats_mp2t_es__parser__adts.cc   |   2 +-
 ...ch-media_formats_mp2t_es__parser__mpeg1audio.cc |   6 +-
 chromium-new/patches/patch-media_media.gyp         |  28 -
 chromium-new/patches/patch-mojo_BUILD.gn           |  13 +
 chromium-new/patches/patch-mojo_edk_test_BUILD.gn  |  22 +
 ..._shell_public_cpp_initialize__base__and__icu.cc |  18 -
 .../patches/patch-mojo_shell_runner_init.cc        |  21 -
 .../patches/patch-native__client__sdk_src_BUILD.gn |  22 +
 .../patches/patch-native__client_build_common.gypi |  13 -
 ...native__client_src_shared_platform_platform.gyp |  13 -
 chromium-new/patches/patch-net_BUILD.gn            |  88 ++
 .../patch-net_base_address__tracker__linux.cc      |   2 +-
 .../patch-net_base_address__tracker__linux.h       |   6 +-
 ...h-net_base_address__tracker__linux__unittest.cc |  12 +-
 .../patches/patch-net_base_mime__util__unittest.cc |   2 +-
 .../patch-net_base_network__change__notifier.cc    |  22 +-
 .../patch-net_base_network__change__notifier.h     |  31 +
 .../patch-net_base_network__interfaces__linux.cc   |  22 +-
 .../patch-net_base_network__interfaces__posix.cc   |   2 +-
 .../patch-net_dns_address__sorter__posix.cc        |   6 +-
 .../patch-net_dns_dns__config_-service__posix.cc   |  13 -
 ...et_dns_dns__config__service__posix__unittest.cc |   4 +-
 .../patches/patch-net_dns_dns__reloader.cc         |  50 +-
 chromium-new/patches/patch-net_dns_dns__session.cc |   4 +-
 .../patches/patch-net_dns_host__resolver__impl.cc  |  13 -
 .../patches/patch-net_dns_host__resolver__proc.cc  |  13 -
 .../patch-net_http_http__auth__gssapi__posix.cc    |   2 +-
 chromium-new/patches/patch-net_net.gyp             |   6 +-
 chromium-new/patches/patch-net_net.gypi            |  24 -
 chromium-new/patches/patch-net_net__common.gypi    |  16 -
 ...atch-net_proxy_proxy__config__service__linux.cc |  42 +-
 .../patches/patch-net_proxy_proxy__service.cc      |  12 +-
 ...atch-net_quic_congestion__control_rtt__stats.cc |  31 -
 .../patch-net_socket_socks5__client__socket.cc     |   2 +-
 .../patches/patch-net_udp_udp__socket__posix.cc    |  14 +-
 .../patches/patch-net_udp_udp__socket__unittest.cc |   4 +-
 .../patches/patch-pdf_pdfium_pdfium__engine.cc     |  14 +-
 .../patch-ppapi_proxy_file__io__resource.cc        |   2 +-
 ...ed__impl_private_net__address__private__impl.cc |   2 +-
 .../patches/patch-ppapi_tests_extensions_BUILD.gn  |  13 +
 chromium-new/patches/patch-printing_BUILD.gn       |  22 +
 .../patches/patch-printing_cups__config__helper.py |  13 +
 chromium-new/patches/patch-printing_printing.gyp   |  13 -
 chromium-new/patches/patch-remoting_host_BUILD.gn  |  49 ++
 .../patches/patch-remoting_remoting__host.gypi     |  31 -
 chromium-new/patches/patch-sdch_BUILD.gn           |  22 +
 .../patch-services_shell_standalone_context.cc     |  13 +
 chromium-new/patches/patch-services_ui_ws_BUILD.gn |  16 +
 chromium-new/patches/patch-skia_BUILD.gn           |  48 ++
 .../patch-skia_ext_SkMemory__new__handler.cpp      |   6 +-
 .../patches/patch-skia_ext_platform__canvas.h      |   6 +-
 chromium-new/patches/patch-skia_skia__chrome.gypi  |  16 -
 chromium-new/patches/patch-skia_skia__common.gypi  |  13 -
 .../patches/patch-sync_util_get__session__name.cc  |  22 -
 .../patch-sync_util_get__session__name__linux.cc   |  16 -
 .../patches/patch-testing_gtest_src_gtest.cc       |  24 -
 .../patches/patch-testing_perf_perf__test.cc       |  17 -
 ...bKit_Source_bindings_core_v8_V8ScriptRunner.cpp |   6 +-
 .../patch-third__party_WebKit_Source_core_BUILD.gn |  13 +
 .../patch-third__party_WebKit_Source_core_core.gyp |  22 -
 ...WebKit_Source_modules_battery_battery__status.h |  13 -
 ...arty_WebKit_Source_platform_blink__platform.gyp |  44 -
 ...arty_WebKit_Source_platform_fonts_FontCache.cpp |   8 +-
 ..._party_WebKit_Source_platform_fonts_FontCache.h |   4 +-
 ...bKit_Source_platform_fonts_FontPlatformData.cpp |  54 +-
 ...WebKit_Source_platform_fonts_FontPlatformData.h |  34 +
 ...WebKit_Source_platform_fonts_SimpleFontData.cpp |  31 +
 ...it_Source_platform_fonts_skia_FontCacheSkia.cpp |  21 +-
 ...d__party_WebKit_Source_platform_heap_GCInfo.cpp |   2 +-
 ...WebKit_Source_platform_heap_StackFrameDepth.cpp |   2 +-
 ...platform_image-decoders_png_PNGImageDecoder.cpp |  13 -
 ...party_WebKit_Source_platform_text_Character.cpp |  24 -
 ...latform_text_CharacterPropertyDataGenerator.cpp |  19 -
 ...hird__party_WebKit_Source_web_PopupMenuImpl.cpp |  13 +
 .../patch-third__party_WebKit_Source_web_web.gyp   |  13 -
 ...h-third__party_WebKit_Source_wtf_Assertions.cpp |  31 +
 .../patch-third__party_WebKit_Source_wtf_Atomics.h |  13 +
 ...patch-third__party_WebKit_Source_wtf_ByteSwap.h |   2 +-
 ..._party_WebKit_Source_wtf_ContainerAnnotations.h |  13 +
 ...__party_WebKit_Source_wtf_ThreadingPthreads.cpp |  31 +
 .../patch-third__party_WebKit_Source_wtf_wtf.gyp   |  13 -
 .../patch-third__party_angle_src_tests_BUILD.gn    |  13 +
 .../patches/patch-third__party_boringssl_BUILD.gn  |  31 +
 ...hird__party_boringssl_src_crypto_bio_internal.h |  15 -
 ...ringssl_src_crypto_cipher_e__chacha20poly1305.c |  40 -
 ...ch-third__party_boringssl_src_crypto_internal.h |  15 -
 .../patch-third__party_boringssl_src_crypto_mem.c  |  12 -
 ...y_boringssl_src_crypto_poly1305_poly1305__vec.c |  30 -
 ...d__party_boringssl_src_include_openssl_thread.h |   4 +-
 ...on_src_google_cacheinvalidation_include_types.h |   2 +-
 .../patches/patch-third__party_cython_rules.gni    |  31 +
 .../patches/patch-third__party_expat_BUILD.gn      |  13 +
 ...mpeg_chromium_config_Chrome_netbsd_x64_config.h |  13 +
 ..._party_ffmpeg_chromium_scripts_generate__gyp.py |   2 +-
 .../patches/patch-third__party_ffmpeg_ffmpeg.gyp   |  20 -
 ...patch-third__party_ffmpeg_ffmpeg__generated.gni | 136 +--
 ...atch-third__party_ffmpeg_ffmpeg__generated.gypi | 397 ---------
 ...y_ffmpeg_libavutil_autorename__libavutil__cpu.c |  25 -
 .../patch-third__party_ffmpeg_libavutil_cpu.c      |  14 -
 .../patch-third__party_ffmpeg_libavutil_mem.c      |  13 -
 .../patches/patch-third__party_fontconfig_BUILD.gn |  13 +
 .../patches/patch-third__party_freetype2_BUILD.gn  |  13 +
 .../patches/patch-third__party_glslang_BUILD.gn    |  22 +
 .../patch-third__party_harfbuzz-ng_BUILD.gn        |  22 +
 ...patch-third__party_icu_android_patch__locale.sh |  13 +
 .../patch-third__party_icu_source_configure        |  20 +
 .../patches/patch-third__party_khronos_khronos.gyp |  12 -
 ...tch-third__party_leveldatabase_env__chromium.cc |   6 +-
 .../patch-third__party_libXNVCtrl_libXNVCtrl.gyp   |  14 -
 .../patch-third__party_libjingle_libjingle.gyp     |  22 -
 ...st_cpp_src_phonenumbers_base_memory_singleton.h |   2 +-
 ...pp_src_phonenumbers_base_synchronization_lock.h |   2 +-
 ...ist_cpp_src_phonenumbers_base_thread__checker.h |   2 +-
 ...-third__party_libphonenumber_libphonenumber.gyp |  12 -
 .../patches/patch-third__party_libpng_libpng.gyp   | 120 ---
 .../patches/patch-third__party_libusb_BUILD.gn     | 263 ++++++
 .../patch-third__party_libyuv_include_libyuv_row.h |  12 +-
 ...ch-third__party_libyuv_source_mjpeg__decoder.cc |   2 +-
 .../patches/patch-third__party_mesa_BUILD.gn       |  25 +
 ...-third__party_mesa_src_src_mesa_main_arrayobj.c |  15 -
 .../patches/patch-third__party_minigbm_BUILD.gn    |  13 +
 .../patches/patch-third__party_opus_BUILD.gn       |  13 +
 ...h-third__party_ots_include_opentype-sanitiser.h |   2 +-
 ...patch-third__party_pdfium_build_standalone.gypi |  31 -
 ...d__party_pdfium_core_fxcrt_include_fx__system.h |   2 +-
 ...__party_pdfium_fpdfsdk_javascript_JS__Value.cpp |   6 +-
 ...rty_pdfium_fpdfsdk_javascript_PublicMethods.cpp |  14 +-
 .../patches/patch-third__party_pdfium_pdfium.gyp   |  13 -
 .../patch-third__party_pdfium_skia_BUILD.gn        |  31 +
 ...third__party_pdfium_third__party_base_logging.h |  13 -
 ...ch-third__party_protobuf_post__process__dist.sh |  13 +
 .../patches/patch-third__party_sfntly_sfntly.gyp   |  12 -
 ...-third__party_skia_src_gpu_GrAutoLocaleSetter.h |   2 +-
 ...third__party_skia_src_opts_opts__check__x86.cpp |  18 -
 .../patches/patch-third__party_sqlite_BUILD.gn     |  40 +
 .../patches/patch-third__party_sqlite_sqlite.gyp   |  13 -
 ...der_third__party_LLVM_utils_buildit_build__llvm |  22 +
 .../patches/patch-third__party_usrsctp_BUILD.gn    |  17 +
 .../patches/patch-third__party_usrsctp_usrsctp.gyp |  19 -
 .../patches/patch-third__party_webrtc_BUILD.gn     |  14 +
 .../patch-third__party_webrtc_base_httpcommon.cc   |   2 +-
 ...h-third__party_webrtc_base_ifaddrs__converter.h |   2 +-
 .../patch-third__party_webrtc_base_ipaddress.h     |   2 +-
 .../patch-third__party_webrtc_base_linux.cc        |   2 +-
 .../patches/patch-third__party_webrtc_base_linux.h |   4 +-
 .../patch-third__party_webrtc_base_network.cc      |   6 +-
 .../patch-third__party_webrtc_base_network.h       |   4 +-
 ...hird__party_webrtc_base_physicalsocketserver.cc |  17 +-
 ...ch-third__party_webrtc_base_platform__thread.cc |   2 +-
 .../patch-third__party_webrtc_base_stringutils.h   |  14 +-
 .../patch-third__party_webrtc_base_systeminfo.cc   |   2 +-
 .../patch-third__party_webrtc_build_common.gypi    |  27 -
 ...h-third__party_webrtc_common__audio_wav__file.h |   2 +-
 ...webrtc_modules_audio__device_audio__device.gypi |  22 -
 ..._modules_desktop__capture_desktop__capture.gypi |  16 -
 ...remote__bitrate__estimator_overuse__detector.cc |   2 +-
 ..._rtp__rtcp_source_forward__error__correction.cc |   6 +-
 ..._party_webrtc_modules_video__coding_receiver.cc |  14 +-
 ...h-third__party_webrtc_system__wrappers_BUILD.gn |  13 +
 ...brtc_system__wrappers_source_atomic32__posix.cc |  16 -
 ...y_webrtc_voice__engine_voice__engine__defines.h |  13 -
 .../patch-third__party_widevine_cdm_BUILD.gn       |  31 +
 ...arty_widevine_cdm_stub_widevine__cdm__version.h |  11 +
 ...tch-third__party_xdg-utils_scripts_xdg-terminal |  62 ++
 ...-third__party_xdg-utils_scripts_xdg-terminal.in |  53 ++
 .../patches/patch-third__party_yasm_BUILD.gn       |  18 +
 .../patches/patch-third__party_zlib_BUILD.gn       |  13 +
 .../patches/patch-tools_battor__agent_BUILD.gn     |  13 +
 chromium-new/patches/patch-tools_gn_args.cc        |  17 +
 .../patches/patch-tools_gn_bootstrap_bootstrap.py  |  65 ++
 .../patches/patch-tools_gn_gn__unittests.isolate   |  13 +
 .../patch-tools_gyp_pylib_gyp_generator_make.py    |  43 -
 ...yp_test_additional-targets_src_dir1_actions.gyp |  13 -
 .../patch-tools_gyp_test_library_src_library.gyp   |  13 -
 .../patch-ui_accessibility_accessibility.gyp       |  22 -
 ...-ui_accessibility_platform_ax__platform__node.h |   2 +-
 .../patch-ui_app__list_app__list__constants.cc     |   6 +-
 .../patch-ui_app__list_app__list__constants.h      |   6 +-
 .../patches/patch-ui_app__list_app__list__menu.cc  |  14 +-
 ...tch-ui_app__list_views_app__list__item__view.cc |  13 +
 .../patch-ui_app__list_views_app__list__view.cc    |  26 +-
 chromium-new/patches/patch-ui_aura_BUILD.gn        |  13 +
 chromium-new/patches/patch-ui_base_BUILD.gn        |  58 +-
 chromium-new/patches/patch-ui_base_ime_BUILD.gn    |  22 +
 ...h-ui_base_ime_ime__engine__handler__interface.h |   2 +-
 .../patch-ui_base_ime_input__method__factory.cc    |  24 +-
 ...patch-ui_base_ime_input__method__initializer.cc |   2 +-
 .../patch-ui_base_resource_resource__bundle.cc     |  16 +-
 chromium-new/patches/patch-ui_base_ui__base.gyp    |  31 -
 .../patches/patch-ui_base_ui__features.gni         |  10 +
 .../patches/patch-ui_base_webui_web__ui__util.cc   |   2 +-
 chromium-new/patches/patch-ui_compositor_BUILD.gn  |  13 +
 .../patches/patch-ui_events_event__switches.cc     |   4 +-
 .../patches/patch-ui_events_event__switches.h      |   4 +-
 ...ch-ui_events_keycodes_dom_keycode__converter.cc |   2 +-
 chromium-new/patches/patch-ui_gfx_BUILD.gn         |  22 +
 chromium-new/patches/patch-ui_gfx_canvas__skia.cc  |   4 +-
 .../patches/patch-ui_gfx_codec_jpeg__codec.cc      |  12 -
 chromium-new/patches/patch-ui_gfx_color__utils.cc  |  50 --
 .../patches/patch-ui_gfx_font__fallback__linux.cc  |   2 +-
 .../patches/patch-ui_gfx_font__render__params.h    |   4 +-
 chromium-new/patches/patch-ui_gfx_render__text.cc  |   4 +-
 chromium-new/patches/patch-ui_gl_BUILD.gn          |  22 +
 chromium-new/patches/patch-ui_gl_gl.gyp            |  22 -
 .../patch-ui_gl_gl__gl__api__implementation.cc     |  16 -
 .../patches/patch-ui_gl_gl__implementation__x11.cc |  13 -
 .../patches/patch-ui_gl_gl__surface__glx.cc        |  13 -
 .../patch-ui_gl_sync__control__vsync__provider.cc  |   8 +-
 .../patch-ui_gl_sync__control__vsync__provider.h   |  13 +
 ...tch-ui_message__center_message__center__style.h |   4 +-
 ...e__center_views_message__center__button__bar.cc |  12 +-
 ...ge__center_views_message__center__button__bar.h |   4 +-
 ..._message__center_views_message__center__view.cc |  22 -
 ...message__center_views_message__view__factory.cc |  13 +
 ...-ui_message__center_views_notification__view.cc |  13 -
 .../patches/patch-ui_resources_ui__resources.grd   |   2 +-
 chromium-new/patches/patch-ui_views_BUILD.gn       |  22 +
 ...ews_accessibility_native__view__accessibility.h |   2 +-
 .../patch-ui_views_bubble_bubble__delegate.cc      |  13 -
 ...tch-ui_views_bubble_bubble__dialog__delegate.cc |  13 +
 ...patch-ui_views_controls_button_label__button.cc |  22 -
 ...i_views_controls_scrollbar_base__scroll__bar.cc |  13 -
 .../patch-ui_views_controls_textfield_textfield.cc |  48 +-
 .../patch-ui_views_controls_webview_BUILD.gn       |  13 +
 .../patch-ui_views_controls_webview_webview.gyp    |  13 -
 .../patch-ui_views_examples_widget__example.cc     |   2 +-
 .../patch-ui_views_style_platform__style.cc        |  16 +-
 chromium-new/patches/patch-ui_views_views.gyp      |  28 -
 .../patches/patch-ui_views_views__delegate.cc      |   2 +-
 .../patches/patch-ui_views_views__delegate.h       |   2 +-
 .../patches/patch-ui_views_views__switches.cc      |   2 +-
 .../patch-ui_views_window_custom__frame__view.cc   |   4 +-
 .../patch-ui_views_window_dialog__delegate.cc      |   6 +-
 .../patches/patch-ui_webui_resources_js_cr.js      |   2 +-
 .../patches/patch-ui_webui_resources_js_icon.js    |  13 +
 .../patches/patch-ui_webui_resources_js_util.js    |  13 -
 chromium-new/patches/patch-v8_BUILD.gn             |  41 +
 .../patch-v8_src_base_platform_platform-netbsd.cc  | 301 +++++++
 .../patch-v8_src_base_platform_platform-posix.cc   |  26 +-
 .../patches/patch-v8_src_base_platform_platform.h  |   2 +-
 .../patch-v8_src_compiler_graph-visualizer.cc      |  21 -
 .../patch-v8_src_compiler_graph-visualizer.h       |  22 -
 chromium-new/patches/patch-v8_src_log-utils.h      |  14 -
 chromium-new/patches/patch-v8_tools_run-llprof.sh  |   2 +-
 634 files changed, 7835 insertions(+), 5527 deletions(-)

diffs:
diff --git a/chromium-new/Makefile b/chromium-new/Makefile
index f2c45ae..e126173 100644
--- a/chromium-new/Makefile
+++ b/chromium-new/Makefile
@@ -1,6 +1,6 @@
 # $NetBSD: Makefile,v 1.14 2012/09/24 18:26:53 asau Exp $
 
-DISTNAME=	chromium-51.0.2704.106
+DISTNAME=	chromium-54.0.2840.100
 CATEGORIES=	www
 MASTER_SITES=	http://commondatastorage.googleapis.com/chromium-browser-official/
 EXTRACT_SUFX=	.tar.xz
@@ -24,210 +24,241 @@ DEPENDS+=	xdg-utils-[0-9]*:../../misc/xdg-utils
 .include "../../mk/bsd.prefs.mk"
 .include "../../mk/compiler.mk"
 
-ONLY_FOR_PLATFORM=	*-*-arm *-*-i386 *-*-x86_64
+#ONLY_FOR_PLATFORM+=	*-*-arm *-*-i386 # not tested yet
+ONLY_FOR_PLATFORM+=	*-*-x86_64
 
-CHECK_PORTABILITY_SKIP+=	third_party/xdg-utils/scripts/xdg-terminal.in
-CHECK_PORTABILITY_SKIP+=	third_party/xdg-utils/scripts/xdg-terminal
-CHECK_PORTABILITY_SKIP+=	third_party/icu/source/configure
-CHECK_PORTABILITY_SKIP+=	third_party/icu/android/patch_locale.sh
-
-SUBST_CLASSES+=		bash
-SUBST_MESSAGE.bash=	Fixing bash path
-SUBST_STAGE.bash=	post-patch
-SUBST_FILES.bash+=	build/linux/python_arch.sh
-SUBST_FILES.bash+=	chrome/tools/build/linux/chrome-wrapper
-SUBST_FILES.bash+=	chrome/tools/build/linux/sed.sh
-SUBST_SED.bash=		-e 's:/bin/bash:${BASH}:'
+# Workaround
+BUILDLINK_TRANSFORM.NetBSD+=	rm:-ldl
 
 SUBST_CLASSES+=		path
-SUBST_MESSAGE.path=	Fixing pkg path
 SUBST_STAGE.path=	post-patch
-SUBST_FILES.path+=	base/base.gyp
-SUBST_FILES.path+=	base/base_paths_linux.cc
-SUBST_FILES.path+=	base/process_util_openbsd.cc
-SUBST_FILES.path+=	build/common.gypi
-SUBST_FILES.path+=	chrome/chrome_tests.gypi
+SUBST_MESSAGE.path=	Fixing pkg path
+SUBST_FILES.path+=	chrome/common/chrome_paths.cc
 SUBST_SED.path+=	-e 's:/usr/local/:${PREFIX}/:'
-SUBST_SED.path+=	-e 's:/usr/lib/:${BUILDLINK_DIR}/lib/:'
-SUBST_SED.path+=	-e 's:/usr/include/:${BUILDLINK_DIR}/include/:'
-
-CONFIGURE_ENV+=		CC=${CC:Q}
-CONFIGURE_ENV+=		CXX=${CXX:Q}
-CONFIGURE_ENV+=		GYP_GENERATORS=ninja
-CONFIGURE_ENV+=		GYP_DEFINES="${GYP_DEFINES}"
 
 CFLAGS+=		-fno-stack-protector
-# for #include <glib-2.0/gmodule.h>
-CFLAGS+=		-I${BUILDLINK_DIR}/include/glib
 
-BUILDTYPE=	Release
-#BUILDTYPE=	Debug
+.include "options.mk"
+
 MAKE_ENV+=	BUILDTYPE=${BUILDTYPE}
 MAKE_ENV+=	GPERF=${PREFIX}/bin/gperf
 
+KEEPLIBS+= \
+		base/third_party/dmg_fp \
+		base/third_party/dynamic_annotations \
+		base/third_party/icu \
+		base/third_party/nspr \
+		base/third_party/superfasthash \
+		base/third_party/symbolize \
+		base/third_party/valgrind \
+		base/third_party/xdg_mime \
+		base/third_party/xdg_user_dirs \
+		breakpad/src/third_party/curl \
+		chrome/third_party/mozilla_security_manager \
+		courgette/third_party \
+		net/third_party/mozilla_security_manager \
+		net/third_party/nss \
+		third_party/WebKit \
+		third_party/analytics \
+		third_party/angle \
+		third_party/angle/src/common/third_party/numerics \
+		third_party/angle/src/third_party/compiler \
+		third_party/angle/src/third_party/libXNVCtrl \
+		third_party/angle/src/third_party/murmurhash \
+		third_party/angle/src/third_party/trace_event \
+		third_party/boringssl \
+		third_party/brotli \
+		third_party/cacheinvalidation \
+		third_party/catapult \
+		third_party/catapult/third_party/polymer \
+		third_party/catapult/third_party/py_vulcanize \
+		third_party/catapult/third_party/py_vulcanize/third_party/rcssmin \
+		third_party/catapult/third_party/py_vulcanize/third_party/rjsmin \
+		third_party/catapult/tracing/third_party/d3 \
+		third_party/catapult/tracing/third_party/gl-matrix \
+		third_party/catapult/tracing/third_party/jszip \
+		third_party/catapult/tracing/third_party/mannwhitneyu \
+		third_party/ced \
+		third_party/cld_2 \
+		third_party/cld_3 \
+		third_party/cros_system_api \
+		third_party/cython/python_flags.py \
+		third_party/devscripts \
+		third_party/dom_distiller_js \
+		third_party/fips181 \
+		third_party/flatbuffers \
+		third_party/flot \
+		third_party/google_input_tools \
+		third_party/google_input_tools/third_party/closure_library \
+		third_party/google_input_tools/third_party/closure_library/third_party/closure \
+		third_party/hunspell \
+		third_party/iccjpeg \
+		third_party/icu \
+		third_party/jstemplate \
+		third_party/khronos \
+		third_party/leveldatabase \
+		third_party/libXNVCtrl \
+		third_party/libaddressinput \
+		third_party/libjingle \
+		third_party/libphonenumber \
+		third_party/libsecret \
+		third_party/libsrtp \
+		third_party/libudev \
+		third_party/libusb \
+		third_party/libwebm \
+		third_party/libxml/chromium \
+		third_party/libyuv \
+		third_party/lss \
+		third_party/lzma_sdk \
+		third_party/mesa \
+		third_party/modp_b64 \
+		third_party/mt19937ar \
+		third_party/openh264 \
+		third_party/openmax_dl \
+		third_party/opus \
+		third_party/ots \
+		third_party/pdfium \
+		third_party/pdfium/third_party/agg23 \
+		third_party/pdfium/third_party/base \
+		third_party/pdfium/third_party/bigint \
+		third_party/pdfium/third_party/freetype \
+		third_party/pdfium/third_party/lcms2-2.6 \
+		third_party/pdfium/third_party/libjpeg \
+		third_party/pdfium/third_party/libopenjpeg20 \
+		third_party/pdfium/third_party/libpng16 \
+		third_party/pdfium/third_party/libtiff \
+		third_party/pdfium/third_party/zlib_v128 \
+		third_party/polymer \
+		third_party/protobuf \
+		third_party/protobuf/third_party/six \
+		third_party/qcms \
+		third_party/sfntly \
+		third_party/skia \
+		third_party/smhasher \
+		third_party/sqlite \
+		third_party/tcmalloc \
+		third_party/usrsctp \
+		third_party/web-animations-js \
+		third_party/webdriver \
+		third_party/webrtc \
+		third_party/widevine \
+		third_party/woff2 \
+		third_party/x86inc \
+		third_party/zlib/google \
+		url/third_party/mozilla \
+		v8/src/third_party/valgrind \
+		base/third_party/libevent \
+		third_party/adobe \
+		third_party/speech-dispatcher \
+		third_party/usb_ids \
+		third_party/xdg-utils \
+		third_party/yasm/run_yasm.py \
+		third_party/jinja2 \
+		third_party/ply \
+		third_party/ffmpeg \
+		third_party/markupsafe \
+		third_party/harfbuzz-ng \
+		third_party/zlib
+
 # Proprietary codecs are enabled.
-GYP_DEFINES+=	proprietary_codecs=1
-GYP_DEFINES+=	ffmpeg_branding=Chrome
+GN_ARGS+=	proprietary_codecs=true \
+		ffmpeg_branding="Chrome"
+
+GN_ARGS+=	use_gconf=false \
+		use_pulseaudio=true \
+		use_kerberos=false \
+		use_cups=false \
+		use_aura=true \
+		enable_nacl=false \
+		enable_hevc_demuxing=true \
+		enable_media_router=true \
+		enable_remoting=false \
+		toolkit_views=true \
+		treat_warnings_as_errors=false \
+		use_sysroot=false \
+		use_system_libjpeg=true \
+		use_system_sqlite=false \
+		use_alsa=false \
+		enable_webrtc=false \
+		enable_one_click_signin=true \
+		use_allocator="none" \
+		use_experimental_allocator_shim=false \
+		enable_widevine=true \
+		is_clang=false \
+		enable_webrtc=false \
+		use_gnome_keyring=true
+GN_ARGS+=	extra_cppflags="-I${BUILDLINK_DIR}/include \
+			-I${BUILDLINK_DIR}/include/glib \
+			-I${BUILDLINK_DIR}/include/nss/nss " \
+		extra_ldflags="-L${PREFIX}/lib \
+			-L${X11BASE}/lib \
+			${COMPILER_RPATH_FLAG}${PREFIX}/lib \
+			${COMPILER_RPATH_FLAG}${X11BASE}/lib"
+# To avoid error from sem_destroy(3) in mksnapshot
+GN_ARGS+=	v8_use_snapshot=false
 
-GYP_DEFINES+=	use_gconf=0
-GYP_DEFINES+=	use_pulseaudio=1
-GYP_DEFINES+=	gcc_version=${CC_VERSION:S/gcc-//}
-GYP_DEFINES+=	use_kerberos=0
-GYP_DEFINES+=	linux_breakpad=0
-GYP_DEFINES+=	linux_use_heapchecker=0
-GYP_DEFINES+=	linux_strip_binary=1
-GYP_DEFINES+=	use_aura=1
-GYP_DEFINES+=	test_isolation_mode=noop
-GYP_DEFINES+=	disable_nacl=1
-GYP_DEFINES+=	enable_extensions=1
-GYP_DEFINES+=	enable_one_click_signin=1
-GYP_DEFINES+=	enable_webrtc=0
-GYP_DEFINES+=	enable_web_speech=1
-GYP_DEFINES+=	enable_service_discovery=1
-GYP_DEFINES+=	werror=
-GYP_DEFINES+=	no_gc_sections=1
-GYP_DEFINES+=	OS=${LOWER_OPSYS}
-GYP_DEFINES+=	os_ver=${OS_VERSION}
-GYP_DEFINES+=	prefix_dir=${PREFIX}
-GYP_DEFINES+=	python_ver=${PYVERSSUFFIX}
-GYP_DEFINES+=	use_allocator=none
-GYP_DEFINES+=	use_cups=0
-GYP_DEFINES+=	linux_link_gsettings=1
-GYP_DEFINES+=	linux_link_libpci=1
-GYP_DEFINES+=	linux_link_libspeechd=0
-GYP_DEFINES+=	want_separate_host_toolset=0
-GYP_DEFINES+=	use_system_bzip2=1
-GYP_DEFINES+=	use_system_flac=1
-GYP_DEFINES+=	use_system_ffmpeg=0
-GYP_DEFINES+=	use_system_harfbuzz=0
-GYP_DEFINES+=	use_system_icu=0
-GYP_DEFINES+=	use_system_jsoncpp=1
-GYP_DEFINES+=	use_system_libevent=1
-GYP_DEFINES+=	use_system_libexif=1
-GYP_DEFINES+=	use_system_libjpeg=1
-GYP_DEFINES+=	use_system_libpng=1
-GYP_DEFINES+=	use_system_libusb=1
-GYP_DEFINES+=	use_system_libwebp=1
-GYP_DEFINES+=	use_system_libxml=1
-GYP_DEFINES+=	use_system_libxslt=1
-GYP_DEFINES+=	use_system_nspr=1
-GYP_DEFINES+=	use_system_protobuf=0
-GYP_DEFINES+=	use_system_re2=1
-GYP_DEFINES+=	use_system_snappy=1
-GYP_DEFINES+=	use_system_speex=1
-GYP_DEFINES+=	use_system_xdg_utils=1
-GYP_DEFINES+=	use_system_yasm=1
-GYP_DEFINES+=	v8_use_external_startup_data=0
-GYP_DEFINES+=	flapper_version_h_file='${WRKSRC}/flapper_version.h'
-GYP_DEFINES+=	usb_ids_path=${PREFIX}/share/usbids/usb.ids
-GYP_DEFINES+=	icu_use_data_file_flag=1
+GN_BOOTSTRAP_FLAGS+=	--no-clean --no-rebuild
 
 # API key and OAuth credential for Google.
 # This is pkgsrc use only.
-GYP_DEFINES+=	google_api_key=AIzaSyAT_3ogzNMKbBMFk3xQ6T35fg52Y9GrFBg
-GYP_DEFINES+=	google_default_client_id=74061691103-faqqnan75j2s8ej3p7lh2k98dhkee816.apps.googleusercontent.com
-GYP_DEFINES+=	google_default_client_secret=3R9TyUv14OXgzJnZi6Ismela
+GN_ARGS+=	google_api_key="AIzaSyAT_3ogzNMKbBMFk3xQ6T35fg52Y9GrFBg" \
+		google_default_client_id="74061691103-faqqnan75j2s8ej3p7lh2k98dhkee816.apps.googleusercontent.com" \
+		google_default_client_secret="3R9TyUv14OXgzJnZi6Ismela"
+
+NOT_PAX_MPROTECT_SAFE+=	bin/chrome
+NOT_PAX_ASLR_SAFE+=	bin/chrome
 
-pre-patch:
-	${RM} ${WRKSRC}/third_party/skia/tests/ImageFilterTest.cpp.*
+post-extract:
+	cp -r ${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/linux \
+		${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/${LOWER_OPSYS}
 
 pre-configure:
 	cd ${WRKSRC} && \
-	${PYTHONBIN} ./build/linux/unbundle/replace_gyp_files.py \
-		${GYP_DEFINES:C/^/-D/}
-# allow removal of third_party/adobe
-	${TOUCH} ${WRKSRC}/flapper_version.h
-# missing file: file is in -testdata only, but configure stage
-# will fail if it's not there. do not break TESTS build while
-# allowing regular build without pulling in -testdata.
-	${TOUCH} ${WRKSRC}/chrome/test/data/webui/i18n_process_css_test.html
+	${PYTHONBIN} ./build/linux/unbundle/remove_bundled_libraries.py \
+		${KEEPLIBS} --do-remove \
+			|| ${FALSE}
 
-do-configure:
-	cd ${WRKSRC} && \
-	${SETENV} ${CONFIGURE_ENV} \
-	${PYTHONBIN} ./build/gyp_chromium chrome/chrome.gyp --depth . \
-		${GYP_DEFINES:C/^/-D/}
+	cp -r ${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/linux \
+		${WRKSRC}/third_party/ffmpeg/chromium/config/Chrome/${LOWER_OPSYS}
+# a wrapper for rpath $ORIGIN removal
+#	echo "#! /bin/sh" > ${WRKSRC}/python
+#	echo "LD_LIBRARY_PATH=./ ${PYTHONBIN} \"\$$@\"" >> ${WRKSRC}/python
+#	chmod 755 ${WRKSRC}/python
 
-# From OpenBSD Ports www/chromium
-NINJA_BUILD_TARGETS+=	generate_version_info
-NINJA_BUILD_TARGETS+=	cloud_policy_proto
-NINJA_BUILD_TARGETS+=	net_interfaces
-NINJA_BUILD_TARGETS+=	suggestions
-NINJA_BUILD_TARGETS+=	cacheinvalidation
-NINJA_BUILD_TARGETS+=	cacheinvalidation_proto_cpp
-NINJA_BUILD_TARGETS+=	gfx_vector_icons
-NINJA_BUILD_TARGETS+=	data_reduction_proxy_proto
-NINJA_BUILD_TARGETS+=	cloud_policy_code_generate
-NINJA_BUILD_TARGETS+=	common_constants
-NINJA_BUILD_TARGETS+=	profile_reset_report_proto
-NINJA_BUILD_TARGETS+=	autofill_server_proto
-NINJA_BUILD_TARGETS+=	ipc_mojo
-# Below is generated from ninja -t targets.
-NINJA_BUILD_TARGETS+=	app_list_resources
-NINJA_BUILD_TARGETS+=	app_shell_resources
-NINJA_BUILD_TARGETS+=	ash_resources
-NINJA_BUILD_TARGETS+=	blink_devtools_frontend_resources
-NINJA_BUILD_TARGETS+=	blink_image_resources
-NINJA_BUILD_TARGETS+=	blink_resources
-NINJA_BUILD_TARGETS+=	chrome_extra_resources
-NINJA_BUILD_TARGETS+=	chrome_resources
-NINJA_BUILD_TARGETS+=	chrome_unscaled_resources
-NINJA_BUILD_TARGETS+=	common_mojo_bindings
-NINJA_BUILD_TARGETS+=	components_resources
-NINJA_BUILD_TARGETS+=	content_common_mojo_bindings
-NINJA_BUILD_TARGETS+=	content_common_mojo_bindings_mojom
-NINJA_BUILD_TARGETS+=	content_resources
-NINJA_BUILD_TARGETS+=	content_shell_mojo_bindings
-NINJA_BUILD_TARGETS+=	content_shell_mojo_bindings_mojom
-NINJA_BUILD_TARGETS+=	content_shell_resources
-NINJA_BUILD_TARGETS+=	contextual_search_mojo_bindings
-NINJA_BUILD_TARGETS+=	device_battery_mojo_bindings
-NINJA_BUILD_TARGETS+=	device_usb_mojo_bindings
-NINJA_BUILD_TARGETS+=	device_vibration_mojo_bindings
-NINJA_BUILD_TARGETS+=	devtools_frontend_resources
-NINJA_BUILD_TARGETS+=	devtools_resources
-NINJA_BUILD_TARGETS+=	dom_distiller_mojo_bindings
-NINJA_BUILD_TARGETS+=	extensions_resources
-NINJA_BUILD_TARGETS+=	filesystem_bindings_mojom
-NINJA_BUILD_TARGETS+=	keyboard_resources
-NINJA_BUILD_TARGETS+=	leveldb_bindings_mojom
-NINJA_BUILD_TARGETS+=	mojo_application_bindings_mojom
-NINJA_BUILD_TARGETS+=	mojo_bindings
-NINJA_BUILD_TARGETS+=	mojo_bindings_mojom
-NINJA_BUILD_TARGETS+=	mojo_geometry_bindings_mojom
-NINJA_BUILD_TARGETS+=	mojo_interface_bindings_mojom
-NINJA_BUILD_TARGETS+=	net_resources
-NINJA_BUILD_TARGETS+=	packed_extra_resources
-NINJA_BUILD_TARGETS+=	packed_resources
-NINJA_BUILD_TARGETS+=	platform_verification_mojo_bindings
-NINJA_BUILD_TARGETS+=	profile_service_bindings_mojom
-NINJA_BUILD_TARGETS+=	provision_fetcher_mojo_bindings
-NINJA_BUILD_TARGETS+=	remoting_resources
-NINJA_BUILD_TARGETS+=	resources
-NINJA_BUILD_TARGETS+=	theme_resources
-NINJA_BUILD_TARGETS+=	tracing_resources
-NINJA_BUILD_TARGETS+=	tracing_service_bindings_mojom
-NINJA_BUILD_TARGETS+=	ui_resources
-NINJA_BUILD_TARGETS+=	views_resources
-NINJA_BUILD_TARGETS+=	web_cache_mojo_bindings
-NINJA_BUILD_TARGETS+=	web_ui_mojo_bindings
-NINJA_BUILD_TARGETS+=	widevinecdmadapter_resources
-NINJA_BUILD_TARGETS+=	browser_extensions
-NINJA_BUILD_TARGETS+=	chrome_strings
-# Real target
-NINJA_BUILD_TARGETS+=	chrome
+# Sadly rpath $ORIGIN/. is needed.
+#	rm -rf ${WRAPPER_DIR}
 
+	cd ${WRKSRC} && \
+	${PYTHONBIN} ./build/linux/unbundle/replace_gn_files.py \
+		--system-libraries \
+		flac libjpeg libpng libvpx libwebp libxml libxslt \
+		re2 snappy yasm \
+			|| ${FALSE}
+
+do-configure:
+	cd ${WRKSRC} && \
+		${SETENV} ${CONFIGURE_ENV} \
+		${PYTHONBIN} ./tools/gn/bootstrap/bootstrap.py \
+			${GN_BOOTSTRAP_FLAGS} \
+			--gn-gen-args '${GN_ARGS}'
+	cd ${WRKSRC} && \
+		${SETENV} ${CONFIGURE_ENV} \
+		./out/${BUILDTYPE}/gn \
+			gen --args='${GN_ARGS}' \
+			--script-executable="${PYTHONBIN}" \
+			${GN_VERBOSE} \
+			out/${BUILDTYPE}
+	
 do-build:
-.for target in ${NINJA_BUILD_TARGETS}
-	${ECHO} TARGET is ${target} && \
 	cd ${WRKSRC} && \
 	${SETENV} ${MAKE_ENV} \
-	ninja -C out/${BUILDTYPE} ${target}
-.endfor
+		ninja -j ${MAKE_JOBS} -C out/${BUILDTYPE} \
+			chrome
 
 CHROMIUM_DIR=		chrome
 INSTALLATION_DIRS+=	${CHROMIUM_DIR}
 INSTALLATION_DIRS+=	bin
+INSTALLATION_DIRS+=	lib
 INSTALLATION_DIRS+=	${PKGMANDIR}/man1
 
 ICON_SIZES=		22 24 48 64 128 256
@@ -237,26 +268,32 @@ INSTALLATION_DIRS+=	${ICONS_DIR${i}}
 .endfor
 
 CHROMIUM_PROGS+=	chrome
-CHROMIUM_PROGS+=	mksnapshot
+CHROMIUM_SCRIPTS+=	chrome-wrapper
+# Installed, however may not work.
+CHROMIUM_LIBS+=		libwidevinecdmadapter.so
 
-CHROMIUM_FILES+=	libyuv.a
+CHROMIUM_FILES+=	chrome.1
 CHROMIUM_FILES+=	chrome_100_percent.pak
 CHROMIUM_FILES+=	chrome_200_percent.pak
-CHROMIUM_FILES+=	chrome_material_100_percent.pak
-CHROMIUM_FILES+=	chrome_material_200_percent.pak
-CHROMIUM_FILES+=	content_browser_manifest.json
-CHROMIUM_FILES+=	content_renderer_manifest.json
-CHROMIUM_FILES+=	content_resources.pak
 CHROMIUM_FILES+=	icudtl.dat
 CHROMIUM_FILES+=	keyboard_resources.pak
 CHROMIUM_FILES+=	resources.pak
-CHROMIUM_FILES+=	shell_resources.pak
 
 do-install:
 .for i in ${CHROMIUM_PROGS}
 	${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${i} \
 		${DESTDIR}${PREFIX}/${CHROMIUM_DIR}
 .endfor
+.for i in ${CHROMIUM_SCRIPTS}
+	${INSTALL_SCRIPT} ${WRKSRC}/out/${BUILDTYPE}/${i} \
+		${DESTDIR}${PREFIX}/${CHROMIUM_DIR}
+.endfor
+.for i in ${CHROMIUM_LIBS}
+	${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${i} \
+		${DESTDIR}${PREFIX}/${CHROMIUM_DIR}
+.endfor
+	${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/libwidevinecdm.so \
+		${DESTDIR}${PREFIX}/lib
 .for i in ${CHROMIUM_FILES}
 	${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${i} \
 		${DESTDIR}${PREFIX}/${CHROMIUM_DIR}
@@ -269,7 +306,7 @@ do-install:
 	${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${i}.png \
 		${DESTDIR}${PREFIX}/${ICONS_DIR${i}}/chrome.png
 .endfor
-.for i in catalog locales pseudo_locales remoting_locales resources
+.for i in locales resources
 	cd ${WRKSRC}/out/${BUILDTYPE} && \
 		${FIND} ${i} -type f -print | \
 		pax -rw -pmp ${DESTDIR}${PREFIX}/${CHROMIUM_DIR}
@@ -278,8 +315,10 @@ do-install:
 .include "../../graphics/hicolor-icon-theme/buildlink3.mk"
 .include "../../audio/speech-dispatcher/buildlink3.mk"
 .include "../../audio/pulseaudio/buildlink3.mk"
+# Not tested
 #.include "../../audio/alsa-lib/buildlink3.mk"
 .include "../../graphics/cairo/buildlink3.mk"
+# This introduces OpenSSL dependency and it conflicts with bundled BoringSSL.
 #.include "../../print/cups/buildlink3.mk"
 .include "../../sysutils/dbus/buildlink3.mk"
 .include "../../sysutils/dbus-glib/buildlink3.mk"
@@ -288,8 +327,9 @@ do-install:
 .include "../../audio/flac/buildlink3.mk"
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../security/libgnome-keyring/buildlink3.mk"
+# Not yet
 #.include "../../fonts/harfbuzz/buildlink3.mk"
-.include "../../devel/libevent/buildlink3.mk"
+#.include "../../devel/libevent/buildlink3.mk"
 .include "../../graphics/libexif/buildlink3.mk"
 .include "../../fonts/fontconfig/buildlink3.mk"
 .include "../../security/libgcrypt/buildlink3.mk"
@@ -325,7 +365,12 @@ BUILDLINK_TRANSFORM.NetBSD+=	opt:-lpci:-lpciutils
 .include "../../mk/jpeg.buildlink3.mk"
 .include "../../devel/libusb1/buildlink3.mk"
 .include "../../misc/usbids/buildlink3.mk"
+# Not yet
 #.include "../../textproc/icu/buildlink3.mk"
+.include "../../multimedia/libvpx/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+# Conflict between OpenSSL and BoringSSL.
+#.include "../../multimedia/ffmpeg3/buildlink3.mk"
 
 .include "../../lang/python/tool.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/chromium-new/PLIST b/chromium-new/PLIST
index 42c539c..6bd2a2e 100644
--- a/chromium-new/PLIST
+++ b/chromium-new/PLIST
@@ -1,17 +1,13 @@
 @comment $NetBSD$
 bin/chrome
-chrome/catalog/manifest.json
 chrome/chrome
+chrome/chrome-wrapper
+chrome/chrome.1
 chrome/chrome_100_percent.pak
 chrome/chrome_200_percent.pak
-chrome/chrome_material_100_percent.pak
-chrome/chrome_material_200_percent.pak
-chrome/content_browser_manifest.json
-chrome/content_renderer_manifest.json
-chrome/content_resources.pak
 chrome/icudtl.dat
 chrome/keyboard_resources.pak
-chrome/libyuv.a
+chrome/libwidevinecdmadapter.so
 chrome/locales/am.pak
 chrome/locales/ar.pak
 chrome/locales/bg.pak
@@ -27,6 +23,7 @@ chrome/locales/es-419.pak
 chrome/locales/es.pak
 chrome/locales/et.pak
 chrome/locales/fa.pak
+chrome/locales/fake-bidi.pak
 chrome/locales/fi.pak
 chrome/locales/fil.pak
 chrome/locales/fr.pak
@@ -65,64 +62,13 @@ chrome/locales/uk.pak
 chrome/locales/vi.pak
 chrome/locales/zh-CN.pak
 chrome/locales/zh-TW.pak
-chrome/mksnapshot
-chrome/pseudo_locales/fake-bidi.pak
-chrome/remoting_locales/am.pak
-chrome/remoting_locales/ar.pak
-chrome/remoting_locales/bg.pak
-chrome/remoting_locales/bn.pak
-chrome/remoting_locales/ca.pak
-chrome/remoting_locales/cs.pak
-chrome/remoting_locales/da.pak
-chrome/remoting_locales/de.pak
-chrome/remoting_locales/el.pak
-chrome/remoting_locales/en-GB.pak
-chrome/remoting_locales/en.pak
-chrome/remoting_locales/es-419.pak
-chrome/remoting_locales/es.pak
-chrome/remoting_locales/et.pak
-chrome/remoting_locales/fa.pak
-chrome/remoting_locales/fake-bidi.pak
-chrome/remoting_locales/fi.pak
-chrome/remoting_locales/fil.pak
-chrome/remoting_locales/fr.pak
-chrome/remoting_locales/gu.pak
-chrome/remoting_locales/he.pak
-chrome/remoting_locales/hi.pak
-chrome/remoting_locales/hr.pak
-chrome/remoting_locales/hu.pak
-chrome/remoting_locales/id.pak
-chrome/remoting_locales/it.pak
-chrome/remoting_locales/ja.pak
-chrome/remoting_locales/kn.pak
-chrome/remoting_locales/ko.pak
-chrome/remoting_locales/lt.pak
-chrome/remoting_locales/lv.pak
-chrome/remoting_locales/ml.pak
-chrome/remoting_locales/mr.pak
-chrome/remoting_locales/ms.pak
-chrome/remoting_locales/nb.pak
-chrome/remoting_locales/nl.pak
-chrome/remoting_locales/pl.pak
-chrome/remoting_locales/pt-BR.pak
-chrome/remoting_locales/pt-PT.pak
-chrome/remoting_locales/ro.pak
-chrome/remoting_locales/ru.pak
-chrome/remoting_locales/sk.pak
-chrome/remoting_locales/sl.pak
-chrome/remoting_locales/sr.pak
-chrome/remoting_locales/sv.pak
-chrome/remoting_locales/sw.pak
-chrome/remoting_locales/ta.pak
-chrome/remoting_locales/te.pak
-chrome/remoting_locales/th.pak
-chrome/remoting_locales/tr.pak
-chrome/remoting_locales/uk.pak
-chrome/remoting_locales/vi.pak
-chrome/remoting_locales/zh-CN.pak
-chrome/remoting_locales/zh-TW.pak
 chrome/resources.pak
-chrome/resources/extension/demo/library.js
+chrome/resources/inspector/Images/accelerometer-back.png
+chrome/resources/inspector/Images/accelerometer-bottom.png
+chrome/resources/inspector/Images/accelerometer-front.png
+chrome/resources/inspector/Images/accelerometer-left.png
+chrome/resources/inspector/Images/accelerometer-right.png
+chrome/resources/inspector/Images/accelerometer-top.png
 chrome/resources/inspector/Images/applicationCache.png
 chrome/resources/inspector/Images/breakpoint.png
 chrome/resources/inspector/Images/breakpointConditional.png
@@ -136,9 +82,6 @@ chrome/resources/inspector/Images/chromeMiddle.png
 chrome/resources/inspector/Images/chromeRight.png
 chrome/resources/inspector/Images/chromeSelect.png
 chrome/resources/inspector/Images/chromeSelect_2x.png
-chrome/resources/inspector/Images/cookie.png
-chrome/resources/inspector/Images/database.png
-chrome/resources/inspector/Images/databaseTable.png
 chrome/resources/inspector/Images/deleteIcon.png
 chrome/resources/inspector/Images/domain.png
 chrome/resources/inspector/Images/errorWave.png
@@ -150,10 +93,6 @@ chrome/resources/inspector/Images/graphLabelCalloutLeft.png
 chrome/resources/inspector/Images/graphLabelCalloutRight.png
 chrome/resources/inspector/Images/ic_info_black_18dp.svg
 chrome/resources/inspector/Images/ic_warning_black_18dp.svg
-chrome/resources/inspector/Images/indexedDB.png
-chrome/resources/inspector/Images/indexedDBIndex.png
-chrome/resources/inspector/Images/indexedDBObjectStore.png
-chrome/resources/inspector/Images/localStorage.png
 chrome/resources/inspector/Images/navigationControls.png
 chrome/resources/inspector/Images/navigationControls_2x.png
 chrome/resources/inspector/Images/paneAddButtons.png
@@ -173,24 +112,20 @@ chrome/resources/inspector/Images/resizeVertical_2x.png
 chrome/resources/inspector/Images/resourceCSSIcon.png
 chrome/resources/inspector/Images/resourceDocumentIcon.png
 chrome/resources/inspector/Images/resourceDocumentIconSmall.png
+chrome/resources/inspector/Images/resourceGlyphs.png
+chrome/resources/inspector/Images/resourceGlyphs_2x.png
 chrome/resources/inspector/Images/resourceJSIcon.png
 chrome/resources/inspector/Images/resourcePlainIcon.png
 chrome/resources/inspector/Images/resourcePlainIconSmall.png
 chrome/resources/inspector/Images/resourcesTimeGraphIcon.png
 chrome/resources/inspector/Images/searchNext.png
 chrome/resources/inspector/Images/searchPrev.png
-chrome/resources/inspector/Images/securityPropertyInfo.svg
-chrome/resources/inspector/Images/securityPropertyInsecure.svg
-chrome/resources/inspector/Images/securityPropertySecure.svg
-chrome/resources/inspector/Images/securityPropertyUnknown.svg
-chrome/resources/inspector/Images/securityPropertyWarning.svg
-chrome/resources/inspector/Images/securityStateInsecure.svg
-chrome/resources/inspector/Images/securityStateNeutral.svg
-chrome/resources/inspector/Images/securityStateSecure.svg
-chrome/resources/inspector/Images/serviceWorker.svg
-chrome/resources/inspector/Images/sessionStorage.png
+chrome/resources/inspector/Images/securityIcons.png
+chrome/resources/inspector/Images/securityIcons_2x.png
 chrome/resources/inspector/Images/settingsListRemove.png
 chrome/resources/inspector/Images/settingsListRemove_2x.png
+chrome/resources/inspector/Images/smallIcons.png
+chrome/resources/inspector/Images/smallIcons_2x.png
 chrome/resources/inspector/Images/speech.png
 chrome/resources/inspector/Images/toolbarButtonGlyphs.png
 chrome/resources/inspector/Images/toolbarButtonGlyphs_2x.png
@@ -202,17 +137,22 @@ chrome/resources/inspector/Images/touchCursor_2x.png
 chrome/resources/inspector/InspectorBackendCommands.js
 chrome/resources/inspector/SupportedCSSProperties.js
 chrome/resources/inspector/Tests.js
-chrome/resources/inspector/accessibility_module.js
-chrome/resources/inspector/animation_module.js
-chrome/resources/inspector/audits_module.js
-chrome/resources/inspector/cm_modes_module.js
-chrome/resources/inspector/components_lazy_module.js
-chrome/resources/inspector/console_module.js
-chrome/resources/inspector/devices_module.js
+chrome/resources/inspector/accessibility/accessibility_module.js
+chrome/resources/inspector/animation/animation_module.js
+chrome/resources/inspector/audits/audits_module.js
+chrome/resources/inspector/cm_modes/cm_modes_module.js
+chrome/resources/inspector/components_lazy/components_lazy_module.js
+chrome/resources/inspector/console/console_module.js
+chrome/resources/inspector/devices/devices_module.js
 chrome/resources/inspector/devtools.js
 chrome/resources/inspector/devtools_extension_api.js
-chrome/resources/inspector/diff_module.js
-chrome/resources/inspector/elements_module.js
+chrome/resources/inspector/diff/diff_module.js
+chrome/resources/inspector/elements/elements_module.js
+chrome/resources/inspector/emulated_devices/Nexus5X-landscape.svg
+chrome/resources/inspector/emulated_devices/Nexus5X-portrait.svg
+chrome/resources/inspector/emulated_devices/Nexus6P-landscape.svg
+chrome/resources/inspector/emulated_devices/Nexus6P-portrait.svg
+chrome/resources/inspector/emulated_devices/emulated_devices_module.js
 chrome/resources/inspector/emulated_devices/google-nexus-5-horizontal-default-1x.png
 chrome/resources/inspector/emulated_devices/google-nexus-5-horizontal-default-2x.png
 chrome/resources/inspector/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png
@@ -237,29 +177,38 @@ chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-keyboard-1x
 chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png
 chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-navigation-1x.png
 chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-navigation-2x.png
-chrome/resources/inspector/emulated_devices_module.js
-chrome/resources/inspector/es_tree_module.js
-chrome/resources/inspector/formatter_worker_module.js
-chrome/resources/inspector/heap_snapshot_worker_module.js
+chrome/resources/inspector/emulated_devices/iPad-landscape.svg
+chrome/resources/inspector/emulated_devices/iPad-portrait.svg
+chrome/resources/inspector/emulated_devices/iPhone5-landscape.svg
+chrome/resources/inspector/emulated_devices/iPhone5-portrait.svg
+chrome/resources/inspector/emulated_devices/iPhone6-landscape.svg
+chrome/resources/inspector/emulated_devices/iPhone6-portrait.svg
+chrome/resources/inspector/emulated_devices/iPhone6Plus-landscape.svg
+chrome/resources/inspector/emulated_devices/iPhone6Plus-portrait.svg
+chrome/resources/inspector/es_tree/es_tree_module.js
+chrome/resources/inspector/formatter_worker.js
+chrome/resources/inspector/gonzales/gonzales_module.js
+chrome/resources/inspector/heap_snapshot_worker.js
 chrome/resources/inspector/inspector.html
 chrome/resources/inspector/inspector.js
-chrome/resources/inspector/layers_module.js
-chrome/resources/inspector/network_module.js
-chrome/resources/inspector/profiler_module.js
-chrome/resources/inspector/resources_module.js
-chrome/resources/inspector/sass_module.js
-chrome/resources/inspector/screencast_module.js
-chrome/resources/inspector/security_module.js
-chrome/resources/inspector/settings_module.js
-chrome/resources/inspector/snippets_module.js
-chrome/resources/inspector/source_frame_module.js
-chrome/resources/inspector/sources_module.js
-chrome/resources/inspector/temp_storage_shared_worker_module.js
-chrome/resources/inspector/timeline_module.js
+chrome/resources/inspector/layers/layers_module.js
+chrome/resources/inspector/network/network_module.js
+chrome/resources/inspector/profiler/profiler_module.js
+chrome/resources/inspector/resources/resources_module.js
+chrome/resources/inspector/sass/sass_module.js
+chrome/resources/inspector/screencast/screencast_module.js
+chrome/resources/inspector/security/security_module.js
+chrome/resources/inspector/settings/settings_module.js
+chrome/resources/inspector/snippets/snippets_module.js
+chrome/resources/inspector/source_frame/source_frame_module.js
+chrome/resources/inspector/sources/sources_module.js
+chrome/resources/inspector/temp_storage_shared_worker.js
+chrome/resources/inspector/timeline/timeline_module.js
+chrome/resources/inspector/timeline_model/timeline_model_module.js
 chrome/resources/inspector/toolbox.html
 chrome/resources/inspector/toolbox.js
-chrome/resources/inspector/ui_lazy_module.js
-chrome/shell_resources.pak
+chrome/resources/inspector/ui_lazy/ui_lazy_module.js
+lib/libwidevinecdm.so
 man/man1/chrome.1
 share/icons/hicolor/128x128/apps/chrome.png
 share/icons/hicolor/22x22/apps/chrome.png
diff --git a/chromium-new/TODO b/chromium-new/TODO
index 1415bef..fb300d2 100644
--- a/chromium-new/TODO
+++ b/chromium-new/TODO
@@ -1,6 +1,3 @@
 To Do:
 
-* Unstable and sometimes,
-  System panicked: kernel diagnostic assertion "l->l_md.md_gc_ptp == NULL" failed: file "/usr/src/sys/arch/x86/x86/vm_machdep.c", line 262
-* Cannot signin to Chromium with Google account
 * No html5 audio (video has no problem)
diff --git a/chromium-new/distinfo b/chromium-new/distinfo
index 4e21236..09f26c8 100644
--- a/chromium-new/distinfo
+++ b/chromium-new/distinfo
@@ -1,453 +1,502 @@
 $NetBSD$
 
-SHA1 (chromium-51.0.2704.106.tar.xz) = 5212b0f96be80c0146f7caf0883cfb39a3827177
-RMD160 (chromium-51.0.2704.106.tar.xz) = 7de0ee47b71dbd8e39f4259590e04e5c10ac7c6f
-SHA512 (chromium-51.0.2704.106.tar.xz) = 2afd73ae6942f7d3092e54d2f24bf251baa28bd40b66604fab7a5f854ccfc55b839f7860b2c2c09e35174da66f24e0fef2cb1f6d2e1733ad8da1f6cdb4a4e308
-Size (chromium-51.0.2704.106.tar.xz) = 448656636 bytes
-SHA1 (patch-base_base.gyp) = 8bcdefdacfc1cb979c6330eecbe3a4ee33c0aff8
-SHA1 (patch-base_base.gypi) = 1ff58afdfe4301c58978ac7d6bc7c6bf24c24d19
-SHA1 (patch-base_base__paths__posix.cc) = e8c08666412f6cc9e08e58356a651a47befe290f
-SHA1 (patch-base_debug_debugger__posix.cc) = b1983a4bb3a9429394b5bc0665eb66b14f228204
-SHA1 (patch-base_debug_stack__trace__posix.cc) = 08dc7ad292480c3a07787df7e837266c730c10fb
-SHA1 (patch-base_files_file__path__watcher__kqueue.cc) = faabf877afc757b4c5c5fe1a6d9a1c04917ad1ad
-SHA1 (patch-base_files_file__path__watcher__kqueue.h) = fef4498a2495ed08e1986910d0872abe5889b2b6
-SHA1 (patch-base_i18n_icu__util.cc) = 29b269d1491a0d59436d14354358646f10193393
-SHA1 (patch-base_i18n_icu__util.h) = e6dfc47010581c67d60e80a36e422cda1a33d5ba
-SHA1 (patch-base_linux__util.cc) = 292ed8100d0d8c7a2cbe0bd97ab3ac29153d75a3
-SHA1 (patch-base_posix_unix__domain__socket__linux.cc) = b4d5cd2d70ee8b3021a2e4859af457dd62abb244
-SHA1 (patch-base_posix_unix__domain__socket__linux__unittest.cc) = 94f59b1609a950884cc461ea96350a04df09052b
-SHA1 (patch-base_process_internal__linux.h) = dec9c9f6c7509288a6574072391f77f9ae4c2316
-SHA1 (patch-base_process_launch.cc) = 6bb7c00ba79ab785e2640934a2274db8959ce02c
-SHA1 (patch-base_process_launch.h) = bfad5e02d9576e6dc9ee0410f8a0b9a99933369d
-SHA1 (patch-base_process_launch__posix.cc) = 243d3de308f1a3cf7cb063c78f238f7a00ccb78c
-SHA1 (patch-base_process_memory.cc) = cad48073d6cc898872c99c13a862694c0ce92269
-SHA1 (patch-base_process_memory.h) = 089a781ab84221113c130c44d2e77446cc6f1240
-SHA1 (patch-base_process_memory__stubs.cc) = 35909eff800e990b4275f27cf7c6d5d349828542
-SHA1 (patch-base_process_memory__unittest.cc) = cda374fec64d4ed8da56fd2468ce332fb961f575
-SHA1 (patch-base_process_process__handle__netbsd.cc) = 9b236290890123473a07150fafb2b813a50e2419
-SHA1 (patch-base_process_process__info__linux.cc) = 8c6808e7143673310ec2936edb3bcbe27442498c
-SHA1 (patch-base_process_process__iterator.h) = 8de7e317b4c95308ac689e2191074fc8ada3e27a
-SHA1 (patch-base_process_process__iterator__freebsd.cc) = b24cf46d4b59e9f4dd4336d9288a6ba75bf55e4f
-SHA1 (patch-base_process_process__iterator__netbsd.cc) = c893f74e881c9f916cdd6ce641ae764d00a2c3e7
-SHA1 (patch-base_process_process__metrics.h) = 6f5b1dabf7d717527ffbe2bb03d915b2d7cc2335
-SHA1 (patch-base_process_process__metrics__freebsd.cc) = 652ce63118ef23d96fde23746d05a2d8472b09eb
-SHA1 (patch-base_process_process__metrics__netbsd.cc) = 48e9e0b0bc5060d8b7b4d4595b53ae4cfc178c61
-SHA1 (patch-base_process_process__metrics__posix.cc) = 79d1d0c17a1044f4247b88eead9a902061ef1c3f
-SHA1 (patch-base_process_process__posix.cc) = d78ca399d2b3b8ff1eb8f221d9a191c076cf4180
-SHA1 (patch-base_security__unittest.cc) = f4d2004a5c218d428307283251824755be84c179
-SHA1 (patch-base_strings_safe__sprintf.cc) = 9b258ad5ac5bae6ee7e2ac9dcb256ba981a78df7
-SHA1 (patch-base_sys__info__freebsd.cc) = 1a6cd2157c1b0c9e747d1bc536913f177deb7738
-SHA1 (patch-base_sys__info__netbsd.cc) = a739619ac8a3743177548d700726570465f148dc
-SHA1 (patch-base_sys__info__posix.cc) = 96941a91abfc6a9fce620925081a8cb67e0b37b4
-SHA1 (patch-base_test_launcher_test__launcher.cc) = 80c81da421acd2b919f636dac92171b1f3ad259e
-SHA1 (patch-base_threading_platform__thread__linux.cc) = e503ec65860c76e983a74615bc5dc79a16a32a33
-SHA1 (patch-base_threading_platform__thread__posix.cc) = 2e6b12e2b5af5e01efacd34f023beb8e1fc61e1c
-SHA1 (patch-base_trace__event_process__memory__dump.cc) = 7c28a6ac88c6b812dab3c79e26bc8bc7f83678a1
-SHA1 (patch-base_trace__event_process__memory__dump.h) = 8f9fea6a2a271482a6e5290a8e768372683fe2de
-SHA1 (patch-build_build__config.h) = f6c09cbcf5d917da3104842ce307d60303707401
-SHA1 (patch-build_common.gypi) = 19d13a9b48994857c7150ba77ed5de92090e3b2c
-SHA1 (patch-build_filename__rules.gypi) = dd720f3c44228674d6b987fc51a7b29705dfd680
-SHA1 (patch-build_linux_system.gyp) = c1b58d24d653be2926d47340304647faedc9c935
-SHA1 (patch-build_linux_unbundle_libwebp.gyp) = 05e963f78891c2954b5cdc4fb5f644135ad96b10
-SHA1 (patch-cc_layers_scrollbar__layer__impl__base.cc) = 294c29df3025d921482e7cdfa4b3351b6f2ab584
-SHA1 (patch-cc_trees_property__tree.cc) = 23a1a7d81e3244131856156ab6804786a9c74afd
-SHA1 (patch-chrome_app_chrome__main__delegate.cc) = be4ab117d7863f0c1eb9cd3f4d371c621c6d3619
-SHA1 (patch-chrome_app_chrome__main__delegate.h) = c77f0308ebe2ebb1387546c56dcbf4795b6d420d
-SHA1 (patch-chrome_app_chromium__strings.grd) = 8f3366066d34bfb962f67051ec2ac9bbe9b99018
-SHA1 (patch-chrome_app_generated__resources.grd) = c188fa5341e08104d0b6e554dd1db01b7277872d
-SHA1 (patch-chrome_app_resources_locale__settings.grd) = e3ed8bfd4b7710f7db5a520d290069145cc9ac16
-SHA1 (patch-chrome_browser_about__flags.cc) = 76ac78bc9e7f10a15ca4371a64a03a2124b51714
-SHA1 (patch-chrome_browser_browser__resources.grd) = 4f9c0100f67346c9dd5cdb8aac6796656340f01a
-SHA1 (patch-chrome_browser_chrome__browser__main.cc) = a65d7e33c9e0e6805dfa76f3e21ee2d911a73c83
-SHA1 (patch-chrome_browser_chrome__browser__main__linux.cc) = 1cc1c770e66218cfa78f647adb513326e475aaf2
-SHA1 (patch-chrome_browser_chrome__browser__main__posix.cc) = 86b752fc93faeab5078d34b65479d3f4d1d06b37
-SHA1 (patch-chrome_browser_chrome__content__browser__client.cc) = 809d14065a644abd31627dba613970daefb46c40
-SHA1 (patch-chrome_browser_chrome__content__browser__client.h) = eb0f643ac57ef93bfe3157648b840615b3268c8a
-SHA1 (patch-chrome_browser_defaults.cc) = 9e2700ed67c33295d411825914ed0c100d9a55e2
-SHA1 (patch-chrome_browser_diagnostics_diagnostics__writer.cc) = b3f4a473b73dd913e4728a2c35b132da16b11998
-SHA1 (patch-chrome_browser_diagnostics_diagnostics__writer.h) = 707a042df241f0213777021c144df4c1a80311ab
-SHA1 (patch-chrome_browser_download_chrome__download__manager__delegate.cc) = f78a966f29ff38028cc7bda6ce31aada673d9dc7
-SHA1 (patch-chrome_browser_download_download__commands.cc) = 9aad34dadfe72da3e1e6c9fcbc42aa0ca1554e29
-SHA1 (patch-chrome_browser_download_download__commands.h) = 956b6c87edd6415cf170d87716c43f5af0917343
-SHA1 (patch-chrome_browser_download_download__prefs.cc) = b315cf3f49e4699344e962cb09fef9b76db8dd47
-SHA1 (patch-chrome_browser_download_download__prefs.h) = 84cd1f4f8b0e1d34fc703d9fe304ecfad042d437
-SHA1 (patch-chrome_browser_download_download__query.cc) = ec7dab730d873f48b1fb5665076ab340fca86130
-SHA1 (patch-chrome_browser_download_download__shelf__context__menu.cc) = dada990d0acb5b9857feda8f2919e367588aab10
-SHA1 (patch-chrome_browser_extensions_activity__log_activity__log.cc) = 30ba8f4e19d79133b6aeebf11a3121b7c305a085
-SHA1 (patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc) = c2fb46cc8fa4c5b433f024221ddc5d861702cb9c
-SHA1 (patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc) = a08be3225a823943cd396759cb4828a318f865ae
-SHA1 (patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.h) = 6cddc43019033ea9fc4d4a86ee18030d9e1c39ac
-SHA1 (patch-chrome_browser_extensions_api_input__ime_input__ime__api.h) = e14719f5f2739f99cde3e5d0c4133a366b47bb27
-SHA1 (patch-chrome_browser_extensions_api_messaging_message__service.cc) = 6e7e9a67d508fdfafe09096dd4e2d01058b67825
-SHA1 (patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc) = 55ce1f5d5b31f323455c28c5d74cc7ab5f6db3b7
-SHA1 (patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc) = e8bca7a09ebda74d96d6d0187bb1df89d2eda029
-SHA1 (patch-chrome_browser_extensions_external__provider__impl.cc) = 613f6df298e2c7f81523aaf065fe78c16ef97bce
-SHA1 (patch-chrome_browser_extensions_window__open__apitest.cc) = a4db9bfcc8e7469cb7905b6feb9074524ce85d36
-SHA1 (patch-chrome_browser_gpu_gl__string__manager.cc) = f781e59274036acd5fcb92196a472f9c50019482
-SHA1 (patch-chrome_browser_gpu_gpu__feature__checker.cc) = 76090a3a033989c9cab91a25bfc9e46e8d28cd05
-SHA1 (patch-chrome_browser_interstitials_chrome__controller__client.cc) = d75a44a1522de433ec009d2254d278d3cdcab9a3
-SHA1 (patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc) = 63283052ae0a2c332458879078dcfa791eb0687c
-SHA1 (patch-chrome_browser_media__galleries_media__file__system__registry.cc) = 9685c93bf96b71e2abb5547fda2d077beac1f08a
-SHA1 (patch-chrome_browser_media_webrtc__log__uploader.cc) = 5a027f227257a5dded15c10a615c83f07edba11f
-SHA1 (patch-chrome_browser_memory__details.cc) = f28539c8c3474b98bdafa3e69c461d191fa29f9c
-SHA1 (patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc) = a56fb1f82abfb635f609d0c00480c422671845d2
-SHA1 (patch-chrome_browser_notifications_message__center__notification__manager.cc) = 363b48d2297998d08bcd864a6e2176766893e7be
-SHA1 (patch-chrome_browser_password__manager_chrome__password__manager__client.cc) = 6319ad5080b2945adacdcd74f1e9b79ad1d42f45
-SHA1 (patch-chrome_browser_plugins_plugins__resource__service.cc) = 299f9b210c8298a218fd14ab0a25cea027b7877c
-SHA1 (patch-chrome_browser_policy_policy__prefs__browsertest.cc) = 9870501ddc52ce6ce0b968497045b0a48caaeb48
-SHA1 (patch-chrome_browser_process__singleton__posix.cc) = 1b124cd631c52ab0138ea00e2dead805e2680302
-SHA1 (patch-chrome_browser_renderer__preferences__util.cc) = f51aae55d16f6779d00e56c943cffdf6c135bb7b
-SHA1 (patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc) = cb916cc9cf09e0738b5466f88099cd3f34a02757
-SHA1 (patch-chrome_browser_search_local__files__ntp__source.cc) = bbebccfd637e738e1ce3c5dcd3fc5e8d361c23e5
-SHA1 (patch-chrome_browser_sync_chrome__sync__client.cc) = 4ade6fef16366aff828bd6059945e7de7cf3db04
-SHA1 (patch-chrome_browser_tracing_crash__service__uploader.cc) = ed3a9ae92855487d2026ea7a9088450755c5018c
-SHA1 (patch-chrome_browser_ui_browser__command__controller.cc) = 982195b9fd3f225a49faaa00aee040588e0d55a5
-SHA1 (patch-chrome_browser_ui_browser__view__prefs.cc) = 185e85c25de4f92d7b46978889ef756e5b0e3efc
-SHA1 (patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc) = c5f6bd04b62ee6c2a939d4ab1447c2693a28a88a
-SHA1 (patch-chrome_browser_ui_input__method_input__method__engine__base.cc) = 24201e7237c33c2e2e09b49678dd41b81b7c2feb
-SHA1 (patch-chrome_browser_ui_panels_panel__manager.cc) = 510a2289c49891dc6de447d9d5ef69608835e0cb
-SHA1 (patch-chrome_browser_ui_startup_startup__browser__creator.cc) = d31c7cd68d39ffe01afdee27ea17ac0527fe57be
-SHA1 (patch-chrome_browser_ui_toolbar_app__menu__model.cc) = 2d6728bd402bbb1a353dff11c7b4e009d5e9b751
-SHA1 (patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc) = be683a43a946a94a14e5d3f58523dceee13066b1
-SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate.cc) = f2d0c44554206ab0566a1ec97cb4aa1e7eea7c05
-SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate.h) = 1f6f272e0248aa27fa88e73e771dd10dfe0ff75e
-SHA1 (patch-chrome_browser_ui_views_first__run__dialog.cc) = 24f5890e1b35b4da7dcf54d7cd6d84e0f7ae609e
-SHA1 (patch-chrome_browser_ui_views_frame_browser__frame.cc) = 46bd39d7ec5b57ac12e8f4b0ff4e4d83d9eff296
-SHA1 (patch-chrome_browser_ui_views_frame_browser__root__view.cc) = 2ec5044b879aff539bbf1030b44857a37c5b2217
-SHA1 (patch-chrome_browser_ui_views_frame_browser__view.cc) = a3ee8ab565b7e14bbba8791e8be3e9dca97ba72f
-SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc) = 4f1715427b1094992c96003a447565418352a3a9
-SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc) = 374008b6584529c97b9b7c4c04b32f3e0fd4b23d
-SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc) = f959d815ca92e3eff5233f206a533e93f302a482
-SHA1 (patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc) = 05b00fd7b25228ffd16d2cb02fad87131d5d3b1f
-SHA1 (patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc) = d4e1f043878b383250c415300fc553cc1be878fb
-SHA1 (patch-chrome_browser_ui_views_panels_panel__frame__view.cc) = dece37969cf7373e259da07fcd1aa69100ee69c8
-SHA1 (patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc) = ea789d7bc26772b62f822a0cfdfcf5090a8ed684
-SHA1 (patch-chrome_browser_ui_views_tabs_tab__strip.cc) = dee6b63de6a1ff511b9f47e3eff1017c258e3dfd
-SHA1 (patch-chrome_browser_ui_webui_about__ui.cc) = 9858056446456ebf6dcc62e8238fc790e0021235
-SHA1 (patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc) = f39a6e6c164beb10f8815afa8bbde4c46518ef03
-SHA1 (patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc) = 6c72ee6cd3fecd6a663b3cb74125a36e0550852d
-SHA1 (patch-chrome_browser_ui_webui_options_browser__options__handler.cc) = c42a7914bce67ca2b79e9e7e7662285dd4c4555c
-SHA1 (patch-chrome_browser_ui_webui_options_browser__options__handler.h) = 92743ac921516594d260982a478232cfba898cf6
-SHA1 (patch-chrome_browser_web__applications_web__app.cc) = a8a32925302e3b78a56d4ded06260a7751fd7817
-SHA1 (patch-chrome_browser_web__applications_web__app.h) = eadb5a3cab8faaeb0315fdc97c26ac0d87ebb308
-SHA1 (patch-chrome_chrome__browser.gypi) = 6fba5113b1087ea93919675f4f184fd433878545
-SHA1 (patch-chrome_chrome__browser__extensions.gypi) = 99603a44a8dbaeccf07889f1ae794b05aea6a07a
-SHA1 (patch-chrome_chrome__browser__ui.gypi) = 4604e001fb4db1b02799fad126a6e012e91845fc
-SHA1 (patch-chrome_chrome__common.gypi) = f5baf8d4e1ef51c581c23750927a14ef83ccae6c
-SHA1 (patch-chrome_chrome__exe.gypi) = d86975910a43e442264596b1c85493cc21038107
-SHA1 (patch-chrome_common_channel__info__posix.cc) = 885d9a24b7f785dc76ca41b0205e876ca61bb4f9
-SHA1 (patch-chrome_common_chrome__paths.cc) = 290323247aed25b5f37772e17fda7de6af75317f
-SHA1 (patch-chrome_common_chrome__paths.h) = dc9e1bdba1227ad168bfe07cd94a11e1eae21e60
-SHA1 (patch-chrome_common_chrome__paths__internal.h) = d74708185471657d4669188aa87fdf792386c0d4
-SHA1 (patch-chrome_common_chrome__switches.cc) = 706791fb96cf2b4b45e9bf9c4a42021f713db06f
-SHA1 (patch-chrome_common_chrome__switches.h) = 673b303c472d81eb9a315d1da31a4aefa9c71b2a
-SHA1 (patch-chrome_common_component__flash__hint__file__linux.h) = cea4506709805f5df78691452ec78efe32f9b5c2
-SHA1 (patch-chrome_common_extensions_api_schemas.gypi) = a4d80f6ed15560588af2e96dc0a17a6314a44b47
-SHA1 (patch-chrome_common_extensions_command.cc) = ba68c59f2fc656557537d9a31668d970f21d73b4
-SHA1 (patch-chrome_common_pref__names.cc) = 2fd5847175c4a68aa602080bce81c7e2f6e4ebff
-SHA1 (patch-chrome_common_pref__names.h) = 5e35b356023b4522973d91d423cfa6bc3a442882
-SHA1 (patch-chrome_common_variations_fieldtrial__testing__config.gyp) = 95d88ca0632379bd677fc8bac32a5d3e0bf85083
-SHA1 (patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc) = f6a7beadcb3c93a08b58bdeb6e027b49bd9f8eb2
-SHA1 (patch-chrome_renderer_pepper_pepper__flash__font__file__host.h) = 14915951af481f028b735cdecfc167c93c57d0cf
-SHA1 (patch-chrome_test_base_in__process__browser__test.cc) = 993ab9a519a5a790ce750488107c597fa17c0da3
-SHA1 (patch-chrome_test_base_testing__browser__process.h) = 97edb39a86dcb45d2d9bee82f5d59d968d034f53
-SHA1 (patch-chrome_test_chromedriver_chrome_chrome__finder.cc) = 138f13a54c73c86266d72bb74eb819579f1ce9eb
-SHA1 (patch-components_autofill_content_renderer_password__form__conversion__utils.cc) = 9fd2106bfb684d39a4a6428701ed9e5ac6ac4c14
-SHA1 (patch-components_autofill_core_browser_form__structure.cc) = 9898db2c3b826074f4a660735fcdc8530d3b96c8
-SHA1 (patch-components_cookie__config_cookie__store__util.cc) = 5d5eba63f6fdbb410736899cfd63aa9a9c705cd3
-SHA1 (patch-components_dom__distiller_core_page__features.cc) = 53126900cef2bb693ec61a4da17534355dfeb2d5
-SHA1 (patch-components_drive_drive__api__util.cc) = 5a0af11ada1e51acfce1e784e824090a52fc995b
-SHA1 (patch-components_feedback_anonymizer__tool.cc) = 3628c519c93390b86b106a35f0c75714d691191b
-SHA1 (patch-components_flags__ui_flags__state.cc) = 3658b2d4e8347306b5b00081c54229ddab75becc
-SHA1 (patch-components_json__schema_json__schema__validator.cc) = 9fb8260357307ed19a978b810b5c81c3f62a9a5e
-SHA1 (patch-components_keyed__service_core_dependency__graph__unittest.cc) = 01f6cc0966f84fd9826cf01553d7e041f2297087
-SHA1 (patch-components_metrics_drive__metrics__provider__linux.cc) = 9ab9ac170bdfe688b242a4eb467dba6a90792fb4
-SHA1 (patch-components_metrics_system__memory__stats__recorder__linux.cc) = fac6d38fb31d61f5c9eccee82b6cccf4c5a1dd9b
-SHA1 (patch-components_neterror_resources_neterror.js) = b03a2a0e80fa689b2ac5a1bb056d211d2cfc398c
-SHA1 (patch-components_password__manager_core_browser_import_csv__reader.cc) = d297dc883579567d60d502bb0effc3e68676de88
-SHA1 (patch-components_plugins_renderer_plugin__placeholder.cc) = 2a8950604b5290e5f5a317cef5709f30dd862faf
-SHA1 (patch-components_policy_core_common_schema.cc) = d65e18664ec9ccef8fb44115b3a83b02ad981c68
-SHA1 (patch-components_policy_resources_policy__templates.json) = 3e4bec6af1387f1594558bee3f46ade6d4b1ef25
-SHA1 (patch-components_policy_tools_generate__policy__source.py) = 273c04aee70c0a46197b035bebd418601761fff7
-SHA1 (patch-components_storage__monitor.gypi) = 6b42a0ca768137f662bd8e8e931261b92e1e2c3a
-SHA1 (patch-components_storage__monitor_storage__monitor.cc) = aada15e6539c05b3fbf841e773e9115e5ec51259
-SHA1 (patch-components_storage__monitor_storage__monitor__freebsd.cc) = 9bebfeb7afd90e8843ba145f57d78867c738fcf3
-SHA1 (patch-components_storage__monitor_storage__monitor__freebsd.h) = d2f27f3680a1dd21ce66116f5020fa48dce9759c
-SHA1 (patch-components_storage__monitor_storage__monitor__netbsd.cc) = f56be795a83897fea3e823e58f3f85e0e98f1a2a
-SHA1 (patch-components_storage__monitor_storage__monitor__netbsd.h) = 01469bf0143193c2172dc533a11aa846a5fab2ef
-SHA1 (patch-components_update__client_update__query__params.cc) = 325905ac49c992252bd9a55b6f9c62feefcbe3c6
-SHA1 (patch-components_url__matcher_regex__set__matcher.cc) = 7c475fac8617e2b618bf1580e582fd8f75242922
-SHA1 (patch-components_url__matcher_url__matcher__factory.cc) = 6c254c711dafc0ee32b3547233c58a4132e3697c
-SHA1 (patch-components_webcrypto_algorithms_test__helpers.cc) = 27e64c94915b31308cde409da826e338b94ce494
-SHA1 (patch-content_app_content__main__runner.cc) = 5e6c13989662382db47116e8c4754ac03367d09f
-SHA1 (patch-content_browser_accessibility_browser__accessibility.h) = 6dc8e2df85b287734bc8cbf392eaed28485c7fe5
-SHA1 (patch-content_browser_accessibility_browser__accessibility__manager.h) = b21fe70979e66a91ef6fa3a242d5d2b71df1c573
-SHA1 (patch-content_browser_browser__main__loop.cc) = da4849a32483b7561774fa2ae92f48c651a412b7
-SHA1 (patch-content_browser_browser__shutdown__profile__dumper.cc) = 740c8f81986e04093830e5e8522d2ad2e409d47d
-SHA1 (patch-content_browser_child__process__launcher.cc) = 4a2b8ea55678943c8761ec32c3cee85712f5c2ca
-SHA1 (patch-content_browser_download_base__file.cc) = 7c1d4b33444ebb2168225c2c4bbabde10972d58a
-SHA1 (patch-content_browser_download_base__file__linux.cc) = 9786621267f4dddae701752fd56e0f73f1757435
-SHA1 (patch-content_browser_geolocation_location__arbitrator__impl.cc) = a0363bd55e18061fb9f8ef1b4882d0a1931e0782
-SHA1 (patch-content_browser_geolocation_wifi__data__provider__freebsd.cc) = 67a1e76bfe8bcb85e5681775c73aca1217969b09
-SHA1 (patch-content_browser_geolocation_wifi__data__provider__freebsd.h) = 9793189a5768521f25ae856497a3c1f6fc25b263
-SHA1 (patch-content_browser_gpu_gpu__data__manager__impl__private.cc) = c95ebf5f15431f63bfc646ee04e0d31215b0ab5c
-SHA1 (patch-content_browser_gpu_gpu__internals__ui.cc) = 933f9b1a6bbe02af85e2850078be00289ffa3767
-SHA1 (patch-content_browser_indexed__db_indexed__db__backing__store.cc) = dff03cc4a5695d1cdce72618e957b2bc9d90795f
-SHA1 (patch-content_browser_ppapi__plugin__process__host.cc) = 443a9cdd207fa2020d61fbc28f9736af24acca86
-SHA1 (patch-content_browser_renderer__host_render__process__host__impl.cc) = 2cc5cae1eb1297f35010ba053cfc7772fe4c5dbf
-SHA1 (patch-content_browser_renderer__host_render__widget__host__view__aura.cc) = 78c9585d6ba432d92dff09f6f14c4025f396dc6a
-SHA1 (patch-content_browser_time__zone__monitor.cc) = e977b9d11189b94b2fa67aac38758fe59d4ab55e
-SHA1 (patch-content_browser_time__zone__monitor__linux.cc) = b9756e90acc45a38f4d8572b06e71186c8b07738
-SHA1 (patch-content_browser_utility__process__host__impl.cc) = 824fb5b378e38b8b4cee4fe5498f2c217a7419f7
-SHA1 (patch-content_browser_web__contents_web__contents__impl.cc) = 790a03da00a81a7fa9ef286270607fd7c7c117b2
-SHA1 (patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc) = ab11c3f59baf528bb1837fee533898eb761fbefd
-SHA1 (patch-content_common_set__process__title__linux.cc) = 270992c0fa160e0019f4048fdf5cfea431551408
-SHA1 (patch-content_common_set__process__title__linux.h) = 7ecf5cee9081e08dcdb3a41a2468181fe9110fae
-SHA1 (patch-content_content__browser.gypi) = 100b6094d39fd39b5c8432969f3d079680210ac9
-SHA1 (patch-content_content__common.gypi) = 21eb4ac13752c21aa6e05fc26eee0cd87fd53033
-SHA1 (patch-content_content__tests.gypi) = fdc4b3044405439cd6df5e8815cf02a7e644fbf0
-SHA1 (patch-content_gpu_gpu__child__thread.cc) = 68b59265c98eec87e0f2e132ffb8e7235ec61bde
-SHA1 (patch-content_gpu_gpu__main.cc) = 6aae17e7da2eb87a7cc5786c93a639b131fae958
-SHA1 (patch-content_public_common_child__process__sandbox__support__linux.h) = 9da0022b5e38da5cf831f5cfbb391203e7f391f7
-SHA1 (patch-content_public_common_content__switches.cc) = d0a1a6378b42cb48522fc74853c167ed4c48ccc9
-SHA1 (patch-content_public_common_content__switches.h) = 01a8b3b6da6ec5b8219c7484ce6ad0426eab5217
-SHA1 (patch-content_public_test_browser__test__base.cc) = 6119634c1654894a51084a604d177ea382928774
-SHA1 (patch-content_renderer_devtools_v8__sampling__profiler.cc) = d8b00b5bc11ab180796fe40171b9d9c63b866b50
-SHA1 (patch-content_renderer_media_webrtc__audio__capturer.cc) = d5a36183186f6557e781c28496ee23d51c7f8bce
-SHA1 (patch-content_renderer_render__thread__impl.cc) = 840d846d4594e1676785538d8371ec42d6abaf74
-SHA1 (patch-content_renderer_renderer__blink__platform__impl.cc) = e6cb875083c8216e16e55ab563b6a3e81fd5412b
-SHA1 (patch-content_renderer_renderer__blink__platform__impl.h) = 5fbfdb3cbc03c15062472ae811f9762d82a31fd6
-SHA1 (patch-content_renderer_renderer__main__platform__delegate__linux.cc) = 0064211b5989584132276c4691d26debdd887aea
-SHA1 (patch-content_renderer_webscrollbarbehavior__impl__gtkoraura.cc) = f73e19b4bcfc8d3d14de51e13feb3a33d23e7b78
-SHA1 (patch-content_shell_browser_shell__browser__context.cc) = f065c2127d3c1bf85ed72ec532f03308d374074e
-SHA1 (patch-content_shell_browser_shell__browser__main__parts.cc) = 9412a5bb158957b36bf5a1290dbfb4a33b6eef7a
-SHA1 (patch-crypto_nss__util.cc) = 0116654d4651403368982d728664c1d7731382a2
-SHA1 (patch-device_hid_hid.gyp) = 24fa0c9bdc8ab6b816c92a82cd436890b92e793a
-SHA1 (patch-device_serial_serial.gyp) = 268500902b76e35fdf2dd4edbc42b818716da22e
-SHA1 (patch-device_serial_serial__io__handler__posix.cc) = 870a2294803fe0050b9aaec77520cc9f3ff6e721
-SHA1 (patch-device_serial_serial__service__impl.cc) = b333ce59b50fc75065399095fd845467a0163fcf
-SHA1 (patch-device_usb_usb.gyp) = 7a394e58fcbd5013bda3ccf80acf290f8a535089
-SHA1 (patch-device_usb_usb__context.cc) = f8d41fa61fc915210aad16a307f35ed4118ff075
-SHA1 (patch-device_usb_usb__context__unittest.cc) = d4fc5f7bb435edb320e1fffbbab3211a6ee1d489
-SHA1 (patch-device_usb_usb__device__handle__impl.cc) = 50ae886cd27b2e29465cae9545646dc238c38052
-SHA1 (patch-device_usb_usb__device__handle__impl.h) = 5b27e6116e7e7a79e429933b63dc429d2cfca61c
-SHA1 (patch-device_usb_usb__device__impl.cc) = 17763991c89f52e0239362f693dd3f47f4507126
-SHA1 (patch-device_usb_usb__error.cc) = 22d0bd44fc4dec37b98be3f2216b143c04c8109e
-SHA1 (patch-device_usb_usb__service__impl.cc) = 50ea01a78a721a143246ec72a2e0e817f164e9a0
-SHA1 (patch-device_usb_usb__service__impl.h) = 743f67bb9733e83e2ae4ba4b17324e5fc7bd3359
-SHA1 (patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc) = 9e71f4e67c5cf4d24b5100d1b1fa1189bb017ece
-SHA1 (patch-extensions_browser_api_serial_serial__api.cc) = d50e063e8b13065531ca27825567ab7681ab850e
-SHA1 (patch-extensions_browser_api_web__request_form__data__parser.cc) = 59c4650dc04f0a02b20aa01761d8e575016bc5ed
-SHA1 (patch-extensions_common_image__util.cc) = 4f31dc3bfc97b420c0c3f8dec9eb3caa4e954e91
-SHA1 (patch-extensions_common_stack__frame.cc) = e37852553ce351b542fdf0d6ba8b5158ce83faf0
-SHA1 (patch-gpu_command__buffer_service_error__state.cc) = 914899d0e65a538149aa59e6214f63836ba306bc
-SHA1 (patch-gpu_command__buffer_service_program__manager.cc) = eb9eceb480a7ef425429da3235ce805222b4812c
-SHA1 (patch-gpu_config_gpu__control__list.cc) = aceee4b14794e4abd57aa799118f3614f3733328
-SHA1 (patch-gpu_config_gpu__control__list__unittest.cc) = 1dc39dd8eae36ba712c463e906e65edc424ac106
-SHA1 (patch-gpu_config_gpu__info__collector.cc) = 92d7fda12a8b96845ad65000b44c91d848a95534
-SHA1 (patch-gpu_config_gpu__test__config.cc) = eb98373b4c8de199ef4d4b322c043d9a0b2ce8d4
-SHA1 (patch-gpu_gpu__config.gypi) = b59f936ff3afbee6a00e5bd3198757ff271508ca
-SHA1 (patch-gpu_gpu__ipc__service.gypi) = d4d0b83627209973042ddb45a985d70051c5d4fa
-SHA1 (patch-ipc_ipc__message__utils.cc) = 9a760657d56b8bcef50efa0436631bf7aa88982e
-SHA1 (patch-ipc_ipc__message__utils.h) = b94c384757d86a715b2f47c7fc93dc4cbc547390
-SHA1 (patch-ipc_unix__domain__socket__util.cc) = bac45fcea21208513b537482c7164174bb2901aa
-SHA1 (patch-media_audio_alsa_audio__manager__alsa.cc) = 2bf9b8e35375ba0aa3b0dda5cc4d75e4a504cca0
-SHA1 (patch-media_audio_audio__manager.cc) = ed727c0fa37bd202e99e9c6a8513967f176282a0
-SHA1 (patch-media_audio_audio__manager.h) = 213f448784c3581c1e0c3d748aa80104b29d97ff
-SHA1 (patch-media_audio_audio__output__device.cc) = 772bab5d9dc41a636385aae2c2dd2c24e2ccff4c
-SHA1 (patch-media_audio_audio__output__stream__sink.cc) = 7ed5d82fee81140ea77d9d03f5813a9eeb9541fb
-SHA1 (patch-media_base_audio__renderer__mixer.cc) = 8b9dc8b6d9d729a78bab74165fc7809ac269fb6c
-SHA1 (patch-media_base_audio__renderer__mixer__input.cc) = 9ca52f1c20865ffe652f7d7f0c9b9afd63d22ff7
-SHA1 (patch-media_base_audio__splicer.cc) = 2b06e584c69ef01987a9e6af1915d422609d133b
-SHA1 (patch-media_capture_video_fake__video__capture__device__factory.cc) = 3a8c75cc152affb1cf1daea0909d02b6c623b1b1
-SHA1 (patch-media_capture_video_file__video__capture__device__factory.cc) = c642799a88a1aab174c62a9590e05f12fef734ca
-SHA1 (patch-media_capture_video_linux_v4l2__capture__delegate.cc) = 1e77cf642f1347342c14be7609cdf9e82fb7831f
-SHA1 (patch-media_capture_video_linux_v4l2__capture__delegate.h) = c46a7f5df441d9b34f43da15dadced2f9215a847
-SHA1 (patch-media_capture_video_linux_video__capture__device__factory__linux.cc) = 7c871657759b704375cfb3b3bb0a49e9d9c1eb22
-SHA1 (patch-media_capture_video_linux_video__capture__device__linux.cc) = dc93f97fa1527274c85bd847d452221b6f7773d2
-SHA1 (patch-media_capture_video_video__capture__device.cc) = 9c0fdd226fae83af6411091f0f1f5ef38305c87e
-SHA1 (patch-media_capture_video_video__capture__device.h) = 329255d129ce55cbecb1ab5a36c315cf5b411d59
-SHA1 (patch-media_capture_video_video__capture__device__factory.cc) = 3dac01c0940527e5e47c9f4ef4ff0b17cc279233
-SHA1 (patch-media_filters_audio__clock.cc) = 66c71a29516281b51091e266872c8188e84a28da
-SHA1 (patch-media_filters_audio__clock.h) = 75eeb45406f67fc4a40037dde4caf1513f7ad639
-SHA1 (patch-media_filters_decrypting__audio__decoder.cc) = ed67a788f51159514bf00f48548bf07d3731726a
-SHA1 (patch-media_filters_file__data__source.h) = afa2e7069c95569c7bdaeaf2052b6b04990ddfd4
-SHA1 (patch-media_filters_vp9__parser.h) = 691fc57506d981a88e1a1d30825ccb8bbf0565c6
-SHA1 (patch-media_formats_common_offset__byte__queue.cc) = cee32d0d078fab29d17f4d8f91fea52e53569bb3
-SHA1 (patch-media_formats_common_offset__byte__queue.h) = 509edb4b37a3c7a81a1fbe8c49d25ecb345df898
-SHA1 (patch-media_formats_mp2t_es__parser__adts.cc) = b4d6ecbd50bfbd3277ca8c09f376d3f8052ceed0
-SHA1 (patch-media_formats_mp2t_es__parser__mpeg1audio.cc) = 223ccaea008974a0d8cf2a95f9c006b253bb9730
-SHA1 (patch-media_media.gyp) = 9874140db5de5891d78ad05144927bd518155959
-SHA1 (patch-mojo_shell_public_cpp_initialize__base__and__icu.cc) = e9711afa39b5da6e8d944ab0020e07daeba3696e
-SHA1 (patch-mojo_shell_runner_init.cc) = 7c4ad68a8f9c8d0d5cbc31466ad4c8805f1e8c12
-SHA1 (patch-native__client_build_common.gypi) = d2ef7004310c4d4d834859da5acfcae74f3d13a0
-SHA1 (patch-native__client_src_shared_platform_platform.gyp) = 4ad4b033e4ee73129c7a4913b92207f2bccf23a6
-SHA1 (patch-net_base_address__tracker__linux.cc) = 1c8a510770c07b6f7f05c1b33d44f630ce279f12
-SHA1 (patch-net_base_address__tracker__linux.h) = 1446515b89c58953c51590177a384275c829fc55
-SHA1 (patch-net_base_address__tracker__linux__unittest.cc) = 18c1df2ef8e0283829ee7615ed3e52764329f8af
-SHA1 (patch-net_base_mime__util__unittest.cc) = 797faae8f0e5065e6809eb486e0fa1c1ed8acc79
-SHA1 (patch-net_base_network__change__notifier.cc) = d996973c3de09b13fc68a463a2e184636bbdab21
-SHA1 (patch-net_base_network__interfaces__linux.cc) = ebfd5456cdb2c390dd4515b0da0618306a151db5
-SHA1 (patch-net_base_network__interfaces__posix.cc) = c5f78b08eb510a852027de528dd94a9c3eaa58a5
-SHA1 (patch-net_dns_address__sorter__posix.cc) = 32b384221def41cabe9ea046fac51ccc5f86afa9
-SHA1 (patch-net_dns_dns__config_-service__posix.cc) = 56c9739f1a98a14643312b68f8354f3d291521fa
-SHA1 (patch-net_dns_dns__config__service__posix__unittest.cc) = baeed691d202f2ffcae8c6f82fb75c4d463d35b0
-SHA1 (patch-net_dns_dns__reloader.cc) = 85a6177e805f703b775f036f4ff300cfbdd0adc0
-SHA1 (patch-net_dns_dns__session.cc) = cdca6c5c401e212b8836966fd8cd35bf35deaa9a
-SHA1 (patch-net_dns_host__resolver__impl.cc) = ed9a48fb0e83bf2c7cde9fd803b6c31b05054ff1
-SHA1 (patch-net_dns_host__resolver__proc.cc) = 8817d6aed738f1204cb3f931b2972ce7a3039c6a
-SHA1 (patch-net_http_http__auth__gssapi__posix.cc) = 13e95a22dc48ffd846c6e2096aac7a5481b36b00
-SHA1 (patch-net_net.gyp) = c5346350f93e397f9f4e37f41e019acf001ddffd
-SHA1 (patch-net_net.gypi) = 235320c7324f7008d44cd1631dd5c4bf80172778
-SHA1 (patch-net_net__common.gypi) = bd06e71c6b9427e55ed8c78373c201135a1892a9
-SHA1 (patch-net_proxy_proxy__config__service__linux.cc) = dc1cdd16ca4a7823ae3cd91bfbb63b0459dfd402
-SHA1 (patch-net_proxy_proxy__service.cc) = 4a21aac68dac50cc0e91032d682122511b963b75
-SHA1 (patch-net_quic_congestion__control_rtt__stats.cc) = 69aee874c92310ef5c438a0f8fa4062cb72145db
-SHA1 (patch-net_socket_socks5__client__socket.cc) = ba7a30df1d1902ae79a70f22fc507b782d985ba8
-SHA1 (patch-net_udp_udp__socket__posix.cc) = f574e4cae83f7142e0e01e8c7d81b1c0e0b01613
-SHA1 (patch-net_udp_udp__socket__unittest.cc) = 34bfda9eedc1c3692f5c5570d978c78b502bf83c
-SHA1 (patch-pdf_pdfium_pdfium__engine.cc) = 84a82bc48321dc356c399c00000c102a4ca4f14e
-SHA1 (patch-ppapi_proxy_file__io__resource.cc) = ca72374b45f3089d6a3023050af673f67a383eb3
-SHA1 (patch-ppapi_shared__impl_private_net__address__private__impl.cc) = ef8614cd6ed300f5beb085821f2c834c41d6bae7
-SHA1 (patch-printing_printing.gyp) = b3afa69f376a9eff48632bc278c76c09a302a65f
-SHA1 (patch-remoting_remoting__host.gypi) = c3a0d3f2cb16f73bac3473a07bab7c4bbdf874b0
-SHA1 (patch-skia_ext_SkMemory__new__handler.cpp) = 982b8c3095d28d67fa9e508cf1d444930d4d2bb3
-SHA1 (patch-skia_ext_platform__canvas.h) = 6b8d0db489e45152c059bd33d408eea80ca0957c
-SHA1 (patch-skia_skia__chrome.gypi) = a9624317cf02fe9f9e63bcfa910638e6f3cce18b
-SHA1 (patch-skia_skia__common.gypi) = 4d66a38b5f53c3881ff7bc5277c6027e29a500c7
-SHA1 (patch-sync_util_get__session__name.cc) = b0f1cf325bb487c6a69dbc0d3961553a3bb53960
-SHA1 (patch-sync_util_get__session__name__linux.cc) = eb40d32d068e43be940f66c125d87963633ffe55
-SHA1 (patch-testing_gtest_src_gtest.cc) = 7acd56029a8e84b17a68146c30fce89c209306c8
-SHA1 (patch-testing_perf_perf__test.cc) = 1b85a7ba592bff275fade32dd72bfd2fcd46ddbe
-SHA1 (patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp) = 647833307c4914a3722990254408c44ba26cc420
-SHA1 (patch-third__party_WebKit_Source_core_core.gyp) = c607ec13a7c1d60a0560c31d3659c519ad9525b2
-SHA1 (patch-third__party_WebKit_Source_modules_battery_battery__status.h) = bce38e1b755472b30fab97e0293028b1f2eed1c5
-SHA1 (patch-third__party_WebKit_Source_platform_blink__platform.gyp) = ac8571d3dfffd0154cacfb29137185937422d0d5
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp) = e90bbc8452042f3c4c11e419eff46b6bb65524a4
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontCache.h) = ef15cd605fa141492762d3dcc0c4b1847fdd3921
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp) = 2ed983f2da7e211b592d159187bae3957fcc2f49
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp) = 339177c2b9148e05e7f4317b89c036346accf372
-SHA1 (patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp) = 7a31ec129c091b8f41b9da784a08f56aab8f0661
-SHA1 (patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp) = 23ae7f117d044cae18871638f5a6f86031f032fb
-SHA1 (patch-third__party_WebKit_Source_platform_image-decoders_png_PNGImageDecoder.cpp) = d376a3feb69c8c96b470f15e0267d0f82a6d5d4e
-SHA1 (patch-third__party_WebKit_Source_platform_text_Character.cpp) = b9a22bfce843ecaddaac1355282de66ed95cf628
-SHA1 (patch-third__party_WebKit_Source_platform_text_CharacterPropertyDataGenerator.cpp) = ac56b7fdf9ea2f7b599fedfb95ad440d244bbe91
-SHA1 (patch-third__party_WebKit_Source_web_web.gyp) = 97ecd2f854fef924d39a8ed6b3293fbda6c98483
-SHA1 (patch-third__party_WebKit_Source_wtf_ByteSwap.h) = e897f1b616c3555f5018a4b9651b94fa8e4e55ef
-SHA1 (patch-third__party_WebKit_Source_wtf_wtf.gyp) = 45c99e43a4eff4f8f2832f69ba1f456bda1c9608
-SHA1 (patch-third__party_boringssl_src_crypto_bio_internal.h) = 00248db6f46bb2f9a91dcde84b66c2edba993633
-SHA1 (patch-third__party_boringssl_src_crypto_cipher_e__chacha20poly1305.c) = bae5467338d80d37df92c2f1e68bf5ff66eb9945
-SHA1 (patch-third__party_boringssl_src_crypto_internal.h) = de5d860caba670377bdb1e5509a6fa7e60b30407
-SHA1 (patch-third__party_boringssl_src_crypto_mem.c) = dcd80145055416137071f7a6e9a36d1e9f6fd7b4
-SHA1 (patch-third__party_boringssl_src_crypto_poly1305_poly1305__vec.c) = c608103866a8b67171685488e577be2cadd752ec
-SHA1 (patch-third__party_boringssl_src_include_openssl_thread.h) = ed473d18dce684f7ab276f8be7dd0e6218406a0f
-SHA1 (patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h) = 47b3e2b5ca8f6693ae7c8f6a6d1e76f32a46d743
-SHA1 (patch-third__party_ffmpeg_chromium_scripts_generate__gyp.py) = a9b905314e894ebabc182ce7d0881c61e9bfb1e1
-SHA1 (patch-third__party_ffmpeg_ffmpeg.gyp) = 360823abde996e0b446e161cdd230f397e502a9a
-SHA1 (patch-third__party_ffmpeg_ffmpeg__generated.gni) = d7e0dd66320aeca62e19a0b248d41487775d7387
-SHA1 (patch-third__party_ffmpeg_ffmpeg__generated.gypi) = 52bfee1cf1ddbe5f83545f87776c3b07c7e85825
-SHA1 (patch-third__party_ffmpeg_libavutil_autorename__libavutil__cpu.c) = 40f95b2d87d64d91b50dde4f88526fa943acc6ae
-SHA1 (patch-third__party_ffmpeg_libavutil_cpu.c) = f86d34335c39ff65dd514e1fd8a3c67f7f31be7e
-SHA1 (patch-third__party_ffmpeg_libavutil_mem.c) = 449a8436a16da1d203d29331ba9dc3c57b80a6a1
-SHA1 (patch-third__party_khronos_khronos.gyp) = 45cf37c0ff57ba0f57e11f011f3a1752653ceba8
-SHA1 (patch-third__party_leveldatabase_env__chromium.cc) = 3158d0e38298ee69f9706099487c119af0e6859e
-SHA1 (patch-third__party_libXNVCtrl_libXNVCtrl.gyp) = 8ee955cb03b5be8d6ebf64d5f521e50a629ae842
-SHA1 (patch-third__party_libjingle_libjingle.gyp) = b1fe592197c12145a975037433d273ada7f42e10
-SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h) = e1622f4206fe5a76fbc82e5fa75bf36f60001ec2
-SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h) = 98fb2dae47efa5512bd77615ed8fb6e7ba76a8d1
-SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h) = cd4c139979b6cb953dfd459777f4bd88e83d2a8c
-SHA1 (patch-third__party_libphonenumber_libphonenumber.gyp) = f1635609f27a322aa2834b4e70a58324dd02bb92
-SHA1 (patch-third__party_libpng_libpng.gyp) = 2790ee87c4b275e327971f9bad59ff25b6bbacdc
-SHA1 (patch-third__party_libyuv_include_libyuv_row.h) = 46cafafca01293312b42f74d806aa00a40763292
-SHA1 (patch-third__party_libyuv_source_mjpeg__decoder.cc) = 1725db3056678b07a1af2d8b06bbd4ebdea24bb7
-SHA1 (patch-third__party_mesa_src_src_mesa_main_arrayobj.c) = 4915ad6d4367789f7c7f370465faf70eb80796df
-SHA1 (patch-third__party_ots_include_opentype-sanitiser.h) = b2b6fbfef584873ba1b0a3ba736fb12474c6184b
-SHA1 (patch-third__party_pdfium_build_standalone.gypi) = 3d691565bd70ce0e931cfe79ce4250f5a1e5c9cc
-SHA1 (patch-third__party_pdfium_core_fxcrt_include_fx__system.h) = d5ae1d0a53f6e67f64ad2a563a86b32be8bab509
-SHA1 (patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp) = 7230499110cd4f53edf491331eae8e69620c6af5
-SHA1 (patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp) = 83c076852c8a9cf37a412154b420ff7311d373d8
-SHA1 (patch-third__party_pdfium_pdfium.gyp) = f3f5bf710c5fb56719af695302b18c77e1268807
-SHA1 (patch-third__party_pdfium_third__party_base_logging.h) = 6759e9fe5b8efd6e6543fc3ef977cc620fd6614f
-SHA1 (patch-third__party_sfntly_sfntly.gyp) = 978d2c752f4fbd443c56a2a1bd73f8f75a0cb6eb
-SHA1 (patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h) = c252bdf64e321f4a89a026e585aaa6c6453c78b7
-SHA1 (patch-third__party_skia_src_opts_opts__check__x86.cpp) = e779e5299e3a964e0725a00393d192c1dcb5547d
-SHA1 (patch-third__party_sqlite_sqlite.gyp) = ee002a6e98560e320cbebe7dfa8442ac11a51bd0
-SHA1 (patch-third__party_usrsctp_usrsctp.gyp) = 59234d9cc931d64b863b0a2c9a8e49518d3465dc
-SHA1 (patch-third__party_webrtc_base_httpcommon.cc) = 8a401944650f8f6b2de0fedf36bdf2c96b9689f5
-SHA1 (patch-third__party_webrtc_base_ifaddrs__converter.h) = e97d01a7b101841d365ea1a489598c368838cbd6
-SHA1 (patch-third__party_webrtc_base_ipaddress.h) = b10d7264cb4e3a21fc2c8dad74f43ac5aec71111
-SHA1 (patch-third__party_webrtc_base_linux.cc) = 338254dff5ce3caee6f0a4b0448f38f791918453
-SHA1 (patch-third__party_webrtc_base_linux.h) = 3c55c880de6d70cd5a03ec17684d264f76f50d18
-SHA1 (patch-third__party_webrtc_base_network.cc) = e7ad4db9700c55322efb38bfb9d3e40cd8dd2f18
-SHA1 (patch-third__party_webrtc_base_network.h) = fc96cd60f45dadecf5c8184469f0ddfb4154b87f
-SHA1 (patch-third__party_webrtc_base_physicalsocketserver.cc) = 3689da057c25f9d4c002dd8d7882a894c6cea981
-SHA1 (patch-third__party_webrtc_base_platform__thread.cc) = c802f78aaa1357a9a7e17806d04f67f7180a07a6
-SHA1 (patch-third__party_webrtc_base_stringutils.h) = c38b8da3d6cdead712c0285ec534ad257a75f929
-SHA1 (patch-third__party_webrtc_base_systeminfo.cc) = 310973dadacc5fd40027fe731357cc5f28393fc5
-SHA1 (patch-third__party_webrtc_build_common.gypi) = d151874d308c8e1975f543286156a46d2aca114e
-SHA1 (patch-third__party_webrtc_common__audio_wav__file.h) = a4504eb48feb91905a4d7cd4d0954e3cfdec87d1
-SHA1 (patch-third__party_webrtc_modules_audio__device_audio__device.gypi) = 2e20956177eb63a86fa4d937895172318537bfa0
-SHA1 (patch-third__party_webrtc_modules_desktop__capture_desktop__capture.gypi) = 8781f9104c3565000bac3401d757f270fb097812
-SHA1 (patch-third__party_webrtc_modules_remote__bitrate__estimator_overuse__detector.cc) = abec02bb6331d61c5ea02edb12c5f0bf59b9ac9d
-SHA1 (patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc) = e4890ac3ae76965be82f24ed7791a9bd9f2b8268
-SHA1 (patch-third__party_webrtc_modules_video__coding_receiver.cc) = a33f4db4328877145cb6b8d8ae13d6d459e9f8a1
-SHA1 (patch-third__party_webrtc_system__wrappers_source_atomic32__posix.cc) = 97b95ba185dcea126bd417d8ea26d1944fd4c1f4
-SHA1 (patch-third__party_webrtc_voice__engine_voice__engine__defines.h) = 15d02a424e749dbd898d9bc4b5fb5c60fbd5834b
-SHA1 (patch-tools_gyp_pylib_gyp_generator_make.py) = 66a01120de5e0a5b5222909f752ed10bce771632
-SHA1 (patch-tools_gyp_test_additional-targets_src_dir1_actions.gyp) = 2dd205b6cb852b557da1c646411dc8ea9d6fc0bb
-SHA1 (patch-tools_gyp_test_library_src_library.gyp) = 724088b57399edf538030fc5617a6f93d49fa2ec
-SHA1 (patch-ui_accessibility_accessibility.gyp) = d21725b73fedd7b9b3ef6e03c4f0311d3441680f
-SHA1 (patch-ui_accessibility_platform_ax__platform__node.h) = e92ab1e287111ba2147eb54e9dff00d0bac109b9
-SHA1 (patch-ui_app__list_app__list__constants.cc) = ccaa091fd4821e0ae94877ed87ac4f167f31a1e4
-SHA1 (patch-ui_app__list_app__list__constants.h) = e5276dd6872710edc63577830e256547f597072e
-SHA1 (patch-ui_app__list_app__list__menu.cc) = 96ce9cb6956f81a3630433ad7512c14c82876bf8
-SHA1 (patch-ui_app__list_views_app__list__view.cc) = 8f99e3a71d461bc2d0118f5a3a8aa85959facf81
-SHA1 (patch-ui_base_BUILD.gn) = 5aaa7f5fbc6db98c04d75c1cb3c5a188aa859ee2
-SHA1 (patch-ui_base_ime_ime__engine__handler__interface.h) = a0de58507d0cc31850d94017f146e518c9842343
-SHA1 (patch-ui_base_ime_input__method__factory.cc) = fb5161669cd4a23f89ddc02f60ea8f9d73ec369f
-SHA1 (patch-ui_base_ime_input__method__initializer.cc) = a938d8b3ff60c2ba52dd2112f7a65ebcfde4f46c
-SHA1 (patch-ui_base_resource_resource__bundle.cc) = 9569893620e50adebd08742b48e45ca4258c7154
-SHA1 (patch-ui_base_ui__base.gyp) = 96b8dfd1e8b9728f1a2181cbf29156b15f9c9b3f
-SHA1 (patch-ui_base_webui_web__ui__util.cc) = 52961b24befe71c3a417443074b2982c49f98335
-SHA1 (patch-ui_events_event__switches.cc) = 06360138428a2e2efcf7ec3915e354b7114a742d
-SHA1 (patch-ui_events_event__switches.h) = e5fa884d20d8ef273d0af03b1fa6be1535304d6b
-SHA1 (patch-ui_events_keycodes_dom_keycode__converter.cc) = 63357fdbeee4fe53b2999c848a2cd5b39afd5af1
-SHA1 (patch-ui_gfx_canvas__skia.cc) = fc1152ff43efc5c1afe83c1a4bdf2f603fc238dc
-SHA1 (patch-ui_gfx_codec_jpeg__codec.cc) = 53b0e31443a19a7587a8b34074767137dcc9dd01
-SHA1 (patch-ui_gfx_color__utils.cc) = 13c78463244a6020445be05441a3693566d69987
-SHA1 (patch-ui_gfx_font__fallback__linux.cc) = 6eb56aa2bb1838a8a55f0a8298026ca579a57bd9
-SHA1 (patch-ui_gfx_font__render__params.h) = b3da6ca2f475ab3da509745ee21291ef85657567
-SHA1 (patch-ui_gfx_render__text.cc) = a3ad95b6eac82d1b73cd35e9cc918ca1e6d79648
-SHA1 (patch-ui_gl_gl.gyp) = 06b1786ad4a3f7af0eb6c247cd038a4e2402a53d
-SHA1 (patch-ui_gl_gl__gl__api__implementation.cc) = 05faddf08ac81a6bca10c60c8fd7bcc43703ccfe
-SHA1 (patch-ui_gl_gl__implementation__x11.cc) = 42491f0bf60e5994a1564458cd900ad8e0a888e2
-SHA1 (patch-ui_gl_gl__surface__glx.cc) = e507b6bb50b5439f335a1469bf6d16ec7931ac21
-SHA1 (patch-ui_gl_sync__control__vsync__provider.cc) = eb8aa4e9170c315c35be8bbc33e583e81e94892e
-SHA1 (patch-ui_message__center_message__center__style.h) = 825b969362b1b270d98567dd57c76b567c2687ca
-SHA1 (patch-ui_message__center_views_message__center__button__bar.cc) = dea34a9976799ed26b8949ad3745e873817f8b70
-SHA1 (patch-ui_message__center_views_message__center__button__bar.h) = 07e7628962739e7c8c25a760460a6719b261b02e
-SHA1 (patch-ui_message__center_views_message__center__view.cc) = 99a7d5f22de9a2c5727aea17034cf5c6e9f67576
-SHA1 (patch-ui_message__center_views_notification__view.cc) = de23fcae0d16d8c06e1ef57de0b9fe9f80c2b369
-SHA1 (patch-ui_resources_ui__resources.grd) = f66b9f00a4beca2b851411d04021a8413817bc72
-SHA1 (patch-ui_views_accessibility_native__view__accessibility.h) = 27a1b85d07ce4d8a67e8fe6df3661dd6f594e1dd
-SHA1 (patch-ui_views_bubble_bubble__delegate.cc) = d7294dc3b9d1fd363c1de6810d11058b929e23ce
-SHA1 (patch-ui_views_controls_button_label__button.cc) = ac17a941a529ad1229253b1356d7225cfd5ccf01
-SHA1 (patch-ui_views_controls_scrollbar_base__scroll__bar.cc) = d7e1cf16400382e979f205fd17b47d99d418e35d
-SHA1 (patch-ui_views_controls_textfield_textfield.cc) = 20b0ab4a7055a3bf12946021bb580e4b78a1b8ea
-SHA1 (patch-ui_views_controls_webview_webview.gyp) = 4cce31bcb3415791f2299037a80ad4cae0550e03
-SHA1 (patch-ui_views_examples_widget__example.cc) = d47000a9e093f1c64fece0c1814784d8c720cbb6
-SHA1 (patch-ui_views_style_platform__style.cc) = 772082e1fad011f3285d35ce444cc6d27b04d6c4
-SHA1 (patch-ui_views_views.gyp) = 7d6cd1f7015dee5daa1338c8ac4985150560d3b5
-SHA1 (patch-ui_views_views__delegate.cc) = 3a1480c93951d74256fe1cfa00201b615c424c97
-SHA1 (patch-ui_views_views__delegate.h) = d6d67a475a0ccf2c5adbcd27536204c52314d069
-SHA1 (patch-ui_views_views__switches.cc) = 2b9240be3b40c9dca92f4b1a1983fe60ad1baeb0
-SHA1 (patch-ui_views_window_custom__frame__view.cc) = a2702abf0065fc883365d91aa6964bfb0755556a
-SHA1 (patch-ui_views_window_dialog__delegate.cc) = 5280a17cab34a0283b44321abdc7d0f58499a746
-SHA1 (patch-ui_webui_resources_js_cr.js) = 99b20d1ffe0def888925fd1548367366ca3b2bcc
-SHA1 (patch-ui_webui_resources_js_util.js) = 6ea6f332c90d11187ea0bcd721544030111829ae
-SHA1 (patch-v8_src_base_platform_platform-posix.cc) = 9dc731ef47c6b08144d60e23272c3724c10d3814
-SHA1 (patch-v8_src_base_platform_platform.h) = 060af9f5718e01229c1615cd434d082b0f298928
-SHA1 (patch-v8_src_compiler_graph-visualizer.cc) = 32dc07220c8331afc57a82fb0ae3617daafece84
-SHA1 (patch-v8_src_compiler_graph-visualizer.h) = bedd9de6a55a93b81d1c3195b87a8062bda8bb39
-SHA1 (patch-v8_src_log-utils.h) = 580de9075b088e9f1cc8a1fa0dd13445a0d1d11f
-SHA1 (patch-v8_tools_run-llprof.sh) = 192a5de99a045fbfe12c8589b6d6d5d05633ea46
+SHA1 (chromium-54.0.2840.100.tar.xz) = bf51814c569110714a4b1266f96c5bbc45af1a80
+RMD160 (chromium-54.0.2840.100.tar.xz) = f6ebf926bb2877dea88f65c596fbeb72ba742c9b
+SHA512 (chromium-54.0.2840.100.tar.xz) = 52f34db6f68bbf2c8a1ac71789dfa7b6ee17ea97519d0a9a1079d78324cffe55572652701e05055f08e03230d887674757322399062f2f5354b1e43c3fdf8f78
+Size (chromium-54.0.2840.100.tar.xz) = 479762112 bytes
+SHA1 (patch-BUILD.gn) = a6f802e913ac2e55f82e63d9ba7639b5742197d2
+SHA1 (patch-base_BUILD.gn) = 178b43ff50e3b8f5b0bad23b8778fff3fbbb7e3b
+SHA1 (patch-base_allocator_BUILD.gn) = 8a9c4286ef9ad775d623027071e4a03c198fe2a2
+SHA1 (patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc) = fe70f276733722f86670736e79a039f4b30e71a1
+SHA1 (patch-base_allocator_allocator__shim__override__libc__symbols.h) = d121415659a8e8580d9a99568419ec31b785e47b
+SHA1 (patch-base_allocator_allocator__shim__unittest.cc) = 5251a53ef8dc6e6eea53ee3afbce0e17b4460121
+SHA1 (patch-base_base__paths__posix.cc) = 8235ab673cfae21a4570248e51c3827fc306768d
+SHA1 (patch-base_debug_debugger__posix.cc) = 30f2f2f1050a43242b51003c02a9501faaa5de4f
+SHA1 (patch-base_debug_proc__maps__linux.cc) = 13189969fd2ccca0bdbfc840c62ed2046e2907b7
+SHA1 (patch-base_debug_stack__trace__posix.cc) = 4e9036a6456c31dd527f087341e69830af5c8f92
+SHA1 (patch-base_files_file__path__unittest.cc) = 60523a83fdf495ab9c9ff74983b55ad59c247508
+SHA1 (patch-base_files_file__path__watcher__kqueue.h) = 4015b099cd79998ee1d2df9dd7503c891e3475aa
+SHA1 (patch-base_files_file__util.h) = 06d355c32431970618dcae6f86d7645e9dd4f6cd
+SHA1 (patch-base_linux__util.cc) = 376d3dfbc5565267fc32ad0e7bd1e8e65e41fa62
+SHA1 (patch-base_native__library__posix.cc) = fc383018a51d73c1977194a892632b981f2f0beb
+SHA1 (patch-base_posix_unix__domain__socket__linux.cc) = 4bd6c656e5e5f54e8a0a9450d72748108ec4803e
+SHA1 (patch-base_posix_unix__domain__socket__linux__unittest.cc) = 01aee2e9efa6fb9678b125f792e66e0e3fe6a0c2
+SHA1 (patch-base_process_internal__linux.h) = e9ccc1bd32f378fdc04b100ca49329b96e504e4b
+SHA1 (patch-base_process_launch.cc) = cb4502c91b67c181b5c85d12b83afe0c037f3518
+SHA1 (patch-base_process_launch.h) = 42d7c496b480cc636f5f99c95c0311091af67040
+SHA1 (patch-base_process_launch__posix.cc) = c0dcee1962b5a721ca9156ff0d5b68bdd39a1b6a
+SHA1 (patch-base_process_memory.h) = d902030daccc879847d4c2f45ff49a6073d1201c
+SHA1 (patch-base_process_memory__stubs.cc) = b06cddebd2637c5651900b08e00de6db336701e6
+SHA1 (patch-base_process_memory__unittest.cc) = 27298a44279d3a43f3d0d5112ff5bbf5be61e87a
+SHA1 (patch-base_process_process__handle__freebsd.cc) = e375a9d1654175425b2987d8d59eaadb8e12cad6
+SHA1 (patch-base_process_process__handle__netbsd.cc) = 0da68c82d0c44c0bf910fbccbc9de2437741b7d0
+SHA1 (patch-base_process_process__info__linux.cc) = 5a2af4bc00bdba6a48fa9123737b8610221cc5e7
+SHA1 (patch-base_process_process__iterator.h) = 14c559349406b0a79c3b8bec266890a3ff9e3d48
+SHA1 (patch-base_process_process__iterator__freebsd.cc) = 37bed3cc5cef80dcd0c24ff755b1ca0442c663d2
+SHA1 (patch-base_process_process__iterator__netbsd.cc) = 54f8209180488a726127d75587295d6372fdf608
+SHA1 (patch-base_process_process__metrics.h) = 27120d670c3afd7ae9f7036e176f640af4ee4d35
+SHA1 (patch-base_process_process__metrics__freebsd.cc) = 010f447e8d8c88822bc4fcf2e4338ff6cb94002e
+SHA1 (patch-base_process_process__metrics__netbsd.cc) = 488acce8faaf88f2295b57999f8ce5d106c65213
+SHA1 (patch-base_process_process__metrics__posix.cc) = d3450d202d5076ec64f8470ea15e0052a981fb5f
+SHA1 (patch-base_process_process__posix.cc) = 4320674169e2905ed356996f5edad12af086deee
+SHA1 (patch-base_profiler_stack__sampling__profiler__unittest.cc) = e56c78b438e56c7804fb3f7932a16fb1deb8f106
+SHA1 (patch-base_security__unittest.cc) = 552469ee9380392f43999abf70bcfa2d65aea59b
+SHA1 (patch-base_strings_safe__sprintf.cc) = 868c7a2eb687b3ac155ed80dc604b9b81b24c1ce
+SHA1 (patch-base_sys__info__freebsd.cc) = f2f4ae7172a94a916f69881695541a6922ba9cbc
+SHA1 (patch-base_sys__info__netbsd.cc) = 448098a286bf4c20402af9740b457e405dd351f3
+SHA1 (patch-base_sys__info__posix.cc) = b5dfced5679bd4582c90e10bd5f6d72353a44ee9
+SHA1 (patch-base_test_BUILD.gn) = 977dccdac2ada984b745d9ec3d2c5c1942d17f01
+SHA1 (patch-base_test_launcher_test__launcher.cc) = f8a9747102abecf8f169b01500cd7caf2d4e129f
+SHA1 (patch-base_test_test__file__util__posix.cc) = 95417aba2554129a5cbf5afccbf43192f5d831eb
+SHA1 (patch-base_third__party_libevent_BUILD.gn) = 57dea4baec68cffe3d12b827c07682a71f65d79a
+SHA1 (patch-base_third__party_libevent_event-config.h) = 928f7a50867fea7f94c4102a434bc03905c1e58a
+SHA1 (patch-base_third__party_libevent_netbsd_config.h) = 21e16692c4a6c9546afe9b1122b524b68f91b7e6
+SHA1 (patch-base_third__party_libevent_netbsd_event-config.h) = 00bdccd77be2fa4c047bc95d039febcc2281f064
+SHA1 (patch-base_threading_platform__thread__netbsd.cc) = f6c99ab4d517bf45a56f71b7e03b64f4c2a7b91b
+SHA1 (patch-base_threading_platform__thread__posix.cc) = ca5b08982639676bed3012c3d5ab5490173e6861
+SHA1 (patch-base_trace__event_malloc__dump__provider.cc) = a76843ac49c6ee32d1b6b46d165181f1a36d2ef2
+SHA1 (patch-base_trace__event_process__memory__dump.cc) = 9b613bfb46aba020d5d380086293c88732bb215a
+SHA1 (patch-base_trace__event_process__memory__dump.h) = e2a58af0616e2a8d3786d6e5afc806857ea0416d
+SHA1 (patch-breakpad_BUILD.gn) = b8a4db2a770d1641e59c1eaa31c1357e3f26f4db
+SHA1 (patch-build_config_BUILD.gn) = 7c9caa040c6f982b482003132e5a8abeda3c7aa4
+SHA1 (patch-build_config_BUILDCONFIG.gn) = 4728c70cfc475894859867b1638982f0a2e3c2d8
+SHA1 (patch-build_config_allocator.gni) = eaad15f79a93ca7b7c0402ee60e56a17b7272741
+SHA1 (patch-build_config_clang_BUILD.gn) = 2407bb2bc28186913dc59eeb188d8f545c2c1201
+SHA1 (patch-build_config_compiler_BUILD.gn) = 7293b6e890b999aa2a7dcc6d7270765bae9a6556
+SHA1 (patch-build_config_crypto.gni) = f38152c81ce92700b5b9012cd7afbeb5d03f94f5
+SHA1 (patch-build_config_features.gni) = 5b2291c122498c24e3a0ecc7d678206930858404
+SHA1 (patch-build_config_linux_gtk2_BUILD.gn) = 986a8dfaa5c62626d66e634c7410896e28301a5b
+SHA1 (patch-build_config_linux_gtk3_BUILD.gn) = 33e1cd75d75209242decdaf14cf34e30bd26357b
+SHA1 (patch-build_config_linux_pkg-config.py) = c45f2a40439e132a3e2216b1236fc4a5ec3e3fcc
+SHA1 (patch-build_config_sanitizers_BUILD.gn) = 136ca038b3209f079ceadb076546237ec891de80
+SHA1 (patch-build_config_sanitizers_sanitizers.gni) = c149ccdce5afe0a873d831181b2f3540218237d0
+SHA1 (patch-build_config_ui.gni) = 471b92d4a654cdde654355ea2d277444ea7d6c59
+SHA1 (patch-build_linux_libpci_BUILD.gn) = 4ec661326577802ea7b6b7ab13fe927cf56d3e23
+SHA1 (patch-build_secondary_third__party_nss_BUILD.gn) = 73bcd48039bbed4f6d87c4691dbef85aee942094
+SHA1 (patch-build_toolchain_gcc__toolchain.gni) = c815e315196a3617d064b5ebbf040862c1569a75
+SHA1 (patch-build_toolchain_get__concurrent__links.py) = 4ccb873caace8fc8379a05d67724406793f9962a
+SHA1 (patch-cc_layers_scrollbar__layer__impl__base.cc) = 4607770273ef783fc92c6f9c80f53910efd9de93
+SHA1 (patch-cc_trees_property__tree.cc) = f5ba00ed9d2fbb13187f6fb9eca693472e70f652
+SHA1 (patch-chrome_BUILD.gn) = b133a5e0c8c6cee4bbb42ec8c432edcb6affb307
+SHA1 (patch-chrome_app_chrome__command__ids.h) = 77a1705f876a24bb6dedc4bf64e54bb79dc8a73e
+SHA1 (patch-chrome_app_chrome__main__delegate.cc) = cd109711d74df5e506682107de5dd899f8d05c23
+SHA1 (patch-chrome_app_chrome__main__delegate.h) = ffbaf71bdb3aaa8b7a8892d7a07affe3f071a4df
+SHA1 (patch-chrome_app_chromium__strings.grd) = 9aa20452aab97dc5b715275dc381a53b297f0f41
+SHA1 (patch-chrome_app_generated__resources.grd) = 2f42789d720f943457e67f8a4b190d5101c2f897
+SHA1 (patch-chrome_app_resources_locale__settings.grd) = 887aadb51614f64a3faa2792fef4cd43c176ae6d
+SHA1 (patch-chrome_browser_BUILD.gn) = 0df3e2e4c9c364da8cbcbbabc5f826d81821ad71
+SHA1 (patch-chrome_browser_about__flags.cc) = a702a8853ece3b129dbfb3cabb8533ed497c84ed
+SHA1 (patch-chrome_browser_browser__process__impl.cc) = fbe7b6a840cd5f8235848a74723ee2db3753ad8b
+SHA1 (patch-chrome_browser_browser__process__impl.h) = 8a7c2faba4fd3161ea3f9e3dda717faa16c611e2
+SHA1 (patch-chrome_browser_browser__resources.grd) = b8daeccd22c9ca276ee63284225433e24dd57ee6
+SHA1 (patch-chrome_browser_chrome__browser__main.cc) = e8a32581032ae4d07d1c32bcb5b9324f613fd3c4
+SHA1 (patch-chrome_browser_chrome__browser__main__linux.cc) = 32dbb90327d484fc2b8ea15ef5f983adb951338c
+SHA1 (patch-chrome_browser_chrome__browser__main__posix.cc) = 199d7db336bc6c6819aff8795551e01dda8a6772
+SHA1 (patch-chrome_browser_chrome__content__browser__client.cc) = 1d535919d070715db695858223912bda1711afdf
+SHA1 (patch-chrome_browser_chrome__content__browser__client.h) = d653dfcab1a19470f9f0f44b3cda896c47d456e1
+SHA1 (patch-chrome_browser_defaults.cc) = eef38c6ab14f808e2c9b45931fe57e38fd2b4533
+SHA1 (patch-chrome_browser_diagnostics_diagnostics__writer.cc) = 12812ecfa3699714c594e81bc596408d93237953
+SHA1 (patch-chrome_browser_diagnostics_diagnostics__writer.h) = f5520e7e6d8d8143f740c817bb0ea0212e13eef4
+SHA1 (patch-chrome_browser_download_chrome__download__manager__delegate.cc) = b02e24de99c1ab0e55bc885391b6b4969c91478f
+SHA1 (patch-chrome_browser_download_download__commands.cc) = 5c4ae971c20603824fbdd3a137d94dc40d25e405
+SHA1 (patch-chrome_browser_download_download__commands.h) = df72147fd0fc19f535aa8dbc3169646f75a1baf7
+SHA1 (patch-chrome_browser_download_download__prefs.cc) = 94d8c864c1b71df6e14e5091031914cd89d73385
+SHA1 (patch-chrome_browser_download_download__prefs.h) = baac7661c92e6d58324f00204c94a1617dac03b6
+SHA1 (patch-chrome_browser_download_download__query.cc) = e2123d66fcd718e89f7e589036f6effb68ab2963
+SHA1 (patch-chrome_browser_download_download__shelf__context__menu.cc) = 8fd28f498d8b523b5d07b65adbb46b27443fd525
+SHA1 (patch-chrome_browser_extensions_BUILD.gn) = 70cb74dc041f15b40e0fe01747d604eff52693a2
+SHA1 (patch-chrome_browser_extensions_activity__log_activity__log.cc) = ba63a57f0f934245793d612263b84cb1b5d5bc29
+SHA1 (patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc) = 4cb83a0aef3456935142477069bce1ccff013f4f
+SHA1 (patch-chrome_browser_extensions_api_input__ime_input__ime__api.h) = ab1356cca70bf8d6c85c74ef8ed4730e040b7785
+SHA1 (patch-chrome_browser_extensions_api_messaging_message__service.cc) = 8d80f1a5397a2df8ae0b29be002b2ac7256574bf
+SHA1 (patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc) = 8443e1cf7fa0dee54439c07507431f690b8873b3
+SHA1 (patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc) = 3f2da53d49dc3e49ad999af9d20cc2a55d2a6cf4
+SHA1 (patch-chrome_browser_extensions_external__provider__impl.cc) = 98c059da088351361f1de256057eb55ba17467d5
+SHA1 (patch-chrome_browser_gpu_gl__string__manager.cc) = 798e5dd24246e184a6fb33a0c359c15387432b10
+SHA1 (patch-chrome_browser_gpu_gpu__feature__checker.cc) = 5cd02b7df5c8978c4168b9137104b852db3a561f
+SHA1 (patch-chrome_browser_interstitials_chrome__controller__client.cc) = 8f27b840bf0de65547d33e77915bba596e7b666d
+SHA1 (patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc) = 409852bfd5e6f53baf7968d95c27f12ca32854c3
+SHA1 (patch-chrome_browser_media__galleries_media__file__system__registry.cc) = 31261492688a9cc1405fd7fea421086cfd863802
+SHA1 (patch-chrome_browser_media_webrtc__log__uploader.cc) = dfcfd375c086c752837cec1b03d25e3a16a7d3f9
+SHA1 (patch-chrome_browser_memory__details.cc) = 483a7c243c24227abb5921c0b04117080185e974
+SHA1 (patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc) = 45c36fe075e42dc06846e8545c0e7540776defc8
+SHA1 (patch-chrome_browser_notifications_message__center__notification__manager.cc) = dc71d5c273719bffc38fe813988704f04c4709b4
+SHA1 (patch-chrome_browser_password__manager_chrome__password__manager__client.cc) = 84aa79e4cada4d042f9dec89a38755c5dfd03c3a
+SHA1 (patch-chrome_browser_platform__util.h) = dc1b12c676072c8415d24a9fda2e9aae914bf9cf
+SHA1 (patch-chrome_browser_plugins_plugins__resource__service.cc) = 871ba27e1ec749239243409795f8bc4ce18548fe
+SHA1 (patch-chrome_browser_policy_policy__prefs__browsertest.cc) = ce97083bb801740d801c71b8f1fdde4cd7537ea0
+SHA1 (patch-chrome_browser_process__singleton__posix.cc) = 605351e2bd94a981adec9eb1b14d6c4f66732f4e
+SHA1 (patch-chrome_browser_renderer__preferences__util.cc) = 3ecef5ac59caf8a4e83a33a86e6a35b5d95ea722
+SHA1 (patch-chrome_browser_resources_safe__browsing_BUILD.gn) = 3b2b819e62f8c7c15c54606a4e58cc4af1d884fa
+SHA1 (patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py) = 47461db23c5e45d48e0d96bbeb235b475ad5945f
+SHA1 (patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc) = f13246f411c3a0371627748233661efcf548955f
+SHA1 (patch-chrome_browser_safe__browsing_permission__reporter.cc) = 0d05f8d90ace268a9131a5d8b303295bb6c652c7
+SHA1 (patch-chrome_browser_search_local__files__ntp__source.cc) = cf02d4277b281f06c14a5ac0429576cf48269391
+SHA1 (patch-chrome_browser_sync_chrome__sync__client.cc) = e89b193619bace532109ac93e10d32846ce9563d
+SHA1 (patch-chrome_browser_tracing_crash__service__uploader.cc) = 79d972eb9f807af8df244b1ed6662c09b0937de0
+SHA1 (patch-chrome_browser_ui_BUILD.gn) = 4b3ed83892a6a0afe01d3609640f6d3efbe116a7
+SHA1 (patch-chrome_browser_ui_browser__command__controller.cc) = ad88a0a682bcbea7ef59d2ff67831b00e0859f92
+SHA1 (patch-chrome_browser_ui_browser__view__prefs.cc) = c22886dc01e0114d16b72e62cea48e6845f5f291
+SHA1 (patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc) = 3929a3efe70b214abf0cde5d6e8bde33947dd9fb
+SHA1 (patch-chrome_browser_ui_input__method_input__method__engine__base.cc) = f04f8f391eac31ea3357e42618a0cfda911563a7
+SHA1 (patch-chrome_browser_ui_libgtk2ui_BUILD.gn) = bbd9f5a4c1790a12600e5dce7e31309c164cb97d
+SHA1 (patch-chrome_browser_ui_startup_startup__browser__creator.cc) = 69ac5c18aad5f56b0e2bd543dd585245ee2c069f
+SHA1 (patch-chrome_browser_ui_toolbar_app__menu__model.cc) = d54a176f9f3d0510815bf51b36d510855a6c2267
+SHA1 (patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc) = 588a5e3501eaa6ab7e875a98c42dd4618773ee91
+SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate.cc) = 4cbb78d49473ff706142da03a271b1d28659bdca
+SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate.h) = 745714ae3a8765782d560f88742e9a7ecbfa21f1
+SHA1 (patch-chrome_browser_ui_views_first__run__dialog.cc) = 23f8185f11ac00f3e25e3885e0e7d951e3ec5c52
+SHA1 (patch-chrome_browser_ui_views_frame_browser__frame.cc) = efde2724747006fd5aed0b5b719bb6a9258b26df
+SHA1 (patch-chrome_browser_ui_views_frame_browser__view.cc) = cd437b7a74c16ba3d3e8a2fe79a637f25cea1190
+SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc) = d15db795017f118862aefa7b7da7a90f19c3b7aa
+SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc) = 475572a9bc5938417339ab6ef0dba2cb7bfee66e
+SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc) = e419c1cb0d71d11e30189918f1922f2434720c27
+SHA1 (patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc) = feafcec6b32582e9498e992189f32ab56a6a2f27
+SHA1 (patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc) = 54178c425ee67de85957604d8f3a4828ab657b2e
+SHA1 (patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc) = 119f9d6ecb03ce0f06252dda21f3105c3e957cc4
+SHA1 (patch-chrome_browser_ui_views_tabs_tab__strip.cc) = 0c2331be3b1baadd7ab3491d7c18f3e795eb7af7
+SHA1 (patch-chrome_browser_ui_webui_about__ui.cc) = 59b77dc8ffc758bce1737f7b98bc41be0074ed11
+SHA1 (patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc) = a612ed6f83b46af9922c4c773192e1401b1e4b1e
+SHA1 (patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc) = a0c94e7d7ed838ad01f2b9e4bba01e4bdbcc7b0b
+SHA1 (patch-chrome_browser_ui_webui_options_browser__options__handler.cc) = a0fda4738488d00efdc1c8694a1739b12d5cd054
+SHA1 (patch-chrome_browser_ui_webui_options_browser__options__handler.h) = e1328182efa0c4a79254857c402c459fee6b61d3
+SHA1 (patch-chrome_browser_web__applications_web__app.cc) = 046eacf0ea1b24161f12469b8a3d063532ada798
+SHA1 (patch-chrome_browser_web__applications_web__app.h) = 37d99550756b8382e4826fddd2b8d41075453d3b
+SHA1 (patch-chrome_common_BUILD.gn) = 89074e92ad7d356056b7bbb1d68e2424ea48eaa0
+SHA1 (patch-chrome_common_chrome__paths.cc) = 9710da0f5f0e86aec3afd85fb093ad8bd34951f4
+SHA1 (patch-chrome_common_chrome__paths.h) = 883bc7bb5a908235aab9f7df92225684ecc55c98
+SHA1 (patch-chrome_common_chrome__paths__internal.h) = 6dbb9bf74d56fa22f9c4177982430d3697906d23
+SHA1 (patch-chrome_common_chrome__switches.cc) = c7254f8b0bfae3bec1b22b5d736a981dc3aa5802
+SHA1 (patch-chrome_common_chrome__switches.h) = 0c86976d1ebf13a9244f05557dc03363039708f5
+SHA1 (patch-chrome_common_extensions_api_schemas.gni) = c17f4ce43bf62e937eb507bc23cd8cf01e1ebbf6
+SHA1 (patch-chrome_common_extensions_command.cc) = a4bcca9b9e40068ecfbff6466a15445b8cfdcc62
+SHA1 (patch-chrome_common_features.gni) = 7864e41702664fba7db0480c756896564a75451a
+SHA1 (patch-chrome_common_pref__names.cc) = 15566d9cd95dcd9294e4f2a5b0db87cdd7f883ef
+SHA1 (patch-chrome_common_pref__names.h) = 26f5586cee06478072526dd6dbe30d35352c3730
+SHA1 (patch-chrome_common_variations_BUILD.gn) = e4a6807affddf8b6d68351386d637ab38b0979dc
+SHA1 (patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc) = 9fae4d1334773fafec8ad5d55b0d6d3061bf1f14
+SHA1 (patch-chrome_renderer_pepper_pepper__flash__font__file__host.h) = 221c5191ba96c493a6b0c32ecd9ffad7d8e8743f
+SHA1 (patch-chrome_test_BUILD.gn) = dc98073b73a255d94eefaa419f32df13bcadcdc2
+SHA1 (patch-chrome_test_base_in__process__browser__test.cc) = 13115e62a09fb93dfec6486bd30453a06d6dc3e4
+SHA1 (patch-chrome_test_base_testing__browser__process.h) = bb85f289a2d4e5e27900ce30b4aa76ece70a616e
+SHA1 (patch-chrome_test_chromedriver_chrome_chrome__finder.cc) = 6f0fa59c9d1d2c4247aace4a49a1990f6329ebbc
+SHA1 (patch-chromecast_BUILD.gn) = 3213dafa90d8384730105d1adcd67984bc6d5a1a
+SHA1 (patch-chromecast_browser_BUILD.gn) = bc9e8f27b011163866fb4cf3dfb57480a423d703
+SHA1 (patch-chromecast_browser_metrics_BUILD.gn) = edec57a9be2fea41670787fcdf6a468b48365108
+SHA1 (patch-chromecast_crash_BUILD.gn) = 6e5b2227a458d3ee6d6ba0085191be7aa1df7bef
+SHA1 (patch-components_BUILD.gn) = 4e4135faecadbe74570df021137f7d733d372228
+SHA1 (patch-components_arc_metrics_oom__kills__monitor.cc) = 588bfb8a408a89770107647790a9064045da741f
+SHA1 (patch-components_autofill_content_renderer_password__form__conversion__utils.cc) = b076d8c657dfc756913f1d5c79a18ed49d6b091e
+SHA1 (patch-components_autofill_core_browser_address__rewriter.cc) = d4f61c6781149ffe4af249f5e0b36faebe249caa
+SHA1 (patch-components_autofill_core_browser_form__structure.cc) = 163fe5431f3ae5232823ba39c8adb442f6715405
+SHA1 (patch-components_content__settings_core_browser_website__settings__registry.cc) = 5380e4063de89e14b59c66373216b57fc9c8565c
+SHA1 (patch-components_content__settings_core_browser_website__settings__registry.h) = 88026c9a222b09dbb7a1fa5203536153c9ead522
+SHA1 (patch-components_cookie__config_cookie__store__util.cc) = c32313dd163ccb809afd2e0c420fa16d4e067777
+SHA1 (patch-components_crash_content_app_BUILD.gn) = 7a87c41c983234bfe787d7d0434b6e3a06b18c16
+SHA1 (patch-components_crash_content_browser_BUILD.gn) = a923917e3d5c90464ae2cbdfeaa2b9dd19475833
+SHA1 (patch-components_dom__distiller_core_page__features.cc) = 39e9946eef44389894f88f443cc4e25d4a2b7855
+SHA1 (patch-components_drive_drive__api__util.cc) = afd12ae32a3b4b7f69012bc9e4859055e2cbd693
+SHA1 (patch-components_feedback_anonymizer__tool.cc) = b89d559e2e4c17b1b806926a270a511c1fa04efa
+SHA1 (patch-components_flags__ui_flags__state.cc) = ddccd61fc8babc6d15e52ef1c769c12321c43861
+SHA1 (patch-components_gcm__driver_gcm__client.h) = b2f06e9893869d714a10e1c844d77fb25e851963
+SHA1 (patch-components_gcm__driver_gcm__client__impl.cc) = 3a75d496e329e9d0f69cb685a154ff0fbe024b27
+SHA1 (patch-components_json__schema_json__schema__validator.cc) = 544f89041f66cd2900e3d0ea2fbfdd46f853d2ca
+SHA1 (patch-components_keyed__service_core_dependency__graph__unittest.cc) = 3aeb9f9eb98c8ed5ac924f90a2e675eb4efb94ac
+SHA1 (patch-components_metrics_BUILD.gn) = 5d98ca5df1258967b1425c329528aaa332702cf3
+SHA1 (patch-components_metrics_drive__metrics__provider__linux.cc) = 9fb04aed21d18386265ae6664544ef78ae7097f9
+SHA1 (patch-components_metrics_system__memory__stats__recorder__linux.cc) = 7a269ee3b7e9cb731073f6de3da0fc90fbd34482
+SHA1 (patch-components_neterror_resources_neterror.js) = 35c65f0271dc9295730e2dbde4cfc325da655c07
+SHA1 (patch-components_os__crypt_os__crypt.h) = 68bee8abbe2630ba34b4317ba38862e4d3c90a62
+SHA1 (patch-components_password__manager_core_browser_import_csv__reader.cc) = 044de4e5a2ca3e08ea9662c682374440f95d09ac
+SHA1 (patch-components_plugins_renderer_BUILD.gn) = 406c8e314d37a14c3b50ac8e9a7416286e439084
+SHA1 (patch-components_plugins_renderer_plugin__placeholder.cc) = 30942250f0bbeb7b2669afadb1f95c1127c20e9f
+SHA1 (patch-components_policy_BUILD.gn) = ec72a0cfc893f73637d216d86111f10479153e4a
+SHA1 (patch-components_policy_core_common_schema.cc) = aeaeab909505dd3084820a8f185590b84481ff8f
+SHA1 (patch-components_policy_resources_policy__templates.json) = ebbf84151c13514a20f39b159514fcf1a7a6ad78
+SHA1 (patch-components_policy_tools_generate__policy__source.py) = 5d883b6a1cff305ac9e8ac4c16da2cc128849dc3
+SHA1 (patch-components_storage__monitor_BUILD.gn) = 60b12ed624bd4454e7a55b37f6c8825bc68888f7
+SHA1 (patch-components_storage__monitor_storage__monitor.cc) = eda6e88c3d16494266eba823f2d57c9e8da90b5c
+SHA1 (patch-components_storage__monitor_storage__monitor__freebsd.cc) = 61dd6564e5a0257f23fa9ca94c41b5518df5743e
+SHA1 (patch-components_storage__monitor_storage__monitor__freebsd.h) = cdc6cda2fef6dec5fc245bc0b6998974a5c4579c
+SHA1 (patch-components_storage__monitor_storage__monitor__netbsd.cc) = 944b7b24b3ecfccf7dba2d6bacab354539283ba4
+SHA1 (patch-components_storage__monitor_storage__monitor__netbsd.h) = ed3b4ba24235ab4d685fdc821fad43272ff6f2ec
+SHA1 (patch-components_sync_base_get__session__name__linux.cc) = 77e7f18d3b2e5d1862e48be9f467c6209727ff0e
+SHA1 (patch-components_update__client_update__query__params.cc) = b00a5e4a606f05240cc6d1fc244474442778e646
+SHA1 (patch-components_url__matcher_regex__set__matcher.cc) = a2347e5d66a449b83e1fbf4e93d369dec3b641d1
+SHA1 (patch-components_url__matcher_url__matcher__factory.cc) = 69c80d8dfc9c0e31fe678b8b4429bd0baa9c1eea
+SHA1 (patch-components_variations_proto_study.proto) = 6608af1c7ac32a0e367d8c31fde98b2fb495284c
+SHA1 (patch-components_webcrypto_algorithms_test__helpers.cc) = 2903a2ba7dc6e7795792604a9713f3fbd09d49f7
+SHA1 (patch-content_app_BUILD.gn) = b77653f4abb946de49e28b0b3c70a23f0e23e08f
+SHA1 (patch-content_app_content__main__runner.cc) = 29e5b5ae41d382d60aa0fd2fcb221fb3a920edda
+SHA1 (patch-content_browser_BUILD.gn) = a63f8fb218b39f5425ae0f016bfc8f5acd20c6a3
+SHA1 (patch-content_browser_accessibility_browser__accessibility.h) = 32f86444bbc06c8d2e79817cdecae1a1a339f473
+SHA1 (patch-content_browser_accessibility_browser__accessibility__manager.h) = 8c7fd175cde48bdc076c483226a69a499b4bf24e
+SHA1 (patch-content_browser_browser__main__loop.cc) = 90700b20d8a25853322913646ce06ba12d721242
+SHA1 (patch-content_browser_child__process__launcher.cc) = 558b16b5a79b351053b220393b6541b78c5dcfff
+SHA1 (patch-content_browser_device__sensors_data__fetcher__shared__memory.h) = d7b7b4a2352a7b4bb7c393dd3829ed739c7df3c4
+SHA1 (patch-content_browser_devtools_protocol_color__picker.cc) = 7925e3d4bd56b1aa5fddc0b9cb132bd6a09d2091
+SHA1 (patch-content_browser_download_base__file.cc) = 6c8a58b62e69483577481a0bb058a3c1ef4d21b2
+SHA1 (patch-content_browser_download_base__file__linux.cc) = c5f2fd63892de3d3513f260cfe7a96f02266ecbf
+SHA1 (patch-content_browser_gpu_gpu__data__manager__impl__private.cc) = ac2cc79ca896aec80eefd74bf6459ee0a531d12e
+SHA1 (patch-content_browser_gpu_gpu__data__manager__impl__private.h) = 8e233251955d1c517ec298d71c00f58ac5777ea1
+SHA1 (patch-content_browser_gpu_gpu__internals__ui.cc) = 85a3336f5d33d87b43de31e816f8a104e48305f6
+SHA1 (patch-content_browser_gpu_gpu__process__host.cc) = ae1a8b409054402b670987161a0b9e1c4dcff642
+SHA1 (patch-content_browser_indexed__db_indexed__db__backing__store.cc) = e28cea074617d4e63071bb02af53abee5f633c44
+SHA1 (patch-content_browser_media_media__internals.cc) = 4c091c6d1965f322ef86d7cdef24120e77093aa0
+SHA1 (patch-content_browser_ppapi__plugin__process__host.cc) = 727c20e0064395041a74da9e883eabbc96dfa798
+SHA1 (patch-content_browser_renderer__host_media_video__capture__device__client.cc) = ef735eaf6eca42fab5e185e3d155affa0b11db12
+SHA1 (patch-content_browser_renderer__host_render__process__host__impl.cc) = e1a9b7e4ba75f5e2952ce5ad3fad192b3e7805db
+SHA1 (patch-content_browser_renderer__host_render__widget__host__view__aura.cc) = f1d2d9d2e64d951c51be376354b8fb28637a3662
+SHA1 (patch-content_browser_time__zone__monitor.cc) = 020c417827f62a0088fd3dea8164cb723916a77e
+SHA1 (patch-content_browser_time__zone__monitor__linux.cc) = 24d3839da945880f58ce07aa368d55c60bf56738
+SHA1 (patch-content_browser_tracing_tracing__controller__impl.cc) = ceac1913ffe68d814d6f384d647f8aff7943f42b
+SHA1 (patch-content_browser_utility__process__host__impl.cc) = 764c4325a997de613d7e7d88b513d8448c80fb57
+SHA1 (patch-content_common_BUILD.gn) = b2779e83801ffc3a2992db4b93e10e9484884d0b
+SHA1 (patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc) = 0ecb33530a297914c0e42e1d6c26aa34a0b46770
+SHA1 (patch-content_common_set__process__title__linux.cc) = fb10e587c2d356273227f5cb3f397f617bb2775e
+SHA1 (patch-content_common_set__process__title__linux.h) = e8661860efaaab4fd328fcc43a2af0c0d2202aaf
+SHA1 (patch-content_gpu_BUILD.gn) = 2a3e9626a1648eac35d582c8e701f32a6d051fe5
+SHA1 (patch-content_gpu_gpu__child__thread.cc) = b7b72e97d424ed47c5f273a36eaa183ec224353c
+SHA1 (patch-content_gpu_gpu__main.cc) = cff3d3934a3d666995b6765865412f67a3211a56
+SHA1 (patch-content_public_common_child__process__host.h) = 774794bef1612d2bdbddf6ada6ff60d01affdb3e
+SHA1 (patch-content_public_common_content__switches.cc) = e4ada75503b1488cf5e1676301f86f07721c306a
+SHA1 (patch-content_public_common_content__switches.h) = f5356f99e84b21d64f458e8b6bdf3a003081a5fc
+SHA1 (patch-content_public_test_browser__test__base.cc) = 0a2478aad2b0243f0bd73d6591ba2bbeaf4042ba
+SHA1 (patch-content_renderer_devtools_v8__sampling__profiler.cc) = adafbc2e87e91729a0d9ba1c7ab9e9d23e349426
+SHA1 (patch-content_renderer_media_webrtc_processed__local__audio__source.cc) = ab93a8aa27c6b1635c87ae3c4d04e51d871f3012
+SHA1 (patch-content_renderer_render__thread__impl.cc) = 9003854e1a984551c53f7d828023384dc5269a82
+SHA1 (patch-content_renderer_renderer__blink__platform__impl.cc) = ab5d5fd52c504cbbe289736cb949a048a9c6ac4a
+SHA1 (patch-content_renderer_renderer__blink__platform__impl.h) = fc0d314d424ad99b1a869c42951239a7b82d52e7
+SHA1 (patch-content_renderer_renderer__main__platform__delegate__linux.cc) = fd087a84184309497492fc7ae571bddcf7eaeccd
+SHA1 (patch-content_renderer_webscrollbarbehavior__impl__gtkoraura.cc) = 36e9a8bca732f89be7a62558482555777d7ad21d
+SHA1 (patch-content_shell_BUILD.gn) = fe821518f66606630927de3bb80370f240b52b3e
+SHA1 (patch-content_shell_browser_shell__browser__context.cc) = bd47f26f559408247b0adba71eab2b2b4d6a6927
+SHA1 (patch-content_shell_browser_shell__browser__main__parts.cc) = 6a5aabbedab2f324ac2bdbbd7a8a21ccbc26ce7d
+SHA1 (patch-content_test_BUILD.gn) = db8abebcbe671e01396d035febcab2d00fbbc772
+SHA1 (patch-crypto_nss__util.cc) = adbf185884951d5205f6272b94162c143274524d
+SHA1 (patch-device_BUILD.gn) = 488435bd70a43abe297bf0b66d3f27dfd0b20e4e
+SHA1 (patch-device_battery_BUILD.gn) = 6dc69bacc07a0caa502663ac8bccba96697fb804
+SHA1 (patch-device_geolocation_BUILD.gn) = bcb53e20d9703af502064a1e665d75ae9a0187eb
+SHA1 (patch-device_geolocation_location__arbitrator__impl.cc) = 0df7d7090fd07f250da6501fbba1f2c152e1fb68
+SHA1 (patch-device_hid_BUILD.gn) = ab5cab8d650bb9d79643d28f4272694f0f35ac99
+SHA1 (patch-device_media__transfer__protocol_media__transfer__protocol__manager.h) = 9cda2b3faad67c39e02bd0060747017589fb8dc6
+SHA1 (patch-device_serial_BUILD.gn) = a4ca0aad8f313a9b1239d685f50471bd7e9bcbad
+SHA1 (patch-device_serial_serial__io__handler__posix.cc) = 1ab98d90a1bc6060e5648f674d21bc8d544518da
+SHA1 (patch-device_serial_serial__service__impl.cc) = 21273b143fa179cc40eba4e1dce17a1d32378bf2
+SHA1 (patch-device_usb_usb__context.cc) = c2209ea41ec109e8c99484cb430929ed05582fe8
+SHA1 (patch-device_usb_usb__context__unittest.cc) = 3cbdf6d544b9211f83be4f8ff0039a31a8674a99
+SHA1 (patch-device_usb_usb__device__handle__impl.cc) = 15ccf64f3a869260b6ba0bf91e9af3a1a8210afb
+SHA1 (patch-device_usb_usb__device__handle__impl.h) = b62de023d484222424364e3c3493bdabdf7e5de4
+SHA1 (patch-device_usb_usb__device__impl.cc) = f2f0a81e8b194da9d219ab82c31a429dcfb677e1
+SHA1 (patch-device_usb_usb__error.cc) = 019be8d5469eb59e3851fba09d70719740ecd290
+SHA1 (patch-device_usb_usb__service__impl.cc) = 3e355aa312e0f87f5d131cc7a6bf7298ea7a7725
+SHA1 (patch-device_usb_usb__service__impl.h) = 73615905629b962cf86d3d6472d0c0bb3a077ed9
+SHA1 (patch-extensions_browser_BUILD.gn) = 0c9828ae5a0530b0b5392ab2c6232c93e317cafc
+SHA1 (patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc) = 0e13ac404c39cff7c0d3fab913c38a127ffaf273
+SHA1 (patch-extensions_browser_api_serial_serial__api.cc) = edd3527e46683fb7b2e0ddcb0603d24a57dbbb6a
+SHA1 (patch-extensions_browser_api_web__request_form__data__parser.cc) = 0599c63f9a7c763601ccbe2877e0d5d0dfad275b
+SHA1 (patch-extensions_common_image__util.cc) = 4c08db5edebf71bc96f3f1b36116ea39706de594
+SHA1 (patch-extensions_common_stack__frame.cc) = 06cf5b8577b2445b4762ef60ff7e44d6600710a1
+SHA1 (patch-gpu_BUILD.gn) = 8fdb91d64e547a8a788a3e650b151e35641822ff
+SHA1 (patch-gpu_command__buffer_service_program__manager.cc) = 5e654db0d45c2c27dd7baa47fa1152ee991ec26c
+SHA1 (patch-gpu_config_BUILD.gn) = 67bbe51e7ba5959b5918e8c289aaac05be110de6
+SHA1 (patch-gpu_config_gpu__control__list.cc) = 116ffefa65115312f48c46207ee7e8db7752de6a
+SHA1 (patch-gpu_config_gpu__control__list__unittest.cc) = 334d4fa8cb8858bb35779ae9d632dc78e5832798
+SHA1 (patch-gpu_config_gpu__info__collector.cc) = 2394d875982406c24e438500612c5b2a6c15ecfa
+SHA1 (patch-gpu_config_gpu__test__config.cc) = da8e53ad9a9f516dca9da0c20300547e2c72e8ca
+SHA1 (patch-gpu_gles2__conform__support_BUILD.gn) = 4b3348ceb13f3065173a313e52dbf11cb1580c3e
+SHA1 (patch-gpu_gles2__conform__support_native_BUILD.gn) = 994414e9ad7045e428f5d53d9cdb1a47328666eb
+SHA1 (patch-gpu_ipc_client_BUILD.gn) = 180c553e661fd21eb9ecc9bc5c2c6d2ae687598e
+SHA1 (patch-gpu_ipc_service_BUILD.gn) = ed7de63004c5aa5864491d5c79a6eeb49cf393b2
+SHA1 (patch-gpu_tools_compositor__model__bench_BUILD.gn) = 4380eb8823c2bb8fca2aa9b54915f5f1022859f9
+SHA1 (patch-gpu_vulkan_BUILD.gn) = ab291017e8352a1a1d3462c53581d02480291316
+SHA1 (patch-ipc_ipc__channel.h) = be7bf9ae662d8473aba13ae7e1b8497015cd7a50
+SHA1 (patch-ipc_ipc__channel__posix.cc) = 76a62565bf3c6104b3187302917ee7f119fcb0ca
+SHA1 (patch-ipc_ipc__channel__posix.h) = 9f1092a94a2a9ad923f8e66258429d75c8fc8411
+SHA1 (patch-ipc_ipc__message__utils.cc) = 76c25dc8cfc5cc0c96fcc4e460cfb0d3ca29403d
+SHA1 (patch-ipc_ipc__message__utils.h) = 0db5a61279ed68c4f8001a018863fcd8e482da71
+SHA1 (patch-ipc_unix__domain__socket__util.cc) = 5257e5d77edfa57ed15297c896ff6cee974507e8
+SHA1 (patch-media_audio_BUILD.gn) = 3897bbc44c8ad356cff78a38b211529e3c77744d
+SHA1 (patch-media_audio_alsa_audio__manager__alsa.cc) = c53e0bcce886e051972b84764efa0131c2e1fc1c
+SHA1 (patch-media_audio_audio__manager.cc) = 5df7fce108250e38e1ec2a9a5064fad7483e6754
+SHA1 (patch-media_audio_audio__manager.h) = cb76dea2b20fd863299da127af5d3bba3bccd9f8
+SHA1 (patch-media_base_BUILD.gn) = 1bd3329b0346b5c9737efb2e5141aa58a4a9aa0a
+SHA1 (patch-media_base_audio__splicer.cc) = 7021a8956fb7ad0defeb8cf07471ec65d3a82ed9
+SHA1 (patch-media_capture_BUILD.gn) = 97f56ac410eacb95d4a00da6a15e2a735bd27b7d
+SHA1 (patch-media_capture_video_fake__video__capture__device__factory.cc) = 0c6a507219a35e5698e616d539c84683496935a8
+SHA1 (patch-media_capture_video_file__video__capture__device__factory.cc) = 4303cad9b4b6e4d31caa4fd63b541f739f23ad14
+SHA1 (patch-media_capture_video_linux_video__capture__device__linux.cc) = 5b7b31db02446657f3232037836d7be8d13f63dd
+SHA1 (patch-media_capture_video_video__capture__device__factory.cc) = e125d78f5f5a70c5a334d3b1574b3cd3525ce84c
+SHA1 (patch-media_cast_BUILD.gn) = 7cb062646b1ec26432ee65451c2cb932aa156724
+SHA1 (patch-media_cdm_ppapi_ppapi__cdm__adapter.gni) = faf05ae775e316d0144eb2d4446c224f3cb7c4d6
+SHA1 (patch-media_filters_decrypting__audio__decoder.cc) = ccb9faa4672a0594d25dba4e65ff8f3711bbea19
+SHA1 (patch-media_filters_vp9__parser.h) = 148abc0b29ce24e69c598addc53f2479eb96d7b7
+SHA1 (patch-media_formats_common_offset__byte__queue.cc) = f1d10958b03b9ffdff6ae3f7efe2c7e47775bd63
+SHA1 (patch-media_formats_common_offset__byte__queue.h) = 49786e415839aec437e075e481515470194c99fb
+SHA1 (patch-media_formats_mp2t_es__parser__adts.cc) = 1d5ca91a48b4f603ca49fc64f1bb0016b57019d0
+SHA1 (patch-media_formats_mp2t_es__parser__mpeg1audio.cc) = f25203f88d15fa5446c0ceee0857eaacd922c7ee
+SHA1 (patch-mojo_BUILD.gn) = c90ac6ba27be350bb7869719279610f98bd016d1
+SHA1 (patch-mojo_edk_test_BUILD.gn) = 2233643ba1e811b01a40d32f30ffa413d855d982
+SHA1 (patch-native__client__sdk_src_BUILD.gn) = 3a8b066cdcc7b8495560dc4085b2cd62954939a8
+SHA1 (patch-net_BUILD.gn) = 6ee5be65bbc7128f3de2665c0f9233b4657f6536
+SHA1 (patch-net_base_address__tracker__linux.cc) = 27c3b496ed8808797c2daae32ec9201379143e87
+SHA1 (patch-net_base_address__tracker__linux.h) = 0fe001e969012c98cfbea87cf7c6833721468316
+SHA1 (patch-net_base_address__tracker__linux__unittest.cc) = 6c13b788685cd05717154a325456243651374feb
+SHA1 (patch-net_base_mime__util__unittest.cc) = b96498a85afdeeea58af7d8eea712068736c11d7
+SHA1 (patch-net_base_network__change__notifier.cc) = 331f3164fa6d75ebd183f2e0c15fa0c267cadcaa
+SHA1 (patch-net_base_network__change__notifier.h) = 873369c92dca2f28250545c3adf3fa252bfda622
+SHA1 (patch-net_base_network__interfaces__linux.cc) = 7ac23822b05c5566f696d10345ff7ac535a88090
+SHA1 (patch-net_base_network__interfaces__posix.cc) = 79fe81b9793451444e5919279d9f63a2661acb93
+SHA1 (patch-net_dns_address__sorter__posix.cc) = 66f8ae0e8a7d246fa78a90b45e0f54c548c1a166
+SHA1 (patch-net_dns_dns__config__service__posix__unittest.cc) = 88822de03ddba0b5f88f1303237ec530f13c9b59
+SHA1 (patch-net_dns_dns__reloader.cc) = 2d75fe56bb2689ff48c87329fd024921956d2f0e
+SHA1 (patch-net_dns_dns__session.cc) = 76f2c8744b46aa25a389d2acb510b8732f7328de
+SHA1 (patch-net_http_http__auth__gssapi__posix.cc) = dffb74ac6fb803461da5578a75363ae1df8ff365
+SHA1 (patch-net_net.gyp) = dda216aba1dac1fb016fae3adba0ac1db9963738
+SHA1 (patch-net_proxy_proxy__config__service__linux.cc) = 62dc82a74f34f847b7c6f96ad2b4d193c17070d4
+SHA1 (patch-net_proxy_proxy__service.cc) = 046979f785c6b930f374a330bf3ee82976cc6d02
+SHA1 (patch-net_socket_socks5__client__socket.cc) = 197347a2d7f6108c0bc67ac07d41cfdec83f383d
+SHA1 (patch-net_udp_udp__socket__posix.cc) = 92eb1df07b3b444393b1e04b2eba8f5551ae7905
+SHA1 (patch-net_udp_udp__socket__unittest.cc) = faa9d7783ab3a507e1a2d9d4f7ad5ccd2cad8ec1
+SHA1 (patch-pdf_pdfium_pdfium__engine.cc) = b4cd5d43a2ac041475b69fcca1534cc459e7e7ef
+SHA1 (patch-ppapi_proxy_file__io__resource.cc) = e3fd8a34e09350f3bd5f358073328a5e65f6adc6
+SHA1 (patch-ppapi_shared__impl_private_net__address__private__impl.cc) = fbbdad10d1ef9c2b3d4de30e312c2f393f932cc6
+SHA1 (patch-ppapi_tests_extensions_BUILD.gn) = 506fa029fc00d570777d08929178b1dfd66d012f
+SHA1 (patch-printing_BUILD.gn) = 0a791bb1accb18a1b7b7559c2519ab144a12cf44
+SHA1 (patch-printing_cups__config__helper.py) = 582b9427c80a3c7afd13277b2e8eb2a28839264a
+SHA1 (patch-remoting_host_BUILD.gn) = 9352691c2225833fdb9b7c023163ba6428fda6d9
+SHA1 (patch-sdch_BUILD.gn) = de13d11f32413b22d1733b26e441582f01a611d7
+SHA1 (patch-services_shell_standalone_context.cc) = 82e5e1b38a2d9916f57bdf8f23cdeaa728b511ed
+SHA1 (patch-services_ui_ws_BUILD.gn) = 36aa4a6ff175a4e8f5914ab30784069f80205b2b
+SHA1 (patch-skia_BUILD.gn) = a3afad81d0ea253deac5a2e6336b9bf737fcc8d6
+SHA1 (patch-skia_ext_SkMemory__new__handler.cpp) = 9177cb7ecf48537df7da984618239e688a99f7fc
+SHA1 (patch-skia_ext_platform__canvas.h) = 7c621a4e97e2ea48265e04118dac868243232962
+SHA1 (patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp) = ab5af6309ac76ca14857580c31d0ece505c6e9e9
+SHA1 (patch-third__party_WebKit_Source_core_BUILD.gn) = 22bc5a42c19a5797ad8c180423a38cd8ed4a2225
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp) = 5bf02ea58647b28782b03bc8e8b2d1fd34992591
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontCache.h) = f120be5e81a2a26e248268f64ae69e49b2f1f1a2
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp) = 1c816bf51e3e8672a3ff38ca28e7bf9fbfd29183
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h) = adceeed5ee353a91babc4ff9531a01ce56860ec6
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp) = 4866de7ff3cdc955eec2c47f99b01d30a118b7ec
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp) = 1e4feba0d71ddc7bd0f64b93f49d7725092fbb93
+SHA1 (patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp) = 29b4ca87ac2599b6654633b49bdfba47ee1eedaa
+SHA1 (patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp) = 881a92e1889697eb9e305ac3e674c29df5d1de01
+SHA1 (patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp) = 665cbe3a1a000c406b0147798b2653f09ee380dd
+SHA1 (patch-third__party_WebKit_Source_wtf_Assertions.cpp) = f074333bb37445dd3720a8a15b839577559b06ef
+SHA1 (patch-third__party_WebKit_Source_wtf_Atomics.h) = 999c3a06e4ef9d61c682b48c763319ba72aad885
+SHA1 (patch-third__party_WebKit_Source_wtf_ByteSwap.h) = 057e2c5f48d9ccfccd70e86a99a1da2684ef3f97
+SHA1 (patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h) = 719564784cdb6175819109a2d39edbee27322b87
+SHA1 (patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp) = 4f78a25fb28b5d719cdcba280c7d2cabb24fc961
+SHA1 (patch-third__party_angle_src_tests_BUILD.gn) = 5b59b9c6497e18851fffcc77e250ff13515f1735
+SHA1 (patch-third__party_boringssl_BUILD.gn) = b66875fe725dac573ec3c4dc0512249cbc0d7cf7
+SHA1 (patch-third__party_boringssl_src_include_openssl_thread.h) = d197f660e6b8db4600f1ced9b50d80ad3bdf5267
+SHA1 (patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h) = d8846234dc581be2599338ef9524d17de453c635
+SHA1 (patch-third__party_cython_rules.gni) = 3a4baa905c701a1b0b1d182d65cb5955395deba8
+SHA1 (patch-third__party_expat_BUILD.gn) = 7377d083ca6b629a89022db0d2fe1cb4ac319d68
+SHA1 (patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h) = 79214c51ac671d30038eb76e40c4fa1c227e7282
+SHA1 (patch-third__party_ffmpeg_chromium_scripts_generate__gyp.py) = 4b49583a7be2948a5f7c068a1bde42a77c0bcda4
+SHA1 (patch-third__party_ffmpeg_ffmpeg__generated.gni) = b4d8bfe0556607deb0f389092f82fd48f58e4cee
+SHA1 (patch-third__party_fontconfig_BUILD.gn) = 9ec480172afaec88bc2b6b1addc7f11b32924946
+SHA1 (patch-third__party_freetype2_BUILD.gn) = 0c724943a92ac390b0cdc2057b9d1781e1a0c289
+SHA1 (patch-third__party_glslang_BUILD.gn) = 181a36ace8a287c7da624a52b990e56b158582f9
+SHA1 (patch-third__party_harfbuzz-ng_BUILD.gn) = 66737bec929583b74740567651d6899ec78253d8
+SHA1 (patch-third__party_icu_android_patch__locale.sh) = 2da705b185fd924807ee2c911d4f56df61fc6d14
+SHA1 (patch-third__party_icu_source_configure) = fee6bf6dbdeb57b55b1c04bf366304b2b1932f22
+SHA1 (patch-third__party_leveldatabase_env__chromium.cc) = f99f68a96f960ecd70dc4c805464138f11cf10f1
+SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h) = 87762d3f2697361ed2ee84ff1a86895d3fd78ec5
+SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h) = 796e2c59e901bcf085dda76611df1e92ed94ede1
+SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h) = fbac5ad09059353f15ad28cfb335ec7c7b1868e6
+SHA1 (patch-third__party_libusb_BUILD.gn) = 6db4945f91271de89cc9cd2e458c74d9b042e8a2
+SHA1 (patch-third__party_libyuv_include_libyuv_row.h) = 9de01ba169420ed8b8f5413ebb7cad82f47f8653
+SHA1 (patch-third__party_libyuv_source_mjpeg__decoder.cc) = 04cd4b7cf41db3b697808c9d07d8c4a704a79d74
+SHA1 (patch-third__party_mesa_BUILD.gn) = f56a5476aa9da19497d07b647b33b9ca26a85624
+SHA1 (patch-third__party_minigbm_BUILD.gn) = b5b48c7168f6516c63935cdd6a57ed2f85bb73b6
+SHA1 (patch-third__party_opus_BUILD.gn) = 82305a2f62ac3917bb0e34659b85b763fc5548f9
+SHA1 (patch-third__party_ots_include_opentype-sanitiser.h) = 65c5ee24719cc5a4d82465bd5854da3b918dd1b1
+SHA1 (patch-third__party_pdfium_core_fxcrt_include_fx__system.h) = a7e1eb9d75528444ba6b9c30be9c64b4994a0090
+SHA1 (patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp) = af4ca9f809697327437eb42b036b78b0f8f4363d
+SHA1 (patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp) = 0639caa99722e48b0eebdfea68c3989b53f39b1c
+SHA1 (patch-third__party_pdfium_skia_BUILD.gn) = bf65971521dca2d761d8ce318ce2c52ec707e1d6
+SHA1 (patch-third__party_protobuf_post__process__dist.sh) = 6732cfe77ea42e543bf80e53d6c1f57a4b193587
+SHA1 (patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h) = 01988c17b537528f01efcc121c82accebc746a40
+SHA1 (patch-third__party_sqlite_BUILD.gn) = caac3013395b57b9a3310f46ea55e68305731535
+SHA1 (patch-third__party_swiftshader_third__party_LLVM_utils_buildit_build__llvm) = 6644ed54e319f0e4e58a6cf2be3e64959bdb324a
+SHA1 (patch-third__party_usrsctp_BUILD.gn) = 83e6e7a4dc4900e2850c86c24b66c18ae460f33a
+SHA1 (patch-third__party_webrtc_BUILD.gn) = 5dc21ca1999331b71a8e17d7c065252d2e987f5e
+SHA1 (patch-third__party_webrtc_base_httpcommon.cc) = 64880d85e1bec468795e04b7f834d4cb9e3c3cd9
+SHA1 (patch-third__party_webrtc_base_ifaddrs__converter.h) = 45a4bf6be7371bff5874e46bd556dd606cdec9bf
+SHA1 (patch-third__party_webrtc_base_ipaddress.h) = 566c84c3f7c159a43f2b817722306190f45cc56d
+SHA1 (patch-third__party_webrtc_base_linux.cc) = 4aac44068528fac1776449744f06215b312631d4
+SHA1 (patch-third__party_webrtc_base_linux.h) = a8d2ed2e74032a93b4986cebeab6f72fc1243e7d
+SHA1 (patch-third__party_webrtc_base_network.cc) = a362c065aa9ee310813ef3ae12281207cde9f21b
+SHA1 (patch-third__party_webrtc_base_network.h) = fc1dc34746625d21071525a8dc03958b0c6202a7
+SHA1 (patch-third__party_webrtc_base_physicalsocketserver.cc) = 9c31c3489b56f29c51c36d507e102e591f4f5b3c
+SHA1 (patch-third__party_webrtc_base_platform__thread.cc) = 4da2c60ab7fa3184e692252c35cc09366cb7a454
+SHA1 (patch-third__party_webrtc_base_stringutils.h) = de64ddfb1c3b455acaebe8f982fd49fd3085dd61
+SHA1 (patch-third__party_webrtc_base_systeminfo.cc) = 2b8271a9fbf227b817215db11a345fe918c90e73
+SHA1 (patch-third__party_webrtc_common__audio_wav__file.h) = 699b1670037a86c7670f2f98f57dc95d50c63674
+SHA1 (patch-third__party_webrtc_modules_remote__bitrate__estimator_overuse__detector.cc) = 67a73d55585624d3e608e62d96ea7e124d687e67
+SHA1 (patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc) = c03c8801bda66a461d2088956f874c6c3d5fbfa0
+SHA1 (patch-third__party_webrtc_modules_video__coding_receiver.cc) = 2bc6001c1fe0e4bc4d48ccbe7a54832d418f40f5
+SHA1 (patch-third__party_webrtc_system__wrappers_BUILD.gn) = 81b2cb67079667f1158d54409cc6f5c0cbab837d
+SHA1 (patch-third__party_widevine_cdm_BUILD.gn) = 50bf134965433f23f21460b9cd3c9f4545587de2
+SHA1 (patch-third__party_widevine_cdm_stub_widevine__cdm__version.h) = e88d8c99493d0829691ab53160166882682559b9
+SHA1 (patch-third__party_xdg-utils_scripts_xdg-terminal) = 0ffac0d6517800fa9ee6dee34632efe40aa249de
+SHA1 (patch-third__party_xdg-utils_scripts_xdg-terminal.in) = 0460aaf77741dcd9e7b80b6660906f91d54b36ba
+SHA1 (patch-third__party_yasm_BUILD.gn) = 88d5a75026b58f5f5bf8ea98c7098c398ea0a1dd
+SHA1 (patch-third__party_zlib_BUILD.gn) = 5a352cc458f07b59346fa6ff8a0c0a2950dfa029
+SHA1 (patch-tools_battor__agent_BUILD.gn) = cbc43dcd811cee721429f9deae81e1066779f3a5
+SHA1 (patch-tools_gn_args.cc) = 7891b7c0b998a7fe96b0b7bdfc8e4096ded98ebc
+SHA1 (patch-tools_gn_bootstrap_bootstrap.py) = 69996545f0cf50517b41f0f1baca979e5ad8b36e
+SHA1 (patch-tools_gn_gn__unittests.isolate) = 529409783bdf4561d12cf16d0a6137ac3c3cb79a
+SHA1 (patch-ui_accessibility_platform_ax__platform__node.h) = a2796d6e61d53dd3da8a2efcb8cadd354a14ff9a
+SHA1 (patch-ui_app__list_app__list__constants.cc) = 9c27e6433071ff1f48a2be9b0df5f9e48c961eed
+SHA1 (patch-ui_app__list_app__list__constants.h) = 6a4e0b8068ea1dda47c336d6005210c71212023d
+SHA1 (patch-ui_app__list_app__list__menu.cc) = 0792e54e007ca6c27ee4977f0357d8a31351bf5e
+SHA1 (patch-ui_app__list_views_app__list__item__view.cc) = 28a1652703c27b3cbb58f0df1b889f9ebc34b149
+SHA1 (patch-ui_app__list_views_app__list__view.cc) = 456c883abeaaf8267b007a50d318c4e6eef3dc5e
+SHA1 (patch-ui_aura_BUILD.gn) = 74b8d176f5aeceecfd37e18518886fb63feca095
+SHA1 (patch-ui_base_BUILD.gn) = 412e7008ec17ef0234192bb875755e3bb8eeabd9
+SHA1 (patch-ui_base_ime_BUILD.gn) = 51afa404887e3a268266beaff4653fa2d1a5b11f
+SHA1 (patch-ui_base_ime_ime__engine__handler__interface.h) = 35651d81fd3c832a7cdd5fb28c4bcc39c979f242
+SHA1 (patch-ui_base_ime_input__method__factory.cc) = 746bcd00b162fa308f09ef40e7a27885bbc0d446
+SHA1 (patch-ui_base_ime_input__method__initializer.cc) = 15f821784d500f8f5bc20346c395c0175421e5c1
+SHA1 (patch-ui_base_resource_resource__bundle.cc) = 3781d1be578e69330482e11f478eb2daf240c4d0
+SHA1 (patch-ui_base_ui__features.gni) = 87ce205ff8c4c38dff0b4179aaef91fbafb6b65b
+SHA1 (patch-ui_base_webui_web__ui__util.cc) = 7c5553d2d2afc38f4b14dd48116a586a6d7eb770
+SHA1 (patch-ui_compositor_BUILD.gn) = 49ab03b226f07e4b3017abc6e0149b8ab3a52dc2
+SHA1 (patch-ui_events_event__switches.cc) = d2c42cc5ac01d7d402252b607938e57960f03579
+SHA1 (patch-ui_events_event__switches.h) = 0b35d5f6bea06a512f95f5a22f1b5d63ae6bfc5a
+SHA1 (patch-ui_events_keycodes_dom_keycode__converter.cc) = 772f18fd6980f8e6a462e130c6da016096d82295
+SHA1 (patch-ui_gfx_BUILD.gn) = 48aeb0e87fef4f952fd74cb51a4a5e8907e96ce8
+SHA1 (patch-ui_gfx_canvas__skia.cc) = 38219139aa38b71959cf441c8b2bc202a2e12541
+SHA1 (patch-ui_gfx_font__fallback__linux.cc) = 4c5172fcb4a0bff0c838f902301c4c8749a7b7dc
+SHA1 (patch-ui_gfx_font__render__params.h) = f554b0edcb9f966ad107d0613fb86586678dd312
+SHA1 (patch-ui_gfx_render__text.cc) = 7cf9019d4e8ffb7393f681d92ed0a6129423bea1
+SHA1 (patch-ui_gl_BUILD.gn) = 0c591f5049d0b1880d1c9d982dc58c6cfc061f73
+SHA1 (patch-ui_gl_sync__control__vsync__provider.cc) = fd2d2d785ee8dcfda8dd434a29d5820687657352
+SHA1 (patch-ui_gl_sync__control__vsync__provider.h) = f73dec39c974673ae259a6fdd8b7828956b1da11
+SHA1 (patch-ui_message__center_message__center__style.h) = 8bfd11a25284371397948e424ce1b19729bad669
+SHA1 (patch-ui_message__center_views_message__center__button__bar.cc) = 5f856680325a5886a41d4800c5178ae9c7e24397
+SHA1 (patch-ui_message__center_views_message__center__button__bar.h) = e7e4e4e879102822cd31d71d37f6b341ff0ad2ba
+SHA1 (patch-ui_message__center_views_message__view__factory.cc) = 32a1609b4a9213e039fce2ec589d2e028658194a
+SHA1 (patch-ui_resources_ui__resources.grd) = 084ad062d7984599ef59757730b21cf916d51ddd
+SHA1 (patch-ui_views_BUILD.gn) = b36baf3c5c82427fc5802c02ac808215a10836e4
+SHA1 (patch-ui_views_accessibility_native__view__accessibility.h) = 402781057d0d339ed5155eb2b27d0059fe73b625
+SHA1 (patch-ui_views_bubble_bubble__dialog__delegate.cc) = 491aab3745d5aac956ccbbeb7021894f2a41190c
+SHA1 (patch-ui_views_controls_textfield_textfield.cc) = ff5cafef6ed2c07518ad261b3898d913c44e9740
+SHA1 (patch-ui_views_controls_webview_BUILD.gn) = f236ab33937b93841a34c0f6e119d1385ad02ac0
+SHA1 (patch-ui_views_examples_widget__example.cc) = 988ca0090b8763859b21e2add5df86237e8aa3d2
+SHA1 (patch-ui_views_style_platform__style.cc) = 8a385ee3f065abe6d82dcc9dd336168c3cb469eb
+SHA1 (patch-ui_views_views__delegate.cc) = 0fa90998922d7da71034d7c1587ed2278bc79a84
+SHA1 (patch-ui_views_views__delegate.h) = 4b2e7517b6d03f8512679b43b59a45821bc69311
+SHA1 (patch-ui_views_views__switches.cc) = 76d54d6269209144fe6ee615a0a4b33871d7425a
+SHA1 (patch-ui_views_window_custom__frame__view.cc) = 123bad8b9f24507665dbf83129b3839bad6a8584
+SHA1 (patch-ui_views_window_dialog__delegate.cc) = 548466db07af11587a0d24b6ab54925886b50de8
+SHA1 (patch-ui_webui_resources_js_cr.js) = 2b30ee9eef39e94a278e83b5a9a0a437449a98ec
+SHA1 (patch-ui_webui_resources_js_icon.js) = 3d4b4da52e4b4fbe62e45ef9ca6f65c824e3f5a7
+SHA1 (patch-v8_BUILD.gn) = af3a1a6619f05f458860bc4c3580a64ec69d72dc
+SHA1 (patch-v8_src_base_platform_platform-netbsd.cc) = b523f84cb1d87dba64aae495f7c46c3f86cf63db
+SHA1 (patch-v8_src_base_platform_platform-posix.cc) = c11ce3ebc4165e836965533eda417cca02e4815e
+SHA1 (patch-v8_src_base_platform_platform.h) = b550c96973cf6b0fed9dcbde7b71301afa3585c1
+SHA1 (patch-v8_tools_run-llprof.sh) = 5f30e83b37a49e3f8982d8c1387a2816ea6f049d
diff --git a/chromium-new/options.mk b/chromium-new/options.mk
new file mode 100644
index 0000000..1c76eee
--- /dev/null
+++ b/chromium-new/options.mk
@@ -0,0 +1,20 @@
+# $NetBSD: options.mk,v 1.32 2016/08/20 11:17:32 ryoon Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.chromium
+PKG_SUPPORTED_OPTIONS+=	debug
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdebug)
+BUILDTYPE=	Debug
+GN_ARGS+=	is_debug=true
+# Dynamic link build causes link errors in pkgsrc.
+GN_ARGS+=	is_component_build=false
+GN_BOOTSTRAP_FLAGS+=	--debug
+#GN_VERBOSE=    -v
+.else
+BUILDTYPE=	Release
+GN_ARGS+=	is_debug=false \
+		symbol_level=0 \
+		remove_webcore_debug_symbols=true
+.endif
diff --git a/chromium-new/patches/patch-BUILD.gn b/chromium-new/patches/patch-BUILD.gn
new file mode 100644
index 0000000..c75f901
--- /dev/null
+++ b/chromium-new/patches/patch-BUILD.gn
@@ -0,0 +1,166 @@
+$NetBSD$
+
+--- BUILD.gn.orig	2016-11-10 20:02:08.000000000 +0000
++++ BUILD.gn
+@@ -201,7 +201,7 @@ group("both_gn_and_gyp") {
+     ]
+   }
+ 
+-  if (!is_ios && !is_android && !is_chromecast) {
++  if (!is_ios && !is_android && !is_bsd && !is_chromecast) {
+     deps += [
+       "//chrome",
+       "//chrome/test:browser_tests",
+@@ -260,7 +260,7 @@ group("both_gn_and_gyp") {
+     ]
+   }
+ 
+-  if (!is_ios) {
++  if (!is_ios && !is_bsd) {
+     # TODO(GYP): Figure out which of these should actually build on iOS,
+     # and whether there should be other targets that are iOS-only and missing.
+     deps += [
+@@ -300,7 +300,7 @@ group("both_gn_and_gyp") {
+       "//ui/touch_selection:ui_touch_selection_unittests",
+       "//url/ipc:url_ipc_unittests",
+     ]
+-  } else {
++  } else if (!is_bsd) {
+     deps += [ "//ios:all" ]
+   }
+ 
+@@ -457,7 +457,7 @@ group("both_gn_and_gyp") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     # The following are definitely linux-only.
+     deps += [
+       "//chrome:manpage",
+@@ -484,9 +484,16 @@ group("both_gn_and_gyp") {
+       # TODO(dpranke): add the linux_dump_symbols flag?
+       deps += [ "//chrome:linux_symbols" ]
+     }
++
++    if (is_bsd) {
++      deps -= [
++        "//sandbox/linux:chrome_sandbox",
++        "//sandbox/linux:sandbox_linux_unittests",
++      ]
++    }
+   }
+ 
+-  if (is_ios || is_win || (is_linux && !is_chromeos)) {
++  if (is_ios || is_win || is_bsd || (is_linux && !is_chromeos)) {
+     deps += [
+       "//base:base_i18n_perftests",
+       "//base:base_perftests",
+@@ -555,7 +562,7 @@ group("both_gn_and_gyp") {
+     if (enable_nacl) {
+       deps += [ "//components/nacl/loader:nacl_loader_unittests" ]
+ 
+-      if (is_linux) {
++      if (is_linux || is_bsd) {
+         # TODO(dpranke): Figure out what platforms should actually have this.
+         deps += [ "//components/nacl/loader:nacl_helper" ]
+ 
+@@ -664,7 +671,7 @@ group("both_gn_and_gyp") {
+       deps +=
+           [ "//chrome/installer/mini_installer:next_version_mini_installer" ]
+     }
+-  } else if (!is_android && !is_ios) {
++  } else if (!is_android && !is_ios && !is_bsd) {
+     deps += [ "//breakpad:symupload($host_toolchain)" ]
+   }
+ 
+@@ -713,7 +720,7 @@ group("gn_only") {
+     deps += [ "//chrome/tools/disable_outdated_build_detector" ]
+   }
+ 
+-  if (is_win || is_linux) {
++  if (is_win || is_linux || is_bsd) {
+     deps += [
+       "//mash:all",
+       "//media/mojo/services:media_mojo_shell_unittests",
+@@ -726,7 +733,7 @@ group("gn_only") {
+     ]
+   }
+ 
+-  if (is_linux && !is_chromeos && !is_chromecast) {
++  if ((is_linux || is_bsd) && !is_chromeos && !is_chromecast) {
+     # TODO(GYP): Figure out if any of these should be in gn_all
+     # and figure out how cross-platform they are
+     deps += [
+@@ -793,7 +800,7 @@ group("gn_only") {
+     ]
+ 
+     if (target_cpu == "x86" || target_cpu == "x64") {
+-      if (!is_android) {
++      if (!is_android && !is_bsd) {
+         deps += [ "//chrome/test:load_library_perf_tests" ]
+       }
+       deps += [
+@@ -801,7 +808,7 @@ group("gn_only") {
+         "//third_party/libjpeg_turbo:simd_asm",
+       ]
+     }
+-    if (is_linux && current_toolchain == host_toolchain) {
++    if ((is_linux || is_bsd) && current_toolchain == host_toolchain) {
+       deps += [ "//v8:v8_shell" ]
+     }
+   }
+@@ -811,7 +818,7 @@ group("gn_only") {
+   }
+ 
+   if ((is_linux && !is_chromeos && !is_chromecast) || (is_win && use_drfuzz) ||
+-      (use_libfuzzer && is_mac)) {
++      (use_libfuzzer && is_mac) || is_bsd) {
+     deps += [
+       "//testing/libfuzzer/fuzzers",
+       "//testing/libfuzzer/tests:libfuzzer_tests",
+@@ -847,7 +854,7 @@ group("gn_only") {
+ 
+ group("gn_mojo_targets") {
+   testonly = true
+-  if (is_linux && !is_chromeos) {
++  if ((is_linux || is_bsd) && !is_chromeos) {
+     # TODO(GYP): Figure out if any of these should be in gn_all
+     # and figure out how cross-platform they are
+     deps = [
+@@ -872,7 +879,7 @@ group("gn_visibility") {
+   }
+ }
+ 
+-if (!is_ios) {
++if (!is_ios || !is_bsd) {
+   # This group includes all of the targets needed to build and test Blink,
+   # including running the layout tests (see below).
+   group("blink_tests") {
+@@ -906,7 +913,7 @@ if (!is_ios) {
+       ]
+     }
+ 
+-    if (!is_win && !is_android) {
++    if (!is_win && !is_android && !is_bsd) {
+       deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
+     }
+ 
+@@ -935,7 +942,7 @@ group("chromium_swarm_tests") {
+ group("chromium_builder_perf") {
+   testonly = true
+ 
+-  if (!is_ios && !is_android && !is_chromecast) {
++  if (!is_ios && !is_android && !is_chromecast && !is_bsd) {
+     deps = [
+       "//cc:cc_perftests",
+       "//chrome/test:load_library_perf_tests",
+@@ -965,7 +972,7 @@ group("chromium_builder_perf") {
+         "//chrome/installer/mini_installer:mini_installer",
+         "//third_party/angle/src/tests:angle_perftests",
+       ]
+-    } else {
++    } else if (!is_bsd) {
+       deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
+     }
+   }
diff --git a/chromium-new/patches/patch-base_BUILD.gn b/chromium-new/patches/patch-base_BUILD.gn
new file mode 100644
index 0000000..e6f8be1
--- /dev/null
+++ b/chromium-new/patches/patch-base_BUILD.gn
@@ -0,0 +1,85 @@
+$NetBSD$
+
+--- base/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/BUILD.gn
+@@ -1053,6 +1053,35 @@ component("base") {
+     public_deps += [ "//base/allocator:unified_allocator_shim" ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "files/file_util_linux.cc",
++      "files/file_path_watcher_linux.cc",
++      "process/process_linux.cc",
++      "process/process_iterator_linux.cc",
++      "process/process_metrics_linux.cc",
++      "process/process_handle_linux.cc",
++      "sys_info_linux.cc",
++      "trace_event/malloc_dump_provider.cc",
++      "trace_event/malloc_dump_provider.h",
++      "debug/proc_maps_linux.cc",
++      "debug/proc_maps_linux.h",
++    ]
++    sources += [
++      "files/file_path_watcher_stub.cc",
++      "process/process_handle_netbsd.cc",
++      "process/process_iterator_netbsd.cc",
++      "process/process_metrics_netbsd.cc",
++      "sys_info_netbsd.cc",
++    ]
++    libs = [
++      "execinfo", # logging.cc
++      "kvm"       # process_metrics_freebsd
++    ]
++  }
++
++
++
+   # Allow more direct string conversions on platforms with native utf8
+   # strings
+   if (is_mac || is_ios || is_chromeos || is_chromecast) {
+@@ -1324,7 +1353,7 @@ component("base") {
+   }
+ 
+   # Linux.
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     if (is_asan || is_lsan || is_msan || is_tsan) {
+       # For llvm-sanitizer.
+       data += [ "//third_party/llvm-build/Release+Asserts/lib/libstdc++.so.6" ]
+@@ -1349,7 +1378,7 @@ component("base") {
+       "//base/third_party/xdg_user_dirs",
+     ]
+   } else {
+-    # Non-Linux.
++    # Non-Linux/BSD.
+     sources -= [
+       "nix/mime_util_xdg.cc",
+       "nix/mime_util_xdg.h",
+@@ -1365,6 +1394,13 @@ component("base") {
+     }
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "threading/platform_thread_linux.cc",
++    ]
++    sources += [ "threading/platform_thread_freebsd.cc" ]
++  }
++
+   # iOS
+   if (is_ios) {
+     set_sources_assignment_filter([])
+@@ -2119,6 +2155,12 @@ test("base_unittests") {
+     set_sources_assignment_filter(sources_assignment_filter)
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "debug/proc_maps_linux_unittest.cc",
++    ]
++  }
++
+   if (is_win) {
+     deps += [ "//base:scoped_handle_test_dll" ]
+     if (current_cpu == "x64") {
diff --git a/chromium-new/patches/patch-base_allocator_BUILD.gn b/chromium-new/patches/patch-base_allocator_BUILD.gn
new file mode 100644
index 0000000..12d4ef9
--- /dev/null
+++ b/chromium-new/patches/patch-base_allocator_BUILD.gn
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- base/allocator/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/allocator/BUILD.gn
+@@ -330,6 +330,9 @@ if (use_experimental_allocator_shim) {
+       ]
+     } else if (is_linux && use_allocator == "none") {
+       sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ]
++    } else if (is_bsd && use_allocator == "none") {
++      # TODO move the code to allocator_shim_default_dispatch_to_libc.cc"
++      sources += [ "allocator_shim_default_dispatch_to_glibc.cc" ]
+     } else if (is_android && use_allocator == "none") {
+       sources += [
+         "allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc",
diff --git a/chromium-new/patches/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc b/chromium-new/patches/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
new file mode 100644
index 0000000..9fdaa66
--- /dev/null
+++ b/chromium-new/patches/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
@@ -0,0 +1,90 @@
+$NetBSD$
+
+--- base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/allocator/allocator_shim_default_dispatch_to_glibc.cc
+@@ -3,17 +3,46 @@
+ // found in the LICENSE file.
+ 
+ #include "base/allocator/allocator_shim.h"
++#include <stdio.h>
++#include <stdlib.h>
++#if defined(OS_FREEBSD)
++#include <malloc_np.h>
++#endif
+ 
+ // This translation unit defines a default dispatch for the allocator shim which
+ // routes allocations to libc functions.
+-// The code here is strongly inspired from tcmalloc's libc_override_glibc.h.
++// The code here is strongly inspired from tcmalloc's override_glibc.h.
+ 
+ extern "C" {
+-void* __libc_malloc(size_t size);
+-void* __libc_calloc(size_t n, size_t size);
+-void* __libc_realloc(void* address, size_t size);
+-void* __libc_memalign(size_t alignment, size_t size);
+-void __libc_free(void* ptr);
++#if defined(OS_FREEBSD)
++void* __malloc(size_t size);
++void* __calloc(size_t n, size_t size);
++void* __realloc(void* address, size_t size);
++void* __memalign(size_t alignment, size_t size) {
++  void *ret;
++  if (__posix_memalign(&ret, alignment, size) != 0) {
++    return nullptr;
++  } else {
++    return ret;
++  }
++}
++int  __posix_memalign(void **ptr, size_t alignment, size_t size);
++void __free(void* ptr);
++#else
++#define __malloc malloc
++#define __calloc calloc
++#define __realloc realloc
++void* __memalign(size_t alignment, size_t size) {
++  void *ret;
++  if (posix_memalign(&ret, alignment, size) != 0) {
++    return nullptr;
++  } else {
++    return ret;
++  }
++}
++#define __posix_memalign posix_memalign
++#define __free free
++#endif
+ }  // extern "C"
+ 
+ namespace {
+@@ -21,23 +50,27 @@ namespace {
+ using base::allocator::AllocatorDispatch;
+ 
+ void* GlibcMalloc(const AllocatorDispatch*, size_t size) {
+-  return __libc_malloc(size);
++  return __malloc(size);
+ }
+ 
+ void* GlibcCalloc(const AllocatorDispatch*, size_t n, size_t size) {
+-  return __libc_calloc(n, size);
++  return __calloc(n, size);
+ }
+ 
+ void* GlibcRealloc(const AllocatorDispatch*, void* address, size_t size) {
+-  return __libc_realloc(address, size);
++  return __realloc(address, size);
+ }
+ 
+ void* GlibcMemalign(const AllocatorDispatch*, size_t alignment, size_t size) {
+-  return __libc_memalign(alignment, size);
++  return __memalign(alignment, size);
+ }
+ 
++/* int GlibcPosixMemalign(const AllocatorDispatch*, void** ptr, size_t alignment, size_t size) { */
++/*   return __posix_memalign(ptr, alignment, size); */
++/* } */
++
+ void GlibcFree(const AllocatorDispatch*, void* address) {
+-  __libc_free(address);
++  __free(address);
+ }
+ 
+ }  // namespace
diff --git a/chromium-new/patches/patch-base_allocator_allocator__shim__override__libc__symbols.h b/chromium-new/patches/patch-base_allocator_allocator__shim__override__libc__symbols.h
new file mode 100644
index 0000000..d8b3ac3
--- /dev/null
+++ b/chromium-new/patches/patch-base_allocator_allocator__shim__override__libc__symbols.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/allocator/allocator_shim_override_libc_symbols.h.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/allocator/allocator_shim_override_libc_symbols.h
+@@ -10,7 +10,7 @@
+ #endif
+ #define BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_LIBC_SYMBOLS_H_
+ 
+-#include <malloc.h>
++#include <stdlib.h>
+ 
+ #include "base/allocator/allocator_shim_internals.h"
+ 
diff --git a/chromium-new/patches/patch-base_allocator_allocator__shim__unittest.cc b/chromium-new/patches/patch-base_allocator_allocator__shim__unittest.cc
new file mode 100644
index 0000000..a93a190
--- /dev/null
+++ b/chromium-new/patches/patch-base_allocator_allocator__shim__unittest.cc
@@ -0,0 +1,63 @@
+$NetBSD$
+
+--- base/allocator/allocator_shim_unittest.cc.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/allocator/allocator_shim_unittest.cc
+@@ -4,7 +4,6 @@
+ 
+ #include "base/allocator/allocator_shim.h"
+ 
+-#include <malloc.h>
+ #include <stdlib.h>
+ #include <string.h>
+ 
+@@ -193,11 +192,13 @@ TEST_F(AllocatorShimTest, InterceptLibcS
+   ASSERT_GE(zero_allocs_intercepted_by_size[2 * 23], 1u);
+ 
+ #if !defined(OS_WIN)
++#if !defined(OS_BSD)
+   void* memalign_ptr = memalign(128, 53);
+   ASSERT_NE(nullptr, memalign_ptr);
+   ASSERT_EQ(0u, reinterpret_cast<uintptr_t>(memalign_ptr) % 128);
+   ASSERT_GE(aligned_allocs_intercepted_by_alignment[128], 1u);
+   ASSERT_GE(aligned_allocs_intercepted_by_size[53], 1u);
++#endif
+ 
+   void* posix_memalign_ptr = nullptr;
+   int res = posix_memalign(&posix_memalign_ptr, 256, 59);
+@@ -214,12 +215,14 @@ TEST_F(AllocatorShimTest, InterceptLibcS
+   ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u);
+   ASSERT_GE(aligned_allocs_intercepted_by_size[61], 1u);
+ 
++#if !defined(OS_BSD)
+   void* pvalloc_ptr = pvalloc(67);
+   ASSERT_NE(nullptr, pvalloc_ptr);
+   ASSERT_EQ(0u, reinterpret_cast<uintptr_t>(pvalloc_ptr) % kPageSize);
+   ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u);
+   // pvalloc rounds the size up to the next page.
+   ASSERT_GE(aligned_allocs_intercepted_by_size[kPageSize], 1u);
++#endif
+ #endif  // OS_WIN
+ 
+   char* realloc_ptr = static_cast<char*>(realloc(nullptr, 71));
+@@ -240,8 +243,10 @@ TEST_F(AllocatorShimTest, InterceptLibcS
+   ASSERT_GE(frees_intercepted_by_addr[Hash(zero_alloc_ptr)], 1u);
+ 
+ #if !defined(OS_WIN)
++#if !defined(OS_BSD)
+   free(memalign_ptr);
+   ASSERT_GE(frees_intercepted_by_addr[Hash(memalign_ptr)], 1u);
++#endif
+ 
+   free(posix_memalign_ptr);
+   ASSERT_GE(frees_intercepted_by_addr[Hash(posix_memalign_ptr)], 1u);
+@@ -249,8 +254,10 @@ TEST_F(AllocatorShimTest, InterceptLibcS
+   free(valloc_ptr);
+   ASSERT_GE(frees_intercepted_by_addr[Hash(valloc_ptr)], 1u);
+ 
++#if !defined(OS_BSD)
+   free(pvalloc_ptr);
+   ASSERT_GE(frees_intercepted_by_addr[Hash(pvalloc_ptr)], 1u);
++#endif
+ #endif  // OS_WIN
+ 
+   free(realloc_ptr);
diff --git a/chromium-new/patches/patch-base_base.gyp b/chromium-new/patches/patch-base_base.gyp
deleted file mode 100644
index 473b273..0000000
--- a/chromium-new/patches/patch-base_base.gyp
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
---- base/base.gyp.orig	2016-06-24 01:02:08.000000000 +0000
-+++ base/base.gyp
-@@ -114,7 +114,7 @@
-           ],
-           'link_settings': {
-             'libraries': [
--              '-L/usr/local/lib -lexecinfo',
-+              '-L/usr/local/lib -lexecinfo -lkvm',
-             ],
-           },
-         }],
-@@ -763,6 +763,11 @@
-             'sync_socket_unittest.cc',
-           ],
-         }],
-+        ['OS == "freebsd"', {
-+          'sources!': [
-+            'debug/proc_maps_linux_unittest.cc',
-+          ],
-+        }],
-       ],  # target_conditions
-     },
-     {
diff --git a/chromium-new/patches/patch-base_base.gypi b/chromium-new/patches/patch-base_base.gypi
deleted file mode 100644
index 009c452..0000000
--- a/chromium-new/patches/patch-base_base.gypi
+++ /dev/null
@@ -1,66 +0,0 @@
-$NetBSD$
-
---- base/base.gypi.orig	2016-06-24 01:02:08.000000000 +0000
-+++ base/base.gypi
-@@ -502,6 +502,7 @@
-           'process/process_handle_freebsd.cc',
-           'process/process_handle_linux.cc',
-           'process/process_handle_mac.cc',
-+          'process/process_handle_netbsd.cc',
-           'process/process_handle_openbsd.cc',
-           'process/process_handle_posix.cc',
-           'process/process_handle_win.cc',
-@@ -514,6 +515,7 @@
-           'process/process_iterator_freebsd.cc',
-           'process/process_iterator_linux.cc',
-           'process/process_iterator_mac.cc',
-+          'process/process_iterator_netbsd.cc',
-           'process/process_iterator_openbsd.cc',
-           'process/process_iterator_win.cc',
-           'process/process_linux.cc',
-@@ -524,6 +526,7 @@
-           'process/process_metrics_linux.cc',
-           'process/process_metrics_mac.cc',
-           'process/process_metrics_nacl.cc',
-+          'process/process_metrics_netbsd.cc',
-           'process/process_metrics_openbsd.cc',
-           'process/process_metrics_posix.cc',
-           'process/process_metrics_win.cc',
-@@ -627,6 +630,7 @@
-           'sys_info_ios.mm',
-           'sys_info_linux.cc',
-           'sys_info_mac.mm',
-+          'sys_info_netbsd.cc',
-           'sys_info_openbsd.cc',
-           'sys_info_posix.cc',
-           'sys_info_win.cc',
-@@ -971,6 +975,10 @@
-               'sources/': [ ['exclude', '_openbsd\\.cc$'] ],
-             },
-           ],
-+          ['OS != "netbsd" or >(nacl_untrusted_build)==1', {
-+              'sources/': [ ['exclude', '_netbsd\\.cc$'] ],
-+            },
-+          ],
-           ['OS == "win" and >(nacl_untrusted_build)==0', {
-             'include_dirs': [
-               '<(DEPTH)/third_party/wtl/include',
-@@ -1021,11 +1029,17 @@
-               'process/memory_stubs.cc',
-             ],
-             'sources/': [
-+              ['exclude', '^debug/proc_maps_linux\\.cc$'],
-               ['exclude', '^files/file_path_watcher_linux\\.cc$'],
--              ['exclude', '^files/file_path_watcher_stub\\.cc$'],
-               ['exclude', '^files/file_util_linux\\.cc$'],
-+              ['exclude', '^process/memory_linux\\.cc$'],
-               ['exclude', '^process/process_linux\\.cc$'],
-               ['exclude', '^sys_info_linux\\.cc$'],
-+              ['exclude', '^process/process_handle_linux\\.cc$'],
-+              ['exclude', '^process/process_iterator_linux\\.cc$'],
-+              ['exclude', '^process/process_metrics_linux\\.cc$'],
-+              ['exclude', '^files/file_path_watcher_fsevents\\.cc$'],
-+              ['exclude', '^files/file_path_watcher_fsevents\\.h$'],
-             ],
-           }],
-           # Remove all unnecessary files for build_nexe.py to avoid exceeding
diff --git a/chromium-new/patches/patch-base_base__paths__posix.cc b/chromium-new/patches/patch-base_base__paths__posix.cc
index e8dc2e4..10d4541 100644
--- a/chromium-new/patches/patch-base_base__paths__posix.cc
+++ b/chromium-new/patches/patch-base_base__paths__posix.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/base_paths_posix.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/base_paths_posix.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/base_paths_posix.cc
 @@ -24,9 +24,10 @@
  #include "base/process/process_metrics.h"
diff --git a/chromium-new/patches/patch-base_debug_debugger__posix.cc b/chromium-new/patches/patch-base_debug_debugger__posix.cc
index 2b3818f..44d088c 100644
--- a/chromium-new/patches/patch-base_debug_debugger__posix.cc
+++ b/chromium-new/patches/patch-base_debug_debugger__posix.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/debug/debugger_posix.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/debug/debugger_posix.cc.orig	2016-11-12 05:46:21.381633820 +0000
 +++ base/debug/debugger_posix.cc
 @@ -54,8 +54,48 @@
  namespace base {
diff --git a/chromium-new/patches/patch-base_debug_proc__maps__linux.cc b/chromium-new/patches/patch-base_debug_proc__maps__linux.cc
new file mode 100644
index 0000000..1059498
--- /dev/null
+++ b/chromium-new/patches/patch-base_debug_proc__maps__linux.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/debug/proc_maps_linux.cc.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/debug/proc_maps_linux.cc
+@@ -12,7 +12,7 @@
+ #include "base/strings/string_split.h"
+ #include "build/build_config.h"
+ 
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_ANDROID)
+ #include <inttypes.h>
+ #endif
+ 
diff --git a/chromium-new/patches/patch-base_debug_stack__trace__posix.cc b/chromium-new/patches/patch-base_debug_stack__trace__posix.cc
index 499c88d..de7f6bc 100644
--- a/chromium-new/patches/patch-base_debug_stack__trace__posix.cc
+++ b/chromium-new/patches/patch-base_debug_stack__trace__posix.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/debug/stack_trace_posix.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/debug/stack_trace_posix.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/debug/stack_trace_posix.cc
-@@ -572,6 +572,10 @@ class SandboxSymbolizeHelper {
+@@ -571,6 +571,10 @@ class SandboxSymbolizeHelper {
    // for the modules that are loaded in the current process.
    // Returns true on success.
    bool CacheMemoryRegions() {
@@ -13,7 +13,7 @@ $NetBSD$
      // Reads /proc/self/maps.
      std::string contents;
      if (!ReadProcMaps(&contents)) {
-@@ -587,6 +591,7 @@ class SandboxSymbolizeHelper {
+@@ -586,6 +590,7 @@ class SandboxSymbolizeHelper {
  
      is_initialized_ = true;
      return true;
diff --git a/chromium-new/patches/patch-base_files_file__path__unittest.cc b/chromium-new/patches/patch-base_files_file__path__unittest.cc
new file mode 100644
index 0000000..45c7431
--- /dev/null
+++ b/chromium-new/patches/patch-base_files_file__path__unittest.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/files/file_path_unittest.cc.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/files/file_path_unittest.cc
+@@ -1133,7 +1133,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_
+       "\xEF\xBC\xA1\xEF\xBC\xA2\xEF\xBC\xA3.txt" },
+   };
+ 
+-#if !defined(SYSTEM_NATIVE_UTF8) && defined(OS_LINUX)
++#if !defined(SYSTEM_NATIVE_UTF8) && (defined(OS_LINUX) || defined(OS_BSD))
+   ScopedLocale locale("en_US.UTF-8");
+ #endif
+ 
diff --git a/chromium-new/patches/patch-base_files_file__path__watcher__kqueue.cc b/chromium-new/patches/patch-base_files_file__path__watcher__kqueue.cc
deleted file mode 100644
index 2aff538..0000000
--- a/chromium-new/patches/patch-base_files_file__path__watcher__kqueue.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- base/files/file_path_watcher_kqueue.cc.orig	2016-06-24 01:02:08.000000000 +0000
-+++ base/files/file_path_watcher_kqueue.cc
-@@ -71,7 +71,13 @@ int FilePathWatcherKQueue::EventsForPath
-     struct kevent event;
-     EV_SET(&event, fd, EVFILT_VNODE, (EV_ADD | EV_CLEAR | EV_RECEIPT),
-            (NOTE_DELETE | NOTE_WRITE | NOTE_ATTRIB |
--            NOTE_RENAME | NOTE_REVOKE | NOTE_EXTEND), 0, data);
-+            NOTE_RENAME | NOTE_REVOKE | NOTE_EXTEND), 0,
-+#if defined(__NetBSD__)
-+            (intptr_t)data);
-+#else
-+            data);
-+#endif
-+
-     events->push_back(event);
-   }
-   return last_existing_entry;
diff --git a/chromium-new/patches/patch-base_files_file__path__watcher__kqueue.h b/chromium-new/patches/patch-base_files_file__path__watcher__kqueue.h
index b7f902f..6f37da6 100644
--- a/chromium-new/patches/patch-base_files_file__path__watcher__kqueue.h
+++ b/chromium-new/patches/patch-base_files_file__path__watcher__kqueue.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/files/file_path_watcher_kqueue.h.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/files/file_path_watcher_kqueue.h.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/files/file_path_watcher_kqueue.h
-@@ -5,7 +5,12 @@
+@@ -5,6 +5,10 @@
  #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
  #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
  
@@ -11,7 +11,5 @@ $NetBSD$
 +#include <sys/types.h>
 +#endif
  #include <sys/event.h>
-+#include <sys/time.h>
  #include <vector>
  
- #include "base/files/file_path.h"
diff --git a/chromium-new/patches/patch-base_files_file__util.h b/chromium-new/patches/patch-base_files_file__util.h
new file mode 100644
index 0000000..9c85661
--- /dev/null
+++ b/chromium-new/patches/patch-base_files_file__util.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/files/file_util.h.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/files/file_util.h
+@@ -397,7 +397,7 @@ BASE_EXPORT bool VerifyPathControlledByA
+ // the directory |path|, in the number of FilePath::CharType, or -1 on failure.
+ BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path);
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Broad categories of file systems as returned by statfs() on Linux.
+ enum FileSystemType {
+   FILE_SYSTEM_UNKNOWN,  // statfs failed.
diff --git a/chromium-new/patches/patch-base_i18n_icu__util.cc b/chromium-new/patches/patch-base_i18n_icu__util.cc
deleted file mode 100644
index be28516..0000000
--- a/chromium-new/patches/patch-base_i18n_icu__util.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- base/i18n/icu_util.cc.orig	2016-06-24 01:02:08.000000000 +0000
-+++ base/i18n/icu_util.cc
-@@ -36,10 +36,6 @@
- #include "base/mac/foundation_util.h"
- #endif
- 
--#define ICU_UTIL_DATA_FILE   0
--#define ICU_UTIL_DATA_SHARED 1
--#define ICU_UTIL_DATA_STATIC 2
--
- namespace base {
- namespace i18n {
- 
diff --git a/chromium-new/patches/patch-base_i18n_icu__util.h b/chromium-new/patches/patch-base_i18n_icu__util.h
deleted file mode 100644
index 0bb4833..0000000
--- a/chromium-new/patches/patch-base_i18n_icu__util.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- base/i18n/icu_util.h.orig	2016-06-24 01:02:08.000000000 +0000
-+++ base/i18n/icu_util.h
-@@ -11,6 +11,10 @@
- #include "base/i18n/base_i18n_export.h"
- #include "build/build_config.h"
- 
-+#define ICU_UTIL_DATA_FILE   0
-+#define ICU_UTIL_DATA_SHARED 1
-+#define ICU_UTIL_DATA_STATIC 2
-+
- namespace base {
- namespace i18n {
- 
diff --git a/chromium-new/patches/patch-base_linux__util.cc b/chromium-new/patches/patch-base_linux__util.cc
index 1c84ed0..70b74f8 100644
--- a/chromium-new/patches/patch-base_linux__util.cc
+++ b/chromium-new/patches/patch-base_linux__util.cc
@@ -1,13 +1,20 @@
 $NetBSD$
 
---- base/linux_util.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/linux_util.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/linux_util.cc
-@@ -91,7 +91,7 @@ char g_linux_distro[kDistroSize] =
+@@ -110,12 +110,14 @@ char g_linux_distro[kDistroSize] =
+     "CrOS";
+ #elif defined(OS_ANDROID)
+     "Android";
++#elif defined(OS_BSD)
++    "BSD";
+ #else  // if defined(OS_LINUX)
+     "Unknown";
  #endif
  
  std::string GetLinuxDistro() {
 -#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
-+#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_NETBSD)
++#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD)
    return g_linux_distro;
  #elif defined(OS_LINUX)
    LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance();
diff --git a/chromium-new/patches/patch-base_native__library__posix.cc b/chromium-new/patches/patch-base_native__library__posix.cc
new file mode 100644
index 0000000..8545449
--- /dev/null
+++ b/chromium-new/patches/patch-base_native__library__posix.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/native_library_posix.cc.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/native_library_posix.cc
+@@ -35,7 +35,7 @@ NativeLibrary LoadNativeLibraryWithOptio
+   // versions. Crash here to warn developers that they're trying to rely on
+   // uncertain behavior.
+   CHECK(!options.prefer_own_symbols);
+-#else
++#elif !defined(OS_BSD)
+   if (options.prefer_own_symbols)
+     flags |= RTLD_DEEPBIND;
+ #endif
diff --git a/chromium-new/patches/patch-base_posix_unix__domain__socket__linux.cc b/chromium-new/patches/patch-base_posix_unix__domain__socket__linux.cc
index 4227ecc..7aa8af6 100644
--- a/chromium-new/patches/patch-base_posix_unix__domain__socket__linux.cc
+++ b/chromium-new/patches/patch-base_posix_unix__domain__socket__linux.cc
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- base/posix/unix_domain_socket_linux.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/posix/unix_domain_socket_linux.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/posix/unix_domain_socket_linux.cc
 @@ -23,6 +23,15 @@
  
  namespace base {
  
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
++#if defined(OS_BSD)
 +// Port over Linux ucred structure
 +struct ucred {
 +  pid_t pid; // process ID of the sending process
@@ -18,15 +18,16 @@ $NetBSD$
  const size_t UnixDomainSocket::kMaxFileDescriptors = 16;
  
  #if !defined(OS_NACL_NONSFI)
-@@ -41,7 +50,13 @@ static bool CreateSocketPair(ScopedFD* o
+@@ -40,8 +49,14 @@ static bool CreateSocketPair(ScopedFD* o
+ 
  // static
  bool UnixDomainSocket::EnableReceiveProcessId(int fd) {
-   const int enable = 1;
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
++#if defined(OS_BSD)
 +  // XXX(rene) do this? :
 +  // taken from dbus, Academic Free License 2.1 / GPL 2+
 +  return 0; // fake OK
 +#else
+   const int enable = 1;
    return setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &enable, sizeof(enable)) == 0;
 +#endif
  }
@@ -36,7 +37,7 @@ $NetBSD$
        // The PNaCl toolchain for Non-SFI binary build does not support
        // SCM_CREDENTIALS.
        if (cmsg->cmsg_level == SOL_SOCKET &&
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
++#if defined(OS_BSD)
 +        1) { // XXX(rene) carpet getting full ...
 +#else
            cmsg->cmsg_type == SCM_CREDENTIALS) {
diff --git a/chromium-new/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc b/chromium-new/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc
index b284a64..fa0da46 100644
--- a/chromium-new/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc
+++ b/chromium-new/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/posix/unix_domain_socket_linux_unittest.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/posix/unix_domain_socket_linux_unittest.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/posix/unix_domain_socket_linux_unittest.cc
 @@ -2,10 +2,15 @@
  // Use of this source code is governed by a BSD-style license that can be
diff --git a/chromium-new/patches/patch-base_process_internal__linux.h b/chromium-new/patches/patch-base_process_internal__linux.h
index 407145c..94bac7f 100644
--- a/chromium-new/patches/patch-base_process_internal__linux.h
+++ b/chromium-new/patches/patch-base_process_internal__linux.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/process/internal_linux.h.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/internal_linux.h.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/internal_linux.h
 @@ -14,6 +14,8 @@
  
diff --git a/chromium-new/patches/patch-base_process_launch.cc b/chromium-new/patches/patch-base_process_launch.cc
index f1ae3f5..86d9b08 100644
--- a/chromium-new/patches/patch-base_process_launch.cc
+++ b/chromium-new/patches/patch-base_process_launch.cc
@@ -1,18 +1,13 @@
 $NetBSD$
 
---- base/process/launch.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/launch.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/launch.cc
-@@ -25,11 +25,11 @@ LaunchOptions::LaunchOptions()
-       fds_to_remap(NULL),
-       maximize_rlimits(NULL),
-       new_process_group(false)
+@@ -15,7 +15,7 @@ LaunchOptions::~LaunchOptions() = defaul
+ 
+ LaunchOptions LaunchOptionsForTest() {
+   LaunchOptions options;
 -#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD)
-       , clone_flags(0)
-       , allow_new_privs(false)
-       , kill_on_parent_death(false)
--#endif  // OS_LINUX
-+#endif  // OS_LINUX || OS_FREEBSD || OS_NETBSD
- #if defined(OS_POSIX)
-       , pre_exec_delegate(NULL)
- #endif  // OS_POSIX
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // To prevent accidental privilege sharing to an untrusted child, processes
+   // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this
+   // new child will be used for testing only.
diff --git a/chromium-new/patches/patch-base_process_launch.h b/chromium-new/patches/patch-base_process_launch.h
index 6020405..f2c3c8a 100644
--- a/chromium-new/patches/patch-base_process_launch.h
+++ b/chromium-new/patches/patch-base_process_launch.h
@@ -1,22 +1,22 @@
 $NetBSD$
 
---- base/process/launch.h.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/launch.h.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/launch.h
 @@ -138,7 +138,7 @@ struct BASE_EXPORT LaunchOptions {
    // will be the same as its pid.
-   bool new_process_group;
+   bool new_process_group = false;
  
 -#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
    // If non-zero, start the process using clone(), using flags as provided.
    // Unlike in clone, clone_flags may not contain a custom termination signal
    // that is sent to the parent when the child dies. The termination signal will
 @@ -151,7 +151,7 @@ struct BASE_EXPORT LaunchOptions {
  
    // Sets parent process death signal to SIGKILL.
-   bool kill_on_parent_death;
+   bool kill_on_parent_death = false;
 -#endif  // defined(OS_LINUX)
-+#endif  // defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#endif  // defined(OS_LINUX) || defined(OS_BSD)
  
  #if defined(OS_POSIX)
    // If non-null, a delegate to be run immediately prior to executing the new
diff --git a/chromium-new/patches/patch-base_process_launch__posix.cc b/chromium-new/patches/patch-base_process_launch__posix.cc
index f6ff373..ed0aaef 100644
--- a/chromium-new/patches/patch-base_process_launch__posix.cc
+++ b/chromium-new/patches/patch-base_process_launch__posix.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/process/launch_posix.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/launch_posix.cc.orig	2016-11-16 08:03:06.053219341 +0000
 +++ base/process/launch_posix.cc
-@@ -214,6 +214,8 @@ static const char kFDDir[] = "/dev/fd";
+@@ -215,6 +215,8 @@ static const char kFDDir[] = "/dev/fd";
  static const char kFDDir[] = "/dev/fd";
  #elif defined(OS_OPENBSD)
  static const char kFDDir[] = "/dev/fd";
diff --git a/chromium-new/patches/patch-base_process_memory.cc b/chromium-new/patches/patch-base_process_memory.cc
deleted file mode 100644
index 41a920a..0000000
--- a/chromium-new/patches/patch-base_process_memory.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD$
-
---- base/process/memory.cc.orig	2016-06-24 01:02:08.000000000 +0000
-+++ base/process/memory.cc
-@@ -26,7 +26,7 @@ void TerminateBecauseOutOfMemory(size_t 
- }
- 
- // Defined in memory_mac.mm for Mac.
--#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && defined(OS_FREEBSD)
- 
- bool UncheckedCalloc(size_t num_items, size_t size, void** result) {
-   const size_t alloc_size = num_items * size;
-@@ -46,4 +46,36 @@ bool UncheckedCalloc(size_t num_items, s
- 
- #endif
- 
-+#if defined(OS_FREEBSD)
-+
-+#if defined(USE_TCMALLOC)
-+// Used by UncheckedMalloc. If tcmalloc is linked to the executable
-+// this will be replaced by a strong symbol that actually implement
-+// the semantics and don't call new handler in case the allocation fails.
-+extern "C" {
-+      
-+__attribute__((weak, visibility("default")))
-+void* tc_malloc_skip_new_handler_weak(size_t size);
-+
-+void* tc_malloc_skip_new_handler_weak(size_t size) {
-+  return malloc(size);
-+}
-+
-+}
-+#endif
-+
-+bool UncheckedMalloc(size_t size, void** result) {
-+#if defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || \ 
-+    (!defined(LIBC_GLIBC) && !defined(USE_TCMALLOC))
-+  *result = malloc(size);
-+#elif defined(LIBC_GLIBC) && !defined(USE_TCMALLOC)
-+  *result = __libc_malloc(size);
-+#elif defined(USE_TCMALLOC)
-+  *result = tc_malloc_skip_new_handler_weak(size);
-+#endif
-+  return *result != NULL;
-+}
-+
-+#endif // defined(OS_FREEBSD)
-+
- }  // namespace base
diff --git a/chromium-new/patches/patch-base_process_memory.h b/chromium-new/patches/patch-base_process_memory.h
index 90a0631..9a24fcc 100644
--- a/chromium-new/patches/patch-base_process_memory.h
+++ b/chromium-new/patches/patch-base_process_memory.h
@@ -1,12 +1,13 @@
 $NetBSD$
 
---- base/process/memory.h.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/memory.h.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/memory.h
-@@ -6,6 +6,7 @@
- #define BASE_PROCESS_MEMORY_H_
+@@ -32,7 +32,7 @@ BASE_EXPORT void EnableTerminationOnOutO
+ // Crash reporting classifies such crashes as OOM.
+ BASE_EXPORT void TerminateBecauseOutOfMemory(size_t size);
  
- #include <stddef.h>
-+#include <stdlib.h>
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_ANDROID)
+ BASE_EXPORT extern size_t g_oom_size;
  
- #include "base/base_export.h"
- #include "base/process/process_handle.h"
+ // The maximum allowed value for the OOM score.
diff --git a/chromium-new/patches/patch-base_process_memory__stubs.cc b/chromium-new/patches/patch-base_process_memory__stubs.cc
index 53c4b9e..03f37dd 100644
--- a/chromium-new/patches/patch-base_process_memory__stubs.cc
+++ b/chromium-new/patches/patch-base_process_memory__stubs.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/process/memory_stubs.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/memory_stubs.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/memory_stubs.cc
-@@ -27,6 +27,8 @@ bool AdjustOOMScore(ProcessId process, i
+@@ -31,6 +31,8 @@ void TerminateBecauseOutOfMemory(size_t 
  // their respective stdlib function since those functions will return null on a
  // failure to allocate.
  
@@ -11,7 +11,7 @@ $NetBSD$
  bool UncheckedMalloc(size_t size, void** result) {
    *result = malloc(size);
    return *result != nullptr;
-@@ -36,5 +38,6 @@ bool UncheckedCalloc(size_t num_items, s
+@@ -40,5 +42,6 @@ bool UncheckedCalloc(size_t num_items, s
    *result = calloc(num_items, size);
    return *result != nullptr;
  }
diff --git a/chromium-new/patches/patch-base_process_memory__unittest.cc b/chromium-new/patches/patch-base_process_memory__unittest.cc
index 2267359..7bdf023 100644
--- a/chromium-new/patches/patch-base_process_memory__unittest.cc
+++ b/chromium-new/patches/patch-base_process_memory__unittest.cc
@@ -1,25 +1,24 @@
 $NetBSD$
 
---- base/process/memory_unittest.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/memory_unittest.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/memory_unittest.cc
-@@ -83,11 +83,11 @@ TEST(MemoryTest, AllocatorShimWorking) {
+@@ -82,10 +82,10 @@ TEST(MemoryTest, AllocatorShimWorking) {
+   ASSERT_TRUE(base::allocator::IsAllocatorInitialized());
  }
  
- // Android doesn't implement set_new_handler, so we can't use the
--// OutOfMemoryTest cases. OpenBSD does not support these tests either.
-+// OutOfMemoryTest cases. OpenBSD, FreeBSD and NetBSD do not support these tests either.
- // Don't test these on ASan/TSan/MSan configurations: only test the real
- // allocator.
+-// OpenBSD does not support these tests. Don't test these on ASan/TSan/MSan
++// BSD does not support these tests. Don't test these on ASan/TSan/MSan
+ // configurations: only test the real allocator.
  // Windows only supports these tests with the allocator shim in place.
--#if !defined(OS_ANDROID) && !defined(OS_OPENBSD) &&   \
-+#if !defined(OS_ANDROID) && !defined(OS_BSD) &&   \
-     !(defined(OS_WIN) && !defined(ALLOCATOR_SHIM)) && \
+-#if !defined(OS_OPENBSD) && \
++#if !defined(OS_BSD) && \
+     BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && \
      !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
  
-@@ -451,5 +451,5 @@ TEST_F(OutOfMemoryHandledTest, Unchecked
+@@ -439,5 +439,5 @@ TEST_F(OutOfMemoryHandledTest, Unchecked
+   EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_));
    EXPECT_TRUE(value_ == NULL);
  }
- #endif  // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
--#endif  // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && !(defined(OS_WIN) &&
-+#endif  // !defined(OS_ANDROID) && !defined(OS_BSD) && !(defined(OS_WIN) &&
-         // !defined(ALLOCATOR_SHIM)) && !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
+-#endif  // !defined(OS_OPENBSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) &&
++#endif  // !defined(OS_BSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) &&
+         // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
diff --git a/chromium-new/patches/patch-base_process_process__handle__freebsd.cc b/chromium-new/patches/patch-base_process_process__handle__freebsd.cc
new file mode 100644
index 0000000..b2b86a2
--- /dev/null
+++ b/chromium-new/patches/patch-base_process_process__handle__freebsd.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/process/process_handle_freebsd.cc.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/process/process_handle_freebsd.cc
+@@ -16,7 +16,7 @@ namespace base {
+ 
+ ProcessId GetParentProcessId(ProcessHandle process) {
+   struct kinfo_proc info;
+-  size_t length;
++  size_t length = sizeof(struct kinfo_proc);
+   int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process };
+ 
+   if (sysctl(mib, arraysize(mib), &info, &length, NULL, 0) < 0)
diff --git a/chromium-new/patches/patch-base_process_process__handle__netbsd.cc b/chromium-new/patches/patch-base_process_process__handle__netbsd.cc
index a4cbd25..9c4aee8 100644
--- a/chromium-new/patches/patch-base_process_process__handle__netbsd.cc
+++ b/chromium-new/patches/patch-base_process_process__handle__netbsd.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/process/process_handle_netbsd.cc.orig	2016-07-22 03:20:51.176420341 +0000
+--- base/process/process_handle_netbsd.cc.orig	2016-11-16 08:03:06.205887318 +0000
 +++ base/process/process_handle_netbsd.cc
-@@ -0,0 +1,67 @@
+@@ -0,0 +1,66 @@
 +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 +// Use of this source code is governed by a BSD-style license that can be
 +// found in the LICENSE file.
@@ -42,7 +42,6 @@ $NetBSD$
 +}
 +
 +FilePath GetProcessExecutablePath(ProcessHandle process) {
-+  struct kinfo_proc2 info;
 +  size_t size = sizeof(struct kinfo_proc2);
 +  int mib[4];
 +  int ret;
diff --git a/chromium-new/patches/patch-base_process_process__info__linux.cc b/chromium-new/patches/patch-base_process_process__info__linux.cc
index 3dab0b7..ad55c1a 100644
--- a/chromium-new/patches/patch-base_process_process__info__linux.cc
+++ b/chromium-new/patches/patch-base_process_process__info__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/process/process_info_linux.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/process_info_linux.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/process_info_linux.cc
 @@ -11,10 +11,61 @@
  #include "base/process/process_handle.h"
diff --git a/chromium-new/patches/patch-base_process_process__iterator.h b/chromium-new/patches/patch-base_process_process__iterator.h
index f3aa824..c0c34ff 100644
--- a/chromium-new/patches/patch-base_process_process__iterator.h
+++ b/chromium-new/patches/patch-base_process_process__iterator.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/process/process_iterator.h.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/process_iterator.h.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/process_iterator.h
 @@ -22,7 +22,7 @@
  #if defined(OS_WIN)
@@ -11,13 +11,17 @@ $NetBSD$
  #include <sys/sysctl.h>
  #elif defined(OS_FREEBSD)
  #include <sys/user.h>
-@@ -109,6 +109,9 @@ class BASE_EXPORT ProcessIterator {
+@@ -109,9 +109,12 @@ class BASE_EXPORT ProcessIterator {
  #if defined(OS_WIN)
    HANDLE snapshot_;
    bool started_iteration_;
+-#elif defined(OS_MACOSX) || defined(OS_BSD)
++#elif defined(OS_MACOSX) || defined(OS_FREEBSD)
+   std::vector<kinfo_proc> kinfo_procs_;
+   size_t index_of_kinfo_proc_;
 +#elif defined(OS_NETBSD)
 +  std::vector<kinfo_proc2> kinfo_procs_;
 +  size_t index_of_kinfo_proc_;
- #elif defined(OS_MACOSX) || defined(OS_BSD)
-   std::vector<kinfo_proc> kinfo_procs_;
-   size_t index_of_kinfo_proc_;
+ #elif defined(OS_POSIX)
+   DIR* procfs_dir_;
+ #endif
diff --git a/chromium-new/patches/patch-base_process_process__iterator__freebsd.cc b/chromium-new/patches/patch-base_process_process__iterator__freebsd.cc
index 313e431..7c5dace 100644
--- a/chromium-new/patches/patch-base_process_process__iterator__freebsd.cc
+++ b/chromium-new/patches/patch-base_process_process__iterator__freebsd.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/process/process_iterator_freebsd.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/process_iterator_freebsd.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/process_iterator_freebsd.cc
 @@ -10,6 +10,10 @@
  #include <sys/sysctl.h>
diff --git a/chromium-new/patches/patch-base_process_process__iterator__netbsd.cc b/chromium-new/patches/patch-base_process_process__iterator__netbsd.cc
index 3954086..92c19eb 100644
--- a/chromium-new/patches/patch-base_process_process__iterator__netbsd.cc
+++ b/chromium-new/patches/patch-base_process_process__iterator__netbsd.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/process/process_iterator_netbsd.cc.orig	2016-07-17 08:36:13.001685522 +0000
+--- base/process/process_iterator_netbsd.cc.orig	2016-11-12 02:51:19.578931241 +0000
 +++ base/process/process_iterator_netbsd.cc
 @@ -0,0 +1,146 @@
 +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
diff --git a/chromium-new/patches/patch-base_process_process__metrics.h b/chromium-new/patches/patch-base_process_process__metrics.h
index b8834ac..e775740 100644
--- a/chromium-new/patches/patch-base_process_process__metrics.h
+++ b/chromium-new/patches/patch-base_process_process__metrics.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/process/process_metrics.h.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/process_metrics.h.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/process_metrics.h
-@@ -21,6 +21,13 @@
+@@ -22,6 +22,12 @@
  #include "base/values.h"
  #include "build/build_config.h"
  
@@ -10,19 +10,18 @@ $NetBSD$
 +#include <kvm.h>
 +#include <sys/param.h>
 +#include <sys/sysctl.h>
-+#include <sys/user.h>
 +#endif
 +
  #if defined(OS_MACOSX)
  #include <mach/mach.h>
  #include "base/process/port_provider_mac.h"
-@@ -317,13 +324,17 @@ BASE_EXPORT bool GetSystemMemoryInfo(Sys
+@@ -326,13 +332,17 @@ BASE_EXPORT bool GetSystemMemoryInfo(Sys
  // CPU-related ticks.  Returns -1 on parse error.
  // Exposed for testing.
  BASE_EXPORT int ParseProcStatCPU(const std::string& input);
 +#endif
  
-+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD)
  // Get the number of threads of |process| as available in /proc/<pid>/stat.
  // This should be used with care as no synchronization with running threads is
  // done. This is mostly useful to guarantee being single-threaded.
diff --git a/chromium-new/patches/patch-base_process_process__metrics__freebsd.cc b/chromium-new/patches/patch-base_process_process__metrics__freebsd.cc
index 336ed02..5030c0f 100644
--- a/chromium-new/patches/patch-base_process_process__metrics__freebsd.cc
+++ b/chromium-new/patches/patch-base_process_process__metrics__freebsd.cc
@@ -1,9 +1,9 @@
 $NetBSD$
 
---- base/process/process_metrics_freebsd.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/process_metrics_freebsd.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/process_metrics_freebsd.cc
-@@ -12,6 +12,9 @@
- #include "base/macros.h"
+@@ -13,6 +13,9 @@
+ #include "base/memory/ptr_util.h"
  #include "base/sys_info.h"
  
 +#include <unistd.h> /* getpagesize() */
@@ -12,7 +12,7 @@ $NetBSD$
  namespace base {
  
  ProcessMetrics::ProcessMetrics(ProcessHandle process)
-@@ -121,4 +124,23 @@ size_t GetSystemCommitCharge() {
+@@ -122,4 +125,23 @@ size_t GetSystemCommitCharge() {
    return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
  }
  
diff --git a/chromium-new/patches/patch-base_process_process__metrics__netbsd.cc b/chromium-new/patches/patch-base_process_process__metrics__netbsd.cc
index 77ae964..b56177f 100644
--- a/chromium-new/patches/patch-base_process_process__metrics__netbsd.cc
+++ b/chromium-new/patches/patch-base_process_process__metrics__netbsd.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/process/process_metrics_netbsd.cc.orig	2016-07-17 08:36:13.090234675 +0000
+--- base/process/process_metrics_netbsd.cc.orig	2016-11-12 06:32:44.816301555 +0000
 +++ base/process/process_metrics_netbsd.cc
-@@ -0,0 +1,201 @@
+@@ -0,0 +1,203 @@
 +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
 +// Use of this source code is governed by a BSD-style license that can be
 +// found in the LICENSE file.
@@ -15,6 +15,7 @@ $NetBSD$
 +#include <unistd.h>
 +
 +#include "base/macros.h"
++#include "base/memory/ptr_util.h"
 +#include "base/sys_info.h"
 +
 +#include <unistd.h> /* getpagesize() */
@@ -32,8 +33,9 @@ $NetBSD$
 +}
 +
 +// static
-+ProcessMetrics* ProcessMetrics::CreateProcessMetrics(ProcessHandle process) {
-+  return new ProcessMetrics(process);
++std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
++    ProcessHandle process) {
++  return WrapUnique(new ProcessMetrics(process));
 +}
 +
 +size_t ProcessMetrics::GetPagefileUsage() const {
diff --git a/chromium-new/patches/patch-base_process_process__metrics__posix.cc b/chromium-new/patches/patch-base_process_process__metrics__posix.cc
index 41a2e17..7de1916 100644
--- a/chromium-new/patches/patch-base_process_process__metrics__posix.cc
+++ b/chromium-new/patches/patch-base_process_process__metrics__posix.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- base/process/process_metrics_posix.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/process_metrics_posix.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/process_metrics_posix.cc
-@@ -35,6 +35,8 @@ static const rlim_t kSystemDefaultMaxFds
+@@ -33,6 +33,8 @@ static const rlim_t kSystemDefaultMaxFds
+ static const rlim_t kSystemDefaultMaxFds = 8192;
+ #elif defined(OS_FREEBSD)
  static const rlim_t kSystemDefaultMaxFds = 8192;
- #elif defined(OS_OPENBSD)
- static const rlim_t kSystemDefaultMaxFds = 256;
 +#elif defined(OS_NETBSD)
 +static const rlim_t kSystemDefaultMaxFds = 1024;
+ #elif defined(OS_OPENBSD)
+ static const rlim_t kSystemDefaultMaxFds = 256;
  #elif defined(OS_ANDROID)
- static const rlim_t kSystemDefaultMaxFds = 1024;
- #endif
diff --git a/chromium-new/patches/patch-base_process_process__posix.cc b/chromium-new/patches/patch-base_process_process__posix.cc
index 5232c8e..6c986a8 100644
--- a/chromium-new/patches/patch-base_process_process__posix.cc
+++ b/chromium-new/patches/patch-base_process_process__posix.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/process/process_posix.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/process/process_posix.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/process/process_posix.cc
-@@ -20,8 +20,18 @@
+@@ -21,8 +21,18 @@
  #include <sys/event.h>
  #endif
  
@@ -21,32 +21,15 @@ $NetBSD$
  #if !defined(OS_NACL_NONSFI)
  
  bool WaitpidWithTimeout(base::ProcessHandle handle,
-@@ -86,7 +96,7 @@ bool WaitpidWithTimeout(base::ProcessHan
-   return ret_pid > 0;
- }
- 
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- // Using kqueue on Mac so that we can wait on non-child processes.
- // We can't use kqueues on child processes because we need to reap
- // our own children using wait.
-@@ -175,7 +185,7 @@ static bool WaitForSingleNonChildProcess
- 
-   return true;
- }
--#endif  // OS_MACOSX
-+#endif  // OS_MACOSX || OS_BSD
- 
- bool WaitForExitWithTimeoutImpl(base::ProcessHandle handle,
-                                 int* exit_code,
-@@ -183,13 +193,13 @@ bool WaitForExitWithTimeoutImpl(base::Pr
+@@ -184,13 +194,13 @@ bool WaitForExitWithTimeoutImpl(base::Pr
    base::ProcessHandle parent_pid = base::GetParentProcessId(handle);
    base::ProcessHandle our_pid = base::GetCurrentProcessHandle();
    if (parent_pid != our_pid) {
 -#if defined(OS_MACOSX)
 +#if defined(OS_MACOSX) || defined(OS_BSD)
      // On Mac we can wait on non child processes.
-     return WaitForSingleNonChildProcess(handle, timeout);
+-    return WaitForSingleNonChildProcess(handle, timeout);
++    /* return WaitForSingleNonChildProcess(handle, timeout); */
  #else
      // Currently on Linux we can't handle non child processes.
      NOTIMPLEMENTED();
@@ -55,7 +38,7 @@ $NetBSD$
    }
  
    int status;
-@@ -256,12 +266,16 @@ Process Process::DeprecatedGetProcessFro
+@@ -257,12 +267,16 @@ Process Process::DeprecatedGetProcessFro
    return Process(handle);
  }
  
@@ -74,7 +57,7 @@ $NetBSD$
  
  bool Process::IsValid() const {
    return process_ != kNullProcessHandle;
-@@ -361,15 +375,32 @@ bool Process::WaitForExitWithTimeout(Tim
+@@ -365,15 +379,32 @@ bool Process::WaitForExitWithTimeout(Tim
  bool Process::IsProcessBackgrounded() const {
    // See SetProcessBackgrounded().
    DCHECK(IsValid());
@@ -86,7 +69,7 @@ $NetBSD$
  }
  
  bool Process::SetProcessBackgrounded(bool value) {
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_FREEBSD)
    // Not implemented for POSIX systems other than Linux. With POSIX, if we were
    // to lower the process priority we wouldn't be able to raise it back to its
    // initial priority.
@@ -103,7 +86,7 @@ $NetBSD$
 +
 +  DPCHECK(result == 0);
 +  return result == 0;
-+#endif // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#endif // !defined(OS_FREEBSD)
  }
  #endif  // !defined(OS_LINUX)
  
diff --git a/chromium-new/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc b/chromium-new/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
new file mode 100644
index 0000000..4a61ed3
--- /dev/null
+++ b/chromium-new/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/profiler/stack_sampling_profiler_unittest.cc.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/profiler/stack_sampling_profiler_unittest.cc
+@@ -30,7 +30,7 @@
+ #include <intrin.h>
+ #include <malloc.h>
+ #include <windows.h>
+-#else
++#elif !defined(OS_BSD)
+ #include <alloca.h>
+ #endif
+ 
diff --git a/chromium-new/patches/patch-base_security__unittest.cc b/chromium-new/patches/patch-base_security__unittest.cc
index 9d32f31..9e8c4eb 100644
--- a/chromium-new/patches/patch-base_security__unittest.cc
+++ b/chromium-new/patches/patch-base_security__unittest.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/security_unittest.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/security_unittest.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/security_unittest.cc
 @@ -74,7 +74,7 @@ bool IsTcMallocBypassed() {
  // FAILS_ is too clunky.
diff --git a/chromium-new/patches/patch-base_strings_safe__sprintf.cc b/chromium-new/patches/patch-base_strings_safe__sprintf.cc
index e77848b..17de77c 100644
--- a/chromium-new/patches/patch-base_strings_safe__sprintf.cc
+++ b/chromium-new/patches/patch-base_strings_safe__sprintf.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/strings/safe_sprintf.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/strings/safe_sprintf.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/strings/safe_sprintf.cc
 @@ -115,8 +115,11 @@ class Buffer {
          count_(0) {
diff --git a/chromium-new/patches/patch-base_sys__info__freebsd.cc b/chromium-new/patches/patch-base_sys__info__freebsd.cc
index 402e5da..615d006 100644
--- a/chromium-new/patches/patch-base_sys__info__freebsd.cc
+++ b/chromium-new/patches/patch-base_sys__info__freebsd.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- base/sys_info_freebsd.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/sys_info_freebsd.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/sys_info_freebsd.cc
 @@ -12,12 +12,34 @@
  
@@ -41,11 +41,14 @@ $NetBSD$
      NOTREACHED();
      return 0;
    }
-@@ -35,4 +57,25 @@ uint64_t SysInfo::MaxSharedMemorySize() 
-   return static_cast<uint64_t>(limit);
+@@ -25,14 +47,24 @@ int64_t SysInfo::AmountOfPhysicalMemory(
  }
  
-+// static
+ // static
+-uint64_t SysInfo::MaxSharedMemorySize() {
+-  size_t limit;
+-  size_t size = sizeof(limit);
+-  if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) {
 +std::string SysInfo::CPUModelName() {
 +  int mib[] = { CTL_HW, HW_MODEL };
 +  char name[256];
@@ -60,10 +63,12 @@ $NetBSD$
 +  int ncpu;
 +  size_t size = sizeof(ncpu);
 +  if (sysctl(mib, arraysize(mib), &ncpu, &size, NULL, 0) == -1) {
-+    NOTREACHED();
+     NOTREACHED();
+-    return 0;
 +    return 1;
-+  }
+   }
+-  return static_cast<uint64_t>(limit);
 +  return ncpu;
-+}
-+
+ }
+ 
  }  // namespace base
diff --git a/chromium-new/patches/patch-base_sys__info__netbsd.cc b/chromium-new/patches/patch-base_sys__info__netbsd.cc
index 2e68a69..4d30cd6 100644
--- a/chromium-new/patches/patch-base_sys__info__netbsd.cc
+++ b/chromium-new/patches/patch-base_sys__info__netbsd.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/sys_info_netbsd.cc.orig	2016-07-17 08:36:13.252201679 +0000
+--- base/sys_info_netbsd.cc.orig	2016-11-12 07:18:17.632595486 +0000
 +++ base/sys_info_netbsd.cc
-@@ -0,0 +1,98 @@
+@@ -0,0 +1,77 @@
 +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 +// Use of this source code is governed by a BSD-style license that can be
 +// found in the LICENSE file.
@@ -34,19 +34,6 @@ $NetBSD$
 +
 +namespace base {
 +
-+// static
-+int SysInfo::NumberOfProcessors() {
-+  int mib[] = { CTL_HW, HW_NCPU };
-+  int ncpu;
-+  size_t size = sizeof(ncpu);
-+  if (sysctl(mib, arraysize(mib), &ncpu, &size, NULL, 0) < 0) {
-+    NOTREACHED();
-+    return 1;
-+  }
-+  return ncpu;
-+}
-+
-+// static
 +int64_t SysInfo::AmountOfPhysicalMemory() {
 +  return AmountOfMemory(_SC_PHYS_PAGES);
 +}
@@ -70,25 +57,6 @@ $NetBSD$
 +}
 +
 +// static
-+uint64_t SysInfo::MaxSharedMemorySize() {
-+  int mib[3];
-+  size_t limit;
-+  size_t size = sizeof(limit);
-+  int ret;
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_SYSVIPC;
-+  mib[2] = KERN_SYSVIPC_SHMMAX;
-+
-+  ret = sysctl(mib, 3, &limit, &size, NULL, 0);
-+  if (ret == -1) {
-+    return 0;
-+  }
-+
-+  return static_cast<uint64_t>(limit);
-+}
-+
-+// static
 +std::string SysInfo::CPUModelName() {
 +  int mib[] = { CTL_HW, HW_MODEL };
 +  char name[256];
@@ -100,4 +68,15 @@ $NetBSD$
 +  return name;
 +}
 +
++int SysInfo::NumberOfProcessors() {
++  int mib[] = { CTL_HW, HW_NCPU };
++  int ncpu;
++  size_t size = sizeof(ncpu);
++  if (sysctl(mib, arraysize(mib), &ncpu, &size, NULL, 0) < 0) {
++    NOTREACHED();
++    return 1;
++  }
++  return ncpu;
++}
++
 +}  // namespace base
diff --git a/chromium-new/patches/patch-base_sys__info__posix.cc b/chromium-new/patches/patch-base_sys__info__posix.cc
index a04906a..fb5bf7f 100644
--- a/chromium-new/patches/patch-base_sys__info__posix.cc
+++ b/chromium-new/patches/patch-base_sys__info__posix.cc
@@ -1,13 +1,22 @@
 $NetBSD$
 
---- base/sys_info_posix.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/sys_info_posix.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/sys_info_posix.cc
-@@ -77,7 +77,7 @@ base::LazyInstance<
+@@ -35,7 +35,7 @@
+ 
+ namespace {
+ 
+-#if !defined(OS_OPENBSD)
++#if !defined(OS_BSD)
+ int NumberOfProcessors() {
+   // sysconf returns the number of "logical" (not "physical") processors on both
+   // Mac and Linux.  So we get the number of max available "logical" processors.
+@@ -128,7 +128,7 @@ bool GetDiskSpaceInfo(const base::FilePa
  
  namespace base {
  
 -#if !defined(OS_OPENBSD)
-+#if !defined(OS_OPENBSD) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_BSD)
  int SysInfo::NumberOfProcessors() {
    return g_lazy_number_of_processors.Get().value();
  }
diff --git a/chromium-new/patches/patch-base_test_BUILD.gn b/chromium-new/patches/patch-base_test_BUILD.gn
new file mode 100644
index 0000000..9b3c0ee
--- /dev/null
+++ b/chromium-new/patches/patch-base_test_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/test/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/test/BUILD.gn
+@@ -302,7 +302,7 @@ static_library("run_all_base_unittests")
+   ]
+ }
+ 
+-if (is_linux) {
++if (is_linux || is_bsd) {
+   shared_library("malloc_wrapper") {
+     testonly = true
+     sources = [
diff --git a/chromium-new/patches/patch-base_test_launcher_test__launcher.cc b/chromium-new/patches/patch-base_test_launcher_test__launcher.cc
index 2b93299..b121717 100644
--- a/chromium-new/patches/patch-base_test_launcher_test__launcher.cc
+++ b/chromium-new/patches/patch-base_test_launcher_test__launcher.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/test/launcher/test_launcher.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/test/launcher/test_launcher.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/test/launcher/test_launcher.cc
-@@ -53,6 +53,10 @@
+@@ -55,6 +55,10 @@
  #include "base/win/windows_version.h"
  #endif
  
diff --git a/chromium-new/patches/patch-base_test_test__file__util__posix.cc b/chromium-new/patches/patch-base_test_test__file__util__posix.cc
new file mode 100644
index 0000000..5b7152e
--- /dev/null
+++ b/chromium-new/patches/patch-base_test_test__file__util__posix.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/test/test_file_util_posix.cc.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/test/test_file_util_posix.cc
+@@ -79,7 +79,7 @@ bool DieFileDie(const FilePath& file, bo
+   return DeleteFile(file, recurse);
+ }
+ 
+-#if !defined(OS_LINUX) && !defined(OS_MACOSX)
++#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ bool EvictFileFromSystemCache(const FilePath& file) {
+   // There doesn't seem to be a POSIX way to cool the disk cache.
+   NOTIMPLEMENTED();
diff --git a/chromium-new/patches/patch-base_third__party_libevent_BUILD.gn b/chromium-new/patches/patch-base_third__party_libevent_BUILD.gn
new file mode 100644
index 0000000..ea945a7
--- /dev/null
+++ b/chromium-new/patches/patch-base_third__party_libevent_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- base/third_party/libevent/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/third_party/libevent/BUILD.gn
+@@ -29,6 +29,12 @@ static_library("libevent") {
+   } else if (is_linux) {
+     sources += [ "epoll.c" ]
+     include_dirs = [ "linux" ]
++  } else if (is_freebsd) {
++    sources += [ "kqueue.c" ]
++    include_dirs = [ "freebsd" ]
++  } else if (is_netbsd) {
++    sources += [ "kqueue.c" ]
++    include_dirs = [ "netbsd" ]
+   } else if (is_android) {
+     sources += [ "epoll.c" ]
+     include_dirs = [ "android" ]
diff --git a/chromium-new/patches/patch-base_third__party_libevent_event-config.h b/chromium-new/patches/patch-base_third__party_libevent_event-config.h
new file mode 100644
index 0000000..e2dccf0
--- /dev/null
+++ b/chromium-new/patches/patch-base_third__party_libevent_event-config.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/third_party/libevent/event-config.h.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/third_party/libevent/event-config.h
+@@ -15,6 +15,8 @@
+ #include "base/third_party/libevent/linux/event-config.h"
+ #elif defined(__FreeBSD__)
+ #include "base/third_party/libevent/freebsd/event-config.h"
++#elif defined(__NetBSD__)
++#include "base/third_party/libevent/netbsd/event-config.h"
+ #elif defined(__sun)
+ #include "base/third_party/libevent/solaris/event-config.h"
+ #else
diff --git a/chromium-new/patches/patch-base_third__party_libevent_netbsd_config.h b/chromium-new/patches/patch-base_third__party_libevent_netbsd_config.h
new file mode 100644
index 0000000..26de331
--- /dev/null
+++ b/chromium-new/patches/patch-base_third__party_libevent_netbsd_config.h
@@ -0,0 +1,271 @@
+$NetBSD$
+
+--- base/third_party/libevent/netbsd/config.h.orig	2016-11-12 05:01:22.790720883 +0000
++++ base/third_party/libevent/netbsd/config.h
+@@ -0,0 +1,266 @@
++/* config.h.  Generated from config.h.in by configure.  */
++/* config.h.in.  Generated from configure.in by autoheader.  */
++
++/* Define if clock_gettime is available in libc */
++#define DNS_USE_CPU_CLOCK_FOR_ID 1
++
++/* Define is no secure id variant is available */
++/* #undef DNS_USE_GETTIMEOFDAY_FOR_ID */
++
++/* Define to 1 if you have the `clock_gettime' function. */
++#define HAVE_CLOCK_GETTIME 1
++
++/* Define if /dev/poll is available */
++/* #undef HAVE_DEVPOLL */
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define HAVE_DLFCN_H 1
++
++/* Define if your system supports the epoll system calls */
++/* #undef HAVE_EPOLL */
++
++/* Define to 1 if you have the `epoll_ctl' function. */
++/* #undef HAVE_EPOLL_CTL */
++
++/* Define if your system supports event ports */
++/* #undef HAVE_EVENT_PORTS */
++
++/* Define to 1 if you have the `fcntl' function. */
++#define HAVE_FCNTL 1
++
++/* Define to 1 if you have the <fcntl.h> header file. */
++#define HAVE_FCNTL_H 1
++
++/* Define to 1 if the system has the type `fd_mask'. */
++#define HAVE_FD_MASK 1
++
++/* Define to 1 if you have the `getaddrinfo' function. */
++#define HAVE_GETADDRINFO 1
++
++/* Define to 1 if you have the `getegid' function. */
++#define HAVE_GETEGID 1
++
++/* Define to 1 if you have the `geteuid' function. */
++#define HAVE_GETEUID 1
++
++/* Define to 1 if you have the `getnameinfo' function. */
++#define HAVE_GETNAMEINFO 1
++
++/* Define to 1 if you have the `gettimeofday' function. */
++#define HAVE_GETTIMEOFDAY 1
++
++/* Define to 1 if you have the `inet_ntop' function. */
++#define HAVE_INET_NTOP 1
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#define HAVE_INTTYPES_H 1
++
++/* Define to 1 if you have the `issetugid' function. */
++#define HAVE_ISSETUGID 1
++
++/* Define to 1 if you have the `kqueue' function. */
++#define HAVE_KQUEUE 1
++
++/* Define to 1 if you have the `nsl' library (-lnsl). */
++/* #undef HAVE_LIBNSL */
++
++/* Define to 1 if you have the `resolv' library (-lresolv). */
++/* #undef HAVE_LIBRESOLV */
++
++/* Define to 1 if you have the `rt' library (-lrt). */
++#define HAVE_LIBRT 1
++
++/* Define to 1 if you have the `socket' library (-lsocket). */
++/* #undef HAVE_LIBSOCKET */
++
++/* Define to 1 if you have the <memory.h> header file. */
++#define HAVE_MEMORY_H 1
++
++/* Define to 1 if you have the <netinet/in6.h> header file. */
++/* #undef HAVE_NETINET_IN6_H */
++
++/* Define to 1 if you have the `poll' function. */
++#define HAVE_POLL 1
++
++/* Define to 1 if you have the <poll.h> header file. */
++#define HAVE_POLL_H 1
++
++/* Define to 1 if you have the `port_create' function. */
++/* #undef HAVE_PORT_CREATE */
++
++/* Define to 1 if you have the <port.h> header file. */
++/* #undef HAVE_PORT_H */
++
++/* Define to 1 if you have the `select' function. */
++#define HAVE_SELECT 1
++
++/* Define if F_SETFD is defined in <fcntl.h> */
++#define HAVE_SETFD 1
++
++/* Define to 1 if you have the `sigaction' function. */
++#define HAVE_SIGACTION 1
++
++/* Define to 1 if you have the `signal' function. */
++#define HAVE_SIGNAL 1
++
++/* Define to 1 if you have the <signal.h> header file. */
++#define HAVE_SIGNAL_H 1
++
++/* Define to 1 if you have the <stdarg.h> header file. */
++#define HAVE_STDARG_H 1
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#define HAVE_STDINT_H 1
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#define HAVE_STDLIB_H 1
++
++/* Define to 1 if you have the <strings.h> header file. */
++#define HAVE_STRINGS_H 1
++
++/* Define to 1 if you have the <string.h> header file. */
++#define HAVE_STRING_H 1
++
++/* Define to 1 if you have the `strlcpy' function. */
++#define HAVE_STRLCPY 1
++
++/* Define to 1 if you have the `strsep' function. */
++#define HAVE_STRSEP 1
++
++/* Define to 1 if you have the `strtok_r' function. */
++#define HAVE_STRTOK_R 1
++
++/* Define to 1 if you have the `strtoll' function. */
++#define HAVE_STRTOLL 1
++
++/* Define to 1 if the system has the type `struct in6_addr'. */
++#define HAVE_STRUCT_IN6_ADDR 1
++
++/* Define to 1 if you have the <sys/devpoll.h> header file. */
++/* #undef HAVE_SYS_DEVPOLL_H */
++
++/* Define to 1 if you have the <sys/epoll.h> header file. */
++/* #undef HAVE_SYS_EPOLL_H */
++
++/* Define to 1 if you have the <sys/event.h> header file. */
++#define HAVE_SYS_EVENT_H 1
++
++/* Define to 1 if you have the <sys/ioctl.h> header file. */
++#define HAVE_SYS_IOCTL_H 1
++
++/* Define to 1 if you have the <sys/param.h> header file. */
++#define HAVE_SYS_PARAM_H 1
++
++/* Define to 1 if you have the <sys/queue.h> header file. */
++#define HAVE_SYS_QUEUE_H 1
++
++/* Define to 1 if you have the <sys/select.h> header file. */
++#define HAVE_SYS_SELECT_H 1
++
++/* Define to 1 if you have the <sys/socket.h> header file. */
++#define HAVE_SYS_SOCKET_H 1
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define HAVE_SYS_STAT_H 1
++
++/* Define to 1 if you have the <sys/time.h> header file. */
++#define HAVE_SYS_TIME_H 1
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#define HAVE_SYS_TYPES_H 1
++
++/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
++#define HAVE_TAILQFOREACH 1
++
++/* Define if timeradd is defined in <sys/time.h> */
++#define HAVE_TIMERADD 1
++
++/* Define if timerclear is defined in <sys/time.h> */
++#define HAVE_TIMERCLEAR 1
++
++/* Define if timercmp is defined in <sys/time.h> */
++#define HAVE_TIMERCMP 1
++
++/* Define if timerisset is defined in <sys/time.h> */
++#define HAVE_TIMERISSET 1
++
++/* Define to 1 if the system has the type `uint16_t'. */
++#define HAVE_UINT16_T 1
++
++/* Define to 1 if the system has the type `uint32_t'. */
++#define HAVE_UINT32_T 1
++
++/* Define to 1 if the system has the type `uint64_t'. */
++#define HAVE_UINT64_T 1
++
++/* Define to 1 if the system has the type `uint8_t'. */
++#define HAVE_UINT8_T 1
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#define HAVE_UNISTD_H 1
++
++/* Define to 1 if you have the `vasprintf' function. */
++#define HAVE_VASPRINTF 1
++
++/* Define if kqueue works correctly with pipes */
++#define HAVE_WORKING_KQUEUE 1
++
++/* Name of package */
++#define PACKAGE "libevent"
++
++/* Define to the address where bug reports for this package should be sent. */
++#define PACKAGE_BUGREPORT ""
++
++/* Define to the full name of this package. */
++#define PACKAGE_NAME ""
++
++/* Define to the full name and version of this package. */
++#define PACKAGE_STRING ""
++
++/* Define to the one symbol short name of this package. */
++#define PACKAGE_TARNAME ""
++
++/* Define to the version of this package. */
++#define PACKAGE_VERSION ""
++
++/* The size of `int', as computed by sizeof. */
++#define SIZEOF_INT 4
++
++/* The size of `long', as computed by sizeof. */
++#define SIZEOF_LONG 8
++
++/* The size of `long long', as computed by sizeof. */
++#define SIZEOF_LONG_LONG 8
++
++/* The size of `short', as computed by sizeof. */
++#define SIZEOF_SHORT 2
++
++/* Define to 1 if you have the ANSI C header files. */
++#define STDC_HEADERS 1
++
++/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++#define TIME_WITH_SYS_TIME 1
++
++/* Version number of package */
++#define VERSION "1.4.13-stable"
++
++/* Define to appropriate substitue if compiler doesnt have __func__ */
++/* #undef __func__ */
++
++/* Define to empty if `const' does not conform to ANSI C. */
++/* #undef const */
++
++/* Define to `__inline__' or `__inline' if that's what the C compiler
++   calls it, or to nothing if 'inline' is not supported under any name.  */
++#ifndef __cplusplus
++/* #undef inline */
++#endif
++
++/* Define to `int' if <sys/types.h> does not define. */
++/* #undef pid_t */
++
++/* Define to `unsigned int' if <sys/types.h> does not define. */
++/* #undef size_t */
++
++/* Define to unsigned int if you dont have it */
++/* #undef socklen_t */
diff --git a/chromium-new/patches/patch-base_third__party_libevent_netbsd_event-config.h b/chromium-new/patches/patch-base_third__party_libevent_netbsd_event-config.h
new file mode 100644
index 0000000..d0882db
--- /dev/null
+++ b/chromium-new/patches/patch-base_third__party_libevent_netbsd_event-config.h
@@ -0,0 +1,289 @@
+$NetBSD$
+
+--- base/third_party/libevent/netbsd/event-config.h.orig	2016-11-12 05:01:22.831646497 +0000
++++ base/third_party/libevent/netbsd/event-config.h
+@@ -0,0 +1,284 @@
++/* event-config.h
++ * Generated by autoconf; post-processed by libevent.
++ * Do not edit this file.
++ * Do not rely on macros in this file existing in later versions.
++ */
++#ifndef _EVENT_CONFIG_H_
++#define _EVENT_CONFIG_H_
++/* config.h.  Generated from config.h.in by configure.  */
++/* config.h.in.  Generated from configure.in by autoheader.  */
++
++/* Define if clock_gettime is available in libc */
++#define _EVENT_DNS_USE_CPU_CLOCK_FOR_ID 1
++
++/* Define is no secure id variant is available */
++/* #undef _EVENT_DNS_USE_GETTIMEOFDAY_FOR_ID */
++
++/* Define to 1 if you have the `clock_gettime' function. */
++#define _EVENT_HAVE_CLOCK_GETTIME 1
++
++/* Define if /dev/poll is available */
++/* #undef _EVENT_HAVE_DEVPOLL */
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define _EVENT_HAVE_DLFCN_H 1
++
++/* Define if your system supports the epoll system calls */
++/* #undef _EVENT_HAVE_EPOLL */
++
++/* Define to 1 if you have the `epoll_ctl' function. */
++/* #undef _EVENT_HAVE_EPOLL_CTL */
++
++/* Define if your system supports event ports */
++/* #undef _EVENT_HAVE_EVENT_PORTS */
++
++/* Define to 1 if you have the `fcntl' function. */
++#define _EVENT_HAVE_FCNTL 1
++
++/* Define to 1 if you have the <fcntl.h> header file. */
++#define _EVENT_HAVE_FCNTL_H 1
++
++/* Define to 1 if the system has the type `fd_mask'. */
++#define _EVENT_HAVE_FD_MASK 1
++
++/* Define to 1 if you have the `getaddrinfo' function. */
++#define _EVENT_HAVE_GETADDRINFO 1
++
++/* Define to 1 if you have the `getegid' function. */
++#define _EVENT_HAVE_GETEGID 1
++
++/* Define to 1 if you have the `geteuid' function. */
++#define _EVENT_HAVE_GETEUID 1
++
++/* Define to 1 if you have the `getnameinfo' function. */
++#define _EVENT_HAVE_GETNAMEINFO 1
++
++/* Define to 1 if you have the `gettimeofday' function. */
++#define _EVENT_HAVE_GETTIMEOFDAY 1
++
++/* Define to 1 if you have the `inet_ntop' function. */
++#define _EVENT_HAVE_INET_NTOP 1
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#define _EVENT_HAVE_INTTYPES_H 1
++
++/* Define to 1 if you have the `issetugid' function. */
++#define _EVENT_HAVE_ISSETUGID 1
++
++/* Define to 1 if you have the `kqueue' function. */
++#define _EVENT_HAVE_KQUEUE 1
++
++/* Define to 1 if you have the `nsl' library (-lnsl). */
++/* #undef _EVENT_HAVE_LIBNSL */
++
++/* Define to 1 if you have the `resolv' library (-lresolv). */
++/* #undef _EVENT_HAVE_LIBRESOLV */
++
++/* Define to 1 if you have the `rt' library (-lrt). */
++#define _EVENT_HAVE_LIBRT 1
++
++/* Define to 1 if you have the `socket' library (-lsocket). */
++/* #undef _EVENT_HAVE_LIBSOCKET */
++
++/* Define to 1 if you have the <memory.h> header file. */
++#define _EVENT_HAVE_MEMORY_H 1
++
++/* Define to 1 if you have the <netinet/in6.h> header file. */
++/* #undef _EVENT_HAVE_NETINET_IN6_H */
++
++/* Define to 1 if you have the `poll' function. */
++#define _EVENT_HAVE_POLL 1
++
++/* Define to 1 if you have the <poll.h> header file. */
++#define _EVENT_HAVE_POLL_H 1
++
++/* Define to 1 if you have the `port_create' function. */
++/* #undef _EVENT_HAVE_PORT_CREATE */
++
++/* Define to 1 if you have the <port.h> header file. */
++/* #undef _EVENT_HAVE_PORT_H */
++
++/* Define to 1 if you have the `select' function. */
++#define _EVENT_HAVE_SELECT 1
++
++/* Define if F_SETFD is defined in <fcntl.h> */
++#define _EVENT_HAVE_SETFD 1
++
++/* Define to 1 if you have the `sigaction' function. */
++#define _EVENT_HAVE_SIGACTION 1
++
++/* Define to 1 if you have the `signal' function. */
++#define _EVENT_HAVE_SIGNAL 1
++
++/* Define to 1 if you have the <signal.h> header file. */
++#define _EVENT_HAVE_SIGNAL_H 1
++
++/* Define to 1 if you have the <stdarg.h> header file. */
++#define _EVENT_HAVE_STDARG_H 1
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#define _EVENT_HAVE_STDINT_H 1
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#define _EVENT_HAVE_STDLIB_H 1
++
++/* Define to 1 if you have the <strings.h> header file. */
++#define _EVENT_HAVE_STRINGS_H 1
++
++/* Define to 1 if you have the <string.h> header file. */
++#define _EVENT_HAVE_STRING_H 1
++
++/* Define to 1 if you have the `strlcpy' function. */
++#define _EVENT_HAVE_STRLCPY 1
++
++/* Define to 1 if you have the `strsep' function. */
++#define _EVENT_HAVE_STRSEP 1
++
++/* Define to 1 if you have the `strtok_r' function. */
++#define _EVENT_HAVE_STRTOK_R 1
++
++/* Define to 1 if you have the `strtoll' function. */
++#define _EVENT_HAVE_STRTOLL 1
++
++/* Define to 1 if the system has the type `struct in6_addr'. */
++#define _EVENT_HAVE_STRUCT_IN6_ADDR 1
++
++/* Define to 1 if you have the <sys/devpoll.h> header file. */
++/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */
++
++/* Define to 1 if you have the <sys/epoll.h> header file. */
++/* #undef _EVENT_HAVE_SYS_EPOLL_H */
++
++/* Define to 1 if you have the <sys/event.h> header file. */
++#define _EVENT_HAVE_SYS_EVENT_H 1
++
++/* Define to 1 if you have the <sys/ioctl.h> header file. */
++#define _EVENT_HAVE_SYS_IOCTL_H 1
++
++/* Define to 1 if you have the <sys/param.h> header file. */
++#define _EVENT_HAVE_SYS_PARAM_H 1
++
++/* Define to 1 if you have the <sys/queue.h> header file. */
++#define _EVENT_HAVE_SYS_QUEUE_H 1
++
++/* Define to 1 if you have the <sys/select.h> header file. */
++#define _EVENT_HAVE_SYS_SELECT_H 1
++
++/* Define to 1 if you have the <sys/socket.h> header file. */
++#define _EVENT_HAVE_SYS_SOCKET_H 1
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define _EVENT_HAVE_SYS_STAT_H 1
++
++/* Define to 1 if you have the <sys/time.h> header file. */
++#define _EVENT_HAVE_SYS_TIME_H 1
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#define _EVENT_HAVE_SYS_TYPES_H 1
++
++/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
++#define _EVENT_HAVE_TAILQFOREACH 1
++
++/* Define if timeradd is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERADD 1
++
++/* Define if timerclear is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERCLEAR 1
++
++/* Define if timercmp is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERCMP 1
++
++/* Define if timerisset is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERISSET 1
++
++/* Define to 1 if the system has the type `uint16_t'. */
++#define _EVENT_HAVE_UINT16_T 1
++
++/* Define to 1 if the system has the type `uint32_t'. */
++#define _EVENT_HAVE_UINT32_T 1
++
++/* Define to 1 if the system has the type `uint64_t'. */
++#define _EVENT_HAVE_UINT64_T 1
++
++/* Define to 1 if the system has the type `uint8_t'. */
++#define _EVENT_HAVE_UINT8_T 1
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#define _EVENT_HAVE_UNISTD_H 1
++
++/* Define to 1 if you have the `vasprintf' function. */
++#define _EVENT_HAVE_VASPRINTF 1
++
++/* Define if kqueue works correctly with pipes */
++#define _EVENT_HAVE_WORKING_KQUEUE 1
++
++/* Define to the sub-directory in which libtool stores uninstalled libraries.
++   */
++#define _EVENT_LT_OBJDIR ".libs/"
++
++/* Numeric representation of the version */
++#define _EVENT_NUMERIC_VERSION 0x01040f00
++
++/* Name of package */
++#define _EVENT_PACKAGE "libevent"
++
++/* Define to the address where bug reports for this package should be sent. */
++#define _EVENT_PACKAGE_BUGREPORT ""
++
++/* Define to the full name of this package. */
++#define _EVENT_PACKAGE_NAME ""
++
++/* Define to the full name and version of this package. */
++#define _EVENT_PACKAGE_STRING ""
++
++/* Define to the one symbol short name of this package. */
++#define _EVENT_PACKAGE_TARNAME ""
++
++/* Define to the home page for this package. */
++#define _EVENT_PACKAGE_URL ""
++
++/* Define to the version of this package. */
++#define _EVENT_PACKAGE_VERSION ""
++
++/* The size of `int', as computed by sizeof. */
++#define _EVENT_SIZEOF_INT 4
++
++/* The size of `long', as computed by sizeof. */
++#define _EVENT_SIZEOF_LONG 8
++
++/* The size of `long long', as computed by sizeof. */
++#define _EVENT_SIZEOF_LONG_LONG 8
++
++/* The size of `short', as computed by sizeof. */
++#define _EVENT_SIZEOF_SHORT 2
++
++/* Define to 1 if you have the ANSI C header files. */
++#define _EVENT_STDC_HEADERS 1
++
++/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++#define _EVENT_TIME_WITH_SYS_TIME 1
++
++/* Version number of package */
++#define _EVENT_VERSION "1.4.15"
++
++/* Define to appropriate substitue if compiler doesnt have __func__ */
++/* #undef _EVENT___func__ */
++
++/* Define to empty if `const' does not conform to ANSI C. */
++/* #undef _EVENT_const */
++
++/* Define to `__inline__' or `__inline' if that's what the C compiler
++   calls it, or to nothing if 'inline' is not supported under any name.  */
++#ifndef _EVENT___cplusplus
++/* #undef _EVENT_inline */
++#endif
++
++/* Define to `int' if <sys/types.h> does not define. */
++/* #undef _EVENT_pid_t */
++
++/* Define to `unsigned int' if <sys/types.h> does not define. */
++/* #undef _EVENT_size_t */
++
++/* Define to unsigned int if you dont have it */
++/* #undef _EVENT_socklen_t */
++#endif
diff --git a/chromium-new/patches/patch-base_threading_platform__thread__linux.cc b/chromium-new/patches/patch-base_threading_platform__thread__linux.cc
deleted file mode 100644
index 3899f5e..0000000
--- a/chromium-new/patches/patch-base_threading_platform__thread__linux.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
---- base/threading/platform_thread_linux.cc.orig	2016-06-24 01:02:08.000000000 +0000
-+++ base/threading/platform_thread_linux.cc
-@@ -17,7 +17,9 @@
- 
- #if !defined(OS_NACL)
- #include <pthread.h>
-+#if !defined(OS_BSD)
- #include <sys/prctl.h>
-+#endif
- #include <sys/types.h>
- #include <unistd.h>
- #endif
-@@ -70,7 +72,7 @@ void PlatformThread::SetName(const std::
-   ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
-   tracked_objects::ThreadData::InitializeThreadContext(name);
- 
--#if !defined(OS_NACL)
-+#if !defined(OS_NACL) && !defined(OS_BSD)
-   // On linux we can get the thread names to show up in the debugger by setting
-   // the process name for the LWP.  We don't want to do this for the main
-   // thread because that would rename the process, causing tools like killall
diff --git a/chromium-new/patches/patch-base_threading_platform__thread__netbsd.cc b/chromium-new/patches/patch-base_threading_platform__thread__netbsd.cc
new file mode 100644
index 0000000..0e5cb11
--- /dev/null
+++ b/chromium-new/patches/patch-base_threading_platform__thread__netbsd.cc
@@ -0,0 +1,102 @@
+$NetBSD$
+
+--- base/threading/platform_thread_netbsd.cc.orig	2016-11-12 03:16:24.652349279 +0000
++++ base/threading/platform_thread_netbsd.cc
+@@ -0,0 +1,97 @@
++// Copyright 2014 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/threading/platform_thread.h"
++
++#include <errno.h>
++#include <sched.h>
++#include <stddef.h>
++
++#include "base/lazy_instance.h"
++#include "base/logging.h"
++#include "base/threading/platform_thread_internal_posix.h"
++#include "base/threading/thread_id_name_manager.h"
++#include "base/tracked_objects.h"
++#include "build/build_config.h"
++
++#if !defined(OS_NACL)
++#include <pthread.h>
++#include <sys/types.h>
++#include <unistd.h>
++#endif
++
++namespace base {
++
++namespace internal {
++
++namespace {
++#if !defined(OS_NACL)
++const struct sched_param kRealTimePrio = {8};
++#endif
++}  // namespace
++
++const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4] = {
++    {ThreadPriority::BACKGROUND, 10},
++    {ThreadPriority::NORMAL, 0},
++    {ThreadPriority::DISPLAY, -6},
++    {ThreadPriority::REALTIME_AUDIO, -10},
++};
++
++bool SetCurrentThreadPriorityForPlatform(ThreadPriority priority) {
++#if !defined(OS_NACL)
++  return priority == ThreadPriority::REALTIME_AUDIO &&
++         pthread_setschedparam(pthread_self(), SCHED_RR, &kRealTimePrio) == 0;
++#else
++  return false;
++#endif
++}
++
++bool GetCurrentThreadPriorityForPlatform(ThreadPriority* priority) {
++#if !defined(OS_NACL)
++  int maybe_sched_rr = 0;
++  struct sched_param maybe_realtime_prio = {0};
++  if (pthread_getschedparam(pthread_self(), &maybe_sched_rr,
++                            &maybe_realtime_prio) == 0 &&
++      maybe_sched_rr == SCHED_RR &&
++      maybe_realtime_prio.sched_priority == kRealTimePrio.sched_priority) {
++    *priority = ThreadPriority::REALTIME_AUDIO;
++    return true;
++  }
++#endif
++  return false;
++}
++
++}  // namespace internal
++
++// static
++void PlatformThread::SetName(const std::string& name) {
++  ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
++  tracked_objects::ThreadData::InitializeThreadContext(name);
++
++#if !defined(OS_NACL)
++  // On FreeBSD we can get the thread names to show up in the debugger by
++  // setting the process name for the LWP.  We don't want to do this for the
++  // main thread because that would rename the process, causing tools like
++  // killall to stop working.
++  if (PlatformThread::CurrentId() == getpid())
++    return;
++  setproctitle("%s", name.c_str());
++#endif  //  !defined(OS_NACL)
++}
++
++void InitThreading() {}
++
++void TerminateOnThread() {}
++
++size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
++#if !defined(THREAD_SANITIZER)
++  return 0;
++#else
++  // ThreadSanitizer bloats the stack heavily. Evidence has been that the
++  // default stack size isn't enough for some browser tests.
++  return 2 * (1 << 23);  // 2 times 8192K (the default stack size on Linux).
++#endif
++}
++
++}  // namespace base
diff --git a/chromium-new/patches/patch-base_threading_platform__thread__posix.cc b/chromium-new/patches/patch-base_threading_platform__thread__posix.cc
index bb86881..c9322b5 100644
--- a/chromium-new/patches/patch-base_threading_platform__thread__posix.cc
+++ b/chromium-new/patches/patch-base_threading_platform__thread__posix.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/threading/platform_thread_posix.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/threading/platform_thread_posix.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/threading/platform_thread_posix.cc
-@@ -55,7 +55,7 @@ void* ThreadFunc(void* params) {
+@@ -56,7 +56,7 @@ void* ThreadFunc(void* params) {
      if (!thread_params->joinable)
        base::ThreadRestrictions::SetSingletonAllowed(false);
  
diff --git a/chromium-new/patches/patch-base_trace__event_malloc__dump__provider.cc b/chromium-new/patches/patch-base_trace__event_malloc__dump__provider.cc
new file mode 100644
index 0000000..ae2074f
--- /dev/null
+++ b/chromium-new/patches/patch-base_trace__event_malloc__dump__provider.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/trace_event/malloc_dump_provider.cc.orig	2016-11-10 20:02:09.000000000 +0000
++++ base/trace_event/malloc_dump_provider.cc
+@@ -20,7 +20,7 @@
+ #if defined(OS_MACOSX)
+ #include <malloc/malloc.h>
+ #else
+-#include <malloc.h>
++#include <stdlib.h>
+ #endif
+ #if defined(OS_WIN)
+ #include <windows.h>
diff --git a/chromium-new/patches/patch-base_trace__event_process__memory__dump.cc b/chromium-new/patches/patch-base_trace__event_process__memory__dump.cc
index fd76600..82d1521 100644
--- a/chromium-new/patches/patch-base_trace__event_process__memory__dump.cc
+++ b/chromium-new/patches/patch-base_trace__event_process__memory__dump.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/trace_event/process_memory_dump.cc.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/trace_event/process_memory_dump.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/trace_event/process_memory_dump.cc
-@@ -83,7 +83,7 @@ size_t ProcessMemoryDump::CountResidentB
+@@ -89,7 +89,7 @@ size_t ProcessMemoryDump::CountResidentB
    const size_t kMaxChunkSize = 8 * 1024 * 1024;
    size_t max_vec_size =
        GetSystemPageCount(std::min(mapped_size, kMaxChunkSize), page_size);
diff --git a/chromium-new/patches/patch-base_trace__event_process__memory__dump.h b/chromium-new/patches/patch-base_trace__event_process__memory__dump.h
index 480bda4..dddbc27 100644
--- a/chromium-new/patches/patch-base_trace__event_process__memory__dump.h
+++ b/chromium-new/patches/patch-base_trace__event_process__memory__dump.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- base/trace_event/process_memory_dump.h.orig	2016-06-24 01:02:08.000000000 +0000
+--- base/trace_event/process_memory_dump.h.orig	2016-11-10 20:02:09.000000000 +0000
 +++ base/trace_event/process_memory_dump.h
-@@ -23,7 +23,7 @@
+@@ -24,7 +24,7 @@
  
  // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the
  // resident memory.
diff --git a/chromium-new/patches/patch-breakpad_BUILD.gn b/chromium-new/patches/patch-breakpad_BUILD.gn
new file mode 100644
index 0000000..3e9132f
--- /dev/null
+++ b/chromium-new/patches/patch-breakpad_BUILD.gn
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- breakpad/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ breakpad/BUILD.gn
+@@ -433,7 +433,7 @@ if (is_mac) {
+   }
+ }
+ 
+-if (is_linux || is_android) {
++if (is_linux || is_bsd || is_android) {
+   if (current_toolchain == host_toolchain) {
+     executable("symupload") {
+       sources = [
+@@ -451,7 +451,9 @@ if (is_linux || is_android) {
+ 
+       configs += [ ":tools_config" ]
+ 
++    if (is_linux || is_android) {
+       libs = [ "dl" ]
++    }
+ 
+       deps = [
+         "//build/config/sanitizers:deps",
diff --git a/chromium-new/patches/patch-build_build__config.h b/chromium-new/patches/patch-build_build__config.h
deleted file mode 100644
index c0deb2e..0000000
--- a/chromium-new/patches/patch-build_build__config.h
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- build/build_config.h.orig	2016-06-24 01:02:09.000000000 +0000
-+++ build/build_config.h
-@@ -53,6 +53,8 @@
- #define OS_FREEBSD 1
- #elif defined(__OpenBSD__)
- #define OS_OPENBSD 1
-+#elif defined(__NetBSD__)
-+#define OS_NETBSD 1
- #elif defined(__sun)
- #define OS_SOLARIS 1
- #elif defined(__QNXNTO__)
-@@ -67,7 +69,7 @@
- 
- // For access to standard BSD features, use OS_BSD instead of a
- // more specific macro.
--#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
-+#if defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD)
- #define OS_BSD 1
- #endif
- 
-@@ -75,7 +77,7 @@
- // more specific macro.
- #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) ||     \
-     defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_ANDROID) ||  \
--    defined(OS_NACL) || defined(OS_QNX)
-+    defined(OS_NACL) || defined(OS_QNX) || defined(OS_NETBSD)
- #define OS_POSIX 1
- #endif
- 
diff --git a/chromium-new/patches/patch-build_common.gypi b/chromium-new/patches/patch-build_common.gypi
deleted file mode 100644
index 502e55a..0000000
--- a/chromium-new/patches/patch-build_common.gypi
+++ /dev/null
@@ -1,137 +0,0 @@
-$NetBSD$
-
---- build/common.gypi.orig	2016-06-24 01:02:09.000000000 +0000
-+++ build/common.gypi
-@@ -113,7 +113,7 @@
- 
-           'conditions': [
-             # Windows and Linux use Aura, but not Ash.
--            ['OS=="win" or OS=="linux"', {
-+            ['OS=="win" or OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
-               'use_aura%': 1,
-             }],
- 
-@@ -138,7 +138,7 @@
-             }],
- 
-             # Whether we're a traditional desktop unix.
--            ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
-+            ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or OS=="solaris") and chromeos==0', {
-               'desktop_linux%': 1,
-             }, {
-               'desktop_linux%': 0,
-@@ -255,13 +255,13 @@
-           }],
- 
-           # Enable HiDPI on Mac OS, Windows and Linux (including Chrome OS).
--          ['OS=="mac" or OS=="win" or OS=="linux"', {
-+          ['OS=="mac" or OS=="win" or OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
-             'enable_hidpi%': 1,
-           }],
- 
-           # Enable Top Chrome Material Design on Chrome OS, Windows, and Linux,
-           # and Mac.
--          ['chromeos==1 or OS=="win" or OS=="linux" or OS=="mac"', {
-+          ['chromeos==1 or OS=="win" or OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
-             'enable_topchrome_md%': 1,
-           }],
- 
-@@ -730,14 +730,20 @@
-         }],
- 
-         # A flag for BSD platforms
--        ['OS=="freebsd" or OS=="openbsd"', {
-+        ['OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
-           'os_bsd%': 1,
-         }, {
-           'os_bsd%': 0,
-         }],
- 
-+        ['OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
-+            'icu_use_data_file_flag%': 0,
-+        }, {
-+            'icu_use_data_file_flag%': 1,
-+        }],
-+
-         # NSS usage.
--        ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris")', {
-+        ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or OS=="solaris")', {
-           'use_nss_certs%': 1,
-         }, {
-           'use_nss_certs%': 0,
-@@ -746,7 +752,7 @@
-         # NSS verifier usage.
-         # On non-OpenSSL iOS configurations, certificates use the operating
-         # system library, but the verifier uses the bundled copy of NSS.
--        ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") or (OS=="ios" and use_openssl==0)', {
-+        ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or OS=="solaris") or (OS=="ios" and use_openssl==0)', {
-           'use_nss_verifier%': 1,
-         }, {
-           'use_nss_verifier%': 0,
-@@ -790,7 +796,7 @@
-         }],
- 
-         # DBus usage.
--        ['OS=="linux" and embedded==0', {
-+        ['(OS=="linux" or OS=="freebsd" or OS=="netbsd") and embedded==0', {
-           'use_dbus%': 1,
-         }, {
-           'use_dbus%': 0,
-@@ -892,7 +898,7 @@
- 
-         # Use GPU accelerated cross process image transport by default
-         # on linux builds with the Aura window manager
--        ['use_aura==1 and OS=="linux"', {
-+        ['use_aura==1 and (OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd")', {
-           'ui_compositor_image_transport%': 1,
-         }, {
-           'ui_compositor_image_transport%': 0,
-@@ -1021,7 +1027,7 @@
-         }, {
-           'use_openmax_dl_fft%': 0,
-         }],
--        ['OS=="win" or OS=="linux"', {
-+        ['OS=="win" or OS=="linux" or OS=="freebsd" or OS=="netbsd"', {
-           'enable_mdns%' : 1,
-         }],
- 
-@@ -1321,6 +1327,10 @@
-     # able to turn it off for various reasons.
-     'linux_disable_pie%': 0,
- 
-+    # XXX(rene) More options, keep them?
-+    'os_ver%': 0,
-+    'use_system_libjpeg%': 0,
-+
-     # The release channel that this build targets. This is used to restrict
-     # channel-specific build options, like which installer packages to create.
-     # The default is 'all', which does no channel-specific filtering.
-@@ -4719,11 +4729,18 @@
-     }],
-     # FreeBSD-specific options; note that most FreeBSD options are set above,
-     # with Linux.
--    ['OS=="freebsd"', {
-+    ['OS=="freebsd" or OS=="netbsd"', {
-       'target_defaults': {
-         'ldflags': [
-           '-Wl,--no-keep-memory',
-         ],
-+        'ldflags!': [
-+          '-ldl',
-+          '-pie'
-+        ],
-+        'libraries!': [
-+          '-ldl',
-+        ],
-       },
-     }],
-     # Android-specific options; note that most are set above with Linux.
-@@ -5240,7 +5257,7 @@
-           # 2. Further down, library_dirs is set to
-           #    third_party/libc++-static, which contains a static
-           #    libc++.a library.  The linker then links against that instead
--          #    of against /usr/lib/libc++.dylib when it sees the -lc++ flag
-+          #    of against /usr/tmp/pkgsrc/wip/chromium-new/work/.buildlink/lib/libc++.dylib when it sees the -lc++ flag
-           #    added by the driver.
-           #
-           # In component builds, just link to the system libc++.  This has
diff --git a/chromium-new/patches/patch-build_config_BUILD.gn b/chromium-new/patches/patch-build_config_BUILD.gn
new file mode 100644
index 0000000..44183d2
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- build/config/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/BUILD.gn
+@@ -297,7 +297,7 @@ config("debug") {
+       # builds, and we have to tell it to turn it off.
+       defines += [ "_HAS_ITERATOR_DEBUGGING=0" ]
+     }
+-  } else if (is_linux && current_cpu == "x64" && enable_iterator_debugging) {
++  } else if ((is_linux || is_bsd) && current_cpu == "x64" && enable_iterator_debugging) {
+     # Enable libstdc++ debugging facilities to help catch problems early, see
+     # http://crbug.com/65151 .
+     # TODO(phajdan.jr): Should we enable this for all of POSIX?
+@@ -411,7 +411,7 @@ config("executable_config") {
+     ]
+   } else if (is_ios) {
+     configs += [ "//build/config/ios:ios_dynamic_flags" ]
+-  } else if (is_linux || is_android) {
++  } else if (is_linux || is_android || is_bsd) {
+     configs += [ "//build/config/gcc:executable_ldconfig" ]
+     if (is_android) {
+       configs += [ "//build/config/android:executable_config" ]
diff --git a/chromium-new/patches/patch-build_config_BUILDCONFIG.gn b/chromium-new/patches/patch-build_config_BUILDCONFIG.gn
new file mode 100644
index 0000000..b109356
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_BUILDCONFIG.gn
@@ -0,0 +1,146 @@
+$NetBSD$
+
+--- build/config/BUILDCONFIG.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/BUILDCONFIG.gn
+@@ -134,12 +134,13 @@ declare_args() {
+   is_debug = !is_official_build
+ 
+   # Whether we're a traditional desktop unix.
+-  is_desktop_linux = current_os == "linux"
++  is_desktop_linux = current_os == "linux" || current_os == "bsd" || current_os == "netbsd"
+ 
+   # Set to true when compiling with the Clang compiler. Typically this is used
+   # to configure warnings.
+   is_clang = current_os == "mac" || current_os == "ios" ||
+-             current_os == "linux" || current_os == "chromeos"
++             current_os == "linux" || current_os == "chromeos" ||
++             current_os == "bsd"
+ 
+   # Allows the path to a custom target toolchain to be injected as a single
+   # argument, and set as the default toolchain.
+@@ -183,8 +184,8 @@ if (host_toolchain == "") {
+   # TODO(dpranke): Add some sort of assert here that verifies that
+   # no toolchain omitted host_toolchain from its toolchain_args().
+ 
+-  if (host_os == "linux") {
+-    if (target_os != "linux") {
++  if (host_os == "linux" || host_os == "freebsd" || host_os == "netbsd" || host_os == "openbsd") {
++    if (target_os != "linux" && target_os != "freebsd" && target_os != "netbsd" && target_os != "openbsd") {
+       # TODO(dpranke) - is_clang normally applies only to the target
+       # build, and there is no way to indicate that you want to override
+       # it for both the target build *and* the host build. Do we need to
+@@ -220,7 +221,7 @@ if (target_os == "android") {
+   } else {
+     _default_toolchain = "//build/toolchain/android:$target_cpu"
+   }
+-} else if (target_os == "chromeos" || target_os == "linux") {
++} else if (target_os == "chromeos" || target_os == "linux" || target_os == "freebsd" || target_os == "netbsd" || target_os == "openbsd") {
+   # See comments in build/toolchain/cros/BUILD.gn about board compiles.
+   if (is_clang) {
+     _default_toolchain = "//build/toolchain/linux:clang_$target_cpu"
+@@ -283,6 +284,7 @@ if (current_os == "win" || current_os ==
+   is_nacl = false
+   is_posix = false
+   is_win = true
++  is_bsd = false
+ } else if (current_os == "mac") {
+   is_android = false
+   is_chromeos = false
+@@ -292,6 +294,7 @@ if (current_os == "win" || current_os ==
+   is_nacl = false
+   is_posix = true
+   is_win = false
++  is_bsd = false
+ } else if (current_os == "android") {
+   is_android = true
+   is_chromeos = false
+@@ -301,6 +304,7 @@ if (current_os == "win" || current_os ==
+   is_nacl = false
+   is_posix = true
+   is_win = false
++  is_bsd = false
+ } else if (current_os == "chromeos") {
+   is_android = false
+   is_chromeos = true
+@@ -310,6 +314,7 @@ if (current_os == "win" || current_os ==
+   is_nacl = false
+   is_posix = true
+   is_win = false
++  is_bsd = false
+ } else if (current_os == "nacl") {
+   # current_os == "nacl" will be passed by the nacl toolchain definition.
+   # It is not set by default or on the command line. We treat is as a
+@@ -322,6 +327,7 @@ if (current_os == "win" || current_os ==
+   is_nacl = true
+   is_posix = true
+   is_win = false
++  is_bsd = false
+ } else if (current_os == "ios") {
+   is_android = false
+   is_chromeos = false
+@@ -331,6 +337,7 @@ if (current_os == "win" || current_os ==
+   is_nacl = false
+   is_posix = true
+   is_win = false
++  is_bsd = false
+ } else if (current_os == "linux") {
+   is_android = false
+   is_chromeos = false
+@@ -340,8 +347,47 @@ if (current_os == "win" || current_os ==
+   is_nacl = false
+   is_posix = true
+   is_win = false
++  is_bsd = false
++} else if (current_os == "freebsd") {
++  is_android = false
++  is_chromeos = false
++  is_ios = false
++  is_linux = false
++  is_bsd = true
++  is_mac = false
++  is_nacl = false
++  is_posix = true
++  is_win = false
++  is_freebsd = true
++  is_netbsd = false
++  is_openbsd = false
++} else if (current_os == "netbsd") {
++  is_android = false
++  is_chromeos = false
++  is_ios = false
++  is_linux = false
++  is_bsd = true
++  is_mac = false
++  is_nacl = false
++  is_posix = true
++  is_win = false
++  is_freebsd = false
++  is_netbsd = true
++  is_openbsd = false
++} else if (current_os == "openbsd") {
++  is_android = false
++  is_chromeos = false
++  is_ios = false
++  is_linux = false
++  is_bsd = true
++  is_mac = false
++  is_nacl = false
++  is_posix = true
++  is_win = false
++  is_freebsd = false
++  is_netbsd = false
++  is_openbsd = true
+ }
+-
+ # =============================================================================
+ # SOURCES FILTERS
+ # =============================================================================
+@@ -410,7 +456,7 @@ if (!is_ios) {
+ if (!is_mac && !is_ios) {
+   sources_assignment_filter += [ "*.mm" ]
+ }
+-if (!is_linux) {
++if (!is_linux && !is_bsd) {
+   sources_assignment_filter += [
+     "*_linux.h",
+     "*_linux.cc",
diff --git a/chromium-new/patches/patch-build_config_allocator.gni b/chromium-new/patches/patch-build_config_allocator.gni
new file mode 100644
index 0000000..19598dd
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_allocator.gni
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build/config/allocator.gni.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/allocator.gni
+@@ -44,7 +44,7 @@ assert(use_allocator == "none" || use_al
+ assert(!is_win || use_allocator == "none", "Tcmalloc doesn't work on Windows.")
+ 
+ assert(
+-    !use_experimental_allocator_shim || is_linux || is_android || is_win,
++    !use_experimental_allocator_shim || is_linux || is_android || is_win || is_bsd,
+     "use_experimental_allocator_shim supported only on Linux, Android and Windows targets")
+ 
+ if (is_win && use_experimental_allocator_shim) {
diff --git a/chromium-new/patches/patch-build_config_clang_BUILD.gn b/chromium-new/patches/patch-build_config_clang_BUILD.gn
new file mode 100644
index 0000000..15b332f
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_clang_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- build/config/clang/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/clang/BUILD.gn
+@@ -20,7 +20,7 @@ config("find_bad_constructs") {
+         rebase_path("${clang_base_path}/lib/libFindBadConstructs.dylib",
+                     root_build_dir),
+       ]
+-    } else if (is_linux || is_android) {
++    } else if (is_linux || is_bsd || is_android) {
+       cflags += [
+         "-Xclang",
+         "-load",
+@@ -49,7 +49,7 @@ config("find_bad_constructs") {
+       "enforce-in-pdf",
+     ]
+ 
+-    if ((is_linux || is_android) && !is_chromecast) {
++    if ((is_linux || is_bsd || is_android) && !is_chromecast) {
+       cflags += [
+         "-Xclang",
+         "-plugin-arg-find-bad-constructs",
diff --git a/chromium-new/patches/patch-build_config_compiler_BUILD.gn b/chromium-new/patches/patch-build_config_compiler_BUILD.gn
new file mode 100644
index 0000000..bb5ae17
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_compiler_BUILD.gn
@@ -0,0 +1,102 @@
+$NetBSD$
+
+--- build/config/compiler/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/compiler/BUILD.gn
+@@ -141,7 +141,7 @@ config("compiler") {
+     configs += [ "//build/config/win:compiler" ]
+   } else if (is_android) {
+     configs += [ "//build/config/android:compiler" ]
+-  } else if (is_linux) {
++  } else if (is_linux || is_bsd) {
+     configs += [ "//build/config/linux:compiler" ]
+   } else if (is_nacl) {
+     configs += [ "//build/config/nacl:compiler" ]
+@@ -271,7 +271,7 @@ config("compiler") {
+ 
+   # Linux/Android common flags setup.
+   # ---------------------------------
+-  if (is_linux || is_android) {
++  if (is_linux || is_bsd || is_android) {
+     cflags += [
+       "-fPIC",
+       "-pipe",  # Use pipes for communicating between sub-processes. Faster.
+@@ -376,14 +376,14 @@ config("compiler") {
+   # clang-cl (used if is_win) doesn't expose this flag.
+   # Currently disabled for nacl since its toolchain lacks this flag (too old).
+   # TODO(zforman): Once nacl's toolchain is updated, remove check.
+-  if (is_clang && is_linux) {
++  if (is_clang && (is_linux || is_bsd)) {
+     absolute_path = rebase_path("//.")
+     cflags += [ "-fdebug-prefix-map=$absolute_path=." ]
+   }
+ 
+   # C++11 compiler flags setup.
+   # ---------------------------
+-  if (is_linux || is_android || (is_nacl && is_clang)) {
++  if (is_linux || is_bsd || is_android || (is_nacl && is_clang)) {
+     # gnu++11 instead of c++11 is needed because some code uses typeof() (a
+     # GNU extension).
+     # TODO(thakis): Eventually switch this to c++11 instead,
+@@ -441,7 +441,7 @@ config("compiler") {
+     ldflags += [ "-flto" ]
+ 
+     # Apply a lower LTO optimization level as the default is too slow.
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       if (use_lld) {
+         ldflags += [ "-Wl,--lto-O1" ]
+       } else {
+@@ -460,7 +460,7 @@ config("compiler") {
+     # targeting ARM, without this flag, LTO produces a .text section that is
+     # larger than the maximum call displacement, preventing the linker from
+     # relocating calls (http://llvm.org/PR22999).
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       ldflags += [ "-Wl,-plugin-opt,-function-sections" ]
+     }
+ 
+@@ -738,7 +738,7 @@ config("compiler_codegen") {
+ #   configs -= [ "//build/config/compiler:clang_stackrealign" ]
+ # See https://crbug.com/556393 for details of where it must be avoided.
+ config("clang_stackrealign") {
+-  if (is_clang && current_cpu == "x86" && is_linux) {
++  if (is_clang && current_cpu == "x86" && (is_linux || is_bsd)) {
+     cflags = [
+       # Align the stack on 16-byte boundaries, http://crbug.com/418554.
+       "-mstack-alignment=16",
+@@ -773,7 +773,7 @@ config("runtime_library") {
+   # smaller.
+   if (is_win) {
+     configs += [ "//build/config/win:runtime_library" ]
+-  } else if (is_linux) {
++  } else if (is_linux || is_bsd) {
+     configs += [ "//build/config/linux:runtime_library" ]
+   } else if (is_ios) {
+     configs += [ "//build/config/ios:runtime_library" ]
+@@ -1032,7 +1032,7 @@ config("default_warnings") {
+         "-Wno-nonportable-include-path",
+ 
+         # TODO(hans): https://crbug.com/637306
+-        "-Wno-address-of-packed-member",
++        # "-Wno-address-of-packed-member",
+       ]
+     }
+   }
+@@ -1064,7 +1064,7 @@ config("chromium_code") {
+     ]
+ 
+     if (!is_debug && !using_sanitizer &&
+-        (!is_linux || !is_clang || is_official_build)) {
++        (!is_linux || !is_bsd || !is_clang || is_official_build)) {
+       # _FORTIFY_SOURCE isn't really supported by Clang now, see
+       # http://llvm.org/bugs/show_bug.cgi?id=16821.
+       # It seems to work fine with Ubuntu 12 headers though, so use it in
+@@ -1124,7 +1124,7 @@ config("no_chromium_code") {
+     ]
+   }
+ 
+-  if (is_linux || is_android) {
++  if (is_linux || is_bsd || is_android) {
+     cflags_cc += [
+       # Don't warn about hash_map in third-party code.
+       "-Wno-deprecated",
diff --git a/chromium-new/patches/patch-build_config_crypto.gni b/chromium-new/patches/patch-build_config_crypto.gni
new file mode 100644
index 0000000..8d21ffb
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_crypto.gni
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- build/config/crypto.gni.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/crypto.gni
+@@ -20,4 +20,4 @@ use_openssl_certs = is_android || is_nac
+ 
+ # True if NSS is used for certificate handling. It is possible to use OpenSSL
+ # for the crypto library, but NSS for the platform certificate library.
+-use_nss_certs = is_linux
++use_nss_certs = is_linux || is_bsd
diff --git a/chromium-new/patches/patch-build_config_features.gni b/chromium-new/patches/patch-build_config_features.gni
new file mode 100644
index 0000000..161378c
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_features.gni
@@ -0,0 +1,39 @@
+$NetBSD$
+
+--- build/config/features.gni.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/features.gni
+@@ -22,7 +22,7 @@ if (is_android) {
+ 
+ declare_args() {
+   # Multicast DNS.
+-  enable_mdns = is_win || is_linux
++  enable_mdns = is_win || is_linux || is_bsd
+ 
+   enable_extensions = !is_android && !is_ios
+   enable_plugins = (!is_android && !is_ios) || is_chromecast
+@@ -104,13 +104,13 @@ declare_args() {
+   # libudev usage. This currently only affects the content layer.
+   use_udev = is_linux && !is_chromecast
+ 
+-  use_dbus = is_linux && !is_chromecast
++  use_dbus = (is_linux || is_bsd) && !is_chromecast
+ 
+   # Option controlling the use of GConf (the classic GNOME configuration
+   # system).
+-  use_gconf = is_linux && !is_chromeos && !is_chromecast
++  use_gconf = (is_linux || is_bsd) && !is_chromeos && !is_chromecast
+ 
+-  use_gio = is_linux && !is_chromeos && !is_chromecast
++  use_gio = (is_linux || is_bsd) && !is_chromeos && !is_chromecast
+ 
+   # Enable basic printing support and UI.
+   enable_basic_printing = !is_chromecast && !is_ios
+@@ -142,7 +142,7 @@ use_minikin_hyphenation = is_android
+ 
+ # Enables the use of CDMs in pepper plugins.
+ enable_pepper_cdms =
+-    enable_plugins && (is_linux || is_mac || is_win) && !is_chromecast
++    enable_plugins && (is_linux || is_bsd || is_mac || is_win) && !is_chromecast
+ 
+ # The seccomp-bpf sandbox is only supported on five architectures
+ # currently.
diff --git a/chromium-new/patches/patch-build_config_linux_gtk2_BUILD.gn b/chromium-new/patches/patch-build_config_linux_gtk2_BUILD.gn
new file mode 100644
index 0000000..f28ff27
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_linux_gtk2_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build/config/linux/gtk2/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/linux/gtk2/BUILD.gn
+@@ -4,7 +4,7 @@
+ 
+ import("//build/config/linux/pkg_config.gni")
+ 
+-assert(is_linux, "This file should only be referenced on Linux")
++assert(is_linux || is_bsd, "This file should only be referenced on Linux")
+ 
+ # Depend on //build/config/linux/gtk2 to use GTKv2.
+ #
diff --git a/chromium-new/patches/patch-build_config_linux_gtk3_BUILD.gn b/chromium-new/patches/patch-build_config_linux_gtk3_BUILD.gn
new file mode 100644
index 0000000..6e071ec
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_linux_gtk3_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build/config/linux/gtk3/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/linux/gtk3/BUILD.gn
+@@ -4,7 +4,7 @@
+ 
+ import("//build/config/linux/pkg_config.gni")
+ 
+-assert(is_linux, "This file should only be referenced on Linux")
++assert(is_linux || is_bsd, "This file should only be referenced on Linux")
+ 
+ # Depend on //build/config/linux/gtk3 to use GTKv3.
+ #
diff --git a/chromium-new/patches/patch-build_config_linux_pkg-config.py b/chromium-new/patches/patch-build_config_linux_pkg-config.py
new file mode 100644
index 0000000..22d931d
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_linux_pkg-config.py
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- build/config/linux/pkg-config.py.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/linux/pkg-config.py
+@@ -57,8 +57,12 @@ def SetConfigPath(options):
+     print "You must specify an architecture via -a if using a sysroot."
+     sys.exit(1)
+ 
+-  libdir = sysroot + '/usr/' + options.system_libdir + '/pkgconfig'
+-  libdir += ':' + sysroot + '/usr/share/pkgconfig'
++  if "linux" in sys.platform:
++    libdir = sysroot + '/libdata/' + options.system_libdir + '/pkgconfig'
++    libdir += ':' + sysroot + '/usr/share/pkgconfig'
++  elif "bsd" in sys.platform:
++    libdir = sysroot + '/libdata/pkgconfig'
++    libdir += ':' + '/usr/libdata/pkgconfig'
+   os.environ['PKG_CONFIG_LIBDIR'] = libdir
+   return libdir
+ 
+@@ -107,7 +111,7 @@ def main():
+   # If this is run on non-Linux platforms, just return nothing and indicate
+   # success. This allows us to "kind of emulate" a Linux build from other
+   # platforms.
+-  if "linux" not in sys.platform:
++  if "bsd" not in sys.platform:
+     print "[[],[],[],[],[]]"
+     return 0
+ 
diff --git a/chromium-new/patches/patch-build_config_sanitizers_BUILD.gn b/chromium-new/patches/patch-build_config_sanitizers_BUILD.gn
new file mode 100644
index 0000000..48e65a8
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_sanitizers_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- build/config/sanitizers/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/sanitizers/BUILD.gn
+@@ -364,7 +364,7 @@ config("lsan_flags") {
+ 
+ config("msan_flags") {
+   if (is_msan) {
+-    assert(is_linux, "msan only supported on linux x86_64")
++    assert(is_linux || is_bsd, "msan only supported on linux x86_64")
+     msan_blacklist_path =
+         rebase_path("//tools/msan/blacklist.txt", root_build_dir)
+     cflags = [
+@@ -377,7 +377,7 @@ config("msan_flags") {
+ 
+ config("tsan_flags") {
+   if (is_tsan) {
+-    assert(is_linux, "tsan only supported on linux x86_64")
++    assert(is_linux || is_bsd, "tsan only supported on linux x86_64")
+     tsan_blacklist_path =
+         rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
+     cflags = [
diff --git a/chromium-new/patches/patch-build_config_sanitizers_sanitizers.gni b/chromium-new/patches/patch-build_config_sanitizers_sanitizers.gni
new file mode 100644
index 0000000..6043ed4
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_sanitizers_sanitizers.gni
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- build/config/sanitizers/sanitizers.gni.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/sanitizers/sanitizers.gni
+@@ -53,8 +53,8 @@ declare_args() {
+   # See http://clang.llvm.org/docs/ControlFlowIntegrity.html
+   #
+   # TODO(pcc): Remove this flag if/when CFI is enabled in all official builds.
+-  is_cfi = target_os == "linux" && !is_chromeos && target_cpu == "x64" &&
+-           is_chrome_branded && is_official_build
++  is_cfi = (target_os == "linux" || target_os == "bsd") && !is_chromeos &&
++           target_cpu == "x64" && is_chrome_branded && is_official_build
+ 
+   # Enable checks for bad casts: derived cast and unrelated cast.
+   # TODO(krasin): remove this, when we're ready to add these checks by default.
diff --git a/chromium-new/patches/patch-build_config_ui.gni b/chromium-new/patches/patch-build_config_ui.gni
new file mode 100644
index 0000000..5681df4
--- /dev/null
+++ b/chromium-new/patches/patch-build_config_ui.gni
@@ -0,0 +1,45 @@
+$NetBSD$
+
+--- build/config/ui.gni.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/config/ui.gni
+@@ -31,7 +31,7 @@ declare_args() {
+ 
+   # Indicates if Aura is enabled. Aura is a low-level windowing library, sort
+   # of a replacement for GDI or GTK.
+-  use_aura = is_win || is_linux
++  use_aura = is_win || is_linux || is_bsd
+ 
+   # True means the UI is built using the "views" framework.
+   toolkit_views =
+@@ -47,7 +47,7 @@ declare_args() {
+   use_xkbcommon = false
+ 
+   # Whether we should use glib, a low level C utility library.
+-  use_glib = is_linux
++  use_glib = is_linux || is_bsd
+ 
+   # Indicates if Wayland display server support is enabled.
+   enable_wayland_server = is_chromeos
+@@ -65,19 +65,19 @@ declare_args() {
+ 
+ # Use GPU accelerated cross process image transport by default on linux builds
+ # with the Aura window manager.
+-ui_compositor_image_transport = use_aura && is_linux
++ui_compositor_image_transport = use_aura && (is_linux || is_bsd)
+ 
+ use_default_render_theme = use_aura && !is_android
+ 
+ # Indicates if the UI toolkit depends on X11.
+-use_x11 = is_linux && !use_ozone
++use_x11 = (is_linux || is_bsd) && !use_ozone
+ 
+ # Turn off glib if Ozone is enabled.
+ if (use_ozone) {
+   use_glib = false
+ }
+ 
+-if (is_linux && !use_ozone) {
++if ((is_linux || is_bsd) && !use_ozone) {
+   use_cairo = true
+   use_pango = true
+ } else {
diff --git a/chromium-new/patches/patch-build_filename__rules.gypi b/chromium-new/patches/patch-build_filename__rules.gypi
deleted file mode 100644
index 1ddae5e..0000000
--- a/chromium-new/patches/patch-build_filename__rules.gypi
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- build/filename_rules.gypi.orig	2016-06-24 01:02:09.000000000 +0000
-+++ build/filename_rules.gypi
-@@ -29,7 +29,7 @@
-     # In case a file is not needed, it is going to be excluded later on.
-     # TODO(evan): the above is not correct; we shouldn't build _linux
-     # files on non-linux.
--    ['OS!="linux" and OS!="openbsd" and OS!="freebsd" or >(nacl_untrusted_build)==1', {
-+    ['OS!="linux" and OS!="openbsd" and OS!="freebsd" and OS!="netbsd" or >(nacl_untrusted_build)==1', {
-       'sources/': [
-         ['exclude', '_linux(_unittest|_test)?\\.(h|cc)$'],
-         ['exclude', '(^|/)linux/'],
-@@ -58,7 +58,7 @@
-         ['exclude', '_nacl(_unittest)?\\.(h|cc)$'],
-       ],
-     }],
--    ['OS!="linux" and OS!="openbsd" and OS!="freebsd" or >(nacl_untrusted_build)==1', {
-+    ['OS!="linux" and OS!="openbsd" and OS!="freebsd" and OS!="netbsd" or >(nacl_untrusted_build)==1', {
-       'sources/': [
-         ['exclude', '_xdg(_unittest)?\\.(h|cc)$'],
-       ],
-@@ -89,7 +89,7 @@
-                     ['exclude', '_ashwin\\.(h|cc)$']
-       ]
-     }],
--    ['<(use_aura)==0 or OS!="linux" or >(nacl_untrusted_build)==1', {
-+    ['<(use_aura)==0 or (OS!="linux" and OS!="openbsd" and OS!="freebsd" and OS!="netbsd") or >(nacl_untrusted_build)==1', {
-       'sources/': [ ['exclude', '_auralinux\\.(h|cc)$'] ]
-     }],
-     ['<(use_ozone)==0 or >(nacl_untrusted_build)==1', {
diff --git a/chromium-new/patches/patch-build_linux_libpci_BUILD.gn b/chromium-new/patches/patch-build_linux_libpci_BUILD.gn
new file mode 100644
index 0000000..df40716
--- /dev/null
+++ b/chromium-new/patches/patch-build_linux_libpci_BUILD.gn
@@ -0,0 +1,56 @@
+$NetBSD$
+
+--- build/linux/libpci/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/linux/libpci/BUILD.gn
+@@ -3,20 +3,36 @@
+ # found in the LICENSE file.
+ 
+ import("//tools/generate_library_loader/generate_library_loader.gni")
++import("//build/config/linux/pkg_config.gni")
+ 
+-# This generates a target named "libpci".
+-generate_library_loader("libpci") {
+-  name = "LibPciLoader"
+-  output_h = "libpci.h"
+-  output_cc = "libpci_loader.cc"
+-  header = "<pci/pci.h>"
+-
+-  functions = [
+-    "pci_alloc",
+-    "pci_init",
+-    "pci_cleanup",
+-    "pci_scan_bus",
+-    "pci_fill_info",
+-    "pci_lookup_name",
+-  ]
++declare_args() {
++  use_system_libpci = is_bsd
++}
++
++if (use_system_libpci) {
++  pkg_config("system_libpci") {
++    packages = [ "libpci" ]
++  }
++
++  source_set("libpci") {
++    public_configs = [ ":system_libpci" ]
++  }
++
++} else {
++  # This generates a target named "libpci".
++  generate_library_loader("libpci") {
++    name = "LibPciLoader"
++    output_h = "libpci.h"
++    output_cc = "libpci_loader.cc"
++    header = "<pci/pci.h>"
++
++    functions = [
++      "pci_alloc",
++      "pci_init",
++      "pci_cleanup",
++      "pci_scan_bus",
++      "pci_fill_info",
++      "pci_lookup_name",
++    ]
++  }
+ }
diff --git a/chromium-new/patches/patch-build_linux_system.gyp b/chromium-new/patches/patch-build_linux_system.gyp
deleted file mode 100644
index 62d6703..0000000
--- a/chromium-new/patches/patch-build_linux_system.gyp
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- build/linux/system.gyp.orig	2016-06-24 01:02:09.000000000 +0000
-+++ build/linux/system.gyp
-@@ -1051,6 +1051,13 @@
-       'include_dirs': [
-         '../..',
-       ],
-+      'conditions' : [
-+        ['OS=="freebsd" or OS=="netbsd"', {
-+          'include_dirs': [
-+            '<(prefix_dir)/include',
-+          ],
-+        }],
-+      ],
-       'hard_dependency': 1,
-       'actions': [
-         {
diff --git a/chromium-new/patches/patch-build_linux_unbundle_libwebp.gyp b/chromium-new/patches/patch-build_linux_unbundle_libwebp.gyp
deleted file mode 100644
index 74d8f6c..0000000
--- a/chromium-new/patches/patch-build_linux_unbundle_libwebp.gyp
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- build/linux/unbundle/libwebp.gyp.orig	2016-06-24 01:02:09.000000000 +0000
-+++ build/linux/unbundle/libwebp.gyp
-@@ -14,13 +14,7 @@
-       },
-       'link_settings': {
-         'libraries': [
--          # Check for presence of webpdemux library, use it if present.
--          '<!(python <(DEPTH)/tools/compile_test/compile_test.py '
--          '--code "int main() { return 0; }" '
--          '--run-linker '
--          '--on-success "-lwebp -lwebpdemux" '
--          '--on-failure "-lwebp" '
--          '-- -lwebpdemux)',
-+          '-lwebp -lwebpdemux',
-         ],
-       },
-     }
diff --git a/chromium-new/patches/patch-build_secondary_third__party_nss_BUILD.gn b/chromium-new/patches/patch-build_secondary_third__party_nss_BUILD.gn
new file mode 100644
index 0000000..b9b3b5b
--- /dev/null
+++ b/chromium-new/patches/patch-build_secondary_third__party_nss_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build/secondary/third_party/nss/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/secondary/third_party/nss/BUILD.gn
+@@ -4,7 +4,7 @@
+ 
+ import("//build/config/linux/pkg_config.gni")
+ 
+-if (is_linux) {
++if (is_linux || is_bsd) {
+   # This is a dependency on NSS with no libssl. On Linux we use a built-in SSL
+   # library but the system NSS libraries. Non-Linux platforms using NSS use the
+   # hermetic one in //third_party/nss.
diff --git a/chromium-new/patches/patch-build_toolchain_gcc__toolchain.gni b/chromium-new/patches/patch-build_toolchain_gcc__toolchain.gni
new file mode 100644
index 0000000..1723591
--- /dev/null
+++ b/chromium-new/patches/patch-build_toolchain_gcc__toolchain.gni
@@ -0,0 +1,50 @@
+$NetBSD$
+
+--- build/toolchain/gcc_toolchain.gni.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/toolchain/gcc_toolchain.gni
+@@ -10,6 +10,11 @@ import("//build/toolchain/cc_wrapper.gni
+ import("//build/toolchain/goma.gni")
+ import("//build/toolchain/toolchain.gni")
+ 
++declare_args() {
++  extra_cppflags = ""
++  extra_ldflags = ""
++}
++
+ # This template defines a toolchain for something that works like gcc
+ # (including clang).
+ #
+@@ -453,14 +458,25 @@ template("clang_toolchain") {
+   }
+ 
+   gcc_toolchain(target_name) {
+-    prefix = rebase_path("$clang_base_path/bin", root_build_dir)
+-    cc = "$prefix/clang"
+-    cxx = "$prefix/clang++"
+-    ld = cxx
+-
+-    readelf = "${toolprefix}readelf"
+-    ar = "${toolprefix}ar"
+-    nm = "${toolprefix}nm"
++    if (is_bsd) {
++      cc = "@PREFIX@/bin/clang"
++      #assert(cc != "", "CC env must me set with >= clang")
++      cxx = "@PREFIX@/bin/clang++"
++      #assert(cxx != "", "CXX env must me set with >= clang++")
++      ld = cxx
++      readelf = "readelf"
++      ar = "${toolprefix}llvm-ar"
++      nm = "${toolprefix}llvm-nm"
++    } else {
++      prefix = rebase_path("$clang_base_path/bin", root_build_dir)
++      cc = "$prefix/clang"
++      cxx = "$prefix/clang++"
++      ld = cxx
++
++      readelf = "${toolprefix}readelf"
++      ar = "${toolprefix}ar"
++      nm = "${toolprefix}nm"
++    }
+ 
+     forward_variables_from(invoker, [ "strip" ])
+ 
diff --git a/chromium-new/patches/patch-build_toolchain_get__concurrent__links.py b/chromium-new/patches/patch-build_toolchain_get__concurrent__links.py
new file mode 100644
index 0000000..60d4dfd
--- /dev/null
+++ b/chromium-new/patches/patch-build_toolchain_get__concurrent__links.py
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- build/toolchain/get_concurrent_links.py.orig	2016-11-10 20:02:09.000000000 +0000
++++ build/toolchain/get_concurrent_links.py
+@@ -45,6 +45,14 @@ def _GetTotalMemoryInBytes():
+       return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']))
+     except Exception:
+       return 0
++  elif sys.platform.startswith('freebsd'):
++    try:
++      avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.physmem']))
++      # With -fuse-lld it doesn't take a lot of ram, feel free to change that
++      # 1 * ... to needed amount
++      return max(1, avail_bytes / (1 * (2 ** 30)))  # total / 4GB
++    except Exception:
++      return 1
+   # TODO(scottmg): Implement this for other platforms.
+   return 0
+ 
diff --git a/chromium-new/patches/patch-cc_layers_scrollbar__layer__impl__base.cc b/chromium-new/patches/patch-cc_layers_scrollbar__layer__impl__base.cc
index c825417..ef687e2 100644
--- a/chromium-new/patches/patch-cc_layers_scrollbar__layer__impl__base.cc
+++ b/chromium-new/patches/patch-cc_layers_scrollbar__layer__impl__base.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- cc/layers/scrollbar_layer_impl_base.cc.orig	2016-06-24 01:02:09.000000000 +0000
+--- cc/layers/scrollbar_layer_impl_base.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ cc/layers/scrollbar_layer_impl_base.cc
-@@ -181,8 +181,8 @@ gfx::Rect ScrollbarLayerImplBase::Comput
+@@ -174,8 +174,8 @@ gfx::Rect ScrollbarLayerImplBase::Comput
    int thumb_offset = TrackStart();
    if (maximum > 0) {
      float ratio = clamped_current_pos / maximum;
diff --git a/chromium-new/patches/patch-cc_trees_property__tree.cc b/chromium-new/patches/patch-cc_trees_property__tree.cc
index 44a07ce..821bc0d 100644
--- a/chromium-new/patches/patch-cc_trees_property__tree.cc
+++ b/chromium-new/patches/patch-cc_trees_property__tree.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- cc/trees/property_tree.cc.orig	2016-06-24 01:02:09.000000000 +0000
+--- cc/trees/property_tree.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ cc/trees/property_tree.cc
-@@ -1488,13 +1488,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollO
+@@ -1300,13 +1300,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollO
  
    gfx::Size clip_layer_bounds = scroll_clip_layer_bounds(scroll_node->id);
  
diff --git a/chromium-new/patches/patch-chrome_BUILD.gn b/chromium-new/patches/patch-chrome_BUILD.gn
new file mode 100644
index 0000000..80c2fbd
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- chrome/BUILD.gn.orig	2016-11-10 20:02:09.000000000 +0000
++++ chrome/BUILD.gn
+@@ -122,7 +122,7 @@ if (!is_android && !is_mac) {
+     data = [
+       "$root_out_dir/resources.pak",
+     ]
+-    if (is_linux || is_win) {
++    if (is_linux || is_bsd || is_win) {
+       data += [
+         "$root_out_dir/chrome_100_percent.pak",
+         "$root_out_dir/locales/en-US.pak",
+@@ -199,7 +199,7 @@ if (!is_android && !is_mac) {
+       sources += [ "app/chrome_exe_main_aura.cc" ]
+     }
+ 
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       sources += [
+         "app/chrome_dll_resource.h",
+         "app/chrome_main.cc",
+@@ -1670,7 +1670,7 @@ if (is_android) {
+   }
+ }
+ 
+-if (is_linux) {
++if (is_linux || is_bsd) {
+   action("manpage") {
+     if (is_chrome_branded) {
+       name = "Google Chrome"
diff --git a/chromium-new/patches/patch-chrome_app_chrome__command__ids.h b/chromium-new/patches/patch-chrome_app_chrome__command__ids.h
new file mode 100644
index 0000000..086a3e3
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_app_chrome__command__ids.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/app/chrome_command_ids.h.orig	2016-11-10 20:02:09.000000000 +0000
++++ chrome/app/chrome_command_ids.h
+@@ -75,7 +75,7 @@
+ #define IDC_VISIT_DESKTOP_OF_LRU_USER_2 34049
+ #define IDC_VISIT_DESKTOP_OF_LRU_USER_3 34050
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #define IDC_USE_SYSTEM_TITLE_BAR        34051
+ #endif
+ 
diff --git a/chromium-new/patches/patch-chrome_app_chrome__main__delegate.cc b/chromium-new/patches/patch-chrome_app_chrome__main__delegate.cc
index d0d19d8..487a024 100644
--- a/chromium-new/patches/patch-chrome_app_chrome__main__delegate.cc
+++ b/chromium-new/patches/patch-chrome_app_chrome__main__delegate.cc
@@ -1,9 +1,9 @@
 $NetBSD$
 
---- chrome/app/chrome_main_delegate.cc.orig	2016-06-24 01:02:10.000000000 +0000
+--- chrome/app/chrome_main_delegate.cc.orig	2016-11-10 20:02:09.000000000 +0000
 +++ chrome/app/chrome_main_delegate.cc
-@@ -111,7 +111,7 @@
- #include "ui/base/x/x11_util.h"
+@@ -115,7 +115,7 @@
+ #include "ui/base/x/x11_util.h"  // nogncheck
  #endif
  
 -#if defined(OS_POSIX) && !defined(OS_MACOSX)
@@ -11,7 +11,7 @@ $NetBSD$
  #include "components/crash/content/app/breakpad_linux.h"
  #endif
  
-@@ -543,7 +543,7 @@ bool ChromeMainDelegate::BasicStartupCom
+@@ -553,7 +553,7 @@ bool ChromeMainDelegate::BasicStartupCom
        std::string format_str =
            command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
        if (format_str == "machine") {
@@ -20,7 +20,7 @@ $NetBSD$
        } else if (format_str == "log") {
          format = diagnostics::DiagnosticsWriter::LOG;
        } else {
-@@ -593,7 +593,7 @@ bool ChromeMainDelegate::BasicStartupCom
+@@ -603,7 +603,7 @@ bool ChromeMainDelegate::BasicStartupCom
        std::string format_str =
            command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
        if (format_str == "machine") {
@@ -29,7 +29,7 @@ $NetBSD$
        } else if (format_str == "human") {
          format = diagnostics::DiagnosticsWriter::HUMAN;
        } else {
-@@ -684,7 +684,7 @@ void ChromeMainDelegate::PreSandboxStart
+@@ -703,7 +703,7 @@ void ChromeMainDelegate::PreSandboxStart
    std::string process_type =
        command_line.GetSwitchValueASCII(switches::kProcessType);
  
@@ -38,7 +38,7 @@ $NetBSD$
    crash_reporter::SetCrashReporterClient(g_chrome_crash_client.Pointer());
  #endif
  
-@@ -805,7 +805,7 @@ void ChromeMainDelegate::PreSandboxStart
+@@ -836,7 +836,7 @@ void ChromeMainDelegate::PreSandboxStart
    chrome::InitializePDF();
  #endif
  
@@ -47,7 +47,7 @@ $NetBSD$
    // Zygote needs to call InitCrashReporter() in RunZygote().
    if (process_type != switches::kZygoteProcess) {
  #if defined(OS_ANDROID)
-@@ -823,7 +823,7 @@ void ChromeMainDelegate::PreSandboxStart
+@@ -854,7 +854,7 @@ void ChromeMainDelegate::PreSandboxStart
      breakpad::InitCrashReporter(process_type);
  #endif  // defined(OS_ANDROID)
    }
@@ -56,7 +56,7 @@ $NetBSD$
  
    // After all the platform Breakpads have been initialized, store the command
    // line for crash reporting.
-@@ -933,7 +933,7 @@ bool ChromeMainDelegate::DelaySandboxIni
+@@ -964,7 +964,7 @@ bool ChromeMainDelegate::DelaySandboxIni
  #endif
    return process_type == switches::kRelauncherProcess;
  }
diff --git a/chromium-new/patches/patch-chrome_app_chrome__main__delegate.h b/chromium-new/patches/patch-chrome_app_chrome__main__delegate.h
index 0255462..375a154 100644
--- a/chromium-new/patches/patch-chrome_app_chrome__main__delegate.h
+++ b/chromium-new/patches/patch-chrome_app_chrome__main__delegate.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/app/chrome_main_delegate.h.orig	2016-06-24 01:02:10.000000000 +0000
+--- chrome/app/chrome_main_delegate.h.orig	2016-11-10 20:02:09.000000000 +0000
 +++ chrome/app/chrome_main_delegate.h
-@@ -38,7 +38,7 @@ class ChromeMainDelegate : public conten
+@@ -39,7 +39,7 @@ class ChromeMainDelegate : public conten
        const std::string& process_type) override;
    bool ShouldSendMachPort(const std::string& process_type) override;
    bool DelaySandboxInitialization(const std::string& process_type) override;
diff --git a/chromium-new/patches/patch-chrome_app_chromium__strings.grd b/chromium-new/patches/patch-chrome_app_chromium__strings.grd
index e2c474b..21511ae 100644
--- a/chromium-new/patches/patch-chrome_app_chromium__strings.grd
+++ b/chromium-new/patches/patch-chrome_app_chromium__strings.grd
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/app/chromium_strings.grd.orig	2016-06-24 01:02:10.000000000 +0000
+--- chrome/app/chromium_strings.grd.orig	2016-11-10 20:02:09.000000000 +0000
 +++ chrome/app/chromium_strings.grd
-@@ -937,7 +937,7 @@ Signing in anyway will merge Chromium in
+@@ -938,7 +938,7 @@ Signing in anyway will merge Chromium in
        </message>
  
        <!-- ProcessSingleton -->
diff --git a/chromium-new/patches/patch-chrome_app_generated__resources.grd b/chromium-new/patches/patch-chrome_app_generated__resources.grd
index 360fc0d..ca3bbde 100644
--- a/chromium-new/patches/patch-chrome_app_generated__resources.grd
+++ b/chromium-new/patches/patch-chrome_app_generated__resources.grd
@@ -1,47 +1,40 @@
 $NetBSD$
 
-* These conditional does not seems to work properly
-
---- chrome/app/generated_resources.grd.orig	2016-06-24 01:02:11.000000000 +0000
+--- chrome/app/generated_resources.grd.orig	2016-11-10 20:02:09.000000000 +0000
 +++ chrome/app/generated_resources.grd
-@@ -3590,11 +3590,11 @@ Even if you have downloaded files from t
-           PWG Raster Convertor
-         </message>
-       </if>
--      <if expr="enable_service_discovery">
-+<!--      <if expr="enable_service_discovery"> -->
-         <message name="IDS_UTILITY_PROCESS_SERVICE_DISCOVERY_HANDLER_NAME" desc="The name of the utility process used for handling service discovery.">
-           Service Discovery Handler
-         </message>
--      </if>
-+<!--      </if> -->
- 
-       <!-- Theme preview info bar -->
-       <message name="IDS_THEME_INSTALL_INFOBAR_LABEL" desc="Text displayed on an infobar when a theme has been installed.">
-@@ -6595,7 +6595,7 @@ Keep your key file in a safe place. You 
+@@ -6841,7 +6841,7 @@ Keep your key file in a safe place. You 
        <message name="IDS_FLAGS_FORCE_UI_DIRECTION_RTL" desc="Name for the option to force right-to-left UI direction mode.">
            Right-to-left
        </message>
 -      <if expr="is_win or is_linux">
-+      <if expr="is_win or is_linux or is_posix">
++      <if expr="is_win or is_linux or is_bsd">
          <message name="IDS_FLAGS_ENABLE_INPUT_IME_API_NAME" desc="Name of the flag to enable che chrome.input.ime API.">
            Enable Input IME API
          </message>
-@@ -13546,7 +13546,7 @@ Please check your email at <ph name="ACC
+@@ -10140,7 +10140,7 @@ I don't think this site should be blocke
+       <message name="IDS_APPEARANCE_GROUP_NAME" desc="The title of the appearance group">
+         Appearance
        </message>
- 
-       <!-- Local Device Discovery display strings -->
--      <if expr="enable_service_discovery">
-+<!--      <if expr="enable_service_discovery"> -->
-         <message name="IDS_LOCAL_DISCOVERY_SERVICE_REGISTER" desc="Name for button to register device in the Cloud">
-           Register
+-      <if expr="not is_linux or chromeos">
++      <if expr="not is_linux or not is_bsd or chromeos">
+         <message name="IDS_THEMES_GROUP_NAME" desc="The title of the themes group">
+           Themes
          </message>
-@@ -13671,7 +13671,7 @@ Please check your email at <ph name="ACC
-         <message name="IDS_LOCAL_DISCOVERY_NOTIFICATIONS_DISABLE_BUTTON_LABEL" desc="Label for button disabling local device notifications">
-           Don't show this again
+@@ -10148,7 +10148,7 @@ I don't think this site should be blocke
+       <message name="IDS_THEMES_RESET_BUTTON" desc="The button to reset your theme">
+         Reset to default theme
+       </message>
+-      <if expr="is_linux and not chromeos">
++      <if expr="is_linux or is_bsd and not chromeos">
+         <message name="IDS_THEMES_GTK_BUTTON" desc="The button to choose GTK colors and icons as the current theme.">
+           Use GTK+ theme
+         </message>
+@@ -11435,7 +11435,7 @@ Tell us what happened exactly before you
+         Set as default
+       </message>
+ 
+-      <if expr="is_linux and not chromeos">
++      <if expr="is_linux or is_bsd and not chromeos">
+         <message name="IDS_SHOW_WINDOW_DECORATIONS_MENU" desc="The menu entry text in the tab strip context menu.  This toggles the system title bar and window borders (window decorations) on linux.">
+           Use system title bar and borders
          </message>
--      </if>
-+<!--      </if> -->
-       <!-- People search strings -->
-       <message name="IDS_PEOPLE_SEARCH_ACTION_EMAIL_TOOLTIP" desc="Tooltip text for sending an email to the person in the result">
-         Email this person
diff --git a/chromium-new/patches/patch-chrome_app_resources_locale__settings.grd b/chromium-new/patches/patch-chrome_app_resources_locale__settings.grd
index cbb25ec..f4d8e69 100644
--- a/chromium-new/patches/patch-chrome_app_resources_locale__settings.grd
+++ b/chromium-new/patches/patch-chrome_app_resources_locale__settings.grd
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/app/resources/locale_settings.grd.orig	2016-06-24 01:02:11.000000000 +0000
+--- chrome/app/resources/locale_settings.grd.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/app/resources/locale_settings.grd
 @@ -156,7 +156,7 @@
          55
diff --git a/chromium-new/patches/patch-chrome_browser_BUILD.gn b/chromium-new/patches/patch-chrome_browser_BUILD.gn
new file mode 100644
index 0000000..b82952b
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_BUILD.gn
@@ -0,0 +1,54 @@
+$NetBSD$
+
+--- chrome/browser/BUILD.gn.orig	2016-11-10 20:02:10.000000000 +0000
++++ chrome/browser/BUILD.gn
+@@ -536,7 +536,7 @@ split_static_library("browser") {
+     deps += [ "//device/udev_linux" ]
+   }
+ 
+-  if (is_linux && !is_chromeos) {
++  if ((is_linux || is_bsd) && !is_chromeos) {
+     deps += [ "//third_party/speech-dispatcher" ]
+   }
+ 
+@@ -727,6 +727,22 @@ split_static_library("browser") {
+     sources += rebase_path(gypi_values.chrome_browser_non_mobile_sources,
+                            ".",
+                            "//chrome")
++    if (is_bsd) {
++      sources -= [
++        "media_galleries/linux/mtp_device_delegate_impl_linux.cc",
++        "media_galleries/linux/mtp_device_delegate_impl_linux.h",
++        "media_galleries/linux/mtp_device_object_enumerator.cc",
++        "media_galleries/linux/mtp_device_object_enumerator.h",
++        "media_galleries/linux/mtp_device_task_helper.cc",
++        "media_galleries/linux/mtp_device_task_helper.h",
++        "media_galleries/linux/mtp_device_task_helper_map_service.cc",
++        "media_galleries/linux/mtp_device_task_helper_map_service.h",
++        "media_galleries/linux/mtp_read_file_worker.cc",
++        "media_galleries/linux/mtp_read_file_worker.h",
++        "media_galleries/linux/snapshot_file_details.cc",
++        "media_galleries/linux/snapshot_file_details.h",
++      ]
++    }
+   }
+ 
+   if (!is_chrome_branded) {
+@@ -854,7 +870,7 @@ split_static_library("browser") {
+     }
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     if (use_aura) {
+       deps += [ "//build/linux:fontconfig" ]
+       if (use_dbus) {
+@@ -867,7 +883,7 @@ split_static_library("browser") {
+     }
+   }
+ 
+-  if (is_linux || is_win) {
++  if (is_linux || is_bsd || is_win) {
+     sources += rebase_path(gypi_values.chrome_browser_non_mac_desktop_sources,
+                            ".",
+                            "//chrome")
diff --git a/chromium-new/patches/patch-chrome_browser_about__flags.cc b/chromium-new/patches/patch-chrome_browser_about__flags.cc
index e8395df..bdbd20c 100644
--- a/chromium-new/patches/patch-chrome_browser_about__flags.cc
+++ b/chromium-new/patches/patch-chrome_browser_about__flags.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/about_flags.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/about_flags.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/about_flags.cc
-@@ -651,7 +651,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -785,7 +785,7 @@ const FeatureEntry kFeatureEntries[] = {
       kOsLinux | kOsCrOS | kOsWin | kOsAndroid,
       ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSmoothScrolling,
                                 switches::kDisableSmoothScrolling)},
@@ -11,9 +11,9 @@ $NetBSD$
      {"overlay-scrollbars", IDS_FLAGS_OVERLAY_SCROLLBARS_NAME,
       IDS_FLAGS_OVERLAY_SCROLLBARS_DESCRIPTION,
       // Uses the system preference on Mac (a different implementation).
-@@ -1691,7 +1691,7 @@ const FeatureEntry kFeatureEntries[] = {
+@@ -1823,7 +1823,7 @@ const FeatureEntry kFeatureEntries[] = {
       IDS_FLAGS_ENABLE_MATERIAL_DESIGN_EXTENSIONS_DESCRIPTION, kOsDesktop,
-      SINGLE_VALUE_TYPE(switches::kEnableMaterialDesignExtensions)},
+      FEATURE_VALUE_TYPE(features::kMaterialDesignExtensions)},
  #endif
 -#if defined(OS_WIN) || defined(OS_LINUX)
 +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
diff --git a/chromium-new/patches/patch-chrome_browser_browser__process__impl.cc b/chromium-new/patches/patch-chrome_browser_browser__process__impl.cc
new file mode 100644
index 0000000..b49c4d5
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_browser__process__impl.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/browser_process_impl.cc.orig	2016-11-10 20:02:10.000000000 +0000
++++ chrome/browser/browser_process_impl.cc
+@@ -162,7 +162,7 @@
+ #include "chrome/browser/media/webrtc_log_uploader.h"
+ #endif
+ 
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/memory/tab_manager.h"
+ #endif
+ 
+@@ -778,7 +778,7 @@ gcm::GCMDriver* BrowserProcessImpl::gcm_
+ 
+ memory::TabManager* BrowserProcessImpl::GetTabManager() {
+   DCHECK(CalledOnValidThread());
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+   if (!tab_manager_.get())
+     tab_manager_.reset(new memory::TabManager());
+   return tab_manager_.get();
diff --git a/chromium-new/patches/patch-chrome_browser_browser__process__impl.h b/chromium-new/patches/patch-chrome_browser_browser__process__impl.h
new file mode 100644
index 0000000..800fc28
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_browser__process__impl.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/browser_process_impl.h.orig	2016-11-10 20:02:10.000000000 +0000
++++ chrome/browser/browser_process_impl.h
+@@ -336,7 +336,7 @@ class BrowserProcessImpl : public Browse
+ 
+   std::unique_ptr<ChromeDeviceClient> device_client_;
+ 
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+   // Any change to this #ifdef must be reflected as well in
+   // chrome/browser/memory/tab_manager_browsertest.cc
+   std::unique_ptr<memory::TabManager> tab_manager_;
diff --git a/chromium-new/patches/patch-chrome_browser_browser__resources.grd b/chromium-new/patches/patch-chrome_browser_browser__resources.grd
index adc328e..6a269a6 100644
--- a/chromium-new/patches/patch-chrome_browser_browser__resources.grd
+++ b/chromium-new/patches/patch-chrome_browser_browser__resources.grd
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/browser_resources.grd.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/browser_resources.grd.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/browser_resources.grd
-@@ -278,7 +278,7 @@
+@@ -335,7 +335,7 @@
          <include name="IDR_ABOUT_VOICESEARCH_JS" file="resources\about_voicesearch.js" type="BINDATA" />
          <include name="IDR_PLUGIN_DB_JSON" file="resources\plugin_metadata\plugins_chromeos.json" type="BINDATA" />
        </if>
diff --git a/chromium-new/patches/patch-chrome_browser_chrome__browser__main.cc b/chromium-new/patches/patch-chrome_browser_chrome__browser__main.cc
index 9dbc61c..2de76f1 100644
--- a/chromium-new/patches/patch-chrome_browser_chrome__browser__main.cc
+++ b/chromium-new/patches/patch-chrome_browser_chrome__browser__main.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/chrome_browser_main.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/chrome_browser_main.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/chrome_browser_main.cc
-@@ -173,7 +173,7 @@
+@@ -188,7 +188,7 @@
  #include "chrome/browser/feedback/feedback_profile_observer.h"
  #endif  // defined(OS_ANDROID)
  
@@ -11,7 +11,7 @@ $NetBSD$
  #include "chrome/browser/first_run/upgrade_util_linux.h"
  #endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
  
-@@ -1109,11 +1109,11 @@ int ChromeBrowserMainParts::PreCreateThr
+@@ -1325,11 +1325,11 @@ int ChromeBrowserMainParts::PreCreateThr
    }
  #endif  // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
  
diff --git a/chromium-new/patches/patch-chrome_browser_chrome__browser__main__linux.cc b/chromium-new/patches/patch-chrome_browser_chrome__browser__main__linux.cc
index e827f94..af23a49 100644
--- a/chromium-new/patches/patch-chrome_browser_chrome__browser__main__linux.cc
+++ b/chromium-new/patches/patch-chrome_browser_chrome__browser__main__linux.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/chrome_browser_main_linux.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/chrome_browser_main_linux.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/chrome_browser_main_linux.cc
-@@ -57,12 +57,14 @@ void ChromeBrowserMainPartsLinux::PrePro
+@@ -75,12 +75,14 @@ void ChromeBrowserMainPartsLinux::PrePro
  void ChromeBrowserMainPartsLinux::PostProfileInit() {
    ChromeBrowserMainPartsPosix::PostProfileInit();
  
@@ -18,7 +18,7 @@ $NetBSD$
    bluez::DBusThreadManagerLinux::Initialize();
    bluez::BluezDBusManager::Initialize(
        bluez::DBusThreadManagerLinux::Get()->GetSystemBus(), false);
-@@ -72,7 +74,7 @@ void ChromeBrowserMainPartsLinux::PostMa
+@@ -90,7 +92,7 @@ void ChromeBrowserMainPartsLinux::PostMa
  }
  
  void ChromeBrowserMainPartsLinux::PostDestroyThreads() {
diff --git a/chromium-new/patches/patch-chrome_browser_chrome__browser__main__posix.cc b/chromium-new/patches/patch-chrome_browser_chrome__browser__main__posix.cc
index f9ca550..ef51546 100644
--- a/chromium-new/patches/patch-chrome_browser_chrome__browser__main__posix.cc
+++ b/chromium-new/patches/patch-chrome_browser_chrome__browser__main__posix.cc
@@ -1,22 +1,20 @@
 $NetBSD$
 
---- chrome/browser/chrome_browser_main_posix.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/chrome_browser_main_posix.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/chrome_browser_main_posix.cc
-@@ -274,6 +274,13 @@ void ChromeBrowserMainPartsPosix::PostMa
+@@ -275,6 +275,11 @@ void ChromeBrowserMainPartsPosix::PostMa
      g_pipe_pid = getpid();
      g_shutdown_pipe_read_fd = pipefd[0];
      g_shutdown_pipe_write_fd = pipefd[1];
-+#if defined(OS_FREEBSD)
++#if defined(OS_FREEBSD) || defined(OS_NETBSD)
 +    // PTHREAD_STACK_MIN causes chromium to crash under FreeBSD,
 +    // we request the default pthread stack size by specifying 0 here.
 +    const size_t kShutdownDetectorThreadStackSize = 0;
-+#elif defined(__NetBSD__)
-+    const size_t kShutdownDetectorThreadStackSize = 0;
 +#else
  #if !defined(ADDRESS_SANITIZER) && !defined(KEEP_SHADOW_STACKS)
      const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
  #else
-@@ -282,6 +289,7 @@ void ChromeBrowserMainPartsPosix::PostMa
+@@ -283,6 +288,7 @@ void ChromeBrowserMainPartsPosix::PostMa
      // size to avoid hitting the guard page.
      const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
  #endif
diff --git a/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.cc b/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.cc
index 71e5523..755cccc 100644
--- a/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.cc
+++ b/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.cc
@@ -1,9 +1,9 @@
 $NetBSD$
 
---- chrome/browser/chrome_content_browser_client.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/chrome_content_browser_client.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/chrome_content_browser_client.cc
-@@ -196,7 +196,7 @@
- #include "chrome/browser/chromeos/system/input_device_settings.h"
+@@ -211,7 +211,7 @@
+ #include "chrome/browser/ui/browser_dialogs.h"
  #include "chromeos/chromeos_switches.h"
  #include "components/user_manager/user_manager.h"
 -#elif defined(OS_LINUX)
@@ -11,7 +11,7 @@ $NetBSD$
  #include "chrome/browser/chrome_browser_main_linux.h"
  #elif defined(OS_ANDROID)
  #include "chrome/browser/chrome_browser_main_android.h"
-@@ -209,7 +209,7 @@
+@@ -223,7 +223,7 @@
  #include "chrome/browser/chrome_browser_main_posix.h"
  #endif
  
@@ -20,7 +20,7 @@ $NetBSD$
  #include "base/debug/leak_annotations.h"
  #include "components/crash/content/app/breakpad_linux.h"
  #include "components/crash/content/browser/crash_handler_host_linux.h"
-@@ -231,7 +231,7 @@
+@@ -245,7 +245,7 @@
  #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
  #endif
  
@@ -29,7 +29,7 @@ $NetBSD$
  #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
  #endif
  
-@@ -508,7 +508,7 @@ bool CertMatchesFilter(const net::X509Ce
+@@ -534,7 +534,7 @@ bool CertMatchesFilter(const net::X509Ce
    return false;
  }
  
@@ -38,7 +38,7 @@ $NetBSD$
  breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost(
      const std::string& process_type) {
    base::FilePath dumps_path;
-@@ -779,7 +779,7 @@ content::BrowserMainParts* ChromeContent
+@@ -840,7 +840,7 @@ content::BrowserMainParts* ChromeContent
    main_parts = new ChromeBrowserMainPartsMac(parameters);
  #elif defined(OS_CHROMEOS)
    main_parts = new chromeos::ChromeBrowserMainPartsChromeos(parameters);
@@ -47,7 +47,7 @@ $NetBSD$
    main_parts = new ChromeBrowserMainPartsLinux(parameters);
  #elif defined(OS_ANDROID)
    main_parts = new ChromeBrowserMainPartsAndroid(parameters);
-@@ -795,7 +795,7 @@ content::BrowserMainParts* ChromeContent
+@@ -856,7 +856,7 @@ content::BrowserMainParts* ChromeContent
    // Construct additional browser parts. Stages are called in the order in
    // which they are added.
  #if defined(TOOLKIT_VIEWS)
@@ -56,7 +56,7 @@ $NetBSD$
    main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux());
  #else
    main_parts->AddParts(new ChromeBrowserMainExtraPartsViews());
-@@ -1407,7 +1407,7 @@ void ChromeContentBrowserClient::AppendE
+@@ -1451,7 +1451,7 @@ void ChromeContentBrowserClient::AppendE
      command_line->AppendSwitchASCII(switches::kMetricsClientID,
                                      client_info->client_id);
    }
@@ -64,8 +64,8 @@ $NetBSD$
 +#elif defined(OS_POSIX) && !defined(OS_BSD)
    if (breakpad::IsCrashReporterEnabled()) {
      std::string switch_value;
-     scoped_ptr<metrics::ClientInfo> client_info =
-@@ -2604,7 +2604,7 @@ void ChromeContentBrowserClient::GetAddi
+     std::unique_ptr<metrics::ClientInfo> client_info =
+@@ -2732,7 +2732,7 @@ void ChromeContentBrowserClient::GetAddi
    PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path);
    DCHECK(!app_data_path.empty());
  }
diff --git a/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.h b/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.h
index c9aba56..1971d8d 100644
--- a/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.h
+++ b/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/chrome_content_browser_client.h.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/chrome_content_browser_client.h.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/chrome_content_browser_client.h
-@@ -256,7 +256,7 @@ class ChromeContentBrowserClient : publi
+@@ -269,7 +269,7 @@ class ChromeContentBrowserClient : publi
        int child_process_id,
        content::FileDescriptorInfo* mappings,
        std::map<int, base::MemoryMappedFile::Region>* regions) override;
diff --git a/chromium-new/patches/patch-chrome_browser_defaults.cc b/chromium-new/patches/patch-chrome_browser_defaults.cc
index 0a93f46..c8ac583 100644
--- a/chromium-new/patches/patch-chrome_browser_defaults.cc
+++ b/chromium-new/patches/patch-chrome_browser_defaults.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/defaults.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/defaults.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/defaults.cc
 @@ -44,7 +44,7 @@ const bool kSyncAutoStarts = true;
  const bool kSyncAutoStarts = false;
diff --git a/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc b/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc
index d95e3d0..730c49f 100644
--- a/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc
+++ b/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/diagnostics/diagnostics_writer.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/diagnostics/diagnostics_writer.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/diagnostics/diagnostics_writer.cc
 @@ -263,7 +263,7 @@ bool DiagnosticsWriter::WriteResult(bool
        console_->SetColor(color);
diff --git a/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h b/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
index 6fe73a6..0a8bc42 100644
--- a/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
+++ b/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/diagnostics/diagnostics_writer.h.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/diagnostics/diagnostics_writer.h.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/diagnostics/diagnostics_writer.h
-@@ -18,7 +18,7 @@ class DiagnosticsWriter : public Diagnos
+@@ -19,7 +19,7 @@ class DiagnosticsWriter : public Diagnos
   public:
    // The type of formatting done by this writer.
    enum FormatType {
diff --git a/chromium-new/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/chromium-new/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
index c0e450d..59a2c42 100644
--- a/chromium-new/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
+++ b/chromium-new/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/download/chrome_download_manager_delegate.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/download/chrome_download_manager_delegate.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/download/chrome_download_manager_delegate.cc
-@@ -736,7 +736,7 @@ void ChromeDownloadManagerDelegate::OnDo
+@@ -774,7 +774,7 @@ void ChromeDownloadManagerDelegate::OnDo
          target_info->is_filetype_handled_safely)
        DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
  
@@ -11,7 +11,7 @@ $NetBSD$
      if (item->GetOriginalMimeType() == "application/x-x509-user-cert")
        DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
  #endif
-@@ -751,7 +751,7 @@ void ChromeDownloadManagerDelegate::OnDo
+@@ -789,7 +789,7 @@ void ChromeDownloadManagerDelegate::OnDo
  
  bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile(
      const base::FilePath& path) {
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__commands.cc b/chromium-new/patches/patch-chrome_browser_download_download__commands.cc
index d21327e..41ee116 100644
--- a/chromium-new/patches/patch-chrome_browser_download_download__commands.cc
+++ b/chromium-new/patches/patch-chrome_browser_download_download__commands.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/download/download_commands.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/download/download_commands.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/download/download_commands.cc
-@@ -211,7 +211,7 @@ bool DownloadCommands::IsCommandChecked(
+@@ -219,7 +219,7 @@ bool DownloadCommands::IsCommandChecked(
        return download_item_->GetOpenWhenComplete() ||
               download_crx_util::IsExtensionDownload(*download_item_);
      case ALWAYS_OPEN_TYPE:
@@ -11,7 +11,7 @@ $NetBSD$
        if (CanOpenPdfInSystemViewer()) {
          DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(
              download_item_->GetBrowserContext());
-@@ -254,7 +254,7 @@ void DownloadCommands::ExecuteCommand(Co
+@@ -263,7 +263,7 @@ void DownloadCommands::ExecuteCommand(Co
        bool is_checked = IsCommandChecked(ALWAYS_OPEN_TYPE);
        DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(
            download_item_->GetBrowserContext());
@@ -20,7 +20,7 @@ $NetBSD$
        if (CanOpenPdfInSystemViewer()) {
          prefs->SetShouldOpenPdfInSystemReader(!is_checked);
          DownloadItemModel(download_item_)
-@@ -352,7 +352,7 @@ Browser* DownloadCommands::GetBrowser() 
+@@ -375,7 +375,7 @@ Browser* DownloadCommands::GetBrowser() 
    return browser_displayer.browser();
  }
  
@@ -29,7 +29,7 @@ $NetBSD$
  bool DownloadCommands::IsDownloadPdf() const {
    base::FilePath path = download_item_->GetTargetFilePath();
    return path.MatchesExtension(FILE_PATH_LITERAL(".pdf"));
-@@ -369,7 +369,7 @@ bool DownloadCommands::CanOpenPdfInSyste
+@@ -392,7 +392,7 @@ bool DownloadCommands::CanOpenPdfInSyste
    return IsDownloadPdf() &&
           (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date
                                            : true);
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__commands.h b/chromium-new/patches/patch-chrome_browser_download_download__commands.h
index e57b5e0..b38d132 100644
--- a/chromium-new/patches/patch-chrome_browser_download_download__commands.h
+++ b/chromium-new/patches/patch-chrome_browser_download_download__commands.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/download/download_commands.h.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/download/download_commands.h.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/download/download_commands.h
-@@ -42,7 +42,8 @@ class DownloadCommands {
+@@ -43,7 +43,8 @@ class DownloadCommands {
    void ExecuteCommand(Command command);
  
  #if defined(OS_WIN) || defined(OS_LINUX) || \
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__prefs.cc b/chromium-new/patches/patch-chrome_browser_download_download__prefs.cc
index b1b6558..fb8540b 100644
--- a/chromium-new/patches/patch-chrome_browser_download_download__prefs.cc
+++ b/chromium-new/patches/patch-chrome_browser_download_download__prefs.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/download/download_prefs.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/download/download_prefs.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/download/download_prefs.cc
-@@ -55,7 +55,7 @@ namespace {
+@@ -56,7 +56,7 @@ namespace {
  // Consider downloads 'dangerous' if they go to the home directory on Linux and
  // to the desktop on any platform.
  bool DownloadPathIsDangerous(const base::FilePath& download_path) {
@@ -11,7 +11,7 @@ $NetBSD$
    base::FilePath home_dir = base::GetHomeDir();
    if (download_path == home_dir) {
      return true;
-@@ -135,7 +135,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr
+@@ -136,7 +136,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr
                   GetDefaultDownloadDirectoryForProfile()));
  #endif  // defined(OS_CHROMEOS)
  
@@ -20,7 +20,7 @@ $NetBSD$
    should_open_pdf_in_system_reader_ =
        prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader);
  #endif
-@@ -211,7 +211,7 @@ void DownloadPrefs::RegisterProfilePrefs
+@@ -213,7 +213,7 @@ void DownloadPrefs::RegisterProfilePrefs
                                   default_download_path);
    registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory,
                                   default_download_path);
@@ -29,7 +29,7 @@ $NetBSD$
    registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false);
  #endif
  }
-@@ -288,7 +288,7 @@ bool DownloadPrefs::IsDownloadPathManage
+@@ -290,7 +290,7 @@ bool DownloadPrefs::IsDownloadPathManage
  }
  
  bool DownloadPrefs::IsAutoOpenUsed() const {
@@ -38,7 +38,7 @@ $NetBSD$
    if (ShouldOpenPdfInSystemReader())
      return true;
  #endif
-@@ -302,7 +302,7 @@ bool DownloadPrefs::IsAutoOpenEnabledBas
+@@ -304,7 +304,7 @@ bool DownloadPrefs::IsAutoOpenEnabledBas
      return false;
    DCHECK(extension[0] == base::FilePath::kExtensionSeparator);
    extension.erase(0, 1);
@@ -47,7 +47,7 @@ $NetBSD$
    if (extension == FILE_PATH_LITERAL("pdf") && ShouldOpenPdfInSystemReader())
      return true;
  #endif
-@@ -335,7 +335,7 @@ void DownloadPrefs::DisableAutoOpenBased
+@@ -338,7 +338,7 @@ void DownloadPrefs::DisableAutoOpenBased
    SaveAutoOpenState();
  }
  
@@ -56,7 +56,7 @@ $NetBSD$
  void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) {
    if (should_open_pdf_in_system_reader_ == should_open)
      return;
-@@ -356,7 +356,7 @@ bool DownloadPrefs::ShouldOpenPdfInSyste
+@@ -359,7 +359,7 @@ bool DownloadPrefs::ShouldOpenPdfInSyste
  #endif
  
  void DownloadPrefs::ResetAutoOpen() {
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__prefs.h b/chromium-new/patches/patch-chrome_browser_download_download__prefs.h
index 1aeb1d8..cb5f0f8 100644
--- a/chromium-new/patches/patch-chrome_browser_download_download__prefs.h
+++ b/chromium-new/patches/patch-chrome_browser_download_download__prefs.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/download/download_prefs.h.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/download/download_prefs.h.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/download/download_prefs.h
 @@ -79,7 +79,7 @@ class DownloadPrefs {
    // Disables auto-open based on file extension.
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__query.cc b/chromium-new/patches/patch-chrome_browser_download_download__query.cc
index 04daadc..50f9fbf 100644
--- a/chromium-new/patches/patch-chrome_browser_download_download__query.cc
+++ b/chromium-new/patches/patch-chrome_browser_download_download__query.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/download/download_query.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/download/download_query.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/download/download_query.cc
 @@ -28,7 +28,11 @@
  #include "components/url_formatter/url_formatter.h"
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__shelf__context__menu.cc b/chromium-new/patches/patch-chrome_browser_download_download__shelf__context__menu.cc
index 53b6105..d74908c 100644
--- a/chromium-new/patches/patch-chrome_browser_download_download__shelf__context__menu.cc
+++ b/chromium-new/patches/patch-chrome_browser_download_download__shelf__context__menu.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/download/download_shelf_context_menu.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/download/download_shelf_context_menu.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/download/download_shelf_context_menu.cc
-@@ -142,7 +142,7 @@ base::string16 DownloadShelfContextMenu:
+@@ -127,7 +127,7 @@ base::string16 DownloadShelfContextMenu:
                     : IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS;
            break;
          }
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_BUILD.gn b/chromium-new/patches/patch-chrome_browser_extensions_BUILD.gn
new file mode 100644
index 0000000..d5c34b0
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_extensions_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- chrome/browser/extensions/BUILD.gn.orig	2016-11-10 20:02:10.000000000 +0000
++++ chrome/browser/extensions/BUILD.gn
+@@ -186,7 +186,7 @@ static_library("extensions") {
+     sources -= [ "global_shortcut_listener_ozone.cc" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//build/linux:fontconfig" ]
+ 
+     if (use_dbus) {
+@@ -252,6 +252,12 @@ static_library("extensions") {
+     defines += [ "ENABLE_HOTWORDING" ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "api/image_writer_private/removable_storage_provider_linux.cc",
++    ]
++  }
++
+   if (enable_service_discovery) {
+     sources += rebase_path(
+             gypi_values.chrome_browser_extensions_service_discovery_sources,
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc b/chromium-new/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc
index edf2086..10b3593 100644
--- a/chromium-new/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc
+++ b/chromium-new/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc
@@ -1,10 +1,10 @@
 $NetBSD$
 
---- chrome/browser/extensions/activity_log/activity_log.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/extensions/activity_log/activity_log.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/extensions/activity_log/activity_log.cc
-@@ -39,7 +39,11 @@
- #include "extensions/browser/extensions_browser_client.h"
+@@ -46,7 +46,11 @@
  #include "extensions/common/extension.h"
+ #include "extensions/common/extension_messages.h"
  #include "extensions/common/one_shot_event.h"
 +#if defined(OS_BSD)
 +#include <re2/re2.h>
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc b/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc
index 7674312..2acfed2 100644
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc
+++ b/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc
 @@ -166,10 +166,12 @@ ImageWriterPrivateListRemovableStorageDe
  }
  
  bool ImageWriterPrivateListRemovableStorageDevicesFunction::RunAsync() {
-+#if !defined(OS_FREEBSD)
++#if !defined(OS_BSD)
    RemovableStorageProvider::GetAllDevices(
      base::Bind(
        &ImageWriterPrivateListRemovableStorageDevicesFunction::OnDeviceListReady,
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc b/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
deleted file mode 100644
index 81541fd..0000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig	2016-06-24 01:02:12.000000000 +0000
-+++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc
-@@ -27,11 +27,13 @@ void RemovableStorageProvider::GetAllDev
-   scoped_refptr<StorageDeviceList> device_list(new StorageDeviceList);
- 
-   // We need to do some file i/o to get the device block size
-+#if !defined(OS_NETBSD)
-   content::BrowserThread::PostTaskAndReplyWithResult(
-       content::BrowserThread::FILE,
-       FROM_HERE,
-       base::Bind(PopulateDeviceList, device_list),
-       base::Bind(callback, device_list));
-+#endif
- }
- 
- void RemovableStorageProvider::SetDeviceListForTesting(
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.h b/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.h
deleted file mode 100644
index 3003de8..0000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.h
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.h.orig	2016-06-24 01:02:12.000000000 +0000
-+++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.h
-@@ -33,9 +33,11 @@ class RemovableStorageProvider {
-   // Clears the list of devices that is used during testing.
-   static void ClearDeviceListForTesting();
- 
-+#if !defined(OS_NETBSD)
-  private:
-   // Fills the provided empty device list with the available devices.
-   static bool PopulateDeviceList(scoped_refptr<StorageDeviceList> device_list);
-+#endif
- };
- 
- } // namespace extensions
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h b/chromium-new/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
index df7b854..8c7f565 100644
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
+++ b/chromium-new/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/extensions/api/input_ime/input_ime_api.h.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/extensions/api/input_ime/input_ime_api.h.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/extensions/api/input_ime/input_ime_api.h
 @@ -28,7 +28,7 @@
  
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc b/chromium-new/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc
index 99eeceb..6e870f3 100644
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc
+++ b/chromium-new/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/extensions/api/messaging/message_service.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/extensions/api/messaging/message_service.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/extensions/api/messaging/message_service.cc
-@@ -118,7 +118,7 @@ MessageService::PolicyPermission Message
+@@ -119,7 +119,7 @@ MessageService::PolicyPermission Message
  
  const char kReceivingEndDoesntExistError[] =
      "Could not establish connection. Receiving end does not exist.";
@@ -11,12 +11,12 @@ $NetBSD$
  const char kMissingPermissionError[] =
      "Access to native messaging requires nativeMessaging permission.";
  const char kProhibitedByPoliciesError[] =
-@@ -415,7 +415,7 @@ void MessageService::OpenChannelToNative
+@@ -416,7 +416,7 @@ void MessageService::OpenChannelToNative
    if (!source)
      return;
  
 -#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
 +#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
-   Profile* profile =
-       Profile::FromBrowserContext(source->GetProcess()->GetBrowserContext());
-   ExtensionService* extension_service =
+   content::WebContents* web_contents =
+       content::WebContents::FromRenderFrameHost(source);
+   ExtensionWebContentsObserver* extension_web_contents_observer =
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc b/chromium-new/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc
index 3d2e032..fed66a0 100644
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc
+++ b/chromium-new/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/extensions/api/music_manager_private/device_id_linux.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/extensions/api/music_manager_private/device_id_linux.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/extensions/api/music_manager_private/device_id_linux.cc
 @@ -4,6 +4,10 @@
  
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc b/chromium-new/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
index 08d7ad9..c696132 100644
--- a/chromium-new/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
+++ b/chromium-new/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/extensions/browser_context_keyed_service_factories.cc
-@@ -63,7 +63,7 @@
+@@ -62,7 +62,7 @@
  #include "chrome/browser/chromeos/extensions/media_player_api.h"
  #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
  #include "chrome/browser/extensions/api/log_private/log_private_api.h"
@@ -11,7 +11,7 @@ $NetBSD$
  #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
  #endif
  
-@@ -104,7 +104,7 @@ void EnsureBrowserContextKeyedServiceFac
+@@ -103,7 +103,7 @@ void EnsureBrowserContextKeyedServiceFac
  #if defined(OS_CHROMEOS)
    extensions::InputImeAPI::GetFactoryInstance();
    extensions::InputMethodAPI::GetFactoryInstance();
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_external__provider__impl.cc b/chromium-new/patches/patch-chrome_browser_extensions_external__provider__impl.cc
index 1026629..df44bdc 100644
--- a/chromium-new/patches/patch-chrome_browser_extensions_external__provider__impl.cc
+++ b/chromium-new/patches/patch-chrome_browser_extensions_external__provider__impl.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/extensions/external_provider_impl.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/extensions/external_provider_impl.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/extensions/external_provider_impl.cc
-@@ -646,7 +646,7 @@ void ExternalProviderImpl::CreateExterna
+@@ -647,7 +647,7 @@ void ExternalProviderImpl::CreateExterna
                                   Manifest::EXTERNAL_PREF_DOWNLOAD,
                                   oem_extension_creation_flags)));
    }
@@ -11,7 +11,7 @@ $NetBSD$
    if (!profile->IsLegacySupervised()) {
      provider_list->push_back(
          linked_ptr<ExternalProviderInterface>(
-@@ -688,7 +688,7 @@ void ExternalProviderImpl::CreateExterna
+@@ -689,7 +689,7 @@ void ExternalProviderImpl::CreateExterna
                  bundled_extension_creation_flags)));
  
      // Define a per-user source of external extensions.
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_window__open__apitest.cc b/chromium-new/patches/patch-chrome_browser_extensions_window__open__apitest.cc
deleted file mode 100644
index 45d1144..0000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_window__open__apitest.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/window_open_apitest.cc.orig	2016-06-24 01:02:12.000000000 +0000
-+++ chrome/browser/extensions/window_open_apitest.cc
-@@ -294,7 +294,7 @@ IN_PROC_BROWSER_TEST_F(WindowOpenPanelDi
-       << message_;
- }
- 
--#if defined(USE_ASH_PANELS) || defined(OS_LINUX)
-+#if defined(USE_ASH_PANELS) || defined(OS_LINUX) || defined(OS_FREEBSD)
- // On Ash, this currently fails because we're currently opening new panel
- // windows as popup windows instead.
- // We're also failing on Linux-aura due to the panel is not opened in the
diff --git a/chromium-new/patches/patch-chrome_browser_gpu_gl__string__manager.cc b/chromium-new/patches/patch-chrome_browser_gpu_gl__string__manager.cc
index 8a2a036..7f644d9 100644
--- a/chromium-new/patches/patch-chrome_browser_gpu_gl__string__manager.cc
+++ b/chromium-new/patches/patch-chrome_browser_gpu_gl__string__manager.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/gpu/gl_string_manager.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/gpu/gl_string_manager.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/gpu/gl_string_manager.cc
-@@ -28,7 +28,7 @@ GLStringManager::~GLStringManager() {
+@@ -33,7 +33,7 @@ GLStringManager::~GLStringManager() {
  
  void GLStringManager::Initialize() {
    // On MacOSX or Windows, preliminary GPUInfo is enough.
diff --git a/chromium-new/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc b/chromium-new/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc
index cbe2a1c..e2fd793 100644
--- a/chromium-new/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc
+++ b/chromium-new/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/gpu/gpu_feature_checker.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/gpu/gpu_feature_checker.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/gpu/gpu_feature_checker.cc
 @@ -34,7 +34,7 @@ void GPUFeatureChecker::CheckGPUFeatureA
    CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
diff --git a/chromium-new/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc b/chromium-new/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc
index 65d741f..9e06d8c 100644
--- a/chromium-new/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc
+++ b/chromium-new/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/interstitials/chrome_controller_client.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/interstitials/chrome_controller_client.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/interstitials/chrome_controller_client.cc
 @@ -55,7 +55,7 @@ void LaunchDateAndTimeSettingsOnFile() {
    chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(),
diff --git a/chromium-new/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc b/chromium-new/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
index 69ef2b7..0057dc1 100644
--- a/chromium-new/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
+++ b/chromium-new/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc
 @@ -37,10 +37,12 @@ void MTPDeviceMapService::RegisterMTPFil
      // Note that this initializes the delegate asynchronously, but since
      // the delegate will only be used from the IO thread, it is guaranteed
      // to be created before use of it expects it to be there.
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_BSD)
      CreateMTPDeviceAsyncDelegate(
          device_location, read_only,
          base::Bind(&MTPDeviceMapService::AddAsyncDelegate,
diff --git a/chromium-new/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc b/chromium-new/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
index 68ecb18..d96005f 100644
--- a/chromium-new/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
+++ b/chromium-new/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/media_galleries/media_file_system_registry.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/media_galleries/media_file_system_registry.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/media_galleries/media_file_system_registry.cc
 @@ -757,7 +757,10 @@ class MediaFileSystemRegistry::MediaFile
  // Constructor in 'private' section because depends on private class definition.
diff --git a/chromium-new/patches/patch-chrome_browser_media_webrtc__log__uploader.cc b/chromium-new/patches/patch-chrome_browser_media_webrtc__log__uploader.cc
index fecef2c..40011c5 100644
--- a/chromium-new/patches/patch-chrome_browser_media_webrtc__log__uploader.cc
+++ b/chromium-new/patches/patch-chrome_browser_media_webrtc__log__uploader.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/media/webrtc_log_uploader.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/media/webrtc_log_uploader.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/media/webrtc_log_uploader.cc
 @@ -344,6 +344,8 @@ void WebRtcLogUploader::SetupMultipart(
    const char product[] = "Chrome_Android";
diff --git a/chromium-new/patches/patch-chrome_browser_memory__details.cc b/chromium-new/patches/patch-chrome_browser_memory__details.cc
index e37acdd..991251d 100644
--- a/chromium-new/patches/patch-chrome_browser_memory__details.cc
+++ b/chromium-new/patches/patch-chrome_browser_memory__details.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/memory_details.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/memory_details.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/memory_details.cc
 @@ -32,7 +32,7 @@
  #include "content/public/common/content_constants.h"
diff --git a/chromium-new/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/chromium-new/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
index 2b3e6f2..5032003 100644
--- a/chromium-new/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
+++ b/chromium-new/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
 @@ -38,12 +38,14 @@
  
@@ -17,4 +17,4 @@ $NetBSD$
 +#endif
  
  #if defined(USE_OZONE) || defined(USE_X11)
- #include "ui/events/devices/device_data_manager.h"
+ #include "ui/events/devices/input_device_event_observer.h"
diff --git a/chromium-new/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc b/chromium-new/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc
index 9b405a7..ea732de 100644
--- a/chromium-new/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc
+++ b/chromium-new/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc
@@ -1,9 +1,9 @@
 $NetBSD$
 
---- chrome/browser/notifications/message_center_notification_manager.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/notifications/message_center_notification_manager.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/notifications/message_center_notification_manager.cc
-@@ -75,7 +75,7 @@ MessageCenterNotificationManager::Messag
-       new FullscreenNotificationBlocker(message_center)));
+@@ -67,7 +67,7 @@ MessageCenterNotificationManager::Messag
+       base::WrapUnique(new FullscreenNotificationBlocker(message_center)));
  
  #if defined(OS_WIN) || defined(OS_MACOSX) \
 -  || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
diff --git a/chromium-new/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc b/chromium-new/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
index e9c67cf..559bf7d 100644
--- a/chromium-new/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
+++ b/chromium-new/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/password_manager/chrome_password_manager_client.cc
-@@ -55,7 +55,11 @@
+@@ -56,7 +56,11 @@
  #include "content/public/browser/web_contents.h"
  #include "google_apis/gaia/gaia_urls.h"
  #include "net/base/url_util.h"
@@ -12,5 +12,5 @@ $NetBSD$
  #include "third_party/re2/src/re2/re2.h"
 +#endif
  
- #if defined(OS_MACOSX) || BUILDFLAG(ANDROID_JAVA_UI)
- #include "chrome/browser/password_manager/save_password_infobar_delegate.h"
+ #if BUILDFLAG(ANDROID_JAVA_UI)
+ #include "chrome/browser/android/tab_android.h"
diff --git a/chromium-new/patches/patch-chrome_browser_platform__util.h b/chromium-new/patches/patch-chrome_browser_platform__util.h
new file mode 100644
index 0000000..562ef8e
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_platform__util.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/platform_util.h.orig	2016-11-10 20:02:10.000000000 +0000
++++ chrome/browser/platform_util.h
+@@ -40,7 +40,7 @@ enum OpenOperationResult {
+ enum OpenItemType {
+   OPEN_FILE,
+   OPEN_FOLDER,
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   SHOW_ITEM_IN_FOLDER
+ #endif
+ };
diff --git a/chromium-new/patches/patch-chrome_browser_plugins_plugins__resource__service.cc b/chromium-new/patches/patch-chrome_browser_plugins_plugins__resource__service.cc
index bfcc78a..4e1ccda 100644
--- a/chromium-new/patches/patch-chrome_browser_plugins_plugins__resource__service.cc
+++ b/chromium-new/patches/patch-chrome_browser_plugins_plugins__resource__service.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/plugins/plugins_resource_service.cc.orig	2016-06-24 01:02:12.000000000 +0000
+--- chrome/browser/plugins/plugins_resource_service.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/plugins/plugins_resource_service.cc
 @@ -31,7 +31,7 @@ GURL GetPluginsServerURL() {
    std::string filename;
diff --git a/chromium-new/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc b/chromium-new/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc
index 56230ec..6d892c47 100644
--- a/chromium-new/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc
+++ b/chromium-new/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/policy/policy_prefs_browsertest.cc.orig	2016-06-24 01:02:13.000000000 +0000
+--- chrome/browser/policy/policy_prefs_browsertest.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/policy/policy_prefs_browsertest.cc
-@@ -174,6 +174,8 @@ class PolicyTestCase {
+@@ -175,6 +175,8 @@ class PolicyTestCase {
      const std::string os("chromeos");
  #elif defined(OS_LINUX)
      const std::string os("linux");
diff --git a/chromium-new/patches/patch-chrome_browser_process__singleton__posix.cc b/chromium-new/patches/patch-chrome_browser_process__singleton__posix.cc
index 668b5c5..58d904f 100644
--- a/chromium-new/patches/patch-chrome_browser_process__singleton__posix.cc
+++ b/chromium-new/patches/patch-chrome_browser_process__singleton__posix.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/process_singleton_posix.cc.orig	2016-06-24 01:02:13.000000000 +0000
+--- chrome/browser/process_singleton_posix.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/process_singleton_posix.cc
-@@ -87,11 +87,11 @@
+@@ -90,11 +90,11 @@
  #include "net/base/network_interfaces.h"
  #include "ui/base/l10n/l10n_util.h"
  
@@ -16,7 +16,7 @@ $NetBSD$
  #include "ui/views/linux_ui/linux_ui.h"
  #endif
  
-@@ -315,7 +315,7 @@ bool DisplayProfileInUseError(const base
+@@ -318,7 +318,7 @@ bool DisplayProfileInUseError(const base
    if (g_disable_prompt)
      return false;
  
diff --git a/chromium-new/patches/patch-chrome_browser_renderer__preferences__util.cc b/chromium-new/patches/patch-chrome_browser_renderer__preferences__util.cc
index 269a56c..18720de 100644
--- a/chromium-new/patches/patch-chrome_browser_renderer__preferences__util.cc
+++ b/chromium-new/patches/patch-chrome_browser_renderer__preferences__util.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/renderer_preferences_util.cc.orig	2016-06-24 01:02:13.000000000 +0000
+--- chrome/browser/renderer_preferences_util.cc.orig	2016-11-10 20:02:10.000000000 +0000
 +++ chrome/browser/renderer_preferences_util.cc
-@@ -15,7 +15,7 @@
+@@ -18,7 +18,7 @@
  #include "content/public/common/webrtc_ip_handling_policy.h"
  #include "third_party/skia/include/core/SkColor.h"
  
@@ -11,7 +11,7 @@ $NetBSD$
  #include "ui/gfx/font_render_params.h"
  #endif
  
-@@ -27,7 +27,7 @@
+@@ -26,7 +26,7 @@
  #include "ui/views/controls/textfield/textfield.h"
  #endif
  
@@ -20,7 +20,7 @@ $NetBSD$
  #include "chrome/browser/themes/theme_service.h"
  #include "chrome/browser/themes/theme_service_factory.h"
  #include "ui/views/linux_ui/linux_ui.h"
-@@ -95,7 +95,7 @@ void UpdateFromSystemSettings(content::R
+@@ -120,7 +120,7 @@ void UpdateFromSystemSettings(content::R
    prefs->caret_blink_interval = views::Textfield::GetCaretBlinkMs() / 1000.0;
  #endif
  
@@ -29,7 +29,7 @@ $NetBSD$
    views::LinuxUI* linux_ui = views::LinuxUI::instance();
    if (linux_ui) {
      if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) {
-@@ -117,7 +117,7 @@ void UpdateFromSystemSettings(content::R
+@@ -142,7 +142,7 @@ void UpdateFromSystemSettings(content::R
    }
  #endif
  
diff --git a/chromium-new/patches/patch-chrome_browser_resources_safe__browsing_BUILD.gn b/chromium-new/patches/patch-chrome_browser_resources_safe__browsing_BUILD.gn
new file mode 100644
index 0000000..7e11926
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_resources_safe__browsing_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/resources/safe_browsing/BUILD.gn.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/browser/resources/safe_browsing/BUILD.gn
+@@ -29,6 +29,8 @@ action("make_file_types_protobuf") {
+     target_arch = "mac"
+   } else if (is_linux) {
+     target_arch = "linux"
++  } else if (is_bsd) {
++    target_arch = "bsd"
+   } else {
+     # This will cause the script to fail.
+     target_arch = "unknown_target_arch"
diff --git a/chromium-new/patches/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py b/chromium-new/patches/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
new file mode 100644
index 0000000..4f39cfa
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- chrome/browser/resources/safe_browsing/gen_file_type_proto.py.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/browser/resources/safe_browsing/gen_file_type_proto.py
+@@ -41,6 +41,7 @@ def PlatformTypes():
+     "android": config_pb2.DownloadFileType.PLATFORM_ANDROID,
+     "chromeos": config_pb2.DownloadFileType.PLATFORM_CHROME_OS,
+     "linux": config_pb2.DownloadFileType.PLATFORM_LINUX,
++    "bsd": config_pb2.DownloadFileType.PLATFORM_LINUX,
+     "mac": config_pb2.DownloadFileType.PLATFORM_MAC,
+     "win": config_pb2.DownloadFileType.PLATFORM_WINDOWS,
+   }
+@@ -192,7 +193,7 @@ def main():
+                     'Outfile must have a %d for version and %s for platform.')
+   parser.add_option('-t', '--type',
+                     help='The platform type. One of android, chromeos, ' +
+-                    'linux, mac, win')
++                    'linux, bsd, mac, win')
+   parser.add_option('-i', '--infile',
+                     help='The ASCII DownloadFileType-proto file to read.')
+   parser.add_option('-d', '--outdir',
diff --git a/chromium-new/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc b/chromium-new/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
index e683736..7b64135 100644
--- a/chromium-new/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
+++ b/chromium-new/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/safe_browsing/incident_reporting/incident_handler_util.cc.orig	2016-06-24 01:02:13.000000000 +0000
+--- chrome/browser/safe_browsing/incident_reporting/incident_handler_util.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/safe_browsing/incident_reporting/incident_handler_util.cc
 @@ -8,7 +8,12 @@
  
diff --git a/chromium-new/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc b/chromium-new/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc
new file mode 100644
index 0000000..81a9800
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/safe_browsing/permission_reporter.cc.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/browser/safe_browsing/permission_reporter.cc
+@@ -190,7 +190,7 @@ bool PermissionReporter::BuildReport(con
+ #if defined(OS_ANDROID)
+   report.set_platform_type(PermissionReport::ANDROID_PLATFORM);
+ #elif defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_CHROMEOS) || \
+-    defined(OS_LINUX)
++    defined(OS_LINUX) || defined(OS_BSD)
+   report.set_platform_type(PermissionReport::DESKTOP_PLATFORM);
+ #else
+ #error Unsupported platform.
diff --git a/chromium-new/patches/patch-chrome_browser_search_local__files__ntp__source.cc b/chromium-new/patches/patch-chrome_browser_search_local__files__ntp__source.cc
index 9f9dde0..8a411be 100644
--- a/chromium-new/patches/patch-chrome_browser_search_local__files__ntp__source.cc
+++ b/chromium-new/patches/patch-chrome_browser_search_local__files__ntp__source.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/search/local_files_ntp_source.cc.orig	2016-06-24 01:02:13.000000000 +0000
+--- chrome/browser/search/local_files_ntp_source.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/search/local_files_ntp_source.cc
-@@ -19,8 +19,13 @@
+@@ -20,8 +20,13 @@
  #include "chrome/common/url_constants.h"
  #include "content/public/browser/browser_thread.h"
  #include "content/public/browser/url_data_source.h"
diff --git a/chromium-new/patches/patch-chrome_browser_sync_chrome__sync__client.cc b/chromium-new/patches/patch-chrome_browser_sync_chrome__sync__client.cc
index c090f9d..4e6645d 100644
--- a/chromium-new/patches/patch-chrome_browser_sync_chrome__sync__client.cc
+++ b/chromium-new/patches/patch-chrome_browser_sync_chrome__sync__client.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/sync/chrome_sync_client.cc.orig	2016-06-24 01:02:13.000000000 +0000
+--- chrome/browser/sync/chrome_sync_client.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/sync/chrome_sync_client.cc
-@@ -577,7 +577,7 @@ void ChromeSyncClient::RegisterDesktopDa
+@@ -573,7 +573,7 @@ void ChromeSyncClient::RegisterDesktopDa
    }
  #endif
  
diff --git a/chromium-new/patches/patch-chrome_browser_tracing_crash__service__uploader.cc b/chromium-new/patches/patch-chrome_browser_tracing_crash__service__uploader.cc
index 6b58401..cea9fb6 100644
--- a/chromium-new/patches/patch-chrome_browser_tracing_crash__service__uploader.cc
+++ b/chromium-new/patches/patch-chrome_browser_tracing_crash__service__uploader.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/tracing/crash_service_uploader.cc.orig	2016-06-24 01:02:13.000000000 +0000
+--- chrome/browser/tracing/crash_service_uploader.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/tracing/crash_service_uploader.cc
-@@ -150,6 +150,10 @@ void TraceCrashServiceUploader::DoUpload
+@@ -155,6 +155,10 @@ void TraceCrashServiceUploader::DoUpload
    const char product[] = "Chrome_Android";
  #elif defined(OS_CHROMEOS)
    const char product[] = "Chrome_ChromeOS";
diff --git a/chromium-new/patches/patch-chrome_browser_ui_BUILD.gn b/chromium-new/patches/patch-chrome_browser_ui_BUILD.gn
new file mode 100644
index 0000000..ec5fd1d
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_ui_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/BUILD.gn.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/browser/ui/BUILD.gn
+@@ -521,7 +521,7 @@ split_static_library("ui") {
+       "//ui/events:dom_keycode_converter",
+     ]
+   }
+-  if (is_linux) {  # Both desktop Linux and ChromeOS.
++  if (is_linux || is_bsd) {  # Both desktop Linux and ChromeOS.
+     sources += rebase_path(gypi_values.chrome_browser_ui_linux_sources,
+                            ".",
+                            "//chrome")
diff --git a/chromium-new/patches/patch-chrome_browser_ui_browser__command__controller.cc b/chromium-new/patches/patch-chrome_browser_ui_browser__command__controller.cc
index edafe4d..2457449 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_browser__command__controller.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_browser__command__controller.cc
@@ -1,17 +1,17 @@
 $NetBSD$
 
---- chrome/browser/ui/browser_command_controller.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/browser_command_controller.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/browser_command_controller.cc
-@@ -77,7 +77,7 @@
+@@ -76,7 +76,7 @@
  #include "chrome/browser/ui/browser_commands_chromeos.h"
  #endif
  
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
 +#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h"
+ #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
  #endif
  
-@@ -217,7 +217,7 @@ bool BrowserCommandController::IsReserve
+@@ -216,7 +216,7 @@ bool BrowserCommandController::IsReserve
    if (window()->IsFullscreen() && command_id == IDC_FULLSCREEN)
      return true;
  
@@ -20,7 +20,7 @@ $NetBSD$
    // If this key was registered by the user as a content editing hotkey, then
    // it is not reserved.
    ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
-@@ -410,7 +410,7 @@ void BrowserCommandController::ExecuteCo
+@@ -419,7 +419,7 @@ void BrowserCommandController::ExecuteCo
        break;
  #endif
  
@@ -29,7 +29,7 @@ $NetBSD$
      case IDC_USE_SYSTEM_TITLE_BAR: {
        PrefService* prefs = browser_->profile()->GetPrefs();
        prefs->SetBoolean(prefs::kUseCustomChromeFrame,
-@@ -806,7 +806,7 @@ void BrowserCommandController::InitComma
+@@ -812,7 +812,7 @@ void BrowserCommandController::InitComma
    command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true);
    command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true);
  #endif
diff --git a/chromium-new/patches/patch-chrome_browser_ui_browser__view__prefs.cc b/chromium-new/patches/patch-chrome_browser_ui_browser__view__prefs.cc
index 168056e..12c0672 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_browser__view__prefs.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_browser__view__prefs.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/ui/browser_view_prefs.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/browser_view_prefs.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/browser_view_prefs.cc
 @@ -10,7 +10,7 @@
  #include "components/prefs/pref_registry_simple.h"
@@ -11,12 +11,12 @@ $NetBSD$
  #include "ui/base/x/x11_util.h"
  #endif
  
-@@ -33,7 +33,7 @@ void RegisterBrowserViewLocalPrefs(PrefR
+@@ -32,7 +32,7 @@ void RegisterBrowserViewLocalPrefs(PrefR
+ 
  void RegisterBrowserViewProfilePrefs(
      user_prefs::PrefRegistrySyncable* registry) {
-   bool custom_frame_default = false;
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)  || defined(OS_BSD)
-   custom_frame_default = ui::GetCustomFramePrefDefault();
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame,
+                                 ui::GetCustomFramePrefDefault());
  #endif
- 
diff --git a/chromium-new/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc b/chromium-new/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
index 8db7b17..1136d86 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
 @@ -19,7 +19,7 @@
  
diff --git a/chromium-new/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc b/chromium-new/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
index 0310d8d..72576ef 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/ui/input_method/input_method_engine_base.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/input_method/input_method_engine_base.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/input_method/input_method_engine_base.cc
 @@ -37,7 +37,7 @@
  #elif defined(OS_WIN)
diff --git a/chromium-new/patches/patch-chrome_browser_ui_libgtk2ui_BUILD.gn b/chromium-new/patches/patch-chrome_browser_ui_libgtk2ui_BUILD.gn
new file mode 100644
index 0000000..85217b8
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_browser_ui_libgtk2ui_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/libgtk2ui/BUILD.gn.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/browser/ui/libgtk2ui/BUILD.gn
+@@ -2,7 +2,7 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+ 
+-assert(is_linux, "This file should only be referenced on Linux")
++assert(is_linux || is_bsd, "This file should only be referenced on Linux")
+ 
+ import("//build/config/features.gni")
+ import("//build/config/ui.gni")
diff --git a/chromium-new/patches/patch-chrome_browser_ui_panels_panel__manager.cc b/chromium-new/patches/patch-chrome_browser_ui_panels_panel__manager.cc
deleted file mode 100644
index beab1e3..0000000
--- a/chromium-new/patches/patch-chrome_browser_ui_panels_panel__manager.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/panels/panel_manager.cc.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/browser/ui/panels/panel_manager.cc
-@@ -143,7 +143,7 @@ bool PanelManager::ShouldUsePanels(const
- // static
- bool PanelManager::IsPanelStackingEnabled() {
-   // Stacked panel mode is not supported in linux-aura.
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_FREEBSD)
-   return false;
- #else
-   return true;
diff --git a/chromium-new/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/chromium-new/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
index 4d05201..60f4734 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/startup/startup_browser_creator.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/startup/startup_browser_creator.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/startup/startup_browser_creator.cc
-@@ -91,7 +91,7 @@
+@@ -90,7 +90,7 @@
  #include "components/user_manager/user_manager.h"
  #endif
  
diff --git a/chromium-new/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc b/chromium-new/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc
index cef3821..7c31dc8 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/toolbar/app_menu_model.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/toolbar/app_menu_model.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/toolbar/app_menu_model.cc
-@@ -711,7 +711,7 @@ bool AppMenuModel::IsCommandIdVisible(in
+@@ -704,7 +704,7 @@ bool AppMenuModel::IsCommandIdVisible(in
      case IDC_UPGRADE_DIALOG:
        return browser_defaults::kShowUpgradeMenuItem &&
            UpgradeDetector::GetInstance()->notify_upgrade();
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc b/chromium-new/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
index efbfbac..126b1eb 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc
 @@ -19,7 +19,7 @@
  #include "ui/gfx/image/image_skia.h"
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc b/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc
index 1d7160b..80c3e97 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/views/chrome_views_delegate.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/chrome_views_delegate.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/chrome_views_delegate.cc
-@@ -51,7 +51,7 @@
+@@ -56,7 +56,7 @@
  #include "ui/views/widget/native_widget_aura.h"
  #endif
  
@@ -11,7 +11,7 @@ $NetBSD$
  #include "ui/views/linux_ui/linux_ui.h"
  #endif
  
-@@ -294,7 +294,7 @@ HICON ChromeViewsDelegate::GetSmallWindo
+@@ -305,7 +305,7 @@ HICON ChromeViewsDelegate::GetSmallWindo
    return GetSmallAppIcon();
  }
  
@@ -20,7 +20,7 @@ $NetBSD$
  gfx::ImageSkia* ChromeViewsDelegate::GetDefaultWindowIcon() const {
    ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
    return rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_64);
-@@ -426,7 +426,7 @@ void ChromeViewsDelegate::OnBeforeWidget
+@@ -444,7 +444,7 @@ void ChromeViewsDelegate::OnBeforeWidget
  #endif
  }
  
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h b/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
index 7f5213c..f4ae47e 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/ui/views/chrome_views_delegate.h.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/chrome_views_delegate.h.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/chrome_views_delegate.h
 @@ -37,7 +37,7 @@ class ChromeViewsDelegate : public views
  #if defined(OS_WIN)
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_first__run__dialog.cc b/chromium-new/patches/patch-chrome_browser_ui_views_first__run__dialog.cc
index 72b6db0..f2ca41c 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_first__run__dialog.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_first__run__dialog.cc
@@ -1,22 +1,15 @@
 $NetBSD$
 
---- chrome/browser/ui/views/first_run_dialog.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/first_run_dialog.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/first_run_dialog.cc
-@@ -116,12 +116,16 @@ views::View* FirstRunDialog::CreateExtra
- bool FirstRunDialog::Accept() {
-   GetWidget()->Hide();
+@@ -35,8 +35,10 @@ using views::GridLayout;
+ namespace {
  
-+#if !defined(OS_BSD)
-   if (report_crashes_ && report_crashes_->checked()) {
-     if (GoogleUpdateSettings::SetCollectStatsConsent(true))
-       breakpad::InitCrashReporter(std::string());
--  } else {
-+  } else
-+#else
-+  {
-     GoogleUpdateSettings::SetCollectStatsConsent(false);
-   }
+ void InitCrashReporterIfEnabled(bool enabled) {
++#ifndef OS_BSD
+   if (enabled)
+     breakpad::InitCrashReporter(std::string());
 +#endif
+ }
  
-   if (make_default_ && make_default_->checked())
-     shell_integration::SetAsDefaultBrowser();
+ }  // namespace
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc b/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
index 767a8d0..d2145ee 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/views/frame/browser_frame.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/frame/browser_frame.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/frame/browser_frame.cc
-@@ -36,7 +36,7 @@
+@@ -38,7 +38,7 @@
  #include "ui/native_theme/native_theme_dark_aura.h"
  #endif
  
@@ -11,7 +11,7 @@ $NetBSD$
  #include "chrome/browser/ui/views/frame/browser_command_handler_linux.h"
  #endif
  
-@@ -88,7 +88,7 @@ void BrowserFrame::InitBrowserFrame() {
+@@ -104,7 +104,7 @@ void BrowserFrame::InitBrowserFrame() {
      non_client_view()->set_context_menu_controller(this);
    }
  
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__root__view.cc b/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__root__view.cc
deleted file mode 100644
index 812e1e5..0000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__root__view.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/frame/browser_root_view.cc.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/browser/ui/views/frame/browser_root_view.cc
-@@ -139,10 +139,10 @@ bool BrowserRootView::OnMouseWheel(const
- 
-       // Number of integer scroll events that have passed in each direction.
-       int whole_scroll_amount_x =
--          std::lround(static_cast<double>(scroll_remainder_x_) /
-+          lround(static_cast<double>(scroll_remainder_x_) /
-                       ui::MouseWheelEvent::kWheelDelta);
-       int whole_scroll_amount_y =
--          std::lround(static_cast<double>(scroll_remainder_y_) /
-+          lround(static_cast<double>(scroll_remainder_y_) /
-                       ui::MouseWheelEvent::kWheelDelta);
- 
-       // Adjust the remainder such that any whole scrolls we have taken action
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__view.cc b/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
index aab8508..73f1ed3 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
@@ -1,9 +1,9 @@
 $NetBSD$
 
---- chrome/browser/ui/views/frame/browser_view.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/frame/browser_view.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/frame/browser_view.cc
-@@ -187,7 +187,7 @@
- #include "content/public/common/mojo_shell_connection.h"
+@@ -180,7 +180,7 @@
+ #include "chrome/browser/ui/views/sync/one_click_signin_dialog_view.h"
  #endif
  
 -#if defined(OS_LINUX)
@@ -11,7 +11,7 @@ $NetBSD$
  #include "ui/native_theme/native_theme_dark_aura.h"
  #endif
  
-@@ -1977,7 +1977,7 @@ void BrowserView::OnThemeChanged() {
+@@ -1990,7 +1990,7 @@ void BrowserView::OnThemeChanged() {
  #if defined(OS_WIN)
      ui::NativeThemeDarkWin::instance()->NotifyObservers();
      ui::NativeThemeWin::instance()->NotifyObservers();
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc b/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
index 71ecf65..9c8aa19 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
-@@ -53,7 +53,7 @@
+@@ -38,7 +38,7 @@
  #include "ui/views/window/frame_background.h"
  #include "ui/views/window/window_shape.h"
  
@@ -11,7 +11,7 @@ $NetBSD$
  #include "ui/views/controls/menu/menu_runner.h"
  #endif
  
-@@ -309,7 +309,7 @@ void OpaqueBrowserFrameView::ButtonPress
+@@ -293,7 +293,7 @@ void OpaqueBrowserFrameView::ButtonPress
  void OpaqueBrowserFrameView::OnMenuButtonClicked(views::MenuButton* source,
                                                   const gfx::Point& point,
                                                   const ui::Event* event) {
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc b/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
index fb5a118..514c632 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
-@@ -20,7 +20,7 @@ namespace {
+@@ -21,7 +21,7 @@ namespace {
  
  const int kCaptionButtonHeight = 18;
  
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc b/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
index 9716a6d..65cfeac 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_specific.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_specific.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_specific.cc
 @@ -10,7 +10,7 @@ bool OpaqueBrowserFrameViewPlatformSpeci
    return false;
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc b/chromium-new/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
index 58890f8..6bfbf03 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/frame/system_menu_model_builder.cc
 @@ -85,7 +85,7 @@ void SystemMenuModelBuilder::BuildSystem
      model->AddSeparator(ui::NORMAL_SEPARATOR);
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc b/chromium-new/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc
index 7990fe8..3cb293d 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/browser/ui/views/message_center/message_center_frame_view.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/message_center/message_center_frame_view.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/message_center/message_center_frame_view.cc
 @@ -15,7 +15,7 @@
  namespace message_center {
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_panels_panel__frame__view.cc b/chromium-new/patches/patch-chrome_browser_ui_views_panels_panel__frame__view.cc
deleted file mode 100644
index 5fe2878..0000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_panels_panel__frame__view.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/panels/panel_frame_view.cc.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/browser/ui/views/panels/panel_frame_view.cc
-@@ -588,7 +588,7 @@ bool PanelFrameView::OnMousePressed(cons
- }
- 
- bool PanelFrameView::OnMouseDragged(const ui::MouseEvent& event) {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   // Converting the mouse location to screen coordinates returns an incorrect
-   // location while the panel is moving. See crbug.com/353393 for more details.
-   // TODO(pkotwicz): Fix conversion to screen coordinates
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc b/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
index 24ec4de..e6aa9b4 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/tabs/tab_drag_controller.cc
-@@ -269,7 +269,7 @@ void TabDragController::Init(
+@@ -281,7 +281,7 @@ void TabDragController::Init(
    //     synchronous on desktop Linux, so use that.
    // - Ash
    //     Releasing capture on Ash cancels gestures so avoid it.
@@ -11,7 +11,7 @@ $NetBSD$
    can_release_capture_ = false;
  #endif
    start_point_in_screen_ = gfx::Point(source_tab_offset, mouse_offset.y());
-@@ -627,7 +627,7 @@ TabDragController::DragBrowserToNewTabSt
+@@ -631,7 +631,7 @@ TabDragController::DragBrowserToNewTabSt
      // that to effect the position of any windows.
      SetWindowPositionManaged(browser_widget->GetNativeWindow(), false);
  
@@ -20,7 +20,7 @@ $NetBSD$
      // EndMoveLoop is going to snap the window back to its original location.
      // Hide it so users don't see this. Hiding a window in Linux aura causes
      // it to lose capture so skip it.
-@@ -1817,7 +1817,7 @@ TabDragController::Liveness TabDragContr
+@@ -1830,7 +1830,7 @@ TabDragController::Liveness TabDragContr
      if (dragged_window)
        exclude.insert(dragged_window);
    }
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc b/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc
index 15435a6..d9c1c15 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/views/tabs/tab_strip.cc.orig	2016-07-10 13:24:50.509360795 +0000
+--- chrome/browser/ui/views/tabs/tab_strip.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/views/tabs/tab_strip.cc
-@@ -331,7 +331,7 @@ NewTabButton::NewTabButton(TabStrip* tab
+@@ -323,7 +323,7 @@ NewTabButton::NewTabButton(TabStrip* tab
      : views::ImageButton(listener),
        tab_strip_(tab_strip),
        destroyed_(NULL) {
diff --git a/chromium-new/patches/patch-chrome_browser_ui_webui_about__ui.cc b/chromium-new/patches/patch-chrome_browser_ui_webui_about__ui.cc
index 9cb7846..14419e3 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_about__ui.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_webui_about__ui.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/webui/about_ui.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/webui/about_ui.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/webui/about_ui.cc
-@@ -73,7 +73,7 @@
+@@ -75,7 +75,7 @@
  #include "chrome/browser/ui/webui/theme_source.h"
  #endif
  
@@ -11,7 +11,7 @@ $NetBSD$
  #include "content/public/browser/zygote_host_linux.h"
  #include "content/public/common/sandbox_linux.h"
  #endif
-@@ -642,7 +642,7 @@ class AboutDnsHandler : public base::Ref
+@@ -644,7 +644,7 @@ class AboutDnsHandler : public base::Ref
    DISALLOW_COPY_AND_ASSIGN(AboutDnsHandler);
  };
  
@@ -20,7 +20,7 @@ $NetBSD$
  std::string AboutLinuxProxyConfig() {
    std::string data;
    AppendHeader(&data, 0,
-@@ -658,6 +658,7 @@ std::string AboutLinuxProxyConfig() {
+@@ -660,6 +660,7 @@ std::string AboutLinuxProxyConfig() {
    return data;
  }
  
@@ -28,15 +28,31 @@ $NetBSD$
  void AboutSandboxRow(std::string* data, int name_id, bool good) {
    data->append("<tr><td>");
    data->append(l10n_util::GetStringUTF8(name_id));
-@@ -759,6 +760,7 @@ void AboutUIHTMLSource::StartDataRequest
-     else if (path == kKeyboardUtilsPath)
-       idr = IDR_KEYBOARD_UTILS_JS;
- #endif
+@@ -674,6 +675,7 @@ void AboutSandboxRow(std::string* data, 
+   }
+   data->append("</td></tr>");
+ }
 +#endif
  
-     response = ResourceBundle::GetSharedInstance().GetRawDataResource(
-         idr).as_string();
-@@ -769,7 +771,7 @@ void AboutUIHTMLSource::StartDataRequest
+ std::string AboutSandbox() {
+   std::string data;
+@@ -683,6 +685,7 @@ std::string AboutSandbox() {
+   data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_TITLE));
+   data.append("</h1>");
+ 
++#if !defined(OS_BSD)
+   // Get expected sandboxing status of renderers.
+   const int status =
+       content::ZygoteHost::GetInstance()->GetRendererSandboxStatus();
+@@ -723,6 +726,7 @@ std::string AboutSandbox() {
+     data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_BAD));
+   }
+   data.append("</p>");
++#endif
+ 
+   AppendFooter(&data);
+   return data;
+@@ -788,7 +792,7 @@ void AboutUIHTMLSource::StartDataRequest
    } else if (source_name_ == chrome::kChromeUIDNSHost) {
      AboutDnsHandler::Start(profile(), callback);
      return;
@@ -45,12 +61,12 @@ $NetBSD$
    } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) {
      response = AboutLinuxProxyConfig();
  #endif
-@@ -778,7 +780,7 @@ void AboutUIHTMLSource::StartDataRequest
+@@ -797,7 +801,7 @@ void AboutUIHTMLSource::StartDataRequest
      ChromeOSCreditsHandler::Start(path, callback);
      return;
  #endif
 -#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
    } else if (source_name_ == chrome::kChromeUISandboxHost) {
      response = AboutSandbox();
  #endif
diff --git a/chromium-new/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/chromium-new/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
index 7592531..0e72aeb 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
-@@ -269,7 +269,7 @@ bool IsAboutUI(const GURL& url) {
+@@ -287,7 +287,7 @@ bool IsAboutUI(const GURL& url) {
  #if !defined(OS_ANDROID)
            || url.host() == chrome::kChromeUITermsHost
  #endif
diff --git a/chromium-new/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc b/chromium-new/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
index 9dc4ce1..1de927c 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/webui/extensions/extension_loader_handler.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/webui/extensions/extension_loader_handler.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/webui/extensions/extension_loader_handler.cc
-@@ -25,7 +25,11 @@
+@@ -27,7 +27,11 @@
  #include "extensions/common/constants.h"
  #include "extensions/common/extension.h"
  #include "extensions/common/manifest_constants.h"
diff --git a/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc b/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc
index 65a70a9..d3f103a 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc
+++ b/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/webui/options/browser_options_handler.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/webui/options/browser_options_handler.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/webui/options/browser_options_handler.cc
-@@ -507,13 +507,13 @@ void BrowserOptionsHandler::GetLocalized
+@@ -540,13 +540,13 @@ void BrowserOptionsHandler::GetLocalized
      { "syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL },
  #endif  // defined(OS_CHROMEOS)
  
@@ -18,7 +18,7 @@ $NetBSD$
  
  #if defined(OS_CHROMEOS) && defined(USE_ASH)
      { "setWallpaper", IDS_SET_WALLPAPER_BUTTON },
-@@ -754,7 +754,7 @@ void BrowserOptionsHandler::RegisterMess
+@@ -797,7 +797,7 @@ void BrowserOptionsHandler::RegisterMess
        "requestProfilesInfo",
        base::Bind(&BrowserOptionsHandler::HandleRequestProfilesInfo,
                   base::Unretained(this)));
@@ -27,7 +27,7 @@ $NetBSD$
    web_ui()->RegisterMessageCallback(
        "themesSetNative",
        base::Bind(&BrowserOptionsHandler::ThemesSetNative,
-@@ -1391,7 +1391,7 @@ void BrowserOptionsHandler::ObserveTheme
+@@ -1443,7 +1443,7 @@ void BrowserOptionsHandler::ObserveTheme
    ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile);
    bool is_system_theme = false;
  
@@ -36,7 +36,7 @@ $NetBSD$
    bool profile_is_supervised = profile->IsSupervised();
    is_system_theme = theme_service->UsingSystemTheme();
    base::FundamentalValue native_theme_enabled(!is_system_theme &&
-@@ -1413,7 +1413,7 @@ void BrowserOptionsHandler::ThemesReset(
+@@ -1465,7 +1465,7 @@ void BrowserOptionsHandler::ThemesReset(
    ThemeServiceFactory::GetForProfile(profile)->UseDefaultTheme();
  }
  
diff --git a/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h b/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h
index ac61312..07a9895 100644
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h
+++ b/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/ui/webui/options/browser_options_handler.h.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/ui/webui/options/browser_options_handler.h.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/ui/webui/options/browser_options_handler.h
-@@ -203,7 +203,7 @@ class BrowserOptionsHandler
+@@ -206,7 +206,7 @@ class BrowserOptionsHandler
  
    void ObserveThemeChanged();
    void ThemesReset(const base::ListValue* args);
diff --git a/chromium-new/patches/patch-chrome_browser_web__applications_web__app.cc b/chromium-new/patches/patch-chrome_browser_web__applications_web__app.cc
index cbc1a01..a90ca9b 100644
--- a/chromium-new/patches/patch-chrome_browser_web__applications_web__app.cc
+++ b/chromium-new/patches/patch-chrome_browser_web__applications_web__app.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/web_applications/web_app.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/web_applications/web_app.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/web_applications/web_app.cc
-@@ -514,7 +514,7 @@ void GetIconsInfo(const WebApplicationIn
+@@ -507,7 +507,7 @@ void GetIconsInfo(const WebApplicationIn
  }
  #endif
  
diff --git a/chromium-new/patches/patch-chrome_browser_web__applications_web__app.h b/chromium-new/patches/patch-chrome_browser_web__applications_web__app.h
index 7fcb2e4..74c0bad 100644
--- a/chromium-new/patches/patch-chrome_browser_web__applications_web__app.h
+++ b/chromium-new/patches/patch-chrome_browser_web__applications_web__app.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/browser/web_applications/web_app.h.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/browser/web_applications/web_app.h.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/browser/web_applications/web_app.h
-@@ -227,7 +227,7 @@ typedef std::vector<WebApplicationInfo::
+@@ -224,7 +224,7 @@ typedef std::vector<WebApplicationInfo::
  void GetIconsInfo(const WebApplicationInfo& app_info, IconInfoList* icons);
  #endif
  
diff --git a/chromium-new/patches/patch-chrome_chrome__browser.gypi b/chromium-new/patches/patch-chrome_chrome__browser.gypi
deleted file mode 100644
index ac4299f..0000000
--- a/chromium-new/patches/patch-chrome_chrome__browser.gypi
+++ /dev/null
@@ -1,53 +0,0 @@
-$NetBSD$
-
---- chrome/chrome_browser.gypi.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/chrome_browser.gypi
-@@ -3590,7 +3590,7 @@
-             '../device/media_transfer_protocol/media_transfer_protocol.gyp:device_media_transfer_protocol',
-           ],
-         }],
--        ['OS=="linux" and chromeos==0', {
-+        ['(OS=="linux" and chromeos==0) or os_bsd==1', {
-           'dependencies': [
-             '../build/linux/system.gyp:libspeechd',
-           ],
-@@ -3654,7 +3654,7 @@
-         ['use_x11==1', {
-           'sources': [ '<@(chrome_browser_x11_sources)' ],
-         }],
--        ['os_posix == 1 and OS != "mac" and OS != "ios"', {
-+        ['os_posix == 1 and OS != "mac" and OS != "ios" and os_bsd != 1', {
-           'sources': [
-             'app/chrome_crash_reporter_client.cc',
-             'app/chrome_crash_reporter_client.h',
-@@ -3786,6 +3786,12 @@
-             }],
-           ],
-         }],
-+        ['os_bsd==1', {
-+          'sources/': [
-+            ['exclude', '^browser/media_galleries/linux/'],
-+            ['exclude', '^browser/memory/system_memory_stats_recorder_linux.cc'],
-+          ],
-+        }],
-         ['OS=="mac"', {
-           'dependencies': [
-             '../third_party/google_toolbox_for_mac/google_toolbox_for_mac.gyp:google_toolbox_for_mac',
-@@ -3902,7 +3908,7 @@
-             }],
-           ],
-         }],
--        ['OS=="linux"', {
-+        ['OS=="linux" or os_bsd==1', {
-           'conditions': [
-             ['use_aura==1', {
-               'dependencies': [
-@@ -3921,7 +3927,7 @@
-             }],
-           ],
-         }],
--        ['OS=="linux" or OS=="win"', {
-+        ['OS=="linux" or OS=="win" or os_bsd==1', {
-             'sources': [ '<@(chrome_browser_non_mac_desktop_sources)' ],
-         }],
-         ['desktop_linux==1', {
diff --git a/chromium-new/patches/patch-chrome_chrome__browser__extensions.gypi b/chromium-new/patches/patch-chrome_chrome__browser__extensions.gypi
deleted file mode 100644
index 508b6e3..0000000
--- a/chromium-new/patches/patch-chrome_chrome__browser__extensions.gypi
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
---- chrome/chrome_browser_extensions.gypi.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/chrome_browser_extensions.gypi
-@@ -1019,6 +1019,11 @@
-             '<@(chrome_browser_extensions_task_manager_enabled_sources)',
-           ],
-         }],
-+        ['os_bsd==1', {
-+          'sources/': [
-+            ['exclude', '^browser/extensions/api/image_writer_private/removable_storage_provider_linux.cc'],
-+          ],
-+        }],
-         ['chromeos==1', {
-           'dependencies': [
-             '../build/linux/system.gyp:dbus',
-@@ -1061,7 +1066,7 @@
-             '../ui/views/views.gyp:views',
-           ],
-         }],
--        ['OS=="linux"', {
-+        ['OS=="linux" or os_bsd==1', {
-           'conditions': [
-             ['use_aura==1', {
-               'dependencies': [
diff --git a/chromium-new/patches/patch-chrome_chrome__browser__ui.gypi b/chromium-new/patches/patch-chrome_chrome__browser__ui.gypi
deleted file mode 100644
index ae80153..0000000
--- a/chromium-new/patches/patch-chrome_chrome__browser__ui.gypi
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/chrome_browser_ui.gypi.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/chrome_browser_ui.gypi
-@@ -3097,7 +3097,7 @@
-             }],
-           ],
-         }],
--        ['use_aura==1 and chromeos==0 and use_ozone==0 and OS=="linux"', {
-+        ['use_aura==1 and chromeos==0 and use_ozone==0 and (OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd")', {
-           'dependencies': [
-             # gtk2 is the only component that can interact with gtk2 in our new
-             # world.
-@@ -3282,7 +3282,7 @@
-           ],
-           'sources': [ '<@(chrome_browser_ui_desktop_linux_sources)' ],
-         }],
--        ['OS=="linux"', {  # Both desktop Linux and ChromeOS.
-+        ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {  # Both desktop Linux and ChromeOS.
-           'sources': [ '<@(chrome_browser_ui_linux_sources)' ],
-           'conditions': [
-             ['use_aura==1', {
diff --git a/chromium-new/patches/patch-chrome_chrome__common.gypi b/chromium-new/patches/patch-chrome_chrome__common.gypi
deleted file mode 100644
index ecc0a0a..0000000
--- a/chromium-new/patches/patch-chrome_chrome__common.gypi
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- chrome/chrome_common.gypi.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/chrome_common.gypi
-@@ -32,8 +32,8 @@
-       'common/common_param_traits.cc',
-       'common/common_param_traits.h',
-       'common/common_param_traits_macros.h',
--      'common/component_flash_hint_file_linux.cc',
--      'common/component_flash_hint_file_linux.h',
-+#      'common/component_flash_hint_file_linux.cc',
-+#      'common/component_flash_hint_file_linux.h',
-       'common/content_restriction.h',
-       'common/content_settings_pattern_serializer.cc',
-       'common/content_settings_pattern_serializer.h',
-@@ -382,7 +382,7 @@
-             ['chromeos==1', {
-               'sources': [ '<@(chrome_common_extensions_chromeos_sources)' ],
-             }],
--            ['OS=="win" or OS=="linux"', {
-+            ['OS=="win" or OS=="linux" or os_bsd==1', {
-               'sources': [
-                 'common/extensions/api/input_ime/input_components_handler.cc',
-                 'common/extensions/api/input_ime/input_components_handler.h',
diff --git a/chromium-new/patches/patch-chrome_chrome__exe.gypi b/chromium-new/patches/patch-chrome_chrome__exe.gypi
deleted file mode 100644
index 3c9db87..0000000
--- a/chromium-new/patches/patch-chrome_chrome__exe.gypi
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/chrome_exe.gypi.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/chrome_exe.gypi
-@@ -182,7 +182,7 @@
-                 '../build/linux/system.gyp:xext',
-               ],
-             }],
--            ['OS=="linux" and enable_plugins==1', {
-+            ['(OS=="linux" or os_bsd==1) and enable_plugins==1', {
-               'dependencies': [
-                 '../pdf/pdf.gyp:pdf',
-               ],
diff --git a/chromium-new/patches/patch-chrome_common_BUILD.gn b/chromium-new/patches/patch-chrome_common_BUILD.gn
new file mode 100644
index 0000000..f96f0b8
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_common_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- chrome/common/BUILD.gn.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/common/BUILD.gn
+@@ -147,6 +147,13 @@ static_library("common") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "component_flash_hint_file_linux.cc",
++      "component_flash_hint_file_linux.h",
++    ]
++  }
++
+   if (enable_extensions) {
+     sources += rebase_path(gypi_values.chrome_common_extensions_sources,
+                            ".",
diff --git a/chromium-new/patches/patch-chrome_common_channel__info__posix.cc b/chromium-new/patches/patch-chrome_common_channel__info__posix.cc
deleted file mode 100644
index 81036bc..0000000
--- a/chromium-new/patches/patch-chrome_common_channel__info__posix.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/common/channel_info_posix.cc.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/common/channel_info_posix.cc
-@@ -8,6 +8,8 @@
- #include "build/build_config.h"
- #include "components/version_info/version_info.h"
- 
-+#include <stdlib.h>
-+
- namespace chrome {
- 
- namespace {
diff --git a/chromium-new/patches/patch-chrome_common_chrome__paths.cc b/chromium-new/patches/patch-chrome_common_chrome__paths.cc
index bf335ab..5ac73e5 100644
--- a/chromium-new/patches/patch-chrome_common_chrome__paths.cc
+++ b/chromium-new/patches/patch-chrome_common_chrome__paths.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/common/chrome_paths.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/common/chrome_paths.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/common/chrome_paths.cc
-@@ -170,7 +170,7 @@ bool PathProvider(int key, base::FilePat
+@@ -190,7 +190,7 @@ bool PathProvider(int key, base::FilePat
          return false;
        break;
      case chrome::DIR_DEFAULT_DOWNLOADS_SAFE:
@@ -11,7 +11,7 @@ $NetBSD$
        if (!GetUserDownloadsDirectorySafe(&cur))
          return false;
        break;
-@@ -448,10 +448,12 @@ bool PathProvider(int key, base::FilePat
+@@ -472,10 +472,12 @@ bool PathProvider(int key, base::FilePat
        if (!base::PathExists(cur))  // We don't want to create this
          return false;
        break;
@@ -25,7 +25,7 @@ $NetBSD$
  #else
        cur = base::FilePath(FILE_PATH_LITERAL("/etc/chromium/policies"));
  #endif
-@@ -502,7 +504,7 @@ bool PathProvider(int key, base::FilePat
+@@ -526,7 +528,7 @@ bool PathProvider(int key, base::FilePat
  #endif
        break;
  
@@ -34,7 +34,7 @@ $NetBSD$
      case chrome::DIR_NATIVE_MESSAGING:
  #if defined(OS_MACOSX)
  #if defined(GOOGLE_CHROME_BUILD)
-@@ -516,6 +518,9 @@ bool PathProvider(int key, base::FilePat
+@@ -540,6 +542,9 @@ bool PathProvider(int key, base::FilePat
  #if defined(GOOGLE_CHROME_BUILD)
        cur = base::FilePath(FILE_PATH_LITERAL(
            "/etc/opt/chrome/native-messaging-hosts"));
@@ -44,7 +44,7 @@ $NetBSD$
  #else
        cur = base::FilePath(FILE_PATH_LITERAL(
            "/etc/chromium/native-messaging-hosts"));
-@@ -528,7 +533,7 @@ bool PathProvider(int key, base::FilePat
+@@ -552,7 +557,7 @@ bool PathProvider(int key, base::FilePat
          return false;
        cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts"));
        break;
diff --git a/chromium-new/patches/patch-chrome_common_chrome__paths.h b/chromium-new/patches/patch-chrome_common_chrome__paths.h
index b505713..9dc340c 100644
--- a/chromium-new/patches/patch-chrome_common_chrome__paths.h
+++ b/chromium-new/patches/patch-chrome_common_chrome__paths.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/common/chrome_paths.h.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/common/chrome_paths.h.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/common/chrome_paths.h
-@@ -46,7 +46,7 @@ enum {
+@@ -48,7 +48,7 @@ enum {
                                  // to set policies for chrome. This directory
                                  // contains subdirectories.
  #endif
@@ -11,7 +11,7 @@ $NetBSD$
      defined(OS_MACOSX)
    DIR_USER_EXTERNAL_EXTENSIONS,  // Directory for per-user external extensions
                                   // on Chrome Mac and Chromium Linux.
-@@ -55,7 +55,7 @@ enum {
+@@ -57,7 +57,7 @@ enum {
                                   // create it.
  #endif
  
@@ -20,7 +20,7 @@ $NetBSD$
    DIR_STANDALONE_EXTERNAL_EXTENSIONS,  // Directory for 'per-extension'
                                         // definition manifest files that
                                         // describe extensions which are to be
-@@ -109,7 +109,7 @@ enum {
+@@ -111,7 +111,7 @@ enum {
    DIR_SUPERVISED_USER_INSTALLED_WHITELISTS,  // Directory where sanitized
                                               // supervised user whitelists are
                                               // installed.
diff --git a/chromium-new/patches/patch-chrome_common_chrome__paths__internal.h b/chromium-new/patches/patch-chrome_common_chrome__paths__internal.h
index 97b3593..88e4946 100644
--- a/chromium-new/patches/patch-chrome_common_chrome__paths__internal.h
+++ b/chromium-new/patches/patch-chrome_common_chrome__paths__internal.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/common/chrome_paths_internal.h.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/common/chrome_paths_internal.h.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/common/chrome_paths_internal.h
 @@ -39,7 +39,7 @@ void GetUserCacheDirectory(const base::F
  // Get the path to the user's documents directory.
diff --git a/chromium-new/patches/patch-chrome_common_chrome__switches.cc b/chromium-new/patches/patch-chrome_common_chrome__switches.cc
index 61cd1fc..24a1a57 100644
--- a/chromium-new/patches/patch-chrome_common_chrome__switches.cc
+++ b/chromium-new/patches/patch-chrome_common_chrome__switches.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- chrome/common/chrome_switches.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/common/chrome_switches.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/common/chrome_switches.cc
-@@ -1298,7 +1298,7 @@ const char kTabManagementExperimentTypeE
-     "tab-management-experiment-type-elderberry";
- #endif  // defined(OS_ANDROID)
+@@ -1277,7 +1277,7 @@ const char kAllowNaClSocketAPI[]        
+ const char kEnableWaylandServer[] = "enable-wayland-server";
+ #endif
  
 -#if defined(OS_WIN) || defined(OS_LINUX)
 +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
- extern const char kEnableInputImeAPI[] = "enable-input-ime-api";
  extern const char kDisableInputImeAPI[] = "disable-input-ime-api";
+ extern const char kEnableInputImeAPI[] = "enable-input-ime-api";
  #endif
diff --git a/chromium-new/patches/patch-chrome_common_chrome__switches.h b/chromium-new/patches/patch-chrome_common_chrome__switches.h
index abc48f1..9dbc320 100644
--- a/chromium-new/patches/patch-chrome_common_chrome__switches.h
+++ b/chromium-new/patches/patch-chrome_common_chrome__switches.h
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- chrome/common/chrome_switches.h.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/common/chrome_switches.h.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/common/chrome_switches.h
-@@ -387,7 +387,7 @@ extern const char kDisableNewTaskManager
+@@ -378,7 +378,7 @@ extern const char kAllowNaClSocketAPI[];
  extern const char kEnableWaylandServer[];
  #endif
  
 -#if defined(OS_WIN) || defined(OS_LINUX)
 +#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
- extern const char kEnableInputImeAPI[];
  extern const char kDisableInputImeAPI[];
+ extern const char kEnableInputImeAPI[];
  #endif
diff --git a/chromium-new/patches/patch-chrome_common_component__flash__hint__file__linux.h b/chromium-new/patches/patch-chrome_common_component__flash__hint__file__linux.h
deleted file mode 100644
index 3b35ac3..0000000
--- a/chromium-new/patches/patch-chrome_common_component__flash__hint__file__linux.h
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- chrome/common/component_flash_hint_file_linux.h.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/common/component_flash_hint_file_linux.h
-@@ -7,9 +7,9 @@
- 
- #include "build/build_config.h"
- 
--#if !defined(OS_LINUX)
-+#if !defined(OS_LINUX) && !defined(OS_FREEBSD)
- #error "This file only applies to the Linux component update of Flash."
--#endif  // !defined(OS_LINUX)
-+#endif  // !defined(OS_LINUX) && !defined(OS_FREEBSD)
- 
- #include <string>
- 
diff --git a/chromium-new/patches/patch-chrome_common_extensions_api_schemas.gni b/chromium-new/patches/patch-chrome_common_extensions_api_schemas.gni
new file mode 100644
index 0000000..eb620e0
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_common_extensions_api_schemas.gni
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/common/extensions/api/schemas.gni.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/common/extensions/api/schemas.gni
+@@ -19,7 +19,7 @@ if (enable_task_manager) {
+ }
+ if (is_chromeos) {
+   schema_sources += gypi_values.chromeos_schema_files
+-} else if (is_linux || is_win) {
++} else if (is_linux || is_win || is_bsd) {
+   schema_sources += gypi_values.input_ime_schema_file
+ }
+ if (enable_service_discovery) {
diff --git a/chromium-new/patches/patch-chrome_common_extensions_api_schemas.gypi b/chromium-new/patches/patch-chrome_common_extensions_api_schemas.gypi
deleted file mode 100644
index 636d44f..0000000
--- a/chromium-new/patches/patch-chrome_common_extensions_api_schemas.gypi
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/common/extensions/api/schemas.gypi.orig	2016-06-24 01:02:14.000000000 +0000
-+++ chrome/common/extensions/api/schemas.gypi
-@@ -184,7 +184,7 @@
-         ],
-       }, { # chromeos==0
-         'conditions': [
--          ['OS=="linux" or OS=="win"', {
-+          ['OS=="linux" or OS=="win" or os_bsd==1', {
-             'schema_files': [
-               '<@(input_ime_schema_file)',
-             ],
diff --git a/chromium-new/patches/patch-chrome_common_extensions_command.cc b/chromium-new/patches/patch-chrome_common_extensions_command.cc
index 89b0448..6684f9d 100644
--- a/chromium-new/patches/patch-chrome_common_extensions_command.cc
+++ b/chromium-new/patches/patch-chrome_common_extensions_command.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/common/extensions/command.cc.orig	2016-06-24 01:02:14.000000000 +0000
+--- chrome/common/extensions/command.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/common/extensions/command.cc
-@@ -306,7 +306,7 @@ std::string Command::CommandPlatform() {
+@@ -304,7 +304,7 @@ std::string Command::CommandPlatform() {
    return values::kKeybindingPlatformMac;
  #elif defined(OS_CHROMEOS)
    return values::kKeybindingPlatformChromeOs;
diff --git a/chromium-new/patches/patch-chrome_common_features.gni b/chromium-new/patches/patch-chrome_common_features.gni
new file mode 100644
index 0000000..de8f9eb
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_common_features.gni
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/common/features.gni.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/common/features.gni
+@@ -22,7 +22,7 @@ declare_args() {
+   enable_background = !is_ios && !is_android && !is_chromecast
+ 
+   enable_one_click_signin =
+-      is_win || is_mac || (is_linux && !is_chromeos && !is_chromecast)
++      is_win || is_mac || is_bsd || (is_linux && !is_chromeos && !is_chromecast)
+ 
+   # Google Now is disabled to prepare for its removal.
+   # http://crbug.com/539674
diff --git a/chromium-new/patches/patch-chrome_common_pref__names.cc b/chromium-new/patches/patch-chrome_common_pref__names.cc
index 262dcc4..b26320c 100644
--- a/chromium-new/patches/patch-chrome_common_pref__names.cc
+++ b/chromium-new/patches/patch-chrome_common_pref__names.cc
@@ -1,17 +1,26 @@
 $NetBSD$
 
---- chrome/common/pref_names.cc.orig	2016-06-24 01:02:15.000000000 +0000
+--- chrome/common/pref_names.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/common/pref_names.cc
-@@ -908,7 +908,7 @@ const char kForceYouTubeSafetyMode[] = "
- // supervised users.
- const char kRecordHistory[] = "settings.history_recorded";
+@@ -952,7 +952,7 @@ const char kForceSessionSync[] = "settin
+ // only using an account that belongs to one of the domains from this pref.
+ const char kAllowedDomainsForApps[] = "settings.allowed_domains_for_apps";
  
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
  // Linux specific preference on whether we should match the system theme.
  const char kUsesSystemTheme[] = "extensions.theme.use_system";
  #endif
-@@ -1373,7 +1373,7 @@ const char kDownloadDefaultDirectory[] =
+@@ -1035,7 +1035,7 @@ const char kShowUpdatePromotionInfoBar[]
+     "browser.show_update_promotion_info_bar";
+ #endif
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ // Boolean that is false if we should show window manager decorations.  If
+ // true, we draw a custom chrome frame (thicker title bar and blue border).
+ const char kUseCustomChromeFrame[] = "browser.custom_chrome_frame";
+@@ -1408,7 +1408,7 @@ const char kDownloadDefaultDirectory[] =
  // upgrade a unsafe location to a safe location.
  const char kDownloadDirUpgraded[] = "download.directory_upgrade";
  
diff --git a/chromium-new/patches/patch-chrome_common_pref__names.h b/chromium-new/patches/patch-chrome_common_pref__names.h
index f4371a0..c0bb6a9 100644
--- a/chromium-new/patches/patch-chrome_common_pref__names.h
+++ b/chromium-new/patches/patch-chrome_common_pref__names.h
@@ -1,17 +1,26 @@
 $NetBSD$
 
---- chrome/common/pref_names.h.orig	2016-06-24 01:02:15.000000000 +0000
+--- chrome/common/pref_names.h.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/common/pref_names.h
-@@ -307,7 +307,7 @@ extern const char kRecordHistory[];
- extern const char kDeleteTimePeriod[];
+@@ -315,7 +315,7 @@ extern const char kForceSessionSync[];
+ extern const char kAllowedDomainsForApps[];
  extern const char kLastClearBrowsingDataTime[];
  extern const char kClearBrowsingDataHistoryNoticeShownTimes[];
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
  extern const char kUsesSystemTheme[];
  #endif
  extern const char kCurrentThemePackFilename[];
-@@ -477,7 +477,7 @@ extern const char kAppWindowPlacement[];
+@@ -347,7 +347,7 @@ extern const char kDefaultBrowserSetting
+ #if defined(OS_MACOSX)
+ extern const char kShowUpdatePromotionInfoBar[];
+ #endif
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ extern const char kUseCustomChromeFrame[];
+ #endif
+ extern const char kBackShortcutBubbleShownCount[];
+@@ -496,7 +496,7 @@ extern const char kAppWindowPlacement[];
  extern const char kDownloadDefaultDirectory[];
  extern const char kDownloadExtensionsToOpen[];
  extern const char kDownloadDirUpgraded[];
diff --git a/chromium-new/patches/patch-chrome_common_variations_BUILD.gn b/chromium-new/patches/patch-chrome_common_variations_BUILD.gn
new file mode 100644
index 0000000..52b90c9
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_common_variations_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/common/variations/BUILD.gn.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/common/variations/BUILD.gn
+@@ -12,7 +12,7 @@ action("fieldtrial_testing_config_action
+   if (is_mac) {
+     source = "//testing/variations/fieldtrial_testing_config_mac.json"
+   }
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     source = "//testing/variations/fieldtrial_testing_config_linux.json"
+   }
+   if (is_chromeos) {
diff --git a/chromium-new/patches/patch-chrome_common_variations_fieldtrial__testing__config.gyp b/chromium-new/patches/patch-chrome_common_variations_fieldtrial__testing__config.gyp
deleted file mode 100644
index ee3ba7d..0000000
--- a/chromium-new/patches/patch-chrome_common_variations_fieldtrial__testing__config.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/common/variations/fieldtrial_testing_config.gyp.orig	2016-06-24 01:02:15.000000000 +0000
-+++ chrome/common/variations/fieldtrial_testing_config.gyp
-@@ -19,7 +19,7 @@
-       'conditions': [
-         ['OS!="android"', {'sources/': [['exclude', '_android\\.json$']]}],
-         ['OS!="win"', {'sources/': [['exclude', '_win\\.json$']]}],
--        ['OS!="linux" or chromeos==1', {'sources/': [['exclude', '_linux\\.json$']]}],
-+        ['(OS!="linux" or chromeos==1) and os_bsd!=1', {'sources/': [['exclude', '_linux\\.json$']]}],
-         ['OS!="mac"', {'sources/': [['exclude', '_mac\\.json$']]}],
-         ['chromeos!=1', {'sources/': [['exclude', '_chromeos\\.json$']]}],
-         ['OS!="ios"', {'sources/': [['exclude', '_ios\\.json$']]}],
diff --git a/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc b/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc
index dc65a81..f3f9c06 100644
--- a/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc
+++ b/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/renderer/pepper/pepper_flash_font_file_host.cc.orig	2016-06-24 01:02:15.000000000 +0000
+--- chrome/renderer/pepper/pepper_flash_font_file_host.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/renderer/pepper/pepper_flash_font_file_host.cc
 @@ -14,7 +14,7 @@
  #include "ppapi/proxy/ppapi_messages.h"
@@ -21,8 +21,8 @@ $NetBSD$
        description.face,
        description.weight >= PP_BROWSERFONT_TRUSTED_WEIGHT_BOLD,
 @@ -44,7 +44,7 @@ PepperFlashFontFileHost::PepperFlashFont
-   skia::RefPtr<SkFontMgr> font_mgr = skia::AdoptRef(SkFontMgr::RefDefault());
-   typeface_ = skia::AdoptRef(
+   sk_sp<SkFontMgr> font_mgr(SkFontMgr::RefDefault());
+   typeface_ = sk_sp<SkTypeface>(
        font_mgr->matchFamilyStyle(description.face.c_str(), style));
 -#endif  // defined(OS_LINUX) || defined(OS_OPENBSD)
 +#endif  // defined(OS_LINUX) || defined(OS_BSD)
diff --git a/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h b/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h
index c396b98..b2350ed 100644
--- a/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h
+++ b/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/renderer/pepper/pepper_flash_font_file_host.h.orig	2016-06-24 01:02:15.000000000 +0000
+--- chrome/renderer/pepper/pepper_flash_font_file_host.h.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/renderer/pepper/pepper_flash_font_file_host.h
 @@ -14,7 +14,7 @@
  #include "ppapi/c/private/pp_private_font_charset.h"
@@ -10,7 +10,7 @@ $NetBSD$
 +#if defined(OS_LINUX) || defined(OS_BSD)
  #include "base/files/scoped_file.h"
  #elif defined(OS_WIN)
- #include "skia/ext/refptr.h"
+ #include "third_party/skia/include/core/SkRefCnt.h"
 @@ -50,7 +50,7 @@ class PepperFlashFontFileHost : public p
                           uint32_t table);
    bool GetFontData(uint32_t table, void* buffer, size_t* length);
@@ -19,4 +19,4 @@ $NetBSD$
 +#if defined(OS_LINUX) || defined(OS_BSD)
    base::ScopedFD fd_;
  #elif defined(OS_WIN)
-   skia::RefPtr<SkTypeface> typeface_;
+   sk_sp<SkTypeface> typeface_;
diff --git a/chromium-new/patches/patch-chrome_test_BUILD.gn b/chromium-new/patches/patch-chrome_test_BUILD.gn
new file mode 100644
index 0000000..566eed6
--- /dev/null
+++ b/chromium-new/patches/patch-chrome_test_BUILD.gn
@@ -0,0 +1,178 @@
+$NetBSD$
+
+--- chrome/test/BUILD.gn.orig	2016-11-10 20:02:11.000000000 +0000
++++ chrome/test/BUILD.gn
+@@ -179,7 +179,7 @@ static_library("test_support") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     public_deps += [ "//crypto:platform" ]
+   }
+   if (is_mac) {
+@@ -383,7 +383,7 @@ if (!is_android) {
+       "$root_out_dir/test_page.css.mock-http-headers",
+       "$root_out_dir/ui_test.pak",
+     ]
+-    if (is_linux || is_win) {
++    if (is_linux || is_bsd || is_win) {
+       data += [
+         "$root_out_dir/chrome_100_percent.pak",
+         "$root_out_dir/chrome_200_percent.pak",
+@@ -391,7 +391,7 @@ if (!is_android) {
+         "$root_out_dir/locales/fr.pak",
+       ]
+     }
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       data += [ "$root_out_dir/libppapi_tests.so" ]
+     }
+ 
+@@ -462,7 +462,7 @@ if (!is_android) {
+                 ".",
+                 "//chrome")
+       }
+-      if (is_linux) {
++      if (is_linux || is_bsd) {
+         if (!is_chromeos) {
+           # Desktop linux.
+           sources -= [
+@@ -1097,14 +1097,14 @@ test("browser_tests") {
+         sources += [ "//third_party/liblouis/nacl_wrapper/liblouis_wrapper_browsertest.cc" ]
+         deps += [ "//chrome/browser/chromeos" ]
+         data_deps += [ "//third_party/liblouis:liblouis_test_data" ]
+-      } else if (is_linux || is_win) {
++      } else if (is_linux || is_bsd || is_win) {
+         sources += [
+           "../browser/ui/views/ime/ime_warning_bubble_browsertest.cc",
+           "../browser/ui/views/ime/ime_window_browsertest.cc",
+         ]
+       }
+ 
+-      if (is_win || is_linux) {
++      if (is_win || is_linux || is_bsd) {
+         sources += [ "../browser/nacl_host/test/nacl_gdb_browsertest.cc" ]
+         data_deps += [ "//chrome/browser/nacl_host/test:mock_nacl_gdb" ]
+       }
+@@ -1116,7 +1116,7 @@ test("browser_tests") {
+         configs +=
+             [ "//build/config/win:default_large_module_incremental_linking" ]
+       }
+-      if (is_linux) {
++      if (is_linux || is_bsd) {
+         data_deps += [ "//components/nacl/loader:nacl_helper" ]
+ 
+         if (enable_nacl_nonsfi) {
+@@ -1176,7 +1176,7 @@ test("browser_tests") {
+       }
+     }
+ 
+-    if (is_linux && !is_component_build) {
++    if ((is_linux || is_bsd) && !is_component_build) {
+       # Set rpath to find the CDM adapter even in a non-component build.
+       configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+     }
+@@ -1226,7 +1226,7 @@ test("browser_tests") {
+       if (toolkit_views) {
+         sources -= [ "../browser/ui/views/select_file_dialog_extension_browsertest.cc" ]
+       }
+-      if (is_win || is_linux) {
++      if (is_win || is_linux || is_bsd) {
+         sources +=
+             [ "../browser/ui/views/ime/input_ime_apitest_nonchromeos.cc" ]
+       }
+@@ -1385,7 +1385,7 @@ test("browser_tests") {
+       ]
+       deps += [ "//components/wifi:test_support" ]
+     }
+-    if (is_linux || is_win) {
++    if (is_linux || is_bsd || is_win) {
+       sources += rebase_path(
+               chrome_tests_gypi_values.chrome_browser_tests_non_mac_desktop_sources,
+               ".",
+@@ -1400,7 +1400,7 @@ test("browser_tests") {
+         "../browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc",
+       ]
+     }
+-    if (is_mac || is_win || (is_linux && !is_chromeos)) {
++    if (is_mac || is_win || is_bsd || (is_linux && !is_chromeos)) {
+       sources += rebase_path(
+               chrome_tests_gypi_values.chrome_browser_tests_non_mobile_non_cros_sources,
+               ".",
+@@ -1519,7 +1519,7 @@ if (!is_android) {
+       "$root_out_dir/pyproto/",
+     ]
+ 
+-    if (is_linux || is_win) {
++    if (is_linux || is_bsd || is_win) {
+       data += [
+         "$root_out_dir/chrome_100_percent.pak",
+         "$root_out_dir/chrome_200_percent.pak",
+@@ -1768,7 +1768,7 @@ test("unit_tests") {
+       "$root_out_dir/locales/en-US.pak",
+     ]
+   }
+-  if (is_linux || is_win) {
++  if (is_linux || is_bsd || is_win) {
+     data += [ "$root_out_dir/chrome_200_percent.pak" ]
+   }
+ 
+@@ -1974,7 +1974,7 @@ test("unit_tests") {
+       "//ui/wm",
+     ]
+   }
+-  if (!is_chromeos && is_linux) {
++  if (!is_chromeos && (is_linux || is_bsd)) {
+     sources += rebase_path(
+             chrome_tests_unit_gypi_values.chrome_unit_tests_desktop_linux_sources,
+             ".",
+@@ -1991,7 +1991,7 @@ test("unit_tests") {
+   if (use_gio) {
+     deps += [ "//build/linux/libgio" ]
+   }
+-  if (!is_chromeos && !use_ozone && is_linux) {
++  if (!is_chromeos && !use_ozone && (is_linux || is_bsd)) {
+     deps += [ "//chrome/browser/ui/libgtk2ui" ]
+   }
+ 
+@@ -2119,18 +2119,18 @@ test("unit_tests") {
+       "//components/os_crypt:gnome_keyring_direct",
+     ]
+   }
+-  if (is_linux && !is_chromeos) {
++  if ((is_linux || is_bsd) && !is_chromeos) {
+     sources +=
+         [ "../browser/password_manager/native_backend_libsecret_unittest.cc" ]
+     deps += [ "//third_party/libsecret" ]
+   }
+-  if (is_linux && use_aura) {
++  if ((is_linux || is_bsd) && use_aura) {
+     deps += [ "//ui/aura:test_support" ]
+     if (use_dbus) {
+       deps += [ "//dbus:test_support" ]
+     }
+   }
+-  if (is_linux && is_chrome_branded && current_cpu == "x86") {
++  if ((is_linux || is_bsd) && is_chrome_branded && current_cpu == "x86") {
+     ldflags = [ "-Wl,--strip-debug" ]
+   }
+   if (is_mac) {
+@@ -2365,7 +2365,7 @@ if (safe_browsing_mode == 1 && is_mac) {
+   }
+ }
+ 
+-if (!is_android) {
++if (!is_android && !is_bsd) {
+   # TODO(609855): Make this compile on Android and run on the bots.
+   test("chrome_app_unittests") {
+     sources = [
+@@ -2391,7 +2391,7 @@ if (!is_android) {
+   }
+ }
+ 
+-if (!is_android && !is_ios && !is_chromecast) {
++if (!is_android && !is_ios && !is_chromecast && !is_bsd) {
+   test("performance_browser_tests") {
+     sources =
+         rebase_path(chrome_tests_gypi_values.performance_browser_tests_sources,
diff --git a/chromium-new/patches/patch-chrome_test_base_in__process__browser__test.cc b/chromium-new/patches/patch-chrome_test_base_in__process__browser__test.cc
index f37f60f..a7391c5 100644
--- a/chromium-new/patches/patch-chrome_test_base_in__process__browser__test.cc
+++ b/chromium-new/patches/patch-chrome_test_base_in__process__browser__test.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/test/base/in_process_browser_test.cc.orig	2016-06-24 01:02:15.000000000 +0000
+--- chrome/test/base/in_process_browser_test.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/test/base/in_process_browser_test.cc
-@@ -89,6 +89,10 @@
+@@ -88,6 +88,10 @@
  
  namespace {
  
diff --git a/chromium-new/patches/patch-chrome_test_base_testing__browser__process.h b/chromium-new/patches/patch-chrome_test_base_testing__browser__process.h
index f621671..2db334e 100644
--- a/chromium-new/patches/patch-chrome_test_base_testing__browser__process.h
+++ b/chromium-new/patches/patch-chrome_test_base_testing__browser__process.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- chrome/test/base/testing_browser_process.h.orig	2016-06-24 01:02:15.000000000 +0000
+--- chrome/test/base/testing_browser_process.h.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/test/base/testing_browser_process.h
-@@ -102,8 +102,8 @@ class TestingBrowserProcess : public Bro
+@@ -105,8 +105,8 @@ class TestingBrowserProcess : public Bro
    DownloadStatusUpdater* download_status_updater() override;
    DownloadRequestLimiter* download_request_limiter() override;
  
diff --git a/chromium-new/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc b/chromium-new/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
index 728b337..a2f0fc1 100644
--- a/chromium-new/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
+++ b/chromium-new/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- chrome/test/chromedriver/chrome/chrome_finder.cc.orig	2016-06-24 01:02:15.000000000 +0000
+--- chrome/test/chromedriver/chrome/chrome_finder.cc.orig	2016-11-10 20:02:11.000000000 +0000
 +++ chrome/test/chromedriver/chrome/chrome_finder.cc
 @@ -45,7 +45,7 @@ void GetApplicationDirs(std::vector<base
          installation_locations[i].Append(L"Chromium\\Application"));
diff --git a/chromium-new/patches/patch-chromecast_BUILD.gn b/chromium-new/patches/patch-chromecast_BUILD.gn
new file mode 100644
index 0000000..1b6bf90
--- /dev/null
+++ b/chromium-new/patches/patch-chromecast_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chromecast/BUILD.gn.orig	2016-11-10 20:02:12.000000000 +0000
++++ chromecast/BUILD.gn
+@@ -44,7 +44,7 @@ cast_test_group("cast_tests") {
+     "//ui/base:ui_base_unittests",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     tests += [ "//chromecast/crash:cast_crash_unittests" ]
+   }
+ 
diff --git a/chromium-new/patches/patch-chromecast_browser_BUILD.gn b/chromium-new/patches/patch-chromecast_browser_BUILD.gn
new file mode 100644
index 0000000..f28f999
--- /dev/null
+++ b/chromium-new/patches/patch-chromecast_browser_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chromecast/browser/BUILD.gn.orig	2016-11-10 20:02:12.000000000 +0000
++++ chromecast/browser/BUILD.gn
+@@ -117,7 +117,7 @@ source_set("browser") {
+     "//ui/native_theme:native_theme",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [
+       "cast_memory_pressure_monitor.cc",
+       "cast_memory_pressure_monitor.h",
diff --git a/chromium-new/patches/patch-chromecast_browser_metrics_BUILD.gn b/chromium-new/patches/patch-chromecast_browser_metrics_BUILD.gn
new file mode 100644
index 0000000..09dab46
--- /dev/null
+++ b/chromium-new/patches/patch-chromecast_browser_metrics_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chromecast/browser/metrics/BUILD.gn.orig	2016-11-10 20:02:12.000000000 +0000
++++ chromecast/browser/metrics/BUILD.gn
+@@ -26,7 +26,7 @@ source_set("metrics") {
+     "//content/public/common",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [
+       "external_metrics.cc",
+       "external_metrics.h",
diff --git a/chromium-new/patches/patch-chromecast_crash_BUILD.gn b/chromium-new/patches/patch-chromecast_crash_BUILD.gn
new file mode 100644
index 0000000..2feeb6c
--- /dev/null
+++ b/chromium-new/patches/patch-chromecast_crash_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chromecast/crash/BUILD.gn.orig	2016-11-10 20:02:12.000000000 +0000
++++ chromecast/crash/BUILD.gn
+@@ -78,7 +78,7 @@ source_set("test_support") {
+   ]
+ }
+ 
+-if (is_linux) {
++if (is_linux || is_bsd) {
+   test("cast_crash_unittests") {
+     sources = [
+       "cast_crashdump_uploader_unittest.cc",
diff --git a/chromium-new/patches/patch-components_BUILD.gn b/chromium-new/patches/patch-components_BUILD.gn
new file mode 100644
index 0000000..1c8634e
--- /dev/null
+++ b/chromium-new/patches/patch-components_BUILD.gn
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- components/BUILD.gn.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/BUILD.gn
+@@ -173,8 +173,8 @@ test("components_unittests") {
+       "//components/cast_certificate:unit_tests",
+       "//components/certificate_reporting:unit_tests",
+       "//components/certificate_transparency:unit_tests",
+-      "//components/crash/content/app:unit_tests",
+-      "//components/crash/core/common:unit_tests",
++      #"//components/crash/content/app:unit_tests",
++      #"//components/crash/core/common:unit_tests",
+       "//components/data_reduction_proxy/content/browser:unit_tests",
+       "//components/data_use_measurement/content:unit_tests",
+       "//components/devtools_http_handler:unit_tests",
diff --git a/chromium-new/patches/patch-components_arc_metrics_oom__kills__monitor.cc b/chromium-new/patches/patch-components_arc_metrics_oom__kills__monitor.cc
new file mode 100644
index 0000000..d85b154
--- /dev/null
+++ b/chromium-new/patches/patch-components_arc_metrics_oom__kills__monitor.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- components/arc/metrics/oom_kills_monitor.cc.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/arc/metrics/oom_kills_monitor.cc
+@@ -25,8 +25,13 @@
+ #include "base/strings/string_split.h"
+ #include "base/time/time.h"
+ #include "components/arc/metrics/oom_kills_histogram.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#include <re2/stringpiece.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
+ #include "third_party/re2/src/re2/stringpiece.h"
++#endif
+ 
+ namespace arc {
+ 
diff --git a/chromium-new/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc b/chromium-new/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
index d22d53b..ac19b0f 100644
--- a/chromium-new/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
+++ b/chromium-new/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/autofill/content/renderer/password_form_conversion_utils.cc.orig	2016-06-24 01:02:17.000000000 +0000
+--- components/autofill/content/renderer/password_form_conversion_utils.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/autofill/content/renderer/password_form_conversion_utils.cc
 @@ -25,7 +25,11 @@
  #include "third_party/WebKit/public/web/WebFormControlElement.h"
diff --git a/chromium-new/patches/patch-components_autofill_core_browser_address__rewriter.cc b/chromium-new/patches/patch-components_autofill_core_browser_address__rewriter.cc
new file mode 100644
index 0000000..fe956cc
--- /dev/null
+++ b/chromium-new/patches/patch-components_autofill_core_browser_address__rewriter.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/autofill/core/browser/address_rewriter.cc.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/autofill/core/browser/address_rewriter.cc
+@@ -10,7 +10,11 @@
+ #include "base/i18n/case_conversion.h"
+ #include "base/memory/singleton.h"
+ #include "base/strings/utf_string_conversions.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ namespace autofill {
+ namespace {
diff --git a/chromium-new/patches/patch-components_autofill_core_browser_form__structure.cc b/chromium-new/patches/patch-components_autofill_core_browser_form__structure.cc
index 675c296..ed12818 100644
--- a/chromium-new/patches/patch-components_autofill_core_browser_form__structure.cc
+++ b/chromium-new/patches/patch-components_autofill_core_browser_form__structure.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/autofill/core/browser/form_structure.cc.orig	2016-06-24 01:02:17.000000000 +0000
+--- components/autofill/core/browser/form_structure.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/autofill/core/browser/form_structure.cc
 @@ -33,7 +33,11 @@
  #include "components/autofill/core/common/form_field_data_predictions.h"
diff --git a/chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.cc b/chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.cc
new file mode 100644
index 0000000..609d278
--- /dev/null
+++ b/chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- components/content_settings/core/browser/website_settings_registry.cc.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/content_settings/core/browser/website_settings_registry.cc
+@@ -88,6 +88,9 @@ const WebsiteSettingsInfo* WebsiteSettin
+   // doesn't allow the settings to be managed in the same way. See
+   // crbug.com/642184.
+   sync_status = WebsiteSettingsInfo::UNSYNCABLE;
++#elif defined(OS_BSD)
++  if (!(platform & PLATFORM_BSD))
++    return nullptr;
+ #else
+ #error "Unsupported platform"
+ #endif
diff --git a/chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.h b/chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.h
new file mode 100644
index 0000000..22b36e4
--- /dev/null
+++ b/chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- components/content_settings/core/browser/website_settings_registry.h.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/content_settings/core/browser/website_settings_registry.h
+@@ -36,10 +36,11 @@ class WebsiteSettingsRegistry {
+     PLATFORM_MAC = 1 << 3,
+     PLATFORM_ANDROID = 1 << 4,
+     PLATFORM_IOS = 1 << 5,
++    PLATFORM_BSD = 1 << 6,
+ 
+     // Settings only applied to win, mac, linux and chromeos.
+     DESKTOP =
+-        PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | PLATFORM_MAC,
++        PLATFORM_WINDOWS | PLATFORM_LINUX | PLATFORM_CHROMEOS | PLATFORM_MAC | PLATFORM_BSD,
+ 
+     // Settings applied to all platforms, including win, mac, linux, chromeos,
+     // android, ios.
diff --git a/chromium-new/patches/patch-components_cookie__config_cookie__store__util.cc b/chromium-new/patches/patch-components_cookie__config_cookie__store__util.cc
index 1e83c9e..939769a 100644
--- a/chromium-new/patches/patch-components_cookie__config_cookie__store__util.cc
+++ b/chromium-new/patches/patch-components_cookie__config_cookie__store__util.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/cookie_config/cookie_store_util.cc.orig	2016-06-24 01:02:17.000000000 +0000
+--- components/cookie_config/cookie_store_util.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/cookie_config/cookie_store_util.cc
 @@ -11,7 +11,7 @@
  
diff --git a/chromium-new/patches/patch-components_crash_content_app_BUILD.gn b/chromium-new/patches/patch-components_crash_content_app_BUILD.gn
new file mode 100644
index 0000000..d2098e2
--- /dev/null
+++ b/chromium-new/patches/patch-components_crash_content_app_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- components/crash/content/app/BUILD.gn.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/crash/content/app/BUILD.gn
+@@ -148,7 +148,7 @@ source_set("app_non_mac_win") {
+ 
+       #'../breakpad/breakpad.gyp:breakpad_sender',  TODO(GYP)
+     ]
+-  } else if (is_posix && !is_ios) {
++  } else if (is_posix && !is_ios && !is_bsd) {
+     deps += [ "//breakpad:client" ]
+   }
+ }
diff --git a/chromium-new/patches/patch-components_crash_content_browser_BUILD.gn b/chromium-new/patches/patch-components_crash_content_browser_BUILD.gn
new file mode 100644
index 0000000..dd64ec8
--- /dev/null
+++ b/chromium-new/patches/patch-components_crash_content_browser_BUILD.gn
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- components/crash/content/browser/BUILD.gn.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/crash/content/browser/BUILD.gn
+@@ -16,7 +16,7 @@ source_set("browser") {
+ 
+   deps = [
+     "//base",
+-    "//breakpad:client",
++    #"//breakpad:client",
+     "//components/crash/content/app",
+     "//content/public/browser",
+     "//content/public/common",
+@@ -39,7 +39,7 @@ source_set("browser") {
+   # This is not in the GYP build but this target includes breakpad client
+   # headers, so add the dependency here.
+   if (is_posix && !is_ios) {
+-    configs += [ "//breakpad:client_config" ]
+-    public_configs = [ "//breakpad:client_config" ]
++    #configs += [ "//breakpad:client_config" ]
++    #public_configs = [ "//breakpad:client_config" ]
+   }
+ }
diff --git a/chromium-new/patches/patch-components_dom__distiller_core_page__features.cc b/chromium-new/patches/patch-components_dom__distiller_core_page__features.cc
index c4fca33..3bed073 100644
--- a/chromium-new/patches/patch-components_dom__distiller_core_page__features.cc
+++ b/chromium-new/patches/patch-components_dom__distiller_core_page__features.cc
@@ -1,17 +1,16 @@
 $NetBSD$
 
---- components/dom_distiller/core/page_features.cc.orig	2016-06-24 01:02:17.000000000 +0000
+--- components/dom_distiller/core/page_features.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/dom_distiller/core/page_features.cc
 @@ -10,7 +10,11 @@
+ #include <string>
  
  #include "base/json/json_reader.h"
- #include "base/memory/scoped_ptr.h"
--#include "third_party/re2/src/re2/re2.h"
-+#if defined(OS_BSD)
-+#  include <re2/re2.h>
++#if !defined(OS_BSD)
+ #include "third_party/re2/src/re2/re2.h"
 +#else
-+#  include "third_party/re2/src/re2/re2.h"
-+#endif // defined(OS_BSD)
++#include <re2/re2.h>
++#endif
  #include "url/gurl.h"
  
  namespace dom_distiller {
diff --git a/chromium-new/patches/patch-components_drive_drive__api__util.cc b/chromium-new/patches/patch-components_drive_drive__api__util.cc
index 54e7868..0e5c1c9 100644
--- a/chromium-new/patches/patch-components_drive_drive__api__util.cc
+++ b/chromium-new/patches/patch-components_drive_drive__api__util.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/drive/drive_api_util.cc.orig	2016-06-24 01:02:17.000000000 +0000
+--- components/drive/drive_api_util.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/drive/drive_api_util.cc
 @@ -22,7 +22,11 @@
  #include "google_apis/drive/drive_api_parser.h"
diff --git a/chromium-new/patches/patch-components_feedback_anonymizer__tool.cc b/chromium-new/patches/patch-components_feedback_anonymizer__tool.cc
index 7424af5..25c1790 100644
--- a/chromium-new/patches/patch-components_feedback_anonymizer__tool.cc
+++ b/chromium-new/patches/patch-components_feedback_anonymizer__tool.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- components/feedback/anonymizer_tool.cc.orig	2016-06-24 01:02:17.000000000 +0000
+--- components/feedback/anonymizer_tool.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/feedback/anonymizer_tool.cc
-@@ -9,7 +9,11 @@
+@@ -10,7 +10,11 @@
  #include "base/strings/string_number_conversions.h"
  #include "base/strings/string_util.h"
  #include "base/strings/stringprintf.h"
diff --git a/chromium-new/patches/patch-components_flags__ui_flags__state.cc b/chromium-new/patches/patch-components_flags__ui_flags__state.cc
index 02e5d80..8155193 100644
--- a/chromium-new/patches/patch-components_flags__ui_flags__state.cc
+++ b/chromium-new/patches/patch-components_flags__ui_flags__state.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- components/flags_ui/flags_state.cc.orig	2016-06-24 01:02:17.000000000 +0000
+--- components/flags_ui/flags_state.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/flags_ui/flags_state.cc
-@@ -450,7 +450,7 @@ int FlagsState::GetCurrentPlatform() {
+@@ -545,7 +545,7 @@ int FlagsState::GetCurrentPlatform() {
    return kOsWin;
  #elif defined(OS_CHROMEOS)  // Needs to be before the OS_LINUX check.
    return kOsCrOS;
diff --git a/chromium-new/patches/patch-components_gcm__driver_gcm__client.h b/chromium-new/patches/patch-components_gcm__driver_gcm__client.h
new file mode 100644
index 0000000..c12031f
--- /dev/null
+++ b/chromium-new/patches/patch-components_gcm__driver_gcm__client.h
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- components/gcm_driver/gcm_client.h.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/gcm_driver/gcm_client.h
+@@ -80,6 +80,7 @@ class GCMClient {
+     PLATFORM_CROS,
+     PLATFORM_IOS,
+     PLATFORM_ANDROID,
++    PLATFORM_BSD,
+     PLATFORM_UNKNOWN
+   };
+ 
diff --git a/chromium-new/patches/patch-components_gcm__driver_gcm__client__impl.cc b/chromium-new/patches/patch-components_gcm__driver_gcm__client__impl.cc
new file mode 100644
index 0000000..63b148a
--- /dev/null
+++ b/chromium-new/patches/patch-components_gcm__driver_gcm__client__impl.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- components/gcm_driver/gcm_client_impl.cc.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/gcm_driver/gcm_client_impl.cc
+@@ -137,6 +137,9 @@ void ToCheckinProtoVersion(
+     case GCMClient::PLATFORM_CROS:
+       platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_CROS;
+       break;
++    case GCMClient::PLATFORM_BSD: // TODO what the hell are those?
++      platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_LINUX;
++      break;
+     case GCMClient::PLATFORM_UNKNOWN:
+       // For unknown platform, return as LINUX.
+       platform = checkin_proto::ChromeBuildProto_Platform_PLATFORM_LINUX;
diff --git a/chromium-new/patches/patch-components_json__schema_json__schema__validator.cc b/chromium-new/patches/patch-components_json__schema_json__schema__validator.cc
index 740dfa0..3cdef8b 100644
--- a/chromium-new/patches/patch-components_json__schema_json__schema__validator.cc
+++ b/chromium-new/patches/patch-components_json__schema_json__schema__validator.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- components/json_schema/json_schema_validator.cc.orig	2016-06-24 01:02:18.000000000 +0000
+--- components/json_schema/json_schema_validator.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/json_schema/json_schema_validator.cc
-@@ -20,7 +20,11 @@
+@@ -21,7 +21,11 @@
  #include "base/strings/stringprintf.h"
  #include "base/values.h"
  #include "components/json_schema/json_schema_constants.h"
diff --git a/chromium-new/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc b/chromium-new/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc
index 589d8fc..83fd7e2 100644
--- a/chromium-new/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc
+++ b/chromium-new/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/keyed_service/core/dependency_graph_unittest.cc.orig	2016-06-24 01:02:18.000000000 +0000
+--- components/keyed_service/core/dependency_graph_unittest.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/keyed_service/core/dependency_graph_unittest.cc
 @@ -9,7 +9,11 @@
  #include "components/keyed_service/core/dependency_graph.h"
diff --git a/chromium-new/patches/patch-components_metrics_BUILD.gn b/chromium-new/patches/patch-components_metrics_BUILD.gn
new file mode 100644
index 0000000..cc58347
--- /dev/null
+++ b/chromium-new/patches/patch-components_metrics_BUILD.gn
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- components/metrics/BUILD.gn.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/metrics/BUILD.gn
+@@ -107,6 +107,13 @@ static_library("metrics") {
+   if (is_win) {
+     sources -= [ "machine_id_provider_stub.cc" ]
+   }
++
++  if (is_bsd) {
++    sources -= [
++      "system_memory_stats_recorder_linux.cc"
++    ]
++  }
++
+ }
+ 
+ if (!is_ios) {
+@@ -266,7 +273,7 @@ static_library("test_support") {
+   ]
+ }
+ 
+-if (is_linux) {
++if (is_linux || is_bsd) {
+   # GYP version: components/metrics.gypi:metrics_serialization
+   static_library("serialization") {
+     sources = [
+@@ -321,7 +328,7 @@ source_set("unit_tests") {
+     "//ui/gfx/geometry",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [ "serialization/serialization_utils_unittest.cc" ]
+     deps += [ ":serialization" ]
+   }
diff --git a/chromium-new/patches/patch-components_metrics_drive__metrics__provider__linux.cc b/chromium-new/patches/patch-components_metrics_drive__metrics__provider__linux.cc
index 88c480e..87e79f8 100644
--- a/chromium-new/patches/patch-components_metrics_drive__metrics__provider__linux.cc
+++ b/chromium-new/patches/patch-components_metrics_drive__metrics__provider__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/metrics/drive_metrics_provider_linux.cc.orig	2016-06-24 01:02:18.000000000 +0000
+--- components/metrics/drive_metrics_provider_linux.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/metrics/drive_metrics_provider_linux.cc
 @@ -4,7 +4,13 @@
  
diff --git a/chromium-new/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc b/chromium-new/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc
index 7d75a0e..2e677e9 100644
--- a/chromium-new/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc
+++ b/chromium-new/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- components/metrics/system_memory_stats_recorder_linux.cc.orig	2016-06-24 01:02:18.000000000 +0000
+--- components/metrics/system_memory_stats_recorder_linux.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/metrics/system_memory_stats_recorder_linux.cc
 @@ -30,6 +30,7 @@ namespace metrics {
    UMA_HISTOGRAM_LINEAR(name, sample, 2500, 50)
  
  void RecordMemoryStats(RecordMemoryStatsType type) {
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_FREEBSD)
    base::SystemMemoryInfoKB memory;
    if (!base::GetSystemMemoryInfo(&memory))
      return;
@@ -14,7 +14,7 @@ $NetBSD$
        break;
      }
    }
-+#endif // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#endif // !defined(OS_FREEBSD)
  }
  
  }  // namespace metrics
diff --git a/chromium-new/patches/patch-components_neterror_resources_neterror.js b/chromium-new/patches/patch-components_neterror_resources_neterror.js
index ed2c786..c5234da 100644
--- a/chromium-new/patches/patch-components_neterror_resources_neterror.js
+++ b/chromium-new/patches/patch-components_neterror_resources_neterror.js
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/neterror/resources/neterror.js.orig	2016-06-24 01:02:18.000000000 +0000
+--- components/neterror/resources/neterror.js.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/neterror/resources/neterror.js
 @@ -147,7 +147,7 @@ function setUpCachedButton(buttonStrings
  }
diff --git a/chromium-new/patches/patch-components_os__crypt_os__crypt.h b/chromium-new/patches/patch-components_os__crypt_os__crypt.h
new file mode 100644
index 0000000..40183e5
--- /dev/null
+++ b/chromium-new/patches/patch-components_os__crypt_os__crypt.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- components/os_crypt/os_crypt.h.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/os_crypt/os_crypt.h
+@@ -13,7 +13,7 @@
+ #include "base/strings/string16.h"
+ #include "build/build_config.h"
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "components/os_crypt/key_storage_linux.h"
+ #endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ 
+@@ -23,7 +23,7 @@
+ // true for Linux, if a password management tool is available.
+ class OSCrypt {
+  public:
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   // If |store_type| is a known password store, we will attempt to use it.
+   // In any other case, we default to auto-detecting the store.
+   // This should not be changed after OSCrypt has been used.
diff --git a/chromium-new/patches/patch-components_password__manager_core_browser_import_csv__reader.cc b/chromium-new/patches/patch-components_password__manager_core_browser_import_csv__reader.cc
index c0b7e7b..b44e636 100644
--- a/chromium-new/patches/patch-components_password__manager_core_browser_import_csv__reader.cc
+++ b/chromium-new/patches/patch-components_password__manager_core_browser_import_csv__reader.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/password_manager/core/browser/import/csv_reader.cc.orig	2016-06-24 01:02:18.000000000 +0000
+--- components/password_manager/core/browser/import/csv_reader.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/password_manager/core/browser/import/csv_reader.cc
 @@ -9,7 +9,11 @@
  #include "base/logging.h"
diff --git a/chromium-new/patches/patch-components_plugins_renderer_BUILD.gn b/chromium-new/patches/patch-components_plugins_renderer_BUILD.gn
new file mode 100644
index 0000000..c70a7db
--- /dev/null
+++ b/chromium-new/patches/patch-components_plugins_renderer_BUILD.gn
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- components/plugins/renderer/BUILD.gn.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/plugins/renderer/BUILD.gn
+@@ -25,6 +25,7 @@ static_library("renderer") {
+   }
+ 
+   deps = [
++    "//v8",
+     "//content/public/child",
+     "//content/public/common",
+     "//content/public/renderer",
+@@ -33,6 +34,5 @@ static_library("renderer") {
+     "//third_party/WebKit/public:blink",
+     "//third_party/re2",
+     "//ui/base",
+-    "//v8",
+   ]
+ }
diff --git a/chromium-new/patches/patch-components_plugins_renderer_plugin__placeholder.cc b/chromium-new/patches/patch-components_plugins_renderer_plugin__placeholder.cc
index 81b1d80..9f08436 100644
--- a/chromium-new/patches/patch-components_plugins_renderer_plugin__placeholder.cc
+++ b/chromium-new/patches/patch-components_plugins_renderer_plugin__placeholder.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/plugins/renderer/plugin_placeholder.cc.orig	2016-06-24 01:02:18.000000000 +0000
+--- components/plugins/renderer/plugin_placeholder.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/plugins/renderer/plugin_placeholder.cc
 @@ -11,7 +11,11 @@
  #include "gin/object_template_builder.h"
diff --git a/chromium-new/patches/patch-components_policy_BUILD.gn b/chromium-new/patches/patch-components_policy_BUILD.gn
new file mode 100644
index 0000000..a0918e0
--- /dev/null
+++ b/chromium-new/patches/patch-components_policy_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- components/policy/BUILD.gn.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/policy/BUILD.gn
+@@ -108,7 +108,7 @@ if (enable_configuration_policy) {
+     if (is_android) {
+       outputs += policy_templates_android_outputs
+     }
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       outputs += policy_templates_linux_outputs
+     }
+     if (is_mac) {
diff --git a/chromium-new/patches/patch-components_policy_core_common_schema.cc b/chromium-new/patches/patch-components_policy_core_common_schema.cc
index 6e5f7e4..cebe8cb 100644
--- a/chromium-new/patches/patch-components_policy_core_common_schema.cc
+++ b/chromium-new/patches/patch-components_policy_core_common_schema.cc
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- components/policy/core/common/schema.cc.orig	2016-06-24 01:02:18.000000000 +0000
+--- components/policy/core/common/schema.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/policy/core/common/schema.cc
 @@ -21,7 +21,11 @@
  #include "components/json_schema/json_schema_constants.h"
  #include "components/json_schema/json_schema_validator.h"
  #include "components/policy/core/common/schema_internal.h"
-+#if defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_BSD)
 +#include <re2/re2.h>
 +#else
  #include "third_party/re2/src/re2/re2.h"
diff --git a/chromium-new/patches/patch-components_policy_resources_policy__templates.json b/chromium-new/patches/patch-components_policy_resources_policy__templates.json
index d4a0cb0..b7712d6 100644
--- a/chromium-new/patches/patch-components_policy_resources_policy__templates.json
+++ b/chromium-new/patches/patch-components_policy_resources_policy__templates.json
@@ -1,31 +1,49 @@
 $NetBSD$
 
---- components/policy/resources/policy_templates.json.orig	2016-06-24 01:02:18.000000000 +0000
+--- components/policy/resources/policy_templates.json.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/policy/resources/policy_templates.json
-@@ -1924,7 +1924,7 @@
+@@ -909,7 +909,7 @@
+           'name': 'RemoteAccessHostMatchUsername',
+           'type': 'main',
+           'schema': { 'type': 'boolean' },
+-          'supported_on': ['chrome.linux:25-', 'chrome.mac:25-', 'chrome_os:42-'],
++          'supported_on': ['chrome.linux:25-', 'chrome.freebsd:25-', 'chrome.mac:25-', 'chrome_os:42-'],
+           'features': {
+             'dynamic_refresh': True,
+             'per_profile': False,
+@@ -1930,7 +1930,7 @@
            'name': 'GSSAPILibraryName',
            'type': 'string',
            'schema': { 'type': 'string' },
 -          'supported_on': ['chrome.linux:9-'],
-+          'supported_on': ['chrome.linux:9-', 'chrome.freebsd:9-', 'chrome.netbsd:9-'],
++          'supported_on': ['chrome.linux:9-', 'chrome.freebsd:9-'],
            'features': {
              'dynamic_refresh': False,
              'per_profile': False,
-@@ -4587,7 +4587,7 @@
+@@ -4601,7 +4601,7 @@
        'name': 'RequireOnlineRevocationChecksForLocalAnchors',
        'type': 'main',
        'schema': { 'type': 'boolean' },
 -      'supported_on': ['chrome_os:30-', 'chrome.linux:30-', 'chrome.win:30-'],
-+      'supported_on': ['chrome_os:30-', 'chrome.linux:30-', 'chrome.freebsd:30-', 'chrome.win:30-', 'chrome.netbsd:30-'],
++      'supported_on': ['chrome_os:30-', 'chrome.linux:30-', 'chrome.freebsd:30-', 'chrome.win:30-'],
        'features': {
          'dynamic_refresh': True,
          'per_profile': False,
-@@ -5416,7 +5416,7 @@
+@@ -5449,7 +5449,7 @@
        'name': 'BackgroundModeEnabled',
        'type': 'main',
        'schema': { 'type': 'boolean' },
 -      'supported_on': ['chrome.win:19-', 'chrome.linux:19-'],
-+      'supported_on': ['chrome.win:19-', 'chrome.linux:19-', 'chrome.freebsd:19-', 'chrome.netbsd:19-'],
++      'supported_on': ['chrome.win:19-', 'chrome.linux:19-', 'chrome.freebsd:19-'],
        'features': {
          'can_be_recommended': True,
          'dynamic_refresh': True,
+@@ -5974,7 +5974,7 @@
+       'name': 'FullscreenAllowed',
+       'type': 'main',
+       'schema': { 'type': 'boolean' },
+-      'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-'],
++      'supported_on': ['chrome.win:31-', 'chrome.linux:31-', 'chrome_os:31-', 'chrome.freebsd:31-'],
+       'features': {
+         'dynamic_refresh': True,
+         'per_profile': True,
diff --git a/chromium-new/patches/patch-components_policy_tools_generate__policy__source.py b/chromium-new/patches/patch-components_policy_tools_generate__policy__source.py
index f99caa3..f7dc466 100644
--- a/chromium-new/patches/patch-components_policy_tools_generate__policy__source.py
+++ b/chromium-new/patches/patch-components_policy_tools_generate__policy__source.py
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- components/policy/tools/generate_policy_source.py.orig	2016-06-24 01:02:19.000000000 +0000
+--- components/policy/tools/generate_policy_source.py.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/policy/tools/generate_policy_source.py
 @@ -102,7 +102,7 @@ class PolicyDetails:
        if platform.startswith('chrome.'):
          platform_sub = platform[7:]
          if platform_sub == '*':
 -          self.platforms.extend(['win', 'mac', 'linux'])
-+          self.platforms.extend(['win', 'mac', 'linux', 'freebsd', 'netbsd'])
++          self.platforms.extend(['win', 'mac', 'linux', 'netbsd'])
          else:
            self.platforms.append(platform_sub)
        else:
diff --git a/chromium-new/patches/patch-components_storage__monitor.gypi b/chromium-new/patches/patch-components_storage__monitor.gypi
deleted file mode 100644
index bba69ef..0000000
--- a/chromium-new/patches/patch-components_storage__monitor.gypi
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD$
-
---- components/storage_monitor.gypi.orig	2016-06-24 01:02:19.000000000 +0000
-+++ components/storage_monitor.gypi
-@@ -50,6 +50,32 @@
-         'storage_monitor/volume_mount_watcher_win.h',
-       ],
-       'conditions': [
-+        ['os_bsd == 1', {
-+          'sources!': [
-+            'storage_monitor/media_transfer_protocol_device_observer_linux.cc',
-+            'storage_monitor/media_transfer_protocol_device_observer_linux.h',
-+            'storage_monitor/test_media_transfer_protocol_manager_linux.cc',
-+            'storage_monitor/test_media_transfer_protocol_manager_linux.h',
-+            'storage_monitor/mtab_watcher_linux.cc',
-+            'storage_monitor/mtab_watcher_linux.h',
-+            'storage_monitor/storage_monitor_linux.cc',
-+            'storage_monitor/storage_monitor_linux.h',
-+            'storage_monitor/udev_util_linux.cc',
-+            'storage_monitor/udev_util_linux.h',
-+          ],
-+        }],
-+        ['OS == "freebsd"', {
-+          'sources': [
-+            'storage_monitor/storage_monitor_freebsd.cc',
-+            'storage_monitor/storage_monitor_freebsd.h',
-+          ],
-+        }],
-+        ['OS == "netbsd"', {
-+          'sources': [
-+            'storage_monitor/storage_monitor_netbsd.cc',
-+            'storage_monitor/storage_monitor_netbsd.h',
-+          ],
-+        }],
-         ['OS == "mac"', {
-           'link_settings': {
-             'libraries': [
diff --git a/chromium-new/patches/patch-components_storage__monitor_BUILD.gn b/chromium-new/patches/patch-components_storage__monitor_BUILD.gn
new file mode 100644
index 0000000..a6a9a89
--- /dev/null
+++ b/chromium-new/patches/patch-components_storage__monitor_BUILD.gn
@@ -0,0 +1,42 @@
+$NetBSD$
+
+--- components/storage_monitor/BUILD.gn.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/storage_monitor/BUILD.gn
+@@ -64,6 +64,23 @@ static_library("storage_monitor") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "media_transfer_protocol_device_observer_linux.cc",
++      "media_transfer_protocol_device_observer_linux.h",
++      "mtab_watcher_linux.cc",
++      "mtab_watcher_linux.h",
++      "storage_monitor_linux.cc",
++      "storage_monitor_linux.h",
++      "udev_util_linux.cc",
++      "udev_util_linux.h",
++    ]
++    sources += [
++      "storage_monitor_freebsd.cc",
++      "storage_monitor_freebsd.h",
++    ]
++  }
++
+   if (use_udev) {
+     deps += [ "//device/udev_linux" ]
+   } else if (is_linux) {
+@@ -119,6 +136,13 @@ static_library("test_support") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "test_media_transfer_protocol_manager_linux.cc",
++      "test_media_transfer_protocol_manager_linux.h",
++    ]
++  }
++
+   if (is_win) {
+     deps = [
+       "//testing/gtest",
diff --git a/chromium-new/patches/patch-components_storage__monitor_storage__monitor.cc b/chromium-new/patches/patch-components_storage__monitor_storage__monitor.cc
index 8bbf06c..8d04dda 100644
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor.cc
+++ b/chromium-new/patches/patch-components_storage__monitor_storage__monitor.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/storage_monitor/storage_monitor.cc.orig	2016-06-24 01:02:19.000000000 +0000
+--- components/storage_monitor/storage_monitor.cc.orig	2016-11-10 20:02:13.000000000 +0000
 +++ components/storage_monitor/storage_monitor.cc
 @@ -85,6 +85,7 @@ std::vector<StorageInfo> StorageMonitor:
  
diff --git a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc b/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc
index cc6f246..41c7f93 100644
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc
+++ b/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/storage_monitor/storage_monitor_freebsd.cc.orig	2016-07-10 13:25:12.307704674 +0000
+--- components/storage_monitor/storage_monitor_freebsd.cc.orig	2016-11-12 02:51:25.371759033 +0000
 +++ components/storage_monitor/storage_monitor_freebsd.cc
 @@ -0,0 +1,101 @@
 +// Copyright 2014 The Chromium Authors. All rights reserved.
diff --git a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.h b/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.h
index 8298762..f244646 100644
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.h
+++ b/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- components/storage_monitor/storage_monitor_freebsd.h.orig	2016-07-10 13:25:12.308178834 +0000
+--- components/storage_monitor/storage_monitor_freebsd.h.orig	2016-11-12 02:51:25.408237260 +0000
 +++ components/storage_monitor/storage_monitor_freebsd.h
-@@ -0,0 +1,46 @@
+@@ -0,0 +1,45 @@
 +// Copyright 2014 The Chromium Authors. All rights reserved.
 +// Use of this source code is governed by a BSD-style license that can be
 +// found in the LICENSE file.
@@ -22,7 +22,6 @@ $NetBSD$
 +#include "base/compiler_specific.h"
 +#include "base/files/file_path.h"
 +#include "base/files/file_path_watcher.h"
-+#include "base/memory/scoped_ptr.h"
 +#include "base/memory/weak_ptr.h"
 +#include "components/storage_monitor/storage_monitor.h"
 +#include "content/public/browser/browser_thread.h"
diff --git a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc b/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc
index c02e325..ea9e4ab 100644
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc
+++ b/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/storage_monitor/storage_monitor_netbsd.cc.orig	2016-07-18 10:41:10.337634800 +0000
+--- components/storage_monitor/storage_monitor_netbsd.cc.orig	2016-11-12 02:51:25.444800290 +0000
 +++ components/storage_monitor/storage_monitor_netbsd.cc
 @@ -0,0 +1,54 @@
 +// Copyright 2014 The Chromium Authors. All rights reserved.
diff --git a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.h b/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.h
index 2c67586..9b739d1 100644
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.h
+++ b/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/storage_monitor/storage_monitor_netbsd.h.orig	2016-07-18 10:41:14.673955086 +0000
+--- components/storage_monitor/storage_monitor_netbsd.h.orig	2016-11-12 02:51:25.481044810 +0000
 +++ components/storage_monitor/storage_monitor_netbsd.h
 @@ -0,0 +1,46 @@
 +// Copyright 2014 The Chromium Authors. All rights reserved.
diff --git a/chromium-new/patches/patch-components_sync_base_get__session__name__linux.cc b/chromium-new/patches/patch-components_sync_base_get__session__name__linux.cc
new file mode 100644
index 0000000..470c725
--- /dev/null
+++ b/chromium-new/patches/patch-components_sync_base_get__session__name__linux.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- components/sync/base/get_session_name_linux.cc.orig	2016-11-10 20:02:13.000000000 +0000
++++ components/sync/base/get_session_name_linux.cc
+@@ -4,7 +4,7 @@
+ 
+ #include "components/sync/base/get_session_name_linux.h"
+ 
+-#include <limits.h>  // for HOST_NAME_MAX
++#include <limits.h>  // for _POSIX_HOST_NAME_MAX
+ #include <unistd.h>  // for gethostname()
+ 
+ #include "base/linux_util.h"
+@@ -13,8 +13,8 @@ namespace syncer {
+ namespace internal {
+ 
+ std::string GetHostname() {
+-  char hostname[HOST_NAME_MAX];
+-  if (gethostname(hostname, HOST_NAME_MAX) == 0)  // Success.
++  char hostname[_POSIX_HOST_NAME_MAX];
++  if (gethostname(hostname, _POSIX_HOST_NAME_MAX) == 0)  // Success.
+     return hostname;
+   return base::GetLinuxDistro();
+ }
diff --git a/chromium-new/patches/patch-components_update__client_update__query__params.cc b/chromium-new/patches/patch-components_update__client_update__query__params.cc
index 3f08437..0f0ef88 100644
--- a/chromium-new/patches/patch-components_update__client_update__query__params.cc
+++ b/chromium-new/patches/patch-components_update__client_update__query__params.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/update_client/update_query_params.cc.orig	2016-06-24 01:02:19.000000000 +0000
+--- components/update_client/update_query_params.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ components/update_client/update_query_params.cc
 @@ -31,6 +31,10 @@ const char kOs[] =
      "linux";
diff --git a/chromium-new/patches/patch-components_url__matcher_regex__set__matcher.cc b/chromium-new/patches/patch-components_url__matcher_regex__set__matcher.cc
index 8214028..6a65eb1 100644
--- a/chromium-new/patches/patch-components_url__matcher_regex__set__matcher.cc
+++ b/chromium-new/patches/patch-components_url__matcher_regex__set__matcher.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- components/url_matcher/regex_set_matcher.cc.orig	2016-06-24 01:02:19.000000000 +0000
+--- components/url_matcher/regex_set_matcher.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ components/url_matcher/regex_set_matcher.cc
 @@ -10,8 +10,13 @@
  #include "base/stl_util.h"
diff --git a/chromium-new/patches/patch-components_url__matcher_url__matcher__factory.cc b/chromium-new/patches/patch-components_url__matcher_url__matcher__factory.cc
index 7d1a6f7..f01ca23 100644
--- a/chromium-new/patches/patch-components_url__matcher_url__matcher__factory.cc
+++ b/chromium-new/patches/patch-components_url__matcher_url__matcher__factory.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- components/url_matcher/url_matcher_factory.cc.orig	2016-06-24 01:02:19.000000000 +0000
+--- components/url_matcher/url_matcher_factory.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ components/url_matcher/url_matcher_factory.cc
-@@ -15,7 +15,11 @@
+@@ -16,7 +16,11 @@
  #include "base/values.h"
  #include "components/url_matcher/url_matcher_constants.h"
  #include "components/url_matcher/url_matcher_helpers.h"
diff --git a/chromium-new/patches/patch-components_variations_proto_study.proto b/chromium-new/patches/patch-components_variations_proto_study.proto
new file mode 100644
index 0000000..9925f63
--- /dev/null
+++ b/chromium-new/patches/patch-components_variations_proto_study.proto
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- components/variations/proto/study.proto.orig	2016-11-10 20:02:14.000000000 +0000
++++ components/variations/proto/study.proto
+@@ -189,6 +189,7 @@ message Study {
+     PLATFORM_CHROMEOS = 3;
+     PLATFORM_ANDROID  = 4;
+     PLATFORM_IOS      = 5;
++    PLATFORM_BSD      = 6;
+   }
+ 
+   // Possible form factors Chrome is running on.
diff --git a/chromium-new/patches/patch-components_webcrypto_algorithms_test__helpers.cc b/chromium-new/patches/patch-components_webcrypto_algorithms_test__helpers.cc
index 917f900..9fe9f5d 100644
--- a/chromium-new/patches/patch-components_webcrypto_algorithms_test__helpers.cc
+++ b/chromium-new/patches/patch-components_webcrypto_algorithms_test__helpers.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- components/webcrypto/algorithms/test_helpers.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- components/webcrypto/algorithms/test_helpers.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ components/webcrypto/algorithms/test_helpers.cc
-@@ -26,7 +26,11 @@
+@@ -25,7 +25,11 @@
  #include "components/webcrypto/status.h"
  #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
  #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h"
diff --git a/chromium-new/patches/patch-content_app_BUILD.gn b/chromium-new/patches/patch-content_app_BUILD.gn
new file mode 100644
index 0000000..81b6f7b
--- /dev/null
+++ b/chromium-new/patches/patch-content_app_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/app/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/app/BUILD.gn
+@@ -66,7 +66,7 @@ template("implement_content_app") {
+     ]
+   }
+ 
+-  if (is_linux && enable_plugins) {
++  if ((is_linux || is_bsd) && enable_plugins) {
+     content_app_deps += [ "//content/ppapi_plugin:ppapi_plugin_sources" ]
+   }
+ 
diff --git a/chromium-new/patches/patch-content_app_content__main__runner.cc b/chromium-new/patches/patch-content_app_content__main__runner.cc
index c5b3a3f..0fa892e 100644
--- a/chromium-new/patches/patch-content_app_content__main__runner.cc
+++ b/chromium-new/patches/patch-content_app_content__main__runner.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- content/app/content_main_runner.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/app/content_main_runner.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/app/content_main_runner.cc
-@@ -96,10 +96,10 @@
+@@ -97,10 +97,10 @@
  #include "base/posix/global_descriptors.h"
  #include "content/public/common/content_descriptors.h"
  
@@ -15,7 +15,7 @@ $NetBSD$
  #include "content/zygote/zygote_main.h"
  #endif
  
-@@ -301,7 +301,7 @@ struct MainFunction {
+@@ -297,7 +297,7 @@ struct MainFunction {
    int (*function)(const MainFunctionParams&);
  };
  
@@ -24,7 +24,7 @@ $NetBSD$
  // On platforms that use the zygote, we have a special subset of
  // subprocesses that are launched via the zygote.  This function
  // fills in some process-launching bits around ZygoteMain().
-@@ -353,7 +353,7 @@ int RunZygote(const MainFunctionParams& 
+@@ -349,7 +349,7 @@ int RunZygote(const MainFunctionParams& 
    NOTREACHED() << "Unknown zygote process type: " << process_type;
    return 1;
  }
@@ -33,7 +33,7 @@ $NetBSD$
  
  static void RegisterMainThreadFactories() {
  #if !defined(CHROME_MULTIPLE_DLL_BROWSER) && !defined(CHROME_MULTIPLE_DLL_CHILD)
-@@ -423,7 +423,7 @@ int RunNamedProcessTypeMain(
+@@ -419,7 +419,7 @@ int RunNamedProcessTypeMain(
      }
    }
  
diff --git a/chromium-new/patches/patch-content_browser_BUILD.gn b/chromium-new/patches/patch-content_browser_BUILD.gn
new file mode 100644
index 0000000..5190f20
--- /dev/null
+++ b/chromium-new/patches/patch-content_browser_BUILD.gn
@@ -0,0 +1,60 @@
+$NetBSD$
+
+--- content/browser/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/browser/BUILD.gn
+@@ -196,7 +196,7 @@ source_set("browser") {
+       "//third_party/webrtc/media:rtc_media",
+       "//third_party/webrtc/modules/desktop_capture:primitives",
+     ]
+-    if (is_linux || is_mac || is_win) {
++    if (is_linux || is_bsd || is_mac || is_win) {
+       sources += [
+         "media/capture/desktop_capture_device.cc",
+         "media/capture/desktop_capture_device.h",
+@@ -288,7 +288,7 @@ source_set("browser") {
+     }
+   }
+ 
+-  if (is_linux && use_aura) {
++  if ((is_linux || is_bsd) && use_aura) {
+     deps += [ "//build/linux:fontconfig" ]
+   }
+ 
+@@ -368,6 +368,19 @@ source_set("browser") {
+       "//chromeos",
+       "//chromeos:power_manager_proto",
+     ]
++  } else if (is_bsd) {
++    sources -= [
++        "zygote_host/zygote_communication_linux.cc",
++        "zygote_host/zygote_communication_linux.h",
++        "zygote_host/zygote_handle_linux.cc",
++        "zygote_host/zygote_host_impl_linux.cc",
++        "zygote_host/zygote_host_impl_linux.h",
++        "../zygote/zygote_linux.cc",
++        "../zygote/zygote_linux.h",
++        "../zygote/zygote_main_linux.cc",
++        "download/file_metadata_linux.cc",
++        "download/file_metadata_linux.h",
++    ]
+   }
+ 
+   if (use_aura) {
+@@ -450,7 +463,7 @@ source_set("browser") {
+     deps += [ "//third_party/flac" ]
+   }
+ 
+-  if (is_linux && use_dbus) {
++  if ((is_linux || is_bsd) && use_dbus) {
+     deps += [ "//dbus" ]
+   }
+ 
+@@ -461,7 +474,7 @@ source_set("browser") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//third_party/boringssl" ]
+   }
+ 
diff --git a/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility.h b/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility.h
index 6f2c5a9..fdbb25f 100644
--- a/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility.h
+++ b/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- content/browser/accessibility/browser_accessibility.h.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/accessibility/browser_accessibility.h.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/accessibility/browser_accessibility.h
 @@ -38,7 +38,7 @@
  #define PLATFORM_HAS_NATIVE_ACCESSIBILITY_IMPL 1
diff --git a/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility__manager.h b/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility__manager.h
index eb658b6..d940474 100644
--- a/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility__manager.h
+++ b/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility__manager.h
@@ -1,17 +1,17 @@
 $NetBSD$
 
---- content/browser/accessibility/browser_accessibility_manager.h.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/accessibility/browser_accessibility_manager.h.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/accessibility/browser_accessibility_manager.h
-@@ -32,7 +32,7 @@ class BrowserAccessibilityManager;
+@@ -33,7 +33,7 @@ class BrowserAccessibilityManager;
  class BrowserAccessibilityManagerAndroid;
  #elif defined(OS_WIN)
  class BrowserAccessibilityManagerWin;
 -#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)
 +#elif (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(USE_X11)
  class BrowserAccessibilityManagerAuraLinux;
- #endif
- 
-@@ -271,7 +271,7 @@ class CONTENT_EXPORT BrowserAccessibilit
+ #elif defined(OS_MACOSX)
+ class BrowserAccessibilityManagerMac;
+@@ -273,7 +273,7 @@ class CONTENT_EXPORT BrowserAccessibilit
    BrowserAccessibilityManagerAndroid* ToBrowserAccessibilityManagerAndroid();
  #endif
  
diff --git a/chromium-new/patches/patch-content_browser_browser__main__loop.cc b/chromium-new/patches/patch-content_browser_browser__main__loop.cc
index e08260f..89b012c 100644
--- a/chromium-new/patches/patch-content_browser_browser__main__loop.cc
+++ b/chromium-new/patches/patch-content_browser_browser__main__loop.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- content/browser/browser_main_loop.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/browser_main_loop.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/browser_main_loop.cc
-@@ -191,7 +191,7 @@
+@@ -204,7 +204,7 @@
  namespace content {
  namespace {
  
@@ -10,13 +10,22 @@ $NetBSD$
 +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
  void SetupSandbox(const base::CommandLine& parsed_command_line) {
    TRACE_EVENT0("startup", "SetupSandbox");
-   base::FilePath sandbox_binary;
-@@ -438,7 +438,7 @@ void BrowserMainLoop::EarlyInitializatio
+ 
+@@ -432,7 +432,7 @@ void BrowserMainLoop::Init() {
+ void BrowserMainLoop::EarlyInitialization() {
    TRACE_EVENT0("startup", "BrowserMainLoop::EarlyInitialization");
-   TRACK_SCOPED_REGION("Startup", "BrowserMainLoop::EarlyInitialization");
  
 -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
 +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
    // No thread should be created before this call, as SetupSandbox()
    // will end-up using fork().
    SetupSandbox(parsed_command_line_);
+@@ -472,7 +472,7 @@ void BrowserMainLoop::EarlyInitializatio
+   // We use quite a few file descriptors for our IPC, and the default limit on
+   // the Mac is low (256), so bump it up.
+   base::SetFdLimit(1024);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   // Same for Linux. The default various per distro, but it is 1024 on Fedora.
+   // Low soft limits combined with liberal use of file descriptors means power
+   // users can easily hit this limit with many open tabs. Bump up the limit to
diff --git a/chromium-new/patches/patch-content_browser_browser__shutdown__profile__dumper.cc b/chromium-new/patches/patch-content_browser_browser__shutdown__profile__dumper.cc
deleted file mode 100644
index acaa31f..0000000
--- a/chromium-new/patches/patch-content_browser_browser__shutdown__profile__dumper.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/browser_shutdown_profile_dumper.cc.orig	2016-06-24 01:02:20.000000000 +0000
-+++ content/browser/browser_shutdown_profile_dumper.cc
-@@ -2,6 +2,8 @@
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- 
-+#include <stdio.h>
-+
- #include "content/browser/browser_shutdown_profile_dumper.h"
- 
- #include "base/command_line.h"
diff --git a/chromium-new/patches/patch-content_browser_child__process__launcher.cc b/chromium-new/patches/patch-content_browser_child__process__launcher.cc
index 033cde4..951ae58 100644
--- a/chromium-new/patches/patch-content_browser_child__process__launcher.cc
+++ b/chromium-new/patches/patch-content_browser_child__process__launcher.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- content/browser/child_process_launcher.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/child_process_launcher.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/child_process_launcher.cc
-@@ -251,7 +251,7 @@ void LaunchOnLauncherThread(const Notify
+@@ -258,7 +258,7 @@ void LaunchOnLauncherThread(const Notify
    // We need to close the client end of the IPC channel to reliably detect
    // child termination.
  
@@ -11,7 +11,7 @@ $NetBSD$
    ZygoteHandle* zygote_handle = delegate->GetZygote();
    // If |zygote_handle| is null, a zygote should not be used.
    if (zygote_handle) {
-@@ -355,7 +355,7 @@ void TerminateOnLauncherThread(ZygoteHan
+@@ -364,7 +364,7 @@ void TerminateOnLauncherThread(ZygoteHan
    process.Terminate(RESULT_CODE_NORMAL_EXIT, false);
    // On POSIX, we must additionally reap the child.
  #if defined(OS_POSIX)
@@ -20,7 +20,7 @@ $NetBSD$
    if (zygote) {
      // If the renderer was created via a zygote, we have to proxy the reaping
      // through the zygote process.
-@@ -459,7 +459,7 @@ void ChildProcessLauncher::Launch(
+@@ -485,7 +485,7 @@ void ChildProcessLauncher::Launch(
  
  void ChildProcessLauncher::UpdateTerminationStatus(bool known_dead) {
    DCHECK(CalledOnValidThread());
@@ -29,8 +29,8 @@ $NetBSD$
    if (zygote_) {
      termination_status_ = zygote_->GetTerminationStatus(
          process_.Handle(), known_dead, &exit_code_);
-@@ -536,7 +536,7 @@ void ChildProcessLauncher::Notify(Zygote
-                                     mojo_platform_channel_.PassServerHandle());
+@@ -566,7 +566,7 @@ void ChildProcessLauncher::Notify(Zygote
+                                     mojo_child_token_, process_error_callback_);
    }
  
 -#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
diff --git a/chromium-new/patches/patch-content_browser_device__sensors_data__fetcher__shared__memory.h b/chromium-new/patches/patch-content_browser_device__sensors_data__fetcher__shared__memory.h
new file mode 100644
index 0000000..126d904
--- /dev/null
+++ b/chromium-new/patches/patch-content_browser_device__sensors_data__fetcher__shared__memory.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/device_sensors/data_fetcher_shared_memory.h.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/browser/device_sensors/data_fetcher_shared_memory.h
+@@ -45,7 +45,7 @@ class CONTENT_EXPORT DataFetcherSharedMe
+   bool Start(ConsumerType consumer_type, void* buffer) override;
+   bool Stop(ConsumerType consumer_type) override;
+ 
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ #if !defined(OS_CHROMEOS)
+   DeviceMotionHardwareBuffer* motion_buffer_ = nullptr;
+   DeviceOrientationHardwareBuffer* orientation_buffer_ = nullptr;
diff --git a/chromium-new/patches/patch-content_browser_devtools_protocol_color__picker.cc b/chromium-new/patches/patch-content_browser_devtools_protocol_color__picker.cc
new file mode 100644
index 0000000..ad16e84
--- /dev/null
+++ b/chromium-new/patches/patch-content_browser_devtools_protocol_color__picker.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/devtools/protocol/color_picker.cc.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/browser/devtools/protocol/color_picker.cc
+@@ -151,7 +151,7 @@ void ColorPicker::UpdateCursor() {
+   // magnified projection only with centered hotspot.
+   // Mac Retina requires cursor to be > 120px in order to render smoothly.
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   const float kCursorSize = 63;
+   const float kDiameter = 63;
+   const float kHotspotOffset = 32;
diff --git a/chromium-new/patches/patch-content_browser_download_base__file.cc b/chromium-new/patches/patch-content_browser_download_base__file.cc
index ac092d8..f3f5765 100644
--- a/chromium-new/patches/patch-content_browser_download_base__file.cc
+++ b/chromium-new/patches/patch-content_browser_download_base__file.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- content/browser/download/base_file.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/download/base_file.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/download/base_file.cc
-@@ -186,7 +186,8 @@ scoped_ptr<crypto::SecureHash> BaseFile:
+@@ -193,7 +193,8 @@ std::unique_ptr<crypto::SecureHash> Base
  }
  
  // OS_WIN, OS_MACOSX and OS_LINUX have specialized implementations.
diff --git a/chromium-new/patches/patch-content_browser_download_base__file__linux.cc b/chromium-new/patches/patch-content_browser_download_base__file__linux.cc
index 53a8368..8d28dd6 100644
--- a/chromium-new/patches/patch-content_browser_download_base__file__linux.cc
+++ b/chromium-new/patches/patch-content_browser_download_base__file__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- content/browser/download/base_file_linux.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/download/base_file_linux.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/download/base_file_linux.cc
 @@ -16,7 +16,9 @@ DownloadInterruptReason BaseFile::Annota
    DCHECK_CURRENTLY_ON(BrowserThread::FILE);
diff --git a/chromium-new/patches/patch-content_browser_geolocation_location__arbitrator__impl.cc b/chromium-new/patches/patch-content_browser_geolocation_location__arbitrator__impl.cc
deleted file mode 100644
index badc6a4..0000000
--- a/chromium-new/patches/patch-content_browser_geolocation_location__arbitrator__impl.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/geolocation/location_arbitrator_impl.cc.orig	2016-06-24 01:02:20.000000000 +0000
-+++ content/browser/geolocation/location_arbitrator_impl.cc
-@@ -163,7 +163,7 @@ LocationProvider* LocationArbitratorImpl
- }
- 
- LocationProvider* LocationArbitratorImpl::NewSystemLocationProvider() {
--#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD)
-   return NULL;
- #else
-   return content::NewSystemLocationProvider();
diff --git a/chromium-new/patches/patch-content_browser_geolocation_wifi__data__provider__freebsd.cc b/chromium-new/patches/patch-content_browser_geolocation_wifi__data__provider__freebsd.cc
deleted file mode 100644
index 14a9dde..0000000
--- a/chromium-new/patches/patch-content_browser_geolocation_wifi__data__provider__freebsd.cc
+++ /dev/null
@@ -1,206 +0,0 @@
-$NetBSD$
-
---- content/browser/geolocation/wifi_data_provider_freebsd.cc.orig	2016-07-10 13:25:12.347697055 +0000
-+++ content/browser/geolocation/wifi_data_provider_freebsd.cc
-@@ -0,0 +1,201 @@
-+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+// For FreeBSD we use the getifaddrs(3) to obtain the list of interfaces
-+// and then check for those with an 802.11 media type and able to return
-+// a list of stations.  This is similar to ifconfig(8).
-+
-+#include "content/browser/geolocation/wifi_data_provider_freebsd.h"
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <sys/sockio.h>
-+#include <net/if.h>
-+#include <net/if_media.h>
-+#include <ifaddrs.h>
-+#include <net80211/ieee80211_ioctl.h>
-+#include <net/ethernet.h>
-+
-+#include "base/strings/utf_string_conversions.h"
-+#include "content/browser/geolocation/wifi_data_provider_common.h"
-+#include "content/browser/geolocation/wifi_data_provider_manager.h"
-+
-+namespace content {
-+namespace {
-+// The time periods, in milliseconds, between successive polls of the wifi data.
-+const int kDefaultPollingInterval = 10000;  // 10s
-+const int kNoChangePollingInterval = 120000;  // 2 mins
-+const int kTwoNoChangePollingInterval = 600000;  // 10 mins
-+const int kNoWifiPollingIntervalMilliseconds = 20 * 1000; // 20s
-+
-+// Convert a wifi frequency to the corresponding channel.
-+// Taken from wifi_data_provider_linux.cc where it says this was
-+// adapted from geolocaiton/wifilib.cc in googleclient (internal to google).
-+int frquency_to_channel(int frequency_Mhz) {
-+	if (frequency_Mhz >= 2412 && frequency_Mhz <= 2472)  // Channels 1-13.
-+		return (frequency_Mhz - 2407) / 5;
-+	if (frequency_Mhz == 2484)
-+		return 14;
-+	if (frequency_Mhz > 5000 && frequency_Mhz < 6000)  // .11a bands.
-+		return (frequency_Mhz - 5000) / 5;
-+	// Ignore everything else.
-+	return AccessPointData().channel;  // invalid channel
-+}
-+
-+// Provides the wifi API binding for FreeBSD.
-+class AccessPointDataFreeBSD : public WifiDataProviderCommon::WlanApiInterface {
-+public:
-+	AccessPointDataFreeBSD();
-+	~AccessPointDataFreeBSD();
-+
-+	// this does nothing
-+	bool Init();
-+
-+	// get the AP data
-+	virtual bool GetAccessPointData(WifiData::AccessPointDataSet* data);
-+
-+private:
-+	DISALLOW_COPY_AND_ASSIGN(AccessPointDataFreeBSD);
-+};
-+
-+AccessPointDataFreeBSD::AccessPointDataFreeBSD() {
-+}
-+
-+AccessPointDataFreeBSD::~AccessPointDataFreeBSD() {
-+}
-+
-+bool AccessPointDataFreeBSD::Init() {
-+	return true;
-+}
-+
-+bool AccessPointDataFreeBSD::GetAccessPointData(WifiData::AccessPointDataSet* data) {
-+	bool			res;
-+	char			*dupn;
-+	struct ifaddrs		*ifal, *ifa;
-+	struct ifreq		ifr;
-+	struct ifmediareq	ifmr;
-+	struct ieee80211req 	i802r;
-+	int			s;
-+	char			iscanbuf[32*1024], *vsr;
-+	unsigned		len;
-+	AccessPointData		apd;
-+
-+	res = false;
-+	if (getifaddrs(&ifal) < 0)
-+		return res;
-+
-+	dupn = NULL;
-+	for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+		memset(&ifr, 0, sizeof(ifr));
-+
-+		if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
-+			continue;
-+		dupn = ifa->ifa_name;
-+
-+		strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
-+		ifr.ifr_addr.sa_family = AF_LOCAL;
-+
-+		if ((s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0)) < 0)
-+			continue;
-+
-+		(void) memset(&ifmr, 0, sizeof(ifmr));
-+		(void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
-+
-+		if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
-+			close(s);
-+			continue;
-+		}
-+		if (IFM_TYPE(ifmr.ifm_active) != IFM_IEEE80211) {
-+			close(s);
-+			continue;
-+		}
-+
-+		(void) memset(&i802r, 0, sizeof(i802r));
-+		(void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
-+		i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
-+		i802r.i_data = iscanbuf;
-+		i802r.i_len = sizeof(iscanbuf);
-+		if (ioctl(s, SIOCG80211, &i802r) < 0) {
-+			close(s);
-+			continue;
-+		}
-+
-+		close(s);
-+
-+		vsr = (char *) i802r.i_data;
-+		len = i802r.i_len;
-+		while (len >= sizeof(struct ieee80211req_scan_result)) {
-+			struct ieee80211req_scan_result *isr;
-+			char		*id;
-+			int		idlen;
-+			char		ssid[IEEE80211_NWID_LEN+1];
-+
-+			isr = (struct ieee80211req_scan_result *) vsr;
-+
-+			if (isr->isr_meshid_len) {
-+				id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
-+				idlen = isr->isr_meshid_len;
-+			}
-+			else {
-+				id = vsr + isr->isr_ie_off;
-+				idlen = isr->isr_ssid_len;
-+			}
-+			strncpy(ssid, id, idlen);
-+			ssid[idlen] = '\0';
-+			apd.ssid = base::UTF8ToUTF16(ssid);
-+			apd.mac_address = MacAddressAsString16(isr->isr_bssid);
-+			apd.radio_signal_strength = (isr->isr_rssi/2) + isr->isr_noise;
-+			apd.signal_to_noise = apd.radio_signal_strength - isr->isr_noise;
-+			apd.channel = frquency_to_channel(isr->isr_freq);
-+			VLOG(1) << "FreeBSD access point: "
-+				<< "SSID: " << apd.ssid << ", "
-+				<< "MAC: " << apd.mac_address << ", "
-+				<< "Strength: " << apd.radio_signal_strength << ":"
-+					        << apd.signal_to_noise << ", "
-+				<< "Channel: " << apd.channel;
-+			data->insert(apd);
-+			res = true;
-+			len -= isr->isr_len;
-+			vsr += isr->isr_len;
-+		}
-+        }
-+
-+	freeifaddrs(ifal);
-+
-+	return res;
-+}
-+
-+}  // namespace
-+
-+// static
-+WifiDataProvider* WifiDataProviderManager::DefaultFactoryFunction() {
-+	return new WifiDataProviderFreeBSD();
-+}
-+
-+WifiDataProviderFreeBSD::WifiDataProviderFreeBSD() {
-+}
-+
-+WifiDataProviderFreeBSD::~WifiDataProviderFreeBSD() {
-+}
-+
-+WifiDataProviderCommon::WlanApiInterface* WifiDataProviderFreeBSD::NewWlanApi() {
-+
-+	scoped_ptr<AccessPointDataFreeBSD> wlan_api(new AccessPointDataFreeBSD);
-+	if (wlan_api->Init())
-+		return wlan_api.release();
-+
-+	return NULL;
-+}
-+
-+WifiPollingPolicy* WifiDataProviderFreeBSD::NewPollingPolicy() {
-+	return new GenericWifiPollingPolicy<kDefaultPollingInterval,
-+	    kNoChangePollingInterval,
-+	    kTwoNoChangePollingInterval,
-+	    kNoWifiPollingIntervalMilliseconds>;
-+}
-+
-+} // namespace content
diff --git a/chromium-new/patches/patch-content_browser_geolocation_wifi__data__provider__freebsd.h b/chromium-new/patches/patch-content_browser_geolocation_wifi__data__provider__freebsd.h
deleted file mode 100644
index 3b68656..0000000
--- a/chromium-new/patches/patch-content_browser_geolocation_wifi__data__provider__freebsd.h
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD$
-
---- content/browser/geolocation/wifi_data_provider_freebsd.h.orig	2016-07-10 13:25:12.348954436 +0000
-+++ content/browser/geolocation/wifi_data_provider_freebsd.h
-@@ -0,0 +1,30 @@
-+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_FREEBSD_H_
-+#define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_FREEBSD_H_
-+
-+#include "base/compiler_specific.h"
-+#include "content/browser/geolocation/wifi_data_provider_common.h"
-+#include "content/common/content_export.h"
-+
-+namespace content {
-+
-+class CONTENT_EXPORT WifiDataProviderFreeBSD : public WifiDataProviderCommon {
-+ public:
-+  WifiDataProviderFreeBSD();
-+
-+ private:
-+  virtual ~WifiDataProviderFreeBSD();
-+
-+  // WifiDataProviderCommon
-+  virtual WlanApiInterface* NewWlanApi() override;
-+  virtual WifiPollingPolicy* NewPollingPolicy() override;
-+
-+  DISALLOW_COPY_AND_ASSIGN(WifiDataProviderFreeBSD);
-+};
-+
-+}  // namespace content
-+
-+#endif  // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_FREEBSD_H_
diff --git a/chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc b/chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
index 0228352..21e8efe 100644
--- a/chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
+++ b/chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
@@ -1,36 +1,45 @@
 $NetBSD$
 
---- content/browser/gpu/gpu_data_manager_impl_private.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/gpu/gpu_data_manager_impl_private.cc
-@@ -470,8 +470,10 @@ void GpuDataManagerImplPrivate::SetGLStr
+@@ -363,7 +363,7 @@ bool GpuDataManagerImplPrivate::GpuAcces
+     // strings even if all features are blacklisted. If all GPU features are
+     // disabled, the GPU process will only initialize GL bindings, create a GL
+     // context, and collect full GPU info.
+-#if !defined(OS_LINUX)
++#if !defined(OS_LINUX) || !defined(OS_BSD)
+     if (reason) {
+       *reason = "All GPU features are blacklisted.";
+     }
+@@ -486,8 +486,10 @@ void GpuDataManagerImplPrivate::SetGLStr
    gpu_info.gl_renderer = gl_renderer;
    gpu_info.gl_version = gl_version;
  
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_BSD)
    gpu::IdentifyActiveGPU(&gpu_info);
    gpu::CollectDriverInfoGL(&gpu_info);
 +#endif
  
    UpdateGpuInfo(gpu_info);
    UpdateGpuSwitchingManager(gpu_info);
-@@ -515,10 +517,12 @@ void GpuDataManagerImplPrivate::Initiali
-     // Also declare the driver_vendor to be osmesa to be able to specify
-     // exceptions based on driver_vendor==osmesa for some blacklist rules.
-     gpu_info.driver_vendor = gfx::kGLImplementationOSMesaName;
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
-   } else {
-     TRACE_EVENT0("startup",
-       "GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo");
-     gpu::CollectBasicGraphicsInfo(&gpu_info);
+@@ -542,10 +544,12 @@ void GpuDataManagerImplPrivate::Initiali
+     // Skip collecting the basic driver info if SetGpuInfo() is already called.
+     if (IsCompleteGpuInfoAvailable()) {
+       gpu_info = gpu_info_;
++#ifndef OS_BSD
+     } else {
+       TRACE_EVENT0("startup",
+                    "GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo");
+       gpu::CollectBasicGraphicsInfo(&gpu_info);
 +#endif
+     }
  
      if (command_line->HasSwitch(switches::kGpuTestingVendorId) &&
-         command_line->HasSwitch(switches::kGpuTestingDeviceId)) {
-@@ -617,7 +621,9 @@ void GpuDataManagerImplPrivate::UpdateGp
+@@ -657,7 +661,9 @@ void GpuDataManagerImplPrivate::UpdateGp
      return;
  
    bool was_info_available = IsCompleteGpuInfoAvailable();
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#ifndef OS_BSD
    gpu::MergeGPUInfo(&gpu_info_, gpu_info);
 +#endif
    if (IsCompleteGpuInfoAvailable()) {
diff --git a/chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h b/chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
new file mode 100644
index 0000000..f87a437
--- /dev/null
+++ b/chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/gpu/gpu_data_manager_impl_private.h.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/browser/gpu/gpu_data_manager_impl_private.h
+@@ -155,7 +155,7 @@ class CONTENT_EXPORT GpuDataManagerImplP
+                            UnblockOtherDomainFrom3DAPIs);
+   FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
+                            UnblockThisDomainFrom3DAPIs);
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
+                            SetGLStrings);
+   FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest,
diff --git a/chromium-new/patches/patch-content_browser_gpu_gpu__internals__ui.cc b/chromium-new/patches/patch-content_browser_gpu_gpu__internals__ui.cc
index d67c4eb..baad738 100644
--- a/chromium-new/patches/patch-content_browser_gpu_gpu__internals__ui.cc
+++ b/chromium-new/patches/patch-content_browser_gpu_gpu__internals__ui.cc
@@ -1,9 +1,9 @@
 $NetBSD$
 
---- content/browser/gpu/gpu_internals_ui.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/gpu/gpu_internals_ui.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/gpu/gpu_internals_ui.cc
-@@ -38,7 +38,7 @@
- #include "third_party/angle/src/common/version.h"
+@@ -42,7 +42,7 @@
+ #include "third_party/skia/include/core/SkMilestone.h"
  #include "ui/gl/gpu_switching_manager.h"
  
 -#if defined(OS_LINUX) && defined(USE_X11)
@@ -11,16 +11,16 @@ $NetBSD$
  #include <X11/Xlib.h>
  #endif
  #if defined(OS_WIN)
-@@ -46,7 +46,7 @@
+@@ -50,7 +50,7 @@
  #include "ui/gfx/win/physical_size.h"
  #endif
  
 -#if defined(OS_LINUX) && defined(USE_X11)
 +#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(USE_X11)
- #include "ui/base/x/x11_util.h"
- #include "ui/gfx/x/x11_atom_cache.h"
+ #include "ui/base/x/x11_util.h"       // nogncheck
+ #include "ui/gfx/x/x11_atom_cache.h"  // nogncheck
  #endif
-@@ -199,7 +199,7 @@ base::DictionaryValue* GpuInfoAsDictiona
+@@ -204,7 +204,7 @@ base::DictionaryValue* GpuInfoAsDictiona
                                               gpu_info.gl_ws_version));
    basic_info->Append(NewDescriptionValuePair("Window system binding extensions",
                                               gpu_info.gl_ws_extensions));
diff --git a/chromium-new/patches/patch-content_browser_gpu_gpu__process__host.cc b/chromium-new/patches/patch-content_browser_gpu_gpu__process__host.cc
new file mode 100644
index 0000000..a2b07fb
--- /dev/null
+++ b/chromium-new/patches/patch-content_browser_gpu_gpu__process__host.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/gpu/gpu_process_host.cc.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/browser/gpu/gpu_process_host.cc
+@@ -989,7 +989,7 @@ bool GpuProcessHost::LaunchGpuProcess(gp
+   base::CommandLine* cmd_line =
+       new base::CommandLine(base::CommandLine::NO_PROGRAM);
+ #else
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   int child_flags = gpu_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF :
+                                            ChildProcessHost::CHILD_NORMAL;
+ #else
diff --git a/chromium-new/patches/patch-content_browser_indexed__db_indexed__db__backing__store.cc b/chromium-new/patches/patch-content_browser_indexed__db_indexed__db__backing__store.cc
index f5986af..136bf05 100644
--- a/chromium-new/patches/patch-content_browser_indexed__db_indexed__db__backing__store.cc
+++ b/chromium-new/patches/patch-content_browser_indexed__db_indexed__db__backing__store.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- content/browser/indexed_db/indexed_db_backing_store.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/indexed_db/indexed_db_backing_store.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/indexed_db/indexed_db_backing_store.cc
-@@ -2432,7 +2432,7 @@ bool IndexedDBBackingStore::WriteBlobFil
+@@ -2422,7 +2422,7 @@ bool IndexedDBBackingStore::WriteBlobFil
          // The round-trip can be lossy; round to nearest millisecond.
          int64_t delta =
              (descriptor.last_modified() - info.last_modified).InMilliseconds();
diff --git a/chromium-new/patches/patch-content_browser_media_media__internals.cc b/chromium-new/patches/patch-content_browser_media_media__internals.cc
new file mode 100644
index 0000000..c624616
--- /dev/null
+++ b/chromium-new/patches/patch-content_browser_media_media__internals.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/media/media_internals.cc.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/browser/media/media_internals.cc
+@@ -724,7 +724,7 @@ void MediaInternals::UpdateVideoCaptureD
+     device_dict->SetString("name", descriptor.GetNameAndModel());
+     device_dict->Set("formats", format_list);
+ #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
+-    defined(OS_ANDROID)
++    defined(OS_ANDROID) || defined(OS_BSD)
+     device_dict->SetString("captureApi", descriptor.GetCaptureApiTypeString());
+ #endif
+     video_capture_capabilities_cached_data_.Append(std::move(device_dict));
diff --git a/chromium-new/patches/patch-content_browser_ppapi__plugin__process__host.cc b/chromium-new/patches/patch-content_browser_ppapi__plugin__process__host.cc
index 986ad0f..3a65f19 100644
--- a/chromium-new/patches/patch-content_browser_ppapi__plugin__process__host.cc
+++ b/chromium-new/patches/patch-content_browser_ppapi__plugin__process__host.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- content/browser/ppapi_plugin_process_host.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/ppapi_plugin_process_host.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/ppapi_plugin_process_host.cc
-@@ -49,7 +49,7 @@
+@@ -52,7 +52,7 @@
  
  namespace content {
  
@@ -11,7 +11,7 @@ $NetBSD$
  ZygoteHandle g_ppapi_zygote;
  #endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
  
-@@ -113,7 +113,7 @@ class PpapiPluginSandboxedProcessLaunche
+@@ -119,7 +119,7 @@ class PpapiPluginSandboxedProcessLaunche
    }
  
  #elif defined(OS_POSIX)
@@ -20,7 +20,7 @@ $NetBSD$
    ZygoteHandle* GetZygote() override {
      const base::CommandLine& browser_command_line =
          *base::CommandLine::ForCurrentProcess();
-@@ -213,7 +213,7 @@ PpapiPluginProcessHost* PpapiPluginProce
+@@ -222,7 +222,7 @@ PpapiPluginProcessHost* PpapiPluginProce
    return NULL;
  }
  
@@ -29,3 +29,12 @@ $NetBSD$
  // static
  void PpapiPluginProcessHost::EarlyZygoteLaunch() {
    DCHECK(!g_ppapi_zygote);
+@@ -380,7 +380,7 @@ bool PpapiPluginProcessHost::Init(const 
+   base::CommandLine::StringType plugin_launcher =
+       browser_command_line.GetSwitchValueNative(switches::kPpapiPluginLauncher);
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   int flags = plugin_launcher.empty() ? ChildProcessHost::CHILD_ALLOW_SELF :
+                                         ChildProcessHost::CHILD_NORMAL;
+ #else
diff --git a/chromium-new/patches/patch-content_browser_renderer__host_media_video__capture__device__client.cc b/chromium-new/patches/patch-content_browser_renderer__host_media_video__capture__device__client.cc
new file mode 100644
index 0000000..c5a195d
--- /dev/null
+++ b/chromium-new/patches/patch-content_browser_renderer__host_media_video__capture__device__client.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/renderer_host/media/video_capture_device_client.cc.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/browser/renderer_host/media/video_capture_device_client.cc
+@@ -186,7 +186,7 @@ void VideoCaptureDeviceClient::OnIncomin
+       // see http://linuxtv.org/downloads/v4l-dvb-apis/packed-rgb.html.
+       // Windows RGB24 defines blue at lowest byte,
+       // see https://msdn.microsoft.com/en-us/library/windows/desktop/dd407253
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+       origin_colorspace = libyuv::FOURCC_RAW;
+ #elif defined(OS_WIN)
+       origin_colorspace = libyuv::FOURCC_24BG;
diff --git a/chromium-new/patches/patch-content_browser_renderer__host_render__process__host__impl.cc b/chromium-new/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
index 84e58c5..8c2c37e 100644
--- a/chromium-new/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
+++ b/chromium-new/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- content/browser/renderer_host/render_process_host_impl.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/renderer_host/render_process_host_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/renderer_host/render_process_host_impl.cc
-@@ -359,7 +359,7 @@ SiteProcessMap* GetSiteProcessMapForBrow
+@@ -369,7 +369,7 @@ SiteProcessMap* GetSiteProcessMapForBrow
    return map;
  }
  
@@ -11,7 +11,7 @@ $NetBSD$
  // This static member variable holds the zygote communication information for
  // the renderer.
  ZygoteHandle g_render_zygote;
-@@ -392,7 +392,7 @@ class RendererSandboxedProcessLauncherDe
+@@ -402,7 +402,7 @@ class RendererSandboxedProcessLauncherDe
    }
  
  #elif defined(OS_POSIX)
@@ -20,7 +20,7 @@ $NetBSD$
    ZygoteHandle* GetZygote() override {
      const base::CommandLine& browser_command_line =
          *base::CommandLine::ForCurrentProcess();
-@@ -514,7 +514,7 @@ void RenderProcessHost::SetMaxRendererPr
+@@ -639,7 +639,7 @@ void RenderProcessHost::SetMaxRendererPr
    g_max_renderer_count_override = count;
  }
  
@@ -29,3 +29,12 @@ $NetBSD$
  // static
  void RenderProcessHostImpl::EarlyZygoteLaunch() {
    DCHECK(!g_render_zygote);
+@@ -835,7 +835,7 @@ bool RenderProcessHostImpl::Init() {
+   renderer_prefix =
+       browser_command_line.GetSwitchValueNative(switches::kRendererCmdPrefix);
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   int flags = renderer_prefix.empty() ? ChildProcessHost::CHILD_ALLOW_SELF
+                                       : ChildProcessHost::CHILD_NORMAL;
+ #else
diff --git a/chromium-new/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/chromium-new/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
index f1698bd..f0dbbd2 100644
--- a/chromium-new/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
+++ b/chromium-new/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
@@ -1,40 +1,31 @@
 $NetBSD$
 
---- content/browser/renderer_host/render_widget_host_view_aura.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/renderer_host/render_widget_host_view_aura.cc
 @@ -106,7 +106,7 @@
- #include "ui/gfx/win/dpi.h"
+ #include "ui/gfx/gdi_util.h"
  #endif
  
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
 +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
- #include "content/common/input_messages.h"
- #include "ui/events/linux/text_edit_command_auralinux.h"
- #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h"
-@@ -636,7 +636,7 @@ gfx::NativeViewId RenderWidgetHostViewAu
-   if (host)
-     return reinterpret_cast<gfx::NativeViewId>(host->GetAcceleratedWidget());
+ #include "ui/base/ime/linux/text_edit_command_auralinux.h"
+ #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
  #endif
--  return static_cast<gfx::NativeViewId>(NULL);
-+  return static_cast<gfx::NativeViewId>(0);
- }
- 
- gfx::NativeViewAccessible RenderWidgetHostViewAura::GetNativeViewAccessible() {
-@@ -2463,7 +2463,7 @@ bool RenderWidgetHostViewAura::NeedsInpu
+@@ -2479,7 +2479,7 @@ bool RenderWidgetHostViewAura::NeedsInpu
  }
  
  bool RenderWidgetHostViewAura::NeedsMouseCapture() {
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
    return NeedsInputGrab();
  #endif
    return false;
-@@ -2691,7 +2691,7 @@ void RenderWidgetHostViewAura::ForwardKe
+@@ -2711,7 +2711,7 @@ void RenderWidgetHostViewAura::ForwardKe
    if (!target_host)
      return;
  
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
    ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate =
        ui::GetTextEditKeyBindingsDelegate();
    std::vector<ui::TextEditCommandAuraLinux> commands;
diff --git a/chromium-new/patches/patch-content_browser_time__zone__monitor.cc b/chromium-new/patches/patch-content_browser_time__zone__monitor.cc
index 009ee88..be9f680 100644
--- a/chromium-new/patches/patch-content_browser_time__zone__monitor.cc
+++ b/chromium-new/patches/patch-content_browser_time__zone__monitor.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- content/browser/time_zone_monitor.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/time_zone_monitor.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/time_zone_monitor.cc
 @@ -29,7 +29,7 @@ void TimeZoneMonitor::NotifyRenderers() 
-   scoped_ptr<icu::TimeZone> new_zone(icu::TimeZone::createDefault());
+   std::unique_ptr<icu::TimeZone> new_zone(icu::TimeZone::createDefault());
  #else
    icu::TimeZone* new_zone = icu::TimeZone::detectHostTimeZone();
 -#if defined(OS_LINUX)
 +#if defined(OS_LINUX) || defined(OS_BSD)
    // We get here multiple times on Linux per a single tz change, but
    // want to update the ICU default zone and notify renderer only once.
-   scoped_ptr<icu::TimeZone> current_zone(icu::TimeZone::createDefault());
+   std::unique_ptr<icu::TimeZone> current_zone(icu::TimeZone::createDefault());
diff --git a/chromium-new/patches/patch-content_browser_time__zone__monitor__linux.cc b/chromium-new/patches/patch-content_browser_time__zone__monitor__linux.cc
index 12dc6f4..675fdc9 100644
--- a/chromium-new/patches/patch-content_browser_time__zone__monitor__linux.cc
+++ b/chromium-new/patches/patch-content_browser_time__zone__monitor__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- content/browser/time_zone_monitor_linux.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/time_zone_monitor_linux.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/time_zone_monitor_linux.cc
 @@ -53,6 +53,9 @@ class TimeZoneMonitorLinuxImpl
        : base::RefCountedThreadSafe<TimeZoneMonitorLinuxImpl>(),
diff --git a/chromium-new/patches/patch-content_browser_tracing_tracing__controller__impl.cc b/chromium-new/patches/patch-content_browser_tracing_tracing__controller__impl.cc
new file mode 100644
index 0000000..dda343f
--- /dev/null
+++ b/chromium-new/patches/patch-content_browser_tracing_tracing__controller__impl.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/tracing/tracing_controller_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/browser/tracing/tracing_controller_impl.cc
+@@ -515,7 +515,7 @@ void TracingControllerImpl::AddTraceMess
+     return;
+   }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // On Linux the browser process dumps process metrics for child process due to
+   // sandbox.
+   tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess(
diff --git a/chromium-new/patches/patch-content_browser_utility__process__host__impl.cc b/chromium-new/patches/patch-content_browser_utility__process__host__impl.cc
index 7f54b9e..0b036cd 100644
--- a/chromium-new/patches/patch-content_browser_utility__process__host__impl.cc
+++ b/chromium-new/patches/patch-content_browser_utility__process__host__impl.cc
@@ -1,9 +1,9 @@
 $NetBSD$
 
---- content/browser/utility_process_host_impl.cc.orig	2016-06-24 01:02:20.000000000 +0000
+--- content/browser/utility_process_host_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/browser/utility_process_host_impl.cc
-@@ -37,7 +37,7 @@
- #include "ipc/ipc_switches.h"
+@@ -44,7 +44,7 @@
+ #include "services/shell/public/cpp/interface_provider.h"
  #include "ui/base/ui_base_switches.h"
  
 -#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
@@ -11,7 +11,7 @@ $NetBSD$
  #include "content/public/browser/zygote_handle_linux.h"
  #endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
  
-@@ -48,7 +48,7 @@
+@@ -55,7 +55,7 @@
  
  namespace content {
  
@@ -20,7 +20,7 @@ $NetBSD$
  namespace {
  ZygoteHandle g_utility_zygote;
  }  // namespace
-@@ -68,7 +68,7 @@ class UtilitySandboxedProcessLauncherDel
+@@ -75,7 +75,7 @@ class UtilitySandboxedProcessLauncherDel
          launch_elevated_(launch_elevated)
  #elif defined(OS_POSIX)
          env_(env),
@@ -29,7 +29,7 @@ $NetBSD$
          no_sandbox_(no_sandbox),
  #endif  // !defined(OS_MACOSX)  && !defined(OS_ANDROID)
          ipc_fd_(host->TakeClientFileDescriptor())
-@@ -100,7 +100,7 @@ class UtilitySandboxedProcessLauncherDel
+@@ -107,7 +107,7 @@ class UtilitySandboxedProcessLauncherDel
  
  #elif defined(OS_POSIX)
  
@@ -38,7 +38,7 @@ $NetBSD$
    ZygoteHandle* GetZygote() override {
      if (no_sandbox_ || !exposed_dir_.empty())
        return nullptr;
-@@ -122,7 +122,7 @@ class UtilitySandboxedProcessLauncherDel
+@@ -129,7 +129,7 @@ class UtilitySandboxedProcessLauncherDel
    bool launch_elevated_;
  #elif defined(OS_POSIX)
    base::EnvironmentMap env_;
@@ -47,7 +47,16 @@ $NetBSD$
    bool no_sandbox_;
  #endif  // !defined(OS_MACOSX) && !defined(OS_ANDROID)
    base::ScopedFD ipc_fd_;
-@@ -231,7 +231,7 @@ void UtilityProcessHostImpl::SetName(con
+@@ -157,7 +157,7 @@ UtilityProcessHostImpl::UtilityProcessHo
+       is_batch_mode_(false),
+       no_sandbox_(false),
+       run_elevated_(false),
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+       child_flags_(ChildProcessHost::CHILD_ALLOW_SELF),
+ #else
+       child_flags_(ChildProcessHost::CHILD_NORMAL),
+@@ -238,7 +238,7 @@ void UtilityProcessHostImpl::SetName(con
    name_ = name;
  }
  
diff --git a/chromium-new/patches/patch-content_browser_web__contents_web__contents__impl.cc b/chromium-new/patches/patch-content_browser_web__contents_web__contents__impl.cc
deleted file mode 100644
index 39cb339..0000000
--- a/chromium-new/patches/patch-content_browser_web__contents_web__contents__impl.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/web_contents/web_contents_impl.cc.orig	2016-06-24 01:02:20.000000000 +0000
-+++ content/browser/web_contents/web_contents_impl.cc
-@@ -1685,7 +1685,7 @@ bool WebContentsImpl::HandleWheelEvent(
-     // Count only integer cumulative scrolls as zoom events; this handles
-     // smooth scroll and regular scroll device behavior.
-     zoom_scroll_remainder_ += event.wheelTicksY;
--    int whole_zoom_scroll_remainder_ = std::lround(zoom_scroll_remainder_);
-+    int whole_zoom_scroll_remainder_ = lround(zoom_scroll_remainder_);
-     zoom_scroll_remainder_ -= whole_zoom_scroll_remainder_;
-     if (whole_zoom_scroll_remainder_ != 0) {
-       delegate_->ContentsZoomChange(whole_zoom_scroll_remainder_ > 0);
diff --git a/chromium-new/patches/patch-content_common_BUILD.gn b/chromium-new/patches/patch-content_common_BUILD.gn
new file mode 100644
index 0000000..2d59a06
--- /dev/null
+++ b/chromium-new/patches/patch-content_common_BUILD.gn
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- content/common/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/common/BUILD.gn
+@@ -187,7 +187,7 @@ source_set("common") {
+   if (use_seccomp_bpf) {
+     defines += [ "USE_SECCOMP_BPF" ]
+   } else {
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       sources -= [
+         "sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc",
+         "sandbox_linux/bpf_cros_arm_gpu_policy_linux.h",
+@@ -201,6 +201,15 @@ source_set("common") {
+         "sandbox_linux/bpf_utility_policy_linux.h",
+         "sandbox_linux/sandbox_bpf_base_policy_linux.cc",
+         "sandbox_linux/sandbox_bpf_base_policy_linux.h",
++        "sandbox_linux/sandbox_seccomp_bpf_linux.cc",
++        "sandbox_linux/sandbox_seccomp_bpf_linux.h",
++      ]
++    }
++    if (is_bsd) {
++      sources -= [
++        "sandbox_linux/sandbox_linux.cc",
++        "sandbox_linux/sandbox_linux.h",
++        "sandbox_linux/sandbox_init_linux.cc",
+       ]
+     }
+     if (is_android) {
diff --git a/chromium-new/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc b/chromium-new/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc
index 4b62c2f..6b0896b 100644
--- a/chromium-new/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc
+++ b/chromium-new/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- content/common/sandbox_linux/sandbox_debug_handling_linux.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/common/sandbox_linux/sandbox_debug_handling_linux.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/common/sandbox_linux/sandbox_debug_handling_linux.cc
 @@ -7,7 +7,9 @@
  #include <errno.h>
diff --git a/chromium-new/patches/patch-content_common_set__process__title__linux.cc b/chromium-new/patches/patch-content_common_set__process__title__linux.cc
index dac2fb6..1290af9 100644
--- a/chromium-new/patches/patch-content_common_set__process__title__linux.cc
+++ b/chromium-new/patches/patch-content_common_set__process__title__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- content/common/set_process_title_linux.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/common/set_process_title_linux.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/common/set_process_title_linux.cc
 @@ -49,6 +49,8 @@
  extern char** environ;
diff --git a/chromium-new/patches/patch-content_common_set__process__title__linux.h b/chromium-new/patches/patch-content_common_set__process__title__linux.h
index bc9b00f..bee82ba 100644
--- a/chromium-new/patches/patch-content_common_set__process__title__linux.h
+++ b/chromium-new/patches/patch-content_common_set__process__title__linux.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- content/common/set_process_title_linux.h.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/common/set_process_title_linux.h.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/common/set_process_title_linux.h
 @@ -5,6 +5,9 @@
  #ifndef CONTENT_COMMON_SET_PROCESS_TITLE_LINUX_H_
diff --git a/chromium-new/patches/patch-content_content__browser.gypi b/chromium-new/patches/patch-content_content__browser.gypi
deleted file mode 100644
index c079dec..0000000
--- a/chromium-new/patches/patch-content_content__browser.gypi
+++ /dev/null
@@ -1,84 +0,0 @@
-$NetBSD$
-
---- content/content_browser.gypi.orig	2016-06-24 01:02:21.000000000 +0000
-+++ content/content_browser.gypi
-@@ -864,6 +864,8 @@
-       'browser/geolocation/wifi_data_provider_common_win.cc',
-       'browser/geolocation/wifi_data_provider_common_win.h',
-       'browser/geolocation/wifi_data_provider_corewlan_mac.mm',
-+      'browser/geolocation/wifi_data_provider_freebsd.cc',
-+      'browser/geolocation/wifi_data_provider_freebsd.h',
-       'browser/geolocation/wifi_data_provider_linux.cc',
-       'browser/geolocation/wifi_data_provider_linux.h',
-       'browser/geolocation/wifi_data_provider_mac.cc',
-@@ -2013,7 +2015,7 @@
-         },
-       },
-     }],
--    ['OS=="linux" and chromeos==0 and use_x11==1', {
-+    ['(os_bsd==1 or OS=="linux") and chromeos==0 and use_x11==1', {
-       'dependencies': [
-         '../build/linux/system.gyp:atk',
-         '../build/linux/system.gyp:gconf',
-@@ -2040,7 +2042,7 @@
-         'browser/gamepad/gamepad_platform_data_fetcher_linux.cc',
-       ],
-     }],
--    ['OS=="linux" and use_aura==1', {
-+    ['(os_bsd==1 or OS=="linux") and use_aura==1', {
-       'dependencies': [
-         '../build/linux/system.gyp:fontconfig',
-       ],
-@@ -2131,8 +2133,29 @@
-       ],
-     }],
-     ['os_bsd==1', {
--      'sources/': [
--        ['exclude', '^browser/gamepad/gamepad_platform_data_fetcher_linux\\.cc$'],
-+      'sources!': [
-+        'public/browser/zygote_host_linux.h',
-+        'browser/zygote_host/zygote_communication_linux.cc',
-+        'browser/zygote_host/zygote_communication_linux.h',
-+        'browser/zygote_host/zygote_handle_linux.cc',
-+        'browser/zygote_host/zygote_host_impl_linux.cc',
-+        'browser/zygote_host/zygote_host_impl_linux.h',
-+        'zygote/zygote_linux.cc',
-+        'zygote/zygote_linux.h',
-+        'zygote/zygote_main_linux.cc',
-+        'browser/device_monitor_linux.cc',
-+        'browser/download/file_metadata_linux.cc',
-+        'browser/gamepad/gamepad_platform_data_fetcher_linux.cc',
-+        'browser/geolocation/wifi_data_provider_linux.cc',
-+        'browser/udev_linux.cc',
-+      ],
-+      'dependencies': [
-+        '../build/linux/system.gyp:dbus',
-+      ],
-+    }],
-+    ['OS!="freebsd"', {
-+      'sources!': [
-+        'browser/geolocation/wifi_data_provider_freebsd.cc',
-       ],
-     }],
-     ['use_aura==1', {
-@@ -2181,10 +2204,7 @@
-         'browser/geolocation/empty_wifi_data_provider.cc',
-       ],
-     }],
--    ['OS == "linux" and use_dbus==1', {
--      'sources!': [
--        'browser/geolocation/empty_wifi_data_provider.cc',
--      ],
-+    ['(OS == "linux" or os_bsd==1) and use_dbus==1', {
-       'dependencies': [
-         '../build/linux/system.gyp:dbus',
-         '../dbus/dbus.gyp:dbus',
-@@ -2200,7 +2220,7 @@
-         'browser/media/cdm/browser_cdm_manager.h',
-       ],
-     }],
--    ['OS == "linux"', {
-+    ['(os_bsd==1 or OS == "linux")', {
-       'dependencies': [
-         '../third_party/boringssl/boringssl.gyp:boringssl',
-       ],
diff --git a/chromium-new/patches/patch-content_content__common.gypi b/chromium-new/patches/patch-content_content__common.gypi
deleted file mode 100644
index b24aa63..0000000
--- a/chromium-new/patches/patch-content_content__common.gypi
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
---- content/content_common.gypi.orig	2016-06-24 01:02:21.000000000 +0000
-+++ content/content_common.gypi
-@@ -673,6 +673,21 @@
-         'content.gyp:common_aidl',
-       ],
-     }],
-+    ['os_bsd==1', {
-+      'sources!': [
-+        'common/sandbox_linux.cc',
-+        'common/sandbox_linux.h',
-+        'common/sandbox_init_linux.cc',
-+        'common/sandbox_seccomp_bpf_linux.cc',
-+        'common/sandbox_seccomp_bpf_linux.h',
-+        'common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc',
-+        'common/sandbox_linux/bpf_gpu_policy_linux.cc',
-+        'common/sandbox_linux/bpf_ppapi_policy_linux.cc',
-+        'common/sandbox_linux/bpf_renderer_policy_linux.cc',
-+        'common/sandbox_linux/sandbox_bpf_base_policy_linux.cc',
-+        'common/sandbox_linux/sandbox_seccomp_bpf_linux.cc',
-+      ],
-+    }],
-     ['use_pango == 1', {
-       'dependencies': [
-         '../build/linux/system.gyp:pangocairo',
diff --git a/chromium-new/patches/patch-content_content__tests.gypi b/chromium-new/patches/patch-content_content__tests.gypi
deleted file mode 100644
index d5d3d6c..0000000
--- a/chromium-new/patches/patch-content_content__tests.gypi
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- content/content_tests.gypi.orig	2016-06-24 01:02:21.000000000 +0000
-+++ content/content_tests.gypi
-@@ -1186,6 +1186,15 @@
-             'renderer/media/video_track_recorder_unittest.cc',
-           ],
-         }],
-+        ['OS == "freebsd"', {
-+          'sources!': [
-+            'browser/download/file_metadata_unittest_linux.cc',
-+            'browser/geolocation/wifi_data_provider_linux_unittest.cc',
-+            'browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc',
-+            'browser/renderer_host/media/media_stream_manager_unittest.cc',
-+            'browser/renderer_host/media/media_stream_ui_controller_unittest.cc'
-+          ]
-+        }], 
-         # Avoid windows due to non-availability of cursor resources in test.
-         ['OS != "linux"', {
-           'sources!': [
diff --git a/chromium-new/patches/patch-content_gpu_BUILD.gn b/chromium-new/patches/patch-content_gpu_BUILD.gn
new file mode 100644
index 0000000..4c279eb
--- /dev/null
+++ b/chromium-new/patches/patch-content_gpu_BUILD.gn
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- content/gpu/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/gpu/BUILD.gn
+@@ -98,6 +98,7 @@ target(link_target_type, "gpu_sources") 
+ 
+   if (use_x11) {
+     deps += [ "//ui/events/platform/x11" ]
++    configs += [ "//build/config/linux:x11" ]
+   }
+ 
+   if (use_ozone) {
diff --git a/chromium-new/patches/patch-content_gpu_gpu__child__thread.cc b/chromium-new/patches/patch-content_gpu_gpu__child__thread.cc
index dadc2ea..56db11a 100644
--- a/chromium-new/patches/patch-content_gpu_gpu__child__thread.cc
+++ b/chromium-new/patches/patch-content_gpu_gpu__child__thread.cc
@@ -1,16 +1,16 @@
 $NetBSD$
 
---- content/gpu/gpu_child_thread.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/gpu/gpu_child_thread.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/gpu/gpu_child_thread.cc
-@@ -435,6 +435,7 @@ void GpuChildThread::StopWatchdog() {
- }
+@@ -419,6 +419,7 @@ void GpuChildThread::OnCollectGraphicsIn
+   if (dead_on_arrival_)
+     return;
  
- void GpuChildThread::OnCollectGraphicsInfo() {
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_BSD)
  #if defined(OS_WIN)
    // GPU full info collection should only happen on un-sandboxed GPU process
    // or single process/in-process gpu mode on Windows.
-@@ -477,6 +478,7 @@ void GpuChildThread::OnCollectGraphicsIn
+@@ -461,6 +462,7 @@ void GpuChildThread::OnCollectGraphicsIn
      base::MessageLoop::current()->QuitWhenIdle();
    }
  #endif  // OS_WIN
diff --git a/chromium-new/patches/patch-content_gpu_gpu__main.cc b/chromium-new/patches/patch-content_gpu_gpu__main.cc
index fa9395a..7842c71 100644
--- a/chromium-new/patches/patch-content_gpu_gpu__main.cc
+++ b/chromium-new/patches/patch-content_gpu_gpu__main.cc
@@ -1,47 +1,47 @@
 $NetBSD$
 
---- content/gpu/gpu_main.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/gpu/gpu_main.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/gpu/gpu_main.cc
-@@ -101,7 +101,7 @@ void GetGpuInfoFromCommandLine(gpu::GPUI
+@@ -104,7 +104,7 @@ void GetGpuInfoFromCommandLine(gpu::GPUI
                                 const base::CommandLine& command_line);
  bool WarmUpSandbox(const base::CommandLine& command_line);
  
 -#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_FREEBSD) && !defined(OS_NETBSD) //XXX(rene) added !FreeBSD
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
  bool CollectGraphicsInfo(gpu::GPUInfo& gpu_info);
  #endif
  
-@@ -189,13 +189,13 @@ int GpuMain(const MainFunctionParams& pa
-   // Use a UI message loop because ANGLE and the desktop GL platform can
+@@ -195,13 +195,13 @@ int GpuMain(const MainFunctionParams& pa
    // create child windows to render to.
+   base::MessagePumpForGpu::InitFactory();
    base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
 -#elif defined(OS_LINUX) && defined(USE_X11)
 +#elif (defined(OS_LINUX) || defined(OS_BSD)) && defined(USE_X11)
    // We need a UI loop so that we can grab the Expose events. See GLSurfaceGLX
    // and https://crbug.com/326995.
    base::MessageLoop main_message_loop(base::MessageLoop::TYPE_UI);
-   scoped_ptr<ui::PlatformEventSource> event_source =
+   std::unique_ptr<ui::PlatformEventSource> event_source =
        ui::PlatformEventSource::CreateDefault();
 -#elif defined(OS_LINUX)
 +#elif defined(OS_LINUX) || defined(OS_BSD)
    base::MessageLoop main_message_loop(base::MessageLoop::TYPE_DEFAULT);
  #elif defined(OS_MACOSX)
    // This is necessary for CoreAnimation layers hosted in the GPU process to be
-@@ -306,7 +306,7 @@ int GpuMain(const MainFunctionParams& pa
+@@ -312,7 +312,7 @@ int GpuMain(const MainFunctionParams& pa
        // and we already registered them through SetGpuInfo() above.
        base::TimeTicks before_collect_context_graphics_info =
            base::TimeTicks::Now();
 -#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)//XXX(rene) added !FreeBSD
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
        if (!CollectGraphicsInfo(gpu_info))
          dead_on_arrival = true;
  
-@@ -462,7 +462,7 @@ bool WarmUpSandbox(const base::CommandLi
+@@ -495,7 +495,7 @@ bool WarmUpSandbox(const base::CommandLi
    return true;
  }
  
 -#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_FREEBSD) && !defined(OS_NETBSD) //XXX(rene) added !FreeBSD
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
  bool CollectGraphicsInfo(gpu::GPUInfo& gpu_info) {
    TRACE_EVENT0("gpu,startup", "Collect Graphics Info");
  
diff --git a/chromium-new/patches/patch-content_public_common_child__process__host.h b/chromium-new/patches/patch-content_public_common_child__process__host.h
new file mode 100644
index 0000000..08bfc44
--- /dev/null
+++ b/chromium-new/patches/patch-content_public_common_child__process__host.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- content/public/common/child_process_host.h.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/public/common/child_process_host.h
+@@ -54,7 +54,7 @@ class CONTENT_EXPORT ChildProcessHost : 
+     // No special behavior requested.
+     CHILD_NORMAL = 0,
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+     // Indicates that the child execed after forking may be execced from
+     // /proc/self/exe rather than using the "real" app path. This prevents
+     // autoupdate from confusing us if it changes the file out from under us.
+@@ -63,7 +63,7 @@ class CONTENT_EXPORT ChildProcessHost : 
+     // gdb). In this case, you'd use GetChildPath to get the real executable
+     // file name, and then prepend the GDB command to the command line.
+     CHILD_ALLOW_SELF = 1 << 0,
+-#endif  // defined(OS_LINUX)
++#endif  // defined(OS_LINUX) || defined(OS_BSD)
+   };
+ 
+   // Returns the pathname to be used for a child process.  If a subprocess
diff --git a/chromium-new/patches/patch-content_public_common_child__process__sandbox__support__linux.h b/chromium-new/patches/patch-content_public_common_child__process__sandbox__support__linux.h
deleted file mode 100644
index a6619277..0000000
--- a/chromium-new/patches/patch-content_public_common_child__process__sandbox__support__linux.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- content/public/common/child_process_sandbox_support_linux.h.orig	2016-06-24 01:02:21.000000000 +0000
-+++ content/public/common/child_process_sandbox_support_linux.h
-@@ -8,6 +8,7 @@
- #include <stddef.h>
- #include <stdint.h>
- #include <string>
-+#include <sys/types.h>
- 
- #include "content/common/content_export.h"
- #include "ppapi/c/trusted/ppb_browser_font_trusted.h"
diff --git a/chromium-new/patches/patch-content_public_common_content__switches.cc b/chromium-new/patches/patch-content_public_common_content__switches.cc
index 28a83d4..1801d5f 100644
--- a/chromium-new/patches/patch-content_public_common_content__switches.cc
+++ b/chromium-new/patches/patch-content_public_common_content__switches.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- content/public/common/content_switches.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/public/common/content_switches.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/public/common/content_switches.cc
-@@ -963,7 +963,7 @@ const char kDisableVaapiAcceleratedVideo
+@@ -1007,7 +1007,7 @@ const char kDisableVaapiAcceleratedVideo
      "disable-vaapi-accelerated-video-encode";
  #endif
  
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
  // Allows sending text-to-speech requests to speech-dispatcher, a common
  // Linux speech service. Because it's buggy, the user must explicitly
  // enable it so that visiting a random webpage can't cause instability.
diff --git a/chromium-new/patches/patch-content_public_common_content__switches.h b/chromium-new/patches/patch-content_public_common_content__switches.h
index 68660d8..d2d6c4f 100644
--- a/chromium-new/patches/patch-content_public_common_content__switches.h
+++ b/chromium-new/patches/patch-content_public_common_content__switches.h
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- content/public/common/content_switches.h.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/public/common/content_switches.h.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/public/common/content_switches.h
-@@ -277,7 +277,7 @@ CONTENT_EXPORT extern const char kDisabl
+@@ -296,7 +296,7 @@ CONTENT_EXPORT extern const char kDisabl
  CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[];
  #endif
  
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
  CONTENT_EXPORT extern const char kEnableSpeechDispatcher[];
  #endif
  
diff --git a/chromium-new/patches/patch-content_public_test_browser__test__base.cc b/chromium-new/patches/patch-content_public_test_browser__test__base.cc
index feec864..6485213 100644
--- a/chromium-new/patches/patch-content_public_test_browser__test__base.cc
+++ b/chromium-new/patches/patch-content_public_test_browser__test__base.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- content/public/test/browser_test_base.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/public/test/browser_test_base.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/public/test/browser_test_base.cc
 @@ -6,6 +6,10 @@
  
diff --git a/chromium-new/patches/patch-content_renderer_devtools_v8__sampling__profiler.cc b/chromium-new/patches/patch-content_renderer_devtools_v8__sampling__profiler.cc
index 1a6820e..c5c2064 100644
--- a/chromium-new/patches/patch-content_renderer_devtools_v8__sampling__profiler.cc
+++ b/chromium-new/patches/patch-content_renderer_devtools_v8__sampling__profiler.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- content/renderer/devtools/v8_sampling_profiler.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/renderer/devtools/v8_sampling_profiler.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/renderer/devtools/v8_sampling_profiler.cc
-@@ -548,6 +548,14 @@ void V8SamplingThread::HandleProfilerSig
+@@ -547,6 +547,14 @@ void V8SamplingThread::HandleProfilerSig
    state.pc = reinterpret_cast<void*>(mcontext->__ss.REG_64_32(__rip, __eip));
    state.sp = reinterpret_cast<void*>(mcontext->__ss.REG_64_32(__rsp, __esp));
    state.fp = reinterpret_cast<void*>(mcontext->__ss.REG_64_32(__rbp, __ebp));
diff --git a/chromium-new/patches/patch-content_renderer_media_webrtc__audio__capturer.cc b/chromium-new/patches/patch-content_renderer_media_webrtc__audio__capturer.cc
deleted file mode 100644
index 29926e4..0000000
--- a/chromium-new/patches/patch-content_renderer_media_webrtc__audio__capturer.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- content/renderer/media/webrtc_audio_capturer.cc.orig	2016-06-24 01:02:21.000000000 +0000
-+++ content/renderer/media/webrtc_audio_capturer.cc
-@@ -435,8 +435,8 @@ void WebRtcAudioCapturer::Capture(const 
- // CaptureCallback.
- #if defined(OS_WIN) || defined(OS_MACOSX)
-   DCHECK_LE(volume, 1.0);
--#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD)
--  // We have a special situation on Linux where the microphone volume can be
-+#elif defined(OS_POSIX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
-+  // We have a special situation on POSIX where the microphone volume can be
-   // "higher than maximum". The input volume slider in the sound preference
-   // allows the user to set a scaling that is higher than 100%. It means that
-   // even if the reported maximum levels is N, the actual microphone level can
diff --git a/chromium-new/patches/patch-content_renderer_media_webrtc_processed__local__audio__source.cc b/chromium-new/patches/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
new file mode 100644
index 0000000..2e9dc63
--- /dev/null
+++ b/chromium-new/patches/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- content/renderer/media/webrtc/processed_local_audio_source.cc.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/renderer/media/webrtc/processed_local_audio_source.cc
+@@ -269,8 +269,8 @@ void ProcessedLocalAudioSource::Capture(
+                                         bool key_pressed) {
+ #if defined(OS_WIN) || defined(OS_MACOSX)
+   DCHECK_LE(volume, 1.0);
+-#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_OPENBSD)
+-  // We have a special situation on Linux where the microphone volume can be
++#elif defined(OS_POSIX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
++  // We have a special situation on POSIX where the microphone volume can be
+   // "higher than maximum". The input volume slider in the sound preference
+   // allows the user to set a scaling that is higher than 100%. It means that
+   // even if the reported maximum levels is N, the actual microphone level can
diff --git a/chromium-new/patches/patch-content_renderer_render__thread__impl.cc b/chromium-new/patches/patch-content_renderer_render__thread__impl.cc
index 9bf16ca..86222ee 100644
--- a/chromium-new/patches/patch-content_renderer_render__thread__impl.cc
+++ b/chromium-new/patches/patch-content_renderer_render__thread__impl.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- content/renderer/render_thread_impl.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/renderer/render_thread_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/renderer/render_thread_impl.cc
-@@ -1469,7 +1469,7 @@ media::GpuVideoAcceleratorFactories* Ren
-     const bool enable_video_accelerator =
-         !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
-     const bool enable_gpu_memory_buffer_video_frames =
+@@ -1455,7 +1455,7 @@ media::GpuVideoAcceleratorFactories* Ren
+   const bool enable_video_accelerator =
+       !cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
+   const bool enable_gpu_memory_buffer_video_frames =
 -#if defined(OS_MACOSX) || defined(OS_LINUX)
 +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
-         !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) &&
-         !cmd_line->HasSwitch(switches::kDisableGpuCompositing) &&
-         !gpu_channel_host->gpu_info().software_rendering;
+       !cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) &&
+       !cmd_line->HasSwitch(switches::kDisableGpuCompositing) &&
+       !gpu_channel_host->gpu_info().software_rendering;
diff --git a/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.cc b/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.cc
index 471c8e1..59a1d79 100644
--- a/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.cc
+++ b/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.cc
@@ -1,58 +1,58 @@
 $NetBSD$
 
---- content/renderer/renderer_blink_platform_impl.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/renderer/renderer_blink_platform_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/renderer/renderer_blink_platform_impl.cc
-@@ -116,7 +116,7 @@
+@@ -114,7 +114,7 @@
  
  #if defined(OS_POSIX)
  #include "base/file_descriptor_posix.h"
 -#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
  #include <map>
  #include <string>
  
-@@ -207,7 +207,7 @@ class RendererBlinkPlatformImpl::FileUti
+@@ -219,7 +219,7 @@ class RendererBlinkPlatformImpl::FileUti
    scoped_refptr<ThreadSafeSender> thread_safe_sender_;
  };
  
 -#if !defined(OS_ANDROID) && !defined(OS_WIN)
-+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD)
  class RendererBlinkPlatformImpl::SandboxSupport
      : public blink::WebSandboxSupport {
   public:
-@@ -253,7 +253,7 @@ RendererBlinkPlatformImpl::RendererBlink
-       web_scrollbar_behavior_(new WebScrollbarBehaviorImpl),
+@@ -266,7 +266,7 @@ RendererBlinkPlatformImpl::RendererBlink
        renderer_scheduler_(renderer_scheduler),
-       blink_service_registry_(new BlinkServiceRegistryImpl(service_registry)) {
+       blink_interface_provider_(
+           new BlinkInterfaceProviderImpl(remote_interfaces)) {
 -#if !defined(OS_ANDROID) && !defined(OS_WIN)
-+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD)
    if (g_sandbox_enabled && sandboxEnabled()) {
      sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport);
    } else {
-@@ -284,7 +284,7 @@ RendererBlinkPlatformImpl::~RendererBlin
+@@ -297,7 +297,7 @@ RendererBlinkPlatformImpl::~RendererBlin
  }
  
  void RendererBlinkPlatformImpl::Shutdown() {
 -#if !defined(OS_ANDROID) && !defined(OS_WIN)
-+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD)
    // SandboxSupport contains a map of WebFontFamily objects, which hold
    // WebCStrings, which become invalidated when blink is shut down. Hence, we
    // need to clear that map now, just before blink::shutdown() is called.
-@@ -334,7 +334,7 @@ blink::WebFileUtilities* RendererBlinkPl
+@@ -349,7 +349,7 @@ blink::WebFileUtilities* RendererBlinkPl
  }
  
  blink::WebSandboxSupport* RendererBlinkPlatformImpl::sandboxSupport() {
 -#if defined(OS_ANDROID) || defined(OS_WIN)
-+#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_BSD)
    // These platforms do not require sandbox support.
    return NULL;
  #else
-@@ -562,7 +562,7 @@ bool RendererBlinkPlatformImpl::SandboxS
+@@ -602,7 +602,7 @@ bool RendererBlinkPlatformImpl::SandboxS
    return FontLoader::CGFontRefFromBuffer(font_data, font_data_size, out);
  }
  
 -#elif defined(OS_POSIX) && !defined(OS_ANDROID)
-+#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_BSD)
  
  void RendererBlinkPlatformImpl::SandboxSupport::getFallbackFontForCharacter(
      blink::WebUChar32 character,
diff --git a/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.h b/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.h
index 874e31c..bdee4d4 100644
--- a/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.h
+++ b/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.h
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- content/renderer/renderer_blink_platform_impl.h.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/renderer/renderer_blink_platform_impl.h.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/renderer/renderer_blink_platform_impl.h
-@@ -254,7 +254,7 @@ class CONTENT_EXPORT RendererBlinkPlatfo
+@@ -264,7 +264,7 @@ class CONTENT_EXPORT RendererBlinkPlatfo
    class MimeRegistry;
-   scoped_ptr<MimeRegistry> mime_registry_;
+   std::unique_ptr<MimeRegistry> mime_registry_;
  
 -#if !defined(OS_ANDROID) && !defined(OS_WIN)
 +#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD)
    class SandboxSupport;
-   scoped_ptr<SandboxSupport> sandbox_support_;
+   std::unique_ptr<SandboxSupport> sandbox_support_;
  #endif
diff --git a/chromium-new/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc b/chromium-new/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
index b4e66ce..50e0055 100644
--- a/chromium-new/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
+++ b/chromium-new/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- content/renderer/renderer_main_platform_delegate_linux.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/renderer/renderer_main_platform_delegate_linux.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/renderer/renderer_main_platform_delegate_linux.cc
 @@ -29,6 +29,7 @@ void RendererMainPlatformDelegate::Platf
  }
diff --git a/chromium-new/patches/patch-content_renderer_webscrollbarbehavior__impl__gtkoraura.cc b/chromium-new/patches/patch-content_renderer_webscrollbarbehavior__impl__gtkoraura.cc
index a8ff343..3e7db46 100644
--- a/chromium-new/patches/patch-content_renderer_webscrollbarbehavior__impl__gtkoraura.cc
+++ b/chromium-new/patches/patch-content_renderer_webscrollbarbehavior__impl__gtkoraura.cc
@@ -1,14 +1,14 @@
 $NetBSD$
 
---- content/renderer/webscrollbarbehavior_impl_gtkoraura.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/renderer/webscrollbarbehavior_impl_gtkoraura.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/renderer/webscrollbarbehavior_impl_gtkoraura.cc
 @@ -14,7 +14,7 @@ bool WebScrollbarBehaviorImpl::shouldCen
-       blink::WebScrollbarBehavior::Button mouseButton,
+       blink::WebPointerProperties::Button mouseButton,
        bool shiftKeyPressed,
        bool altKeyPressed) {
 -#if (defined(OS_LINUX) && !defined(OS_CHROMEOS))
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   if (mouseButton == blink::WebScrollbarBehavior::ButtonMiddle)
++#if ((defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS))
+   if (mouseButton == blink::WebPointerProperties::Button::Middle)
      return true;
  #endif
 @@ -50,7 +50,7 @@ bool WebScrollbarBehaviorImpl::shouldSna
diff --git a/chromium-new/patches/patch-content_shell_BUILD.gn b/chromium-new/patches/patch-content_shell_BUILD.gn
new file mode 100644
index 0000000..b43625d
--- /dev/null
+++ b/chromium-new/patches/patch-content_shell_BUILD.gn
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- content/shell/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/shell/BUILD.gn
+@@ -290,7 +290,7 @@ static_library("content_shell_lib") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [
+       "//build/linux:fontconfig",
+       "//ui/gfx:test_support",
+@@ -311,7 +311,7 @@ static_library("content_shell_lib") {
+     deps += [ "//content/shell/android:content_shell_jni_headers" ]
+   }
+ 
+-  if (is_posix && !is_mac) {
++  if (is_posix && !is_mac && !is_bsd) {
+     deps += [
+       "//components/crash/content/app",
+       "//components/crash/content/browser",
+@@ -359,7 +359,7 @@ static_library("content_shell_lib") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//third_party/freetype2" ]
+   }
+ 
+@@ -525,7 +525,7 @@ if (is_android) {
+       }
+     }
+ 
+-    if (is_linux && !is_component_build) {
++    if ((is_linux || is_bsd) && !is_component_build) {
+       # Set rpath to find our own libfreetype even in a non-component build.
+       configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+     }
diff --git a/chromium-new/patches/patch-content_shell_browser_shell__browser__context.cc b/chromium-new/patches/patch-content_shell_browser_shell__browser__context.cc
index c269f28..595b2de 100644
--- a/chromium-new/patches/patch-content_shell_browser_shell__browser__context.cc
+++ b/chromium-new/patches/patch-content_shell_browser_shell__browser__context.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- content/shell/browser/shell_browser_context.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/shell/browser/shell_browser_context.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/shell/browser/shell_browser_context.cc
 @@ -24,7 +24,7 @@
  
@@ -11,12 +11,12 @@ $NetBSD$
  #include "base/nix/xdg_util.h"
  #elif defined(OS_MACOSX)
  #include "base/base_paths_mac.h"
-@@ -80,7 +80,7 @@ void ShellBrowserContext::InitWhileIOAll
+@@ -81,7 +81,7 @@ void ShellBrowserContext::InitWhileIOAll
  #if defined(OS_WIN)
    CHECK(PathService::Get(base::DIR_LOCAL_APP_DATA, &path_));
    path_ = path_.Append(std::wstring(L"content_shell"));
 -#elif defined(OS_LINUX)
 +#elif defined(OS_LINUX) || defined(OS_BSD)
-   scoped_ptr<base::Environment> env(base::Environment::Create());
+   std::unique_ptr<base::Environment> env(base::Environment::Create());
    base::FilePath config_dir(
        base::nix::GetXDGDirectory(env.get(),
diff --git a/chromium-new/patches/patch-content_shell_browser_shell__browser__main__parts.cc b/chromium-new/patches/patch-content_shell_browser_shell__browser__main__parts.cc
index a54b29d..ccd1492 100644
--- a/chromium-new/patches/patch-content_shell_browser_shell__browser__main__parts.cc
+++ b/chromium-new/patches/patch-content_shell_browser_shell__browser__main__parts.cc
@@ -1,17 +1,17 @@
 $NetBSD$
 
---- content/shell/browser/shell_browser_main_parts.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- content/shell/browser/shell_browser_main_parts.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ content/shell/browser/shell_browser_main_parts.cc
-@@ -40,7 +40,7 @@
+@@ -44,7 +44,7 @@
  #if defined(USE_AURA) && defined(USE_X11)
- #include "ui/events/devices/x11/touch_factory_x11.h"
+ #include "ui/events/devices/x11/touch_factory_x11.h"  // nogncheck
  #endif
 -#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
 +#if !defined(OS_CHROMEOS) && defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX))
  #include "ui/base/ime/input_method_initializer.h"
  #endif
  #if defined(OS_CHROMEOS)
-@@ -124,7 +124,7 @@ void ShellBrowserMainParts::PostMainMess
+@@ -143,7 +143,7 @@ void ShellBrowserMainParts::PostMainMess
  }
  
  void ShellBrowserMainParts::PreEarlyInitialization() {
diff --git a/chromium-new/patches/patch-content_test_BUILD.gn b/chromium-new/patches/patch-content_test_BUILD.gn
new file mode 100644
index 0000000..a301397
--- /dev/null
+++ b/chromium-new/patches/patch-content_test_BUILD.gn
@@ -0,0 +1,51 @@
+$NetBSD$
+
+--- content/test/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ content/test/BUILD.gn
+@@ -377,7 +377,7 @@ test("content_browsertests") {
+                         ".",
+                         "//content")
+ 
+-  if (is_android || is_linux || is_mac || is_win) {
++  if (is_android || is_linux || is_bsd || is_mac || is_win) {
+     data = [
+       "$root_out_dir/content_shell.pak",
+       "data/",
+@@ -615,7 +615,7 @@ test("content_unittests") {
+                         ".",
+                         "//content")
+ 
+-  if (is_android || is_linux || is_mac || is_win) {
++  if (is_android || is_linux || is_bsd || is_mac || is_win) {
+     data = [
+       "$root_out_dir/content_shell.pak",
+       "data/",
+@@ -738,7 +738,7 @@ test("content_unittests") {
+       "//ui/shell_dialogs:shell_dialogs",
+     ]
+ 
+-    if (is_linux || is_mac || is_win) {
++    if (is_linux || is_bsd || is_mac || is_win) {
+       sources +=
+           [ "../browser/media/capture/desktop_capture_device_unittest.cc" ]
+       deps += [ "//third_party/webrtc/modules/desktop_capture" ]
+@@ -772,7 +772,7 @@ test("content_unittests") {
+                     "//content")
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     if (use_dbus) {
+       deps += [ "//dbus:test_support" ]
+     }
+@@ -855,6 +855,10 @@ test("content_unittests") {
+     sources -= [ "../common/plugin_list_unittest.cc" ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [ "../browser/download/file_metadata_unittest_linux.cc"]
++  }
++
+   if (use_ozone) {
+     deps += [ "//ui/ozone" ]
+   } else {
diff --git a/chromium-new/patches/patch-crypto_nss__util.cc b/chromium-new/patches/patch-crypto_nss__util.cc
index d90c2df..9e73b48 100644
--- a/chromium-new/patches/patch-crypto_nss__util.cc
+++ b/chromium-new/patches/patch-crypto_nss__util.cc
@@ -1,9 +1,9 @@
 $NetBSD$
 
---- crypto/nss_util.cc.orig	2016-06-24 01:02:21.000000000 +0000
+--- crypto/nss_util.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ crypto/nss_util.cc
-@@ -17,7 +17,7 @@
- 
+@@ -20,7 +20,7 @@
+ #include "base/threading/thread_task_runner_handle.h"
  #include "crypto/nss_util_internal.h"
  
 -#if defined(OS_OPENBSD)
@@ -11,16 +11,7 @@ $NetBSD$
  #include <sys/mount.h>
  #include <sys/param.h>
  #endif
-@@ -148,7 +148,7 @@ char* PKCS11PasswordFunc(PK11SlotInfo* s
- // detection when database_dir is on NFS.  See http://crbug.com/48585.
- //
- // TODO(wtc): port this function to other USE_NSS_CERTS platforms.  It is
--// defined only for OS_LINUX and OS_OPENBSD simply because the statfs structure
-+// defined only for OS_LINUX and OS_BSD simply because the statfs structure
- // is OS-specific.
- //
- // Because this function sets an environment variable it must be run before we
-@@ -159,10 +159,14 @@ void UseLocalCacheOfNSSDatabaseIfNFS(con
+@@ -150,10 +150,14 @@ void UseLocalCacheOfNSSDatabaseIfNFS(con
    base::FileSystemType fs_type = base::FILE_SYSTEM_UNKNOWN;
    if (base::GetFileSystemType(database_dir, &fs_type))
      db_on_nfs = (fs_type == base::FILE_SYSTEM_NFS);
diff --git a/chromium-new/patches/patch-device_BUILD.gn b/chromium-new/patches/patch-device_BUILD.gn
new file mode 100644
index 0000000..7117b93
--- /dev/null
+++ b/chromium-new/patches/patch-device_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ device/BUILD.gn
+@@ -173,7 +173,7 @@ test("device_unittests") {
+     ]
+   }
+ 
+-  if ((is_chromeos || is_linux) && use_dbus) {
++  if ((is_chromeos || is_linux || is_bsd) && use_dbus) {
+     configs += [ "//build/config/linux/dbus" ]
+ 
+     sources += [
diff --git a/chromium-new/patches/patch-device_battery_BUILD.gn b/chromium-new/patches/patch-device_battery_BUILD.gn
new file mode 100644
index 0000000..02e942e
--- /dev/null
+++ b/chromium-new/patches/patch-device_battery_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/battery/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ device/battery/BUILD.gn
+@@ -47,7 +47,7 @@ if (!is_android) {
+       ]
+     }
+ 
+-    if (is_linux && !is_chromeos) {
++    if ((is_linux || is_bsd) && !is_chromeos) {
+       if (use_dbus) {
+         configs += [ "//build/config/linux/dbus" ]
+         deps += [ "//dbus" ]
diff --git a/chromium-new/patches/patch-device_geolocation_BUILD.gn b/chromium-new/patches/patch-device_geolocation_BUILD.gn
new file mode 100644
index 0000000..4f0f41c
--- /dev/null
+++ b/chromium-new/patches/patch-device_geolocation_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/geolocation/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ device/geolocation/BUILD.gn
+@@ -93,7 +93,7 @@ component("device_geolocation") {
+   if (is_android) {
+     sources -= [ "wifi_data_provider_common.cc" ]
+   }
+-  if (is_chromeos || (is_linux && !use_dbus)) {
++  if (is_chromeos || (is_linux && !use_dbus) || is_bsd) {
+     sources -= [ "wifi_data_provider_linux.cc" ]
+   }
+   if (is_linux && use_dbus) {
diff --git a/chromium-new/patches/patch-device_geolocation_location__arbitrator__impl.cc b/chromium-new/patches/patch-device_geolocation_location__arbitrator__impl.cc
new file mode 100644
index 0000000..73cc643
--- /dev/null
+++ b/chromium-new/patches/patch-device_geolocation_location__arbitrator__impl.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/geolocation/location_arbitrator_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
++++ device/geolocation/location_arbitrator_impl.cc
+@@ -167,7 +167,7 @@ LocationArbitratorImpl::NewNetworkLocati
+ 
+ std::unique_ptr<LocationProvider>
+ LocationArbitratorImpl::NewSystemLocationProvider() {
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+   return nullptr;
+ #else
+   return device::NewSystemLocationProvider();
diff --git a/chromium-new/patches/patch-device_hid_BUILD.gn b/chromium-new/patches/patch-device_hid_BUILD.gn
new file mode 100644
index 0000000..c9a75e9
--- /dev/null
+++ b/chromium-new/patches/patch-device_hid_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- device/hid/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ device/hid/BUILD.gn
+@@ -56,6 +56,13 @@ source_set("hid") {
+     deps += [ "//device/udev_linux" ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "hid_connection_linux.cc",
++      "hid_connection_linux.h",
++    ]
++  }
++
+   if (is_chromeos) {
+     deps += [ "//chromeos" ]
+   }
diff --git a/chromium-new/patches/patch-device_hid_hid.gyp b/chromium-new/patches/patch-device_hid_hid.gyp
deleted file mode 100644
index c3154e2..0000000
--- a/chromium-new/patches/patch-device_hid_hid.gyp
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
---- device/hid/hid.gyp.orig	2016-06-24 01:02:22.000000000 +0000
-+++ device/hid/hid.gyp
-@@ -84,6 +84,18 @@
-             },
-           },
-         }],
-+        ['os_bsd==1', {
-+          'sources!': [
-+            'device_monitor_linux.cc',
-+            'device_monitor_linux.h',
-+            'hid_connection_linux.cc',
-+            'hid_connection_linux.h',
-+            'hid_service_linux.cc',
-+            'hid_service_linux.h',
-+            'input_service_linux.cc',
-+            'input_service_linux.h',
-+          ],
-+        }],
-       ],
-     },
-     {
diff --git a/chromium-new/patches/patch-device_media__transfer__protocol_media__transfer__protocol__manager.h b/chromium-new/patches/patch-device_media__transfer__protocol_media__transfer__protocol__manager.h
new file mode 100644
index 0000000..b6a5494
--- /dev/null
+++ b/chromium-new/patches/patch-device_media__transfer__protocol_media__transfer__protocol__manager.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/media_transfer_protocol/media_transfer_protocol_manager.h.orig	2016-11-10 20:02:14.000000000 +0000
++++ device/media_transfer_protocol/media_transfer_protocol_manager.h
+@@ -15,7 +15,7 @@
+ #include "base/memory/ref_counted.h"
+ #include "build/build_config.h"
+ 
+-#if !defined(OS_LINUX)
++#if !defined(OS_LINUX) && !defined(OS_FREEBSD)
+ #error "Only used on Linux and ChromeOS"
+ #endif
+ 
diff --git a/chromium-new/patches/patch-device_serial_BUILD.gn b/chromium-new/patches/patch-device_serial_BUILD.gn
new file mode 100644
index 0000000..4ca90f8
--- /dev/null
+++ b/chromium-new/patches/patch-device_serial_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- device/serial/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ device/serial/BUILD.gn
+@@ -6,7 +6,7 @@ import("//build/config/features.gni")
+ import("//mojo/public/tools/bindings/mojom.gni")
+ 
+ # Library works only on desktop platforms.
+-assert(is_win || is_linux || is_mac)
++assert(is_win || is_linux || is_bsd || is_mac)
+ 
+ config("platform_support") {
+   visibility = [ ":serial" ]
+@@ -70,6 +70,12 @@ static_library("serial") {
+   if (use_udev) {
+     deps += [ "//device/udev_linux" ]
+   }
++  if (is_bsd) {
++    sources -= [
++      "serial_device_enumerator_linux.cc",
++      "serial_device_enumerator_linux.h"
++    ]
++  }
+   if (is_chromeos) {
+     deps += [
+       "//chromeos",
diff --git a/chromium-new/patches/patch-device_serial_serial.gyp b/chromium-new/patches/patch-device_serial_serial.gyp
deleted file mode 100644
index 4daa68f..0000000
--- a/chromium-new/patches/patch-device_serial_serial.gyp
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- device/serial/serial.gyp.orig	2016-06-24 01:02:22.000000000 +0000
-+++ device/serial/serial.gyp
-@@ -71,6 +71,12 @@
-             },
-           },
-         }],
-+        ['os_bsd==1', {
-+          'sources!': [
-+            'serial_device_enumerator_linux.cc',
-+            'serial_device_enumerator_linux.h',
-+          ],
-+        }],
-       ],
-       'dependencies': [
-         'device_serial_mojo',
diff --git a/chromium-new/patches/patch-device_serial_serial__io__handler__posix.cc b/chromium-new/patches/patch-device_serial_serial__io__handler__posix.cc
index 2a2ed8a..899e377 100644
--- a/chromium-new/patches/patch-device_serial_serial__io__handler__posix.cc
+++ b/chromium-new/patches/patch-device_serial_serial__io__handler__posix.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- device/serial/serial_io_handler_posix.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/serial/serial_io_handler_posix.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/serial/serial_io_handler_posix.cc
 @@ -60,7 +60,7 @@ bool BitrateToSpeedConstant(int bitrate,
      BITRATE_TO_SPEED_CASE(9600)
diff --git a/chromium-new/patches/patch-device_serial_serial__service__impl.cc b/chromium-new/patches/patch-device_serial_serial__service__impl.cc
index 1d3056f..f7bd78e 100644
--- a/chromium-new/patches/patch-device_serial_serial__service__impl.cc
+++ b/chromium-new/patches/patch-device_serial_serial__service__impl.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- device/serial/serial_service_impl.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/serial/serial_service_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/serial/serial_service_impl.cc
-@@ -74,9 +74,14 @@ void SerialServiceImpl::Connect(
+@@ -75,9 +75,14 @@ void SerialServiceImpl::Connect(
  }
  
  SerialDeviceEnumerator* SerialServiceImpl::GetDeviceEnumerator() {
diff --git a/chromium-new/patches/patch-device_usb_usb.gyp b/chromium-new/patches/patch-device_usb_usb.gyp
deleted file mode 100644
index f5a37f2..0000000
--- a/chromium-new/patches/patch-device_usb_usb.gyp
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- device/usb/usb.gyp.orig	2016-06-24 01:02:22.000000000 +0000
-+++ device/usb/usb.gyp
-@@ -117,6 +117,16 @@
-             'usb_service_impl.h',
-           ]
-         }],
-+        ['OS == "freebsd"', {
-+          'dependencies!': [
-+            '../../third_party/libusb/libusb.gyp:libusb',
-+          ],
-+          'link_settings': {
-+            'ldflags': [
-+              '-L/usr/lib -lusb',
-+            ],
-+          },
-+        }],
-         ['chromeos==1', {
-           'dependencies': [
-             '../../chromeos/chromeos.gyp:chromeos',
diff --git a/chromium-new/patches/patch-device_usb_usb__context.cc b/chromium-new/patches/patch-device_usb_usb__context.cc
index 42fd453..1100608 100644
--- a/chromium-new/patches/patch-device_usb_usb__context.cc
+++ b/chromium-new/patches/patch-device_usb_usb__context.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- device/usb/usb_context.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/usb/usb_context.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/usb/usb_context.cc
 @@ -9,8 +9,13 @@
  #include "base/macros.h"
@@ -20,7 +20,7 @@ $NetBSD$
  
  void UsbContext::UsbEventHandler::Stop() {
    base::subtle::Release_Store(&running_, 0);
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD) // XXX(rene) not available in base version
++#if !defined(OS_FREEBSD) // XXX(rene) not available in base version
    libusb_interrupt_handle_event(context_);
 +#endif
  }
diff --git a/chromium-new/patches/patch-device_usb_usb__context__unittest.cc b/chromium-new/patches/patch-device_usb_usb__context__unittest.cc
index 9392127..7b143be 100644
--- a/chromium-new/patches/patch-device_usb_usb__context__unittest.cc
+++ b/chromium-new/patches/patch-device_usb_usb__context__unittest.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- device/usb/usb_context_unittest.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/usb/usb_context_unittest.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/usb/usb_context_unittest.cc
 @@ -7,7 +7,11 @@
  #include "build/build_config.h"
diff --git a/chromium-new/patches/patch-device_usb_usb__device__handle__impl.cc b/chromium-new/patches/patch-device_usb_usb__device__handle__impl.cc
index 0ad5b67..a4c381f 100644
--- a/chromium-new/patches/patch-device_usb_usb__device__handle__impl.cc
+++ b/chromium-new/patches/patch-device_usb_usb__device__handle__impl.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- device/usb/usb_device_handle_impl.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/usb/usb_device_handle_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/usb/usb_device_handle_impl.cc
-@@ -24,7 +24,11 @@
+@@ -25,7 +25,11 @@
  #include "device/usb/usb_error.h"
  #include "device/usb/usb_service.h"
  #include "net/base/io_buffer.h"
diff --git a/chromium-new/patches/patch-device_usb_usb__device__handle__impl.h b/chromium-new/patches/patch-device_usb_usb__device__handle__impl.h
index f245e4c..4f41a11 100644
--- a/chromium-new/patches/patch-device_usb_usb__device__handle__impl.h
+++ b/chromium-new/patches/patch-device_usb_usb__device__handle__impl.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- device/usb/usb_device_handle_impl.h.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/usb/usb_device_handle_impl.h.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/usb/usb_device_handle_impl.h
-@@ -17,7 +17,12 @@
+@@ -18,7 +18,12 @@
  #include "base/memory/ref_counted.h"
  #include "base/threading/thread_checker.h"
  #include "device/usb/usb_device_handle.h"
diff --git a/chromium-new/patches/patch-device_usb_usb__device__impl.cc b/chromium-new/patches/patch-device_usb_usb__device__impl.cc
index 29f3e55..37ca0a5 100644
--- a/chromium-new/patches/patch-device_usb_usb__device__impl.cc
+++ b/chromium-new/patches/patch-device_usb_usb__device__impl.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- device/usb/usb_device_impl.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/usb/usb_device_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/usb/usb_device_impl.cc
-@@ -20,7 +20,11 @@
+@@ -22,7 +22,11 @@
  #include "device/usb/usb_descriptors.h"
  #include "device/usb/usb_device_handle_impl.h"
  #include "device/usb/usb_error.h"
@@ -12,5 +12,5 @@ $NetBSD$
  #include "third_party/libusb/src/libusb/libusb.h"
 +#endif
  
- #if defined(OS_CHROMEOS)
- #include "chromeos/dbus/dbus_thread_manager.h"
+ namespace device {
+ 
diff --git a/chromium-new/patches/patch-device_usb_usb__error.cc b/chromium-new/patches/patch-device_usb_usb__error.cc
index 63e0dcc..ecddbb7 100644
--- a/chromium-new/patches/patch-device_usb_usb__error.cc
+++ b/chromium-new/patches/patch-device_usb_usb__error.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- device/usb/usb_error.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/usb/usb_error.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/usb/usb_error.cc
 @@ -4,7 +4,11 @@
  
diff --git a/chromium-new/patches/patch-device_usb_usb__service__impl.cc b/chromium-new/patches/patch-device_usb_usb__service__impl.cc
index 9dd2295..afff345 100644
--- a/chromium-new/patches/patch-device_usb_usb__service__impl.cc
+++ b/chromium-new/patches/patch-device_usb_usb__service__impl.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- device/usb/usb_service_impl.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/usb/usb_service_impl.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/usb/usb_service_impl.cc
-@@ -24,7 +24,11 @@
+@@ -26,7 +26,11 @@
  #include "device/usb/usb_error.h"
  #include "device/usb/webusb_descriptors.h"
  #include "net/base/io_buffer.h"
@@ -15,7 +15,7 @@ $NetBSD$
  
  #if defined(OS_WIN)
  #include <setupapi.h>
-@@ -292,6 +296,7 @@ UsbServiceImpl::UsbServiceImpl(
+@@ -213,6 +217,7 @@ UsbServiceImpl::UsbServiceImpl(
    }
    context_ = new UsbContext(platform_context);
  
@@ -23,7 +23,7 @@ $NetBSD$
    rv = libusb_hotplug_register_callback(
        context_->context(),
        static_cast<libusb_hotplug_event>(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED |
-@@ -304,6 +309,8 @@ UsbServiceImpl::UsbServiceImpl(
+@@ -225,6 +230,8 @@ UsbServiceImpl::UsbServiceImpl(
    }
  
    RefreshDevices();
@@ -32,19 +32,18 @@ $NetBSD$
  #if defined(OS_WIN)
    DeviceMonitorWin* device_monitor = DeviceMonitorWin::GetForAllInterfaces();
    if (device_monitor) {
-@@ -313,9 +320,11 @@ UsbServiceImpl::UsbServiceImpl(
+@@ -234,8 +241,10 @@ UsbServiceImpl::UsbServiceImpl(
  }
  
  UsbServiceImpl::~UsbServiceImpl() {
 +#if !defined(OS_FREEBSD)
-   if (hotplug_enabled_) {
+   if (hotplug_enabled_)
      libusb_hotplug_deregister_callback(context_->context(), hotplug_handle_);
-   }
 +#endif // !defined(OS_FREEBSD)
-   for (const auto& map_entry : devices_) {
-     map_entry.second->OnDisconnect();
-   }
-@@ -557,6 +566,7 @@ void UsbServiceImpl::RemoveDevice(scoped
+   for (auto* platform_device : ignored_devices_)
+     libusb_unref_device(platform_device);
+ }
+@@ -477,6 +486,7 @@ void UsbServiceImpl::RemoveDevice(scoped
    device->OnDisconnect();
  }
  
@@ -52,7 +51,7 @@ $NetBSD$
  // static
  int LIBUSB_CALL UsbServiceImpl::HotplugCallback(libusb_context* context,
                                                  PlatformUsbDevice device,
-@@ -594,6 +604,7 @@ int LIBUSB_CALL UsbServiceImpl::HotplugC
+@@ -514,6 +524,7 @@ int LIBUSB_CALL UsbServiceImpl::HotplugC
  
    return 0;
  }
diff --git a/chromium-new/patches/patch-device_usb_usb__service__impl.h b/chromium-new/patches/patch-device_usb_usb__service__impl.h
index 77511e5..75e294f 100644
--- a/chromium-new/patches/patch-device_usb_usb__service__impl.h
+++ b/chromium-new/patches/patch-device_usb_usb__service__impl.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- device/usb/usb_service_impl.h.orig	2016-06-24 01:02:22.000000000 +0000
+--- device/usb/usb_service_impl.h.orig	2016-11-10 20:02:14.000000000 +0000
 +++ device/usb/usb_service_impl.h
 @@ -15,7 +15,13 @@
  #include "build/build_config.h"
@@ -16,7 +16,7 @@ $NetBSD$
  
  #if defined(OS_WIN)
  #include "base/scoped_observer.h"
-@@ -71,11 +77,13 @@ class UsbServiceImpl :
+@@ -70,11 +76,13 @@ class UsbServiceImpl :
                   scoped_refptr<UsbDeviceImpl> device);
    void RemoveDevice(scoped_refptr<UsbDeviceImpl> device);
  
@@ -30,7 +30,7 @@ $NetBSD$
    // These functions release a reference to the provided platform device.
    void OnPlatformDeviceAdded(PlatformUsbDevice platform_device);
    void OnPlatformDeviceRemoved(PlatformUsbDevice platform_device);
-@@ -88,7 +96,9 @@ class UsbServiceImpl :
+@@ -90,7 +98,9 @@ class UsbServiceImpl :
    // connected instead of only when a full enumeration is requested.
    // TODO(reillyg): Support this on all platforms. crbug.com/411715
    bool hotplug_enabled_ = false;
diff --git a/chromium-new/patches/patch-extensions_browser_BUILD.gn b/chromium-new/patches/patch-extensions_browser_BUILD.gn
new file mode 100644
index 0000000..b06ce98
--- /dev/null
+++ b/chromium-new/patches/patch-extensions_browser_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- extensions/browser/BUILD.gn.orig	2016-11-10 20:02:14.000000000 +0000
++++ extensions/browser/BUILD.gn
+@@ -85,7 +85,7 @@ source_set("browser") {
+               "//extensions")
+       sources += nonchromeos_sources
+ 
+-      if (is_linux) {
++      if (is_linux || is_bsd) {
+         if (use_dbus) {
+           deps += [ "//dbus" ]
+         }
diff --git a/chromium-new/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc b/chromium-new/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc
index a08448e..0d943b7 100644
--- a/chromium-new/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc
+++ b/chromium-new/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- extensions/browser/api/declarative_webrequest/webrequest_action.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- extensions/browser/api/declarative_webrequest/webrequest_action.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ extensions/browser/api/declarative_webrequest/webrequest_action.cc
 @@ -28,7 +28,11 @@
  #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
diff --git a/chromium-new/patches/patch-extensions_browser_api_serial_serial__api.cc b/chromium-new/patches/patch-extensions_browser_api_serial_serial__api.cc
index c2749f1..8ca650d 100644
--- a/chromium-new/patches/patch-extensions_browser_api_serial_serial__api.cc
+++ b/chromium-new/patches/patch-extensions_browser_api_serial_serial__api.cc
@@ -1,13 +1,14 @@
 $NetBSD$
 
---- extensions/browser/api/serial/serial_api.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- extensions/browser/api/serial/serial_api.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ extensions/browser/api/serial/serial_api.cc
-@@ -86,11 +86,13 @@ bool SerialGetDevicesFunction::Prepare()
+@@ -85,12 +85,13 @@ bool SerialGetDevicesFunction::Prepare()
+ 
  void SerialGetDevicesFunction::Work() {
    DCHECK_CURRENTLY_ON(BrowserThread::FILE);
- 
+-
 +#if !defined(OS_BSD)
-   scoped_ptr<device::SerialDeviceEnumerator> enumerator =
+   std::unique_ptr<device::SerialDeviceEnumerator> enumerator =
        device::SerialDeviceEnumerator::Create();
    mojo::Array<device::serial::DeviceInfoPtr> devices = enumerator->GetDevices();
    results_ = serial::GetDevices::Results::Create(
diff --git a/chromium-new/patches/patch-extensions_browser_api_web__request_form__data__parser.cc b/chromium-new/patches/patch-extensions_browser_api_web__request_form__data__parser.cc
index 9ef2243..812943b 100644
--- a/chromium-new/patches/patch-extensions_browser_api_web__request_form__data__parser.cc
+++ b/chromium-new/patches/patch-extensions_browser_api_web__request_form__data__parser.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- extensions/browser/api/web_request/form_data_parser.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- extensions/browser/api/web_request/form_data_parser.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ extensions/browser/api/web_request/form_data_parser.cc
 @@ -15,7 +15,11 @@
  #include "base/values.h"
diff --git a/chromium-new/patches/patch-extensions_common_image__util.cc b/chromium-new/patches/patch-extensions_common_image__util.cc
index 88c34b5..218af3b 100644
--- a/chromium-new/patches/patch-extensions_common_image__util.cc
+++ b/chromium-new/patches/patch-extensions_common_image__util.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- extensions/common/image_util.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- extensions/common/image_util.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ extensions/common/image_util.cc
 @@ -11,7 +11,11 @@
  #include "base/strings/string_number_conversions.h"
diff --git a/chromium-new/patches/patch-extensions_common_stack__frame.cc b/chromium-new/patches/patch-extensions_common_stack__frame.cc
index dec48be..76bd6c0 100644
--- a/chromium-new/patches/patch-extensions_common_stack__frame.cc
+++ b/chromium-new/patches/patch-extensions_common_stack__frame.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- extensions/common/stack_frame.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- extensions/common/stack_frame.cc.orig	2016-11-10 20:02:14.000000000 +0000
 +++ extensions/common/stack_frame.cc
 @@ -7,7 +7,11 @@
  #include <string>
diff --git a/chromium-new/patches/patch-gpu_BUILD.gn b/chromium-new/patches/patch-gpu_BUILD.gn
new file mode 100644
index 0000000..8a21733
--- /dev/null
+++ b/chromium-new/patches/patch-gpu_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- gpu/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ gpu/BUILD.gn
+@@ -123,7 +123,7 @@ test("command_buffer_gles2_tests") {
+     libs += [ "android" ]
+     deps += [ "//ui/android:ui_java" ]
+   }
+-  if (is_linux && !is_component_build) {
++  if ((is_linux || is_bsd) && !is_component_build) {
+     configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+   }
+ }
diff --git a/chromium-new/patches/patch-gpu_command__buffer_service_error__state.cc b/chromium-new/patches/patch-gpu_command__buffer_service_error__state.cc
deleted file mode 100644
index 1e428fd..0000000
--- a/chromium-new/patches/patch-gpu_command__buffer_service_error__state.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD$
-
---- gpu/command_buffer/service/error_state.cc.orig	2016-06-24 01:02:22.000000000 +0000
-+++ gpu/command_buffer/service/error_state.cc
-@@ -108,6 +108,7 @@ uint32_t ErrorStateImpl::GetGLError() {
- 
- GLenum ErrorStateImpl::GetErrorHandleContextLoss() {
-   GLenum error = glGetError();
-+#if !defined(OS_NETBSD)
-   if (error == GL_CONTEXT_LOST_KHR) {
-     client_->OnContextLostError();
-     // Do not expose GL_CONTEXT_LOST_KHR, as the version of the robustness
-@@ -115,6 +116,7 @@ GLenum ErrorStateImpl::GetErrorHandleCon
-     // buffer.
-     error = GL_NO_ERROR;
-   }
-+#endif
-   return error;
- }
- 
-@@ -205,7 +207,11 @@ void ErrorStateImpl::ClearRealGLErrors(
-   // Clears and logs all current gl errors.
-   GLenum error;
-   while ((error = glGetError()) != GL_NO_ERROR) {
-+#if defined(OS_NETBSD)
-+    if (error != GL_OUT_OF_MEMORY) {
-+#else
-     if (error != GL_CONTEXT_LOST_KHR && error != GL_OUT_OF_MEMORY) {
-+#endif
-       // GL_OUT_OF_MEMORY can legally happen on lost device.
-       logger_->LogMessage(
-           filename, line,
diff --git a/chromium-new/patches/patch-gpu_command__buffer_service_program__manager.cc b/chromium-new/patches/patch-gpu_command__buffer_service_program__manager.cc
index c97e2a9..d13b6f7 100644
--- a/chromium-new/patches/patch-gpu_command__buffer_service_program__manager.cc
+++ b/chromium-new/patches/patch-gpu_command__buffer_service_program__manager.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- gpu/command_buffer/service/program_manager.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- gpu/command_buffer/service/program_manager.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ gpu/command_buffer/service/program_manager.cc
 @@ -29,7 +29,11 @@
  #include "gpu/command_buffer/service/gpu_preferences.h"
diff --git a/chromium-new/patches/patch-gpu_config_BUILD.gn b/chromium-new/patches/patch-gpu_config_BUILD.gn
new file mode 100644
index 0000000..ca9f178
--- /dev/null
+++ b/chromium-new/patches/patch-gpu_config_BUILD.gn
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- gpu/config/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ gpu/config/BUILD.gn
+@@ -8,7 +8,8 @@ import("//build/config/ui.gni")
+ 
+ declare_args() {
+   # Use the PCI lib to collect GPU information on Linux.
+-  use_libpci = is_linux && (!is_chromecast || is_cast_desktop_build) &&
++  use_libpci = (is_linux || is_bsd) &&
++               (!is_chromecast || is_cast_desktop_build) &&
+                (use_x11 || use_ozone)
+ }
+ 
+@@ -97,6 +98,14 @@ source_set("config_sources") {
+       ]
+     }
+   }
++
++  if (is_bsd) {
++    sources -= [
++      "gpu_info_collector_linux.cc",
++      "gpu_info_collector_linux.h"
++    ]
++  }
++
+   if (is_mac) {
+     libs = [
+       "IOKit.framework",
diff --git a/chromium-new/patches/patch-gpu_config_gpu__control__list.cc b/chromium-new/patches/patch-gpu_config_gpu__control__list.cc
index 779a8fe..42c084c 100644
--- a/chromium-new/patches/patch-gpu_config_gpu__control__list.cc
+++ b/chromium-new/patches/patch-gpu_config_gpu__control__list.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- gpu/config/gpu_control_list.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- gpu/config/gpu_control_list.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ gpu/config/gpu_control_list.cc
-@@ -17,7 +17,11 @@
+@@ -19,7 +19,11 @@
  #include "base/sys_info.h"
  #include "gpu/config/gpu_info.h"
  #include "gpu/config/gpu_util.h"
@@ -14,3 +14,21 @@ $NetBSD$
  
  namespace gpu {
  namespace {
+@@ -1154,7 +1158,7 @@ GpuControlList::GpuControlListEntry::GLT
+ GpuControlList::GpuControlListEntry::GetDefaultGLType() {
+ #if defined(OS_CHROMEOS)
+   return kGLTypeGL;
+-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   return kGLTypeGL;
+ #elif defined(OS_MACOSX)
+   return kGLTypeGL;
+@@ -1593,7 +1597,7 @@ GpuControlList::OsType GpuControlList::G
+   return kOsWin;
+ #elif defined(OS_ANDROID)
+   return kOsAndroid;
+-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   return kOsLinux;
+ #elif defined(OS_MACOSX)
+   return kOsMacosx;
diff --git a/chromium-new/patches/patch-gpu_config_gpu__control__list__unittest.cc b/chromium-new/patches/patch-gpu_config_gpu__control__list__unittest.cc
index 115297d..6b40643 100644
--- a/chromium-new/patches/patch-gpu_config_gpu__control__list__unittest.cc
+++ b/chromium-new/patches/patch-gpu_config_gpu__control__list__unittest.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- gpu/config/gpu_control_list_unittest.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- gpu/config/gpu_control_list_unittest.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ gpu/config/gpu_control_list_unittest.cc
 @@ -175,8 +175,7 @@ TEST_F(GpuControlListTest, VendorOnAllOs
    features = control_list->MakeDecision(
diff --git a/chromium-new/patches/patch-gpu_config_gpu__info__collector.cc b/chromium-new/patches/patch-gpu_config_gpu__info__collector.cc
index b321573..428470b 100644
--- a/chromium-new/patches/patch-gpu_config_gpu__info__collector.cc
+++ b/chromium-new/patches/patch-gpu_config_gpu__info__collector.cc
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- gpu/config/gpu_info_collector.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- gpu/config/gpu_info_collector.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ gpu/config/gpu_info_collector.cc
-@@ -167,8 +167,10 @@ CollectInfoResult CollectGraphicsInfoGL(
+@@ -181,8 +181,10 @@ CollectInfoResult CollectGraphicsInfoGL(
    gpu_info->pixel_shader_version = glsl_version;
    gpu_info->vertex_shader_version = glsl_version;
  
-+#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
    IdentifyActiveGPU(gpu_info);
    return CollectDriverInfoGL(gpu_info);
 +#endif
diff --git a/chromium-new/patches/patch-gpu_config_gpu__test__config.cc b/chromium-new/patches/patch-gpu_config_gpu__test__config.cc
index db0a8bc..128d50f 100644
--- a/chromium-new/patches/patch-gpu_config_gpu__test__config.cc
+++ b/chromium-new/patches/patch-gpu_config_gpu__test__config.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- gpu/config/gpu_test_config.cc.orig	2016-06-24 01:02:22.000000000 +0000
+--- gpu/config/gpu_test_config.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ gpu/config/gpu_test_config.cc
-@@ -26,7 +26,7 @@ namespace {
+@@ -24,7 +24,7 @@ namespace {
  GPUTestConfig::OS GetCurrentOS() {
  #if defined(OS_CHROMEOS)
    return GPUTestConfig::kOsChromeOS;
@@ -11,18 +11,18 @@ $NetBSD$
    return GPUTestConfig::kOsLinux;
  #elif defined(OS_WIN)
    int32_t major_version = 0;
-@@ -254,6 +254,10 @@ bool GPUTestBotConfig::LoadCurrentConfig
+@@ -255,6 +255,10 @@ bool GPUTestBotConfig::LoadCurrentConfig
    bool rt;
    if (gpu_info == NULL) {
      GPUInfo my_gpu_info;
-+#if defined(OS_FREEBSD)
++#if defined(OS_FREEBSD) || defined(OS_NETBSD)
 +    rt = false;
 +    LOG(WARNING) << "CollectGpuID not present on FreeBSD";
 +#else
      CollectInfoResult result = CollectGpuID(
          &my_gpu_info.gpu.vendor_id, &my_gpu_info.gpu.device_id);
      if (result != kCollectInfoSuccess) {
-@@ -263,6 +267,7 @@ bool GPUTestBotConfig::LoadCurrentConfig
+@@ -264,6 +268,7 @@ bool GPUTestBotConfig::LoadCurrentConfig
      } else {
        rt = SetGPUInfo(my_gpu_info);
      }
diff --git a/chromium-new/patches/patch-gpu_gles2__conform__support_BUILD.gn b/chromium-new/patches/patch-gpu_gles2__conform__support_BUILD.gn
new file mode 100644
index 0000000..49238d2
--- /dev/null
+++ b/chromium-new/patches/patch-gpu_gles2__conform__support_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- gpu/gles2_conform_support/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ gpu/gles2_conform_support/BUILD.gn
+@@ -61,7 +61,7 @@ executable("gles2_conform_support") {
+     "//gpu/gles2_conform_support/egl",
+     "//ui/gl",
+   ]
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [
+       "native/egl_native_aura.cc",
+       "native/egl_native_x11.cc",
+@@ -131,7 +131,7 @@ if (internal_gles2_conform_tests) {
+       # Must be done this way for warning flags to be ordered correctly.
+       ":gles2_conform_test_warnings",
+     ]
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       if (!is_chromeos) {
+         deps += [ "//build/config/linux/gtk2" ]
+       }
diff --git a/chromium-new/patches/patch-gpu_gles2__conform__support_native_BUILD.gn b/chromium-new/patches/patch-gpu_gles2__conform__support_native_BUILD.gn
new file mode 100644
index 0000000..2a7281a
--- /dev/null
+++ b/chromium-new/patches/patch-gpu_gles2__conform__support_native_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- gpu/gles2_conform_support/native/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ gpu/gles2_conform_support/native/BUILD.gn
+@@ -21,7 +21,7 @@ source_set("native") {
+     "//gpu/gles2_conform_support/egl",
+     "//ui/gl",
+   ]
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [
+       "egl_native_aura.cc",
+       "egl_native_x11.cc",
diff --git a/chromium-new/patches/patch-gpu_gpu__config.gypi b/chromium-new/patches/patch-gpu_gpu__config.gypi
deleted file mode 100644
index f2942ce..0000000
--- a/chromium-new/patches/patch-gpu_gpu__config.gypi
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
---- gpu/gpu_config.gypi.orig	2016-06-24 01:02:23.000000000 +0000
-+++ gpu/gpu_config.gypi
-@@ -71,7 +71,7 @@
-         '../build/linux/system.gyp:libpci',
-       ],
-     }],
--    ['OS=="linux" and use_x11==1', {
-+    ['(OS=="linux" or os_bsd==1) and use_x11==1', {
-       'dependencies': [
-         '../build/linux/system.gyp:x11',
-         '../build/linux/system.gyp:xext',
-@@ -79,5 +79,11 @@
-         '../ui/gfx/x/gfx_x11.gyp:gfx_x11',
-       ],
-     }],
-+    ['os_bsd==1', {
-+      'sources!': [
-+        'config/gpu_info_collector_linux.cc',
-+        'config/gpu_info_collector_linux.h',
-+      ],
-+    }]
-   ],
- }
diff --git a/chromium-new/patches/patch-gpu_gpu__ipc__service.gypi b/chromium-new/patches/patch-gpu_gpu__ipc__service.gypi
deleted file mode 100644
index 0eccc43..0000000
--- a/chromium-new/patches/patch-gpu_gpu__ipc__service.gypi
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- gpu/gpu_ipc_service.gypi.orig	2016-06-24 01:02:23.000000000 +0000
-+++ gpu/gpu_ipc_service.gypi
-@@ -82,7 +82,7 @@
-         ],
-       },
-     }],
--    ['OS=="linux"', {
-+    ['OS=="linux" or os_bsd==1', {
-       'sources': [ 'ipc/service/image_transport_surface_linux.cc' ],
-     }],
-     ['use_x11 == 1 and (target_arch != "arm" or chromeos == 0)', {
diff --git a/chromium-new/patches/patch-gpu_ipc_client_BUILD.gn b/chromium-new/patches/patch-gpu_ipc_client_BUILD.gn
new file mode 100644
index 0000000..4c6710b
--- /dev/null
+++ b/chromium-new/patches/patch-gpu_ipc_client_BUILD.gn
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- gpu/ipc/client/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ gpu/ipc/client/BUILD.gn
+@@ -53,6 +53,7 @@ source_set("ipc_client_sources") {
+   configs += [
+     "//build/config/compiler:no_size_t_to_int_warning",
+     "//gpu:gpu_implementation",
++    "//build/config/linux:x11",
+   ]
+   deps = [
+     "//base",
diff --git a/chromium-new/patches/patch-gpu_ipc_service_BUILD.gn b/chromium-new/patches/patch-gpu_ipc_service_BUILD.gn
new file mode 100644
index 0000000..a5f6cd3
--- /dev/null
+++ b/chromium-new/patches/patch-gpu_ipc_service_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- gpu/ipc/service/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ gpu/ipc/service/BUILD.gn
+@@ -98,11 +98,12 @@ target(link_target_type, "ipc_service_so
+     ]
+     libs += [ "android" ]
+   }
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [ "image_transport_surface_linux.cc" ]
+   }
+   if (use_x11) {
+     sources += [ "x_util.h" ]
++    configs += [ "//build/config/linux:x11" ]
+   }
+   if (use_ozone) {
+     sources += [
diff --git a/chromium-new/patches/patch-gpu_tools_compositor__model__bench_BUILD.gn b/chromium-new/patches/patch-gpu_tools_compositor__model__bench_BUILD.gn
new file mode 100644
index 0000000..81395a1
--- /dev/null
+++ b/chromium-new/patches/patch-gpu_tools_compositor__model__bench_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- gpu/tools/compositor_model_bench/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ gpu/tools/compositor_model_bench/BUILD.gn
+@@ -4,7 +4,7 @@
+ 
+ import("//build/config/ui.gni")
+ 
+-if (is_linux && !is_chromeos && current_cpu != "arm" && use_x11) {
++if ((is_linux || is_bsd) && !is_chromeos && current_cpu != "arm" && use_x11) {
+   # GYP version: //gpu/tools/tools.gyp:compositor_model_bench
+   executable("compositor_model_bench") {
+     sources = [
diff --git a/chromium-new/patches/patch-gpu_vulkan_BUILD.gn b/chromium-new/patches/patch-gpu_vulkan_BUILD.gn
new file mode 100644
index 0000000..f6f866e
--- /dev/null
+++ b/chromium-new/patches/patch-gpu_vulkan_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- gpu/vulkan/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ gpu/vulkan/BUILD.gn
+@@ -13,7 +13,7 @@ if (enable_vulkan) {
+   component("vulkan") {
+     output_name = "vulkan_wrapper"
+ 
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       assert(use_x11, "Vulkan only support x11 at this point.")
+       sources = [
+         "vulkan_command_buffer.cc",
diff --git a/chromium-new/patches/patch-ipc_ipc__channel.h b/chromium-new/patches/patch-ipc_ipc__channel.h
new file mode 100644
index 0000000..58dedf4
--- /dev/null
+++ b/chromium-new/patches/patch-ipc_ipc__channel.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ipc/ipc_channel.h.orig	2016-11-10 20:02:15.000000000 +0000
++++ ipc/ipc_channel.h
+@@ -290,7 +290,7 @@ class IPC_EXPORT Channel : public Endpoi
+       IPC::ChannelHandle* handle0,
+       IPC::ChannelHandle* handle1);
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // Sandboxed processes live in a PID namespace, so when sending the IPC hello
+   // message from client to server we need to send the PID from the global
+   // PID namespace.
diff --git a/chromium-new/patches/patch-ipc_ipc__channel__posix.cc b/chromium-new/patches/patch-ipc_ipc__channel__posix.cc
new file mode 100644
index 0000000..69f7ebf
--- /dev/null
+++ b/chromium-new/patches/patch-ipc_ipc__channel__posix.cc
@@ -0,0 +1,66 @@
+$NetBSD$
+
+--- ipc/ipc_channel_posix.cc.orig	2016-11-10 20:02:15.000000000 +0000
++++ ipc/ipc_channel_posix.cc
+@@ -183,9 +183,9 @@ void Channel::NotifyProcessForkedForTest
+ 
+ //------------------------------------------------------------------------------
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ int ChannelPosix::global_pid_ = 0;
+-#endif  // OS_LINUX
++#endif  // OS_LINUX || defined(OS_BSD)
+ 
+ ChannelPosix::ChannelPosix(const IPC::ChannelHandle& channel_handle,
+                            Mode mode,
+@@ -613,7 +613,7 @@ bool ChannelPosix::IsNamedServerInitiali
+   return base::PathExists(base::FilePath(channel_id));
+ }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // static
+ void ChannelPosix::SetGlobalPid(int pid) {
+   global_pid_ = pid;
+@@ -622,7 +622,7 @@ void ChannelPosix::SetGlobalPid(int pid)
+ int ChannelPosix::GetGlobalPid() {
+   return global_pid_;
+ }
+-#endif  // OS_LINUX
++#endif  // OS_LINUX || defined(OS_BSD)
+ 
+ // Called by libevent when we can read from the pipe without blocking.
+ void ChannelPosix::OnFileCanReadWithoutBlocking(int fd) {
+@@ -811,12 +811,12 @@ int ChannelPosix::GetHelloMessageProcId(
+   return -1;
+ #else
+   int pid = base::GetCurrentProcId();
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // Our process may be in a sandbox with a separate PID namespace.
+   if (global_pid_) {
+     pid = global_pid_;
+   }
+-#endif  // defined(OS_LINUX)
++#endif  // defined(OS_LINUX) || defined(OS_BSD)
+   return pid;
+ #endif  // defined(OS_NACL_NONSFI)
+ }
+@@ -1133,7 +1133,7 @@ bool Channel::IsNamedServerInitialized(
+   return ChannelPosix::IsNamedServerInitialized(channel_id);
+ }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // static
+ void Channel::SetGlobalPid(int pid) {
+   ChannelPosix::SetGlobalPid(pid);
+@@ -1141,6 +1141,6 @@ void Channel::SetGlobalPid(int pid) {
+ int Channel::GetGlobalPid() {
+   return ChannelPosix::GetGlobalPid();
+ }
+-#endif  // OS_LINUX
++#endif  // OS_LINUX || defined(OS_BSD)
+ 
+ }  // namespace IPC
diff --git a/chromium-new/patches/patch-ipc_ipc__channel__posix.h b/chromium-new/patches/patch-ipc_ipc__channel__posix.h
new file mode 100644
index 0000000..097983c
--- /dev/null
+++ b/chromium-new/patches/patch-ipc_ipc__channel__posix.h
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- ipc/ipc_channel_posix.h.orig	2016-11-10 20:02:15.000000000 +0000
++++ ipc/ipc_channel_posix.h
+@@ -63,10 +63,10 @@ class IPC_EXPORT ChannelPosix : public C
+   void CloseClientFileDescriptor();
+ 
+   static bool IsNamedServerInitialized(const std::string& channel_id);
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   static void SetGlobalPid(int pid);
+   static int GetGlobalPid();
+-#endif  // OS_LINUX
++#endif  // OS_LINUX || defined(OS_BSD)
+ 
+  private:
+   bool CreatePipe(const IPC::ChannelHandle& channel_handle);
+@@ -209,10 +209,10 @@ class IPC_EXPORT ChannelPosix : public C
+   // True if we are responsible for unlinking the unix domain socket file.
+   bool must_unlink_;
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // If non-zero, overrides the process ID sent in the hello message.
+   static int global_pid_;
+-#endif  // OS_LINUX
++#endif  // OS_LINUX || defined(OS_BSD)
+ 
+   DISALLOW_IMPLICIT_CONSTRUCTORS(ChannelPosix);
+ };
diff --git a/chromium-new/patches/patch-ipc_ipc__message__utils.cc b/chromium-new/patches/patch-ipc_ipc__message__utils.cc
index 7f8375e..6dbbfca 100644
--- a/chromium-new/patches/patch-ipc_ipc__message__utils.cc
+++ b/chromium-new/patches/patch-ipc_ipc__message__utils.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ipc/ipc_message_utils.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- ipc/ipc_message_utils.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ ipc/ipc_message_utils.cc
 @@ -423,7 +423,7 @@ void ParamTraits<unsigned int>::Log(cons
    l->append(base::UintToString(p));
diff --git a/chromium-new/patches/patch-ipc_ipc__message__utils.h b/chromium-new/patches/patch-ipc_ipc__message__utils.h
index 5c7099f..58934e7 100644
--- a/chromium-new/patches/patch-ipc_ipc__message__utils.h
+++ b/chromium-new/patches/patch-ipc_ipc__message__utils.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ipc/ipc_message_utils.h.orig	2016-06-24 01:02:23.000000000 +0000
+--- ipc/ipc_message_utils.h.orig	2016-11-10 20:02:15.000000000 +0000
 +++ ipc/ipc_message_utils.h
-@@ -208,7 +208,7 @@ struct ParamTraits<unsigned int> {
+@@ -209,7 +209,7 @@ struct ParamTraits<unsigned int> {
  //   3) Android 64 bit also has int64_t typedef'd to long.
  // Since we want to support Android 32<>64 bit IPC, as long as we don't have
  // these traits for 32 bit ARM then that'll catch any errors.
diff --git a/chromium-new/patches/patch-ipc_unix__domain__socket__util.cc b/chromium-new/patches/patch-ipc_unix__domain__socket__util.cc
index 34071c1..8cabe3a 100644
--- a/chromium-new/patches/patch-ipc_unix__domain__socket__util.cc
+++ b/chromium-new/patches/patch-ipc_unix__domain__socket__util.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- ipc/unix_domain_socket_util.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- ipc/unix_domain_socket_util.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ ipc/unix_domain_socket_util.cc
 @@ -156,7 +156,7 @@ bool CreateClientUnixDomainSocket(const 
  
  bool GetPeerEuid(int fd, uid_t* peer_euid) {
    DCHECK(peer_euid);
 -#if defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_FREEBSD)
-+#if defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_MACOSX) || defined(OS_BSD)
    uid_t socket_euid;
    gid_t socket_gid;
    if (getpeereid(fd, &socket_euid, &socket_gid) < 0) {
diff --git a/chromium-new/patches/patch-media_audio_BUILD.gn b/chromium-new/patches/patch-media_audio_BUILD.gn
new file mode 100644
index 0000000..293bfd9
--- /dev/null
+++ b/chromium-new/patches/patch-media_audio_BUILD.gn
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- media/audio/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ media/audio/BUILD.gn
+@@ -206,7 +206,7 @@ source_set("audio") {
+     deps += [ "//media/base/android:media_jni_headers" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [ "linux/audio_manager_linux.cc" ]
+   }
+ 
+@@ -255,10 +255,12 @@ source_set("audio") {
+       configs += [ ":libpulse" ]
+     } else {
+       # TODO(ajwong): Technically, this dl should go in the action.
+-      libs += [ "dl" ]
+       deps += [ ":pulse_generate_stubs" ]
+       sources += get_target_outputs(":pulse_generate_stubs")
+     }
++    if (is_linux) {
++      libs += [ "dl" ]
++    }
+   }
+ 
+   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
diff --git a/chromium-new/patches/patch-media_audio_alsa_audio__manager__alsa.cc b/chromium-new/patches/patch-media_audio_alsa_audio__manager__alsa.cc
index b590bf1..4302982 100644
--- a/chromium-new/patches/patch-media_audio_alsa_audio__manager__alsa.cc
+++ b/chromium-new/patches/patch-media_audio_alsa_audio__manager__alsa.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- media/audio/alsa/audio_manager_alsa.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/audio/alsa/audio_manager_alsa.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/audio/alsa/audio_manager_alsa.cc
-@@ -129,7 +129,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+@@ -135,7 +135,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
    int card = -1;
  
    // Loop through the sound cards to get ALSA device hints.
@@ -12,7 +12,7 @@ $NetBSD$
      void** hints = NULL;
      int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
      if (!error) {
-@@ -141,7 +143,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+@@ -147,7 +149,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
        DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: "
                      << wrapper_->StrError(error);
      }
@@ -22,7 +22,7 @@ $NetBSD$
  }
  
  void AudioManagerAlsa::GetAlsaDevicesInfo(
-@@ -227,7 +231,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvail
+@@ -230,7 +234,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvail
      // goes through software conversion if needed (e.g. incompatible
      // sample rate).
      // TODO(joi): Should we prefer "hw" instead?
@@ -34,7 +34,7 @@ $NetBSD$
      return strncmp(kDeviceTypeDesired,
                     device_name,
                     arraysize(kDeviceTypeDesired) - 1) == 0;
-@@ -251,7 +259,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
+@@ -254,7 +262,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
    // Loop through the sound cards.
    // Don't use snd_device_name_hint(-1,..) since there is a access violation
    // inside this ALSA API with libasound.so.2.0.0.
@@ -44,7 +44,7 @@ $NetBSD$
      int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
      if (!error) {
        for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) {
-@@ -275,7 +285,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
+@@ -278,7 +288,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
        DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: "
                      << wrapper_->StrError(error);
      }
diff --git a/chromium-new/patches/patch-media_audio_audio__manager.cc b/chromium-new/patches/patch-media_audio_audio__manager.cc
index 7279089..ef59bd3 100644
--- a/chromium-new/patches/patch-media_audio_audio__manager.cc
+++ b/chromium-new/patches/patch-media_audio_audio__manager.cc
@@ -1,18 +1,18 @@
 $NetBSD$
 
---- media/audio/audio_manager.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/audio/audio_manager.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/audio/audio_manager.cc
-@@ -193,7 +193,7 @@ class AudioManagerHelper : public base::
+@@ -95,7 +95,7 @@ class AudioManagerHelper : public base::
    }
  #endif
  
 -#if defined(OS_LINUX)
 +#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD)
-   void set_app_name(const std::string& app_name) {
-     app_name_ = app_name;
-   }
-@@ -243,7 +243,7 @@ class AudioManagerHelper : public base::
-   scoped_ptr<base::win::ScopedCOMInitializer> com_initializer_for_testing_;
+   void set_app_name(const std::string& app_name) { app_name_ = app_name; }
+   const std::string& app_name() const { return app_name_; }
+ #endif
+@@ -253,7 +253,7 @@ class AudioManagerHelper : public base::
+   std::unique_ptr<base::win::ScopedCOMInitializer> com_initializer_for_testing_;
  #endif
  
 -#if defined(OS_LINUX)
@@ -20,7 +20,7 @@ $NetBSD$
    std::string app_name_;
  #endif
  
-@@ -321,7 +321,7 @@ void AudioManager::EnableCrashKeyLogging
+@@ -365,7 +365,7 @@ void AudioManager::EnableCrashKeyLogging
    g_helper.Pointer()->enable_crash_key_logging();
  }
  
diff --git a/chromium-new/patches/patch-media_audio_audio__manager.h b/chromium-new/patches/patch-media_audio_audio__manager.h
index 3f54370..6bfda86 100644
--- a/chromium-new/patches/patch-media_audio_audio__manager.h
+++ b/chromium-new/patches/patch-media_audio_audio__manager.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- media/audio/audio_manager.h.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/audio/audio_manager.h.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/audio/audio_manager.h
-@@ -68,7 +68,7 @@ class MEDIA_EXPORT AudioManager {
+@@ -84,7 +84,7 @@ class MEDIA_EXPORT AudioManager {
    // See http://crbug.com/422522
    static void EnableCrashKeyLoggingForAudioThreadHangs();
  
diff --git a/chromium-new/patches/patch-media_audio_audio__output__device.cc b/chromium-new/patches/patch-media_audio_audio__output__device.cc
deleted file mode 100644
index ee70f11..0000000
--- a/chromium-new/patches/patch-media_audio_audio__output__device.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/audio/audio_output_device.cc.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/audio/audio_output_device.cc
-@@ -426,7 +426,7 @@ void AudioOutputDevice::AudioThreadCallb
-   // frames, and ask client to render audio.  Since |output_bus_| is wrapping
-   // the shared memory the Render() call is writing directly into the shared
-   // memory.
--  render_callback_->Render(output_bus_.get(), std::round(frames_delayed),
-+  render_callback_->Render(output_bus_.get(), round(frames_delayed),
-                            frames_skipped);
- }
- 
diff --git a/chromium-new/patches/patch-media_audio_audio__output__stream__sink.cc b/chromium-new/patches/patch-media_audio_audio__output__stream__sink.cc
deleted file mode 100644
index 649acef..0000000
--- a/chromium-new/patches/patch-media_audio_audio__output__stream__sink.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/audio/audio_output_stream_sink.cc.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/audio/audio_output_stream_sink.cc
-@@ -85,7 +85,7 @@ int AudioOutputStreamSink::OnMoreData(Au
-   if (!active_render_callback_)
-     return 0;
- 
--  uint32_t frames_delayed = std::round(static_cast<double>(total_bytes_delay) /
-+  uint32_t frames_delayed = round(static_cast<double>(total_bytes_delay) /
-                                        active_params_.GetBytesPerFrame());
- 
-   return active_render_callback_->Render(dest, frames_delayed, frames_skipped);
diff --git a/chromium-new/patches/patch-media_base_BUILD.gn b/chromium-new/patches/patch-media_base_BUILD.gn
new file mode 100644
index 0000000..05fe23f
--- /dev/null
+++ b/chromium-new/patches/patch-media_base_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- media/base/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ media/base/BUILD.gn
+@@ -294,7 +294,7 @@ target(link_target_type, "base") {
+     allow_circular_includes_from += [ "//media/base/android" ]
+   }
+ 
+-  if (is_linux && use_x11) {
++  if ((is_linux || is_bsd) && use_x11) {
+     configs += [
+       "//build/config/linux:x11",
+       "//build/config/linux:xext",
+@@ -330,7 +330,7 @@ target(link_target_type, "base") {
+     deps += [ ":media_yasm" ]
+   }
+ 
+-  if (is_linux || is_win) {
++  if (is_linux || is_bsd || is_win) {
+     sources += [
+       "keyboard_event_counter.cc",
+       "keyboard_event_counter.h",
diff --git a/chromium-new/patches/patch-media_base_audio__renderer__mixer.cc b/chromium-new/patches/patch-media_base_audio__renderer__mixer.cc
deleted file mode 100644
index 73e5a4c..0000000
--- a/chromium-new/patches/patch-media_base_audio__renderer__mixer.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/base/audio_renderer_mixer.cc.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/base/audio_renderer_mixer.cc
-@@ -138,7 +138,7 @@ int AudioRendererMixer::Render(AudioBus*
-   // expect a count of frames delayed instead of TimeDelta (less precise).
-   // See http://crbug.com/587522.
-   base::TimeDelta audio_delay = base::TimeDelta::FromMicroseconds(
--      std::round(frames_delayed * output_params_.GetMicrosecondsPerFrame()));
-+      round(frames_delayed * output_params_.GetMicrosecondsPerFrame()));
- 
-   master_converter_.ConvertWithDelay(audio_delay, audio_bus);
-   return audio_bus->frames();
diff --git a/chromium-new/patches/patch-media_base_audio__renderer__mixer__input.cc b/chromium-new/patches/patch-media_base_audio__renderer__mixer__input.cc
deleted file mode 100644
index d9540fa..0000000
--- a/chromium-new/patches/patch-media_base_audio__renderer__mixer__input.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/base/audio_renderer_mixer_input.cc.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/base/audio_renderer_mixer_input.cc
-@@ -164,7 +164,7 @@ double AudioRendererMixerInput::ProvideI
-   // TODO(chcunningham): Delete this conversion and change ProvideInput to more
-   // precisely describe delay as a count of frames delayed instead of TimeDelta.
-   // See http://crbug.com/587522.
--  uint32_t frames_delayed = std::round(buffer_delay.InMicroseconds() /
-+  uint32_t frames_delayed = round(buffer_delay.InMicroseconds() /
-                                        params_.GetMicrosecondsPerFrame());
- 
-   int frames_filled = callback_->Render(audio_bus, frames_delayed, 0);
diff --git a/chromium-new/patches/patch-media_base_audio__splicer.cc b/chromium-new/patches/patch-media_base_audio__splicer.cc
index e563f5d..37fe474 100644
--- a/chromium-new/patches/patch-media_base_audio__splicer.cc
+++ b/chromium-new/patches/patch-media_base_audio__splicer.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- media/base/audio_splicer.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/base/audio_splicer.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/base/audio_splicer.cc
 @@ -167,7 +167,7 @@ bool AudioStreamSanitizer::AddInput(cons
        output_timestamp_helper_.GetTimestamp();
@@ -12,7 +12,7 @@ $NetBSD$
      MEDIA_LOG(ERROR, media_log_)
          << "Audio splicing failed: coded frame timestamp differs from "
 @@ -183,7 +183,7 @@ bool AudioStreamSanitizer::AddInput(cons
-   if (delta != base::TimeDelta())
+   if (!delta.is_zero())
      frames_to_fill = output_timestamp_helper_.GetFramesToTarget(timestamp);
  
 -  if (frames_to_fill == 0 || std::abs(frames_to_fill) < kMinGapSize) {
diff --git a/chromium-new/patches/patch-media_capture_BUILD.gn b/chromium-new/patches/patch-media_capture_BUILD.gn
new file mode 100644
index 0000000..062915f
--- /dev/null
+++ b/chromium-new/patches/patch-media_capture_BUILD.gn
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- media/capture/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ media/capture/BUILD.gn
+@@ -111,6 +111,16 @@ component("capture") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "video/linux/video_capture_device_linux.cc",
++      "video/linux/video_capture_device_linux.h",
++      "video/linux/video_capture_device_factory_linux.cc",
++      "video/linux/video_capture_device_factory_linux.h",
++      "video/linux/v4l2_capture_delegate.cc",
++    ]
++  }
++
+   if (is_win) {
+     deps += [
+       "//media/base",  # For media_switches.
diff --git a/chromium-new/patches/patch-media_capture_video_fake__video__capture__device__factory.cc b/chromium-new/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
index daa3068..0db200e 100644
--- a/chromium-new/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
+++ b/chromium-new/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- media/capture/video/fake_video_capture_device_factory.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/capture/video/fake_video_capture_device_factory.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/capture/video/fake_video_capture_device_factory.cc
 @@ -49,7 +49,7 @@ void FakeVideoCaptureDeviceFactory::GetD
    for (int n = 0; n < number_of_devices_; ++n) {
-     VideoCaptureDevice::Name name(base::StringPrintf("fake_device_%d", n),
-                                   base::StringPrintf("/dev/video%d", n)
+     device_descriptors->emplace_back(base::StringPrintf("fake_device_%d", n),
+                                      base::StringPrintf("/dev/video%d", n),
 -#if defined(OS_LINUX)
 +#if defined(OS_LINUX) || defined(OS_BSD)
-                                       ,
-                                   VideoCaptureDevice::Name::V4L2_SINGLE_PLANE
+                                      VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE
  #elif defined(OS_MACOSX)
+                                      VideoCaptureApi::MACOSX_AVFOUNDATION
diff --git a/chromium-new/patches/patch-media_capture_video_file__video__capture__device__factory.cc b/chromium-new/patches/patch-media_capture_video_file__video__capture__device__factory.cc
index a122ace..0638d1e 100644
--- a/chromium-new/patches/patch-media_capture_video_file__video__capture__device__factory.cc
+++ b/chromium-new/patches/patch-media_capture_video_file__video__capture__device__factory.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- media/capture/video/file_video_capture_device_factory.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/capture/video/file_video_capture_device_factory.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/capture/video/file_video_capture_device_factory.cc
-@@ -50,7 +50,7 @@ void FileVideoCaptureDeviceFactory::GetD
-   device_names->push_back(VideoCaptureDevice::Name(
+@@ -49,7 +49,7 @@ void FileVideoCaptureDeviceFactory::GetD
+ #elif defined(OS_MACOSX)
        command_line_file_path.value(), kFileVideoCaptureDeviceName,
-       VideoCaptureDevice::Name::AVFOUNDATION));
+       VideoCaptureApi::MACOSX_AVFOUNDATION
 -#elif defined(OS_LINUX)
 +#elif defined(OS_LINUX) || defined(OS_BSD)
-   device_names->push_back(VideoCaptureDevice::Name(
        command_line_file_path.value(), kFileVideoCaptureDeviceName,
-       VideoCaptureDevice::Name::V4L2_SINGLE_PLANE));
+       VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE
+ #else
diff --git a/chromium-new/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc b/chromium-new/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
deleted file mode 100644
index 901b0b1..0000000
--- a/chromium-new/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- media/capture/video/linux/v4l2_capture_delegate.cc.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/capture/video/linux/v4l2_capture_delegate.cc
-@@ -248,6 +248,7 @@ void V4L2CaptureDelegate::AllocateAndSta
-   // TODO(mcasas): what should be done if the camera driver does not allow
-   // framerate configuration, or the actual one is different from the desired?
- 
-+#if !defined(__NetBSD__)
-   // Set anti-banding/anti-flicker to 50/60Hz. May fail due to not supported
-   // operation (|errno| == EINVAL in this case) or plain failure.
-   if ((power_line_frequency_ == V4L2_CID_POWER_LINE_FREQUENCY_50HZ) ||
-@@ -261,6 +262,7 @@ void V4L2CaptureDelegate::AllocateAndSta
-     if (retval != 0)
-       DVLOG(1) << "Error setting power line frequency removal";
-   }
-+#endif
- 
-   capture_format_.frame_size.SetSize(video_fmt_.fmt.pix.width,
-                                      video_fmt_.fmt.pix.height);
diff --git a/chromium-new/patches/patch-media_capture_video_linux_v4l2__capture__delegate.h b/chromium-new/patches/patch-media_capture_video_linux_v4l2__capture__delegate.h
deleted file mode 100644
index 34d71f2..0000000
--- a/chromium-new/patches/patch-media_capture_video_linux_v4l2__capture__delegate.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/capture/video/linux/v4l2_capture_delegate.h.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/capture/video/linux/v4l2_capture_delegate.h
-@@ -14,7 +14,7 @@
- #include "build/build_config.h"
- #include "media/capture/video/video_capture_device.h"
- 
--#if defined(OS_OPENBSD)
-+#if defined(OS_OPENBSD) || defined(OS_NETBSD)
- #include <sys/videoio.h>
- #else
- #include <linux/videodev2.h>
diff --git a/chromium-new/patches/patch-media_capture_video_linux_video__capture__device__factory__linux.cc b/chromium-new/patches/patch-media_capture_video_linux_video__capture__device__factory__linux.cc
deleted file mode 100644
index 532ddc4..0000000
--- a/chromium-new/patches/patch-media_capture_video_linux_video__capture__device__factory__linux.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD$
-
---- media/capture/video/linux/video_capture_device_factory_linux.cc.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/capture/video/linux/video_capture_device_factory_linux.cc
-@@ -14,7 +14,7 @@
- #include "base/posix/eintr_wrapper.h"
- #include "build/build_config.h"
- 
--#if defined(OS_OPENBSD)
-+#if defined(OS_OPENBSD) || defined(OS_NETBSD)
- #include <sys/videoio.h>
- #else
- #include <linux/videodev2.h>
-@@ -53,6 +53,7 @@ static std::list<float> GetFrameRateList
-                                          uint32_t height) {
-   std::list<float> frame_rates;
- 
-+#if !defined(__NetBSD__)
-   v4l2_frmivalenum frame_interval = {};
-   frame_interval.pixel_format = fourcc;
-   frame_interval.width = width;
-@@ -73,6 +74,7 @@ static std::list<float> GetFrameRateList
-       break;
-     }
-   }
-+#endif
-   // Some devices, e.g. Kinect, do not enumerate any frame rates, see
-   // http://crbug.com/412284. Set their frame_rate to zero.
-   if (frame_rates.empty())
-@@ -83,6 +85,7 @@ static std::list<float> GetFrameRateList
- static void GetSupportedFormatsForV4L2BufferType(
-     int fd,
-     media::VideoCaptureFormats* supported_formats) {
-+#if !defined(__NetBSD__)
-   v4l2_fmtdesc v4l2_format = {};
-   v4l2_format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-   for (; HANDLE_EINTR(ioctl(fd, VIDIOC_ENUM_FMT, &v4l2_format)) == 0;
-@@ -118,6 +121,9 @@ static void GetSupportedFormatsForV4L2Bu
-       }
-     }
-   }
-+#else
-+  NOTIMPLEMENTED();
-+#endif
- }
- 
- VideoCaptureDeviceFactoryLinux::VideoCaptureDeviceFactoryLinux(
diff --git a/chromium-new/patches/patch-media_capture_video_linux_video__capture__device__linux.cc b/chromium-new/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
index 9398466..c030883 100644
--- a/chromium-new/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
+++ b/chromium-new/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
@@ -1,88 +1,64 @@
 $NetBSD$
 
---- media/capture/video/linux/video_capture_device_linux.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/capture/video/linux/video_capture_device_linux.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/capture/video/linux/video_capture_device_linux.cc
-@@ -13,7 +13,7 @@
- #include "build/build_config.h"
- #include "media/capture/video/linux/v4l2_capture_delegate.h"
+@@ -21,6 +21,7 @@
  
--#if defined(OS_OPENBSD)
-+#if defined(OS_OPENBSD) || defined(OS_NETBSD)
- #include <sys/videoio.h>
- #else
- #include <linux/videodev2.h>
-@@ -44,6 +44,7 @@ static bool ReadIdFile(const std::string
-   return true;
- }
+ namespace media {
  
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_FREEBSD)
  // Translates Video4Linux pixel formats to Chromium pixel formats.
  // static
  VideoPixelFormat VideoCaptureDeviceLinux::V4l2FourCcToChromiumPixelFormat(
-@@ -57,6 +58,7 @@ std::list<uint32_t> VideoCaptureDeviceLi
+@@ -34,6 +35,7 @@ std::list<uint32_t> VideoCaptureDeviceLi
      bool favour_mjpeg) {
    return V4L2CaptureDelegate::GetListOfUsableFourCcs(favour_mjpeg);
  }
-+#endif // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#endif // !defined(OS_FREEBSD)
  
- const std::string VideoCaptureDevice::Name::GetModel() const {
-   // |unique_id| is of the form "/dev/video2".  |file_name| is "video2".
-@@ -90,6 +92,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDe
+ VideoCaptureDeviceLinux::VideoCaptureDeviceLinux(
+     const VideoCaptureDeviceDescriptor& device_descriptor)
+@@ -47,6 +49,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDe
    v4l2_thread_.Stop();
  }
  
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_FREEBSD)
  void VideoCaptureDeviceLinux::AllocateAndStart(
      const VideoCaptureParams& params,
-     scoped_ptr<VideoCaptureDevice::Client> client) {
-@@ -113,7 +116,13 @@ void VideoCaptureDeviceLinux::AllocateAn
+     std::unique_ptr<VideoCaptureDevice::Client> client) {
+@@ -70,7 +73,13 @@ void VideoCaptureDeviceLinux::AllocateAn
                   params.requested_format.frame_size.height(),
                   params.requested_format.frame_rate, base::Passed(&client)));
  }
-+#else // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#else // !defined(OS_FREEBSD)
 +void VideoCaptureDeviceLinux::AllocateAndStart(
 +    const VideoCaptureParams& params,
-+    scoped_ptr<VideoCaptureDevice::Client> client) {}
-+#endif // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++    std::unique_ptr<VideoCaptureDevice::Client> client) {}
++#endif // !defined(OS_FREEBSD)
  
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_FREEBSD)
  void VideoCaptureDeviceLinux::StopAndDeAllocate() {
    if (!v4l2_thread_.IsRunning())
      return;  // Wrong state.
-@@ -124,7 +133,11 @@ void VideoCaptureDeviceLinux::StopAndDeA
+@@ -81,7 +90,11 @@ void VideoCaptureDeviceLinux::StopAndDeA
  
    capture_impl_ = NULL;
  }
-+#else // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#else // !defined(OS_FREEBSD)
 +void VideoCaptureDeviceLinux::StopAndDeAllocate() {}
-+#endif // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#endif // !defined(OS_FREEBSD)
  
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(OS_FREEBSD)
  void VideoCaptureDeviceLinux::SetRotation(int rotation) {
    if (v4l2_thread_.IsRunning()) {
-     v4l2_thread_.message_loop()->PostTask(
-@@ -132,10 +145,14 @@ void VideoCaptureDeviceLinux::SetRotatio
+     v4l2_thread_.task_runner()->PostTask(
+@@ -89,6 +102,9 @@ void VideoCaptureDeviceLinux::SetRotatio
          base::Bind(&V4L2CaptureDelegate::SetRotation, capture_impl_, rotation));
    }
  }
-+#else // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#else // !defined(OS_FREEBSD)
 +void VideoCaptureDeviceLinux::SetRotation(int rotation) {}
 +#endif // !defined(OS_FREEBSD)
  
  // static
  int VideoCaptureDeviceLinux::TranslatePowerLineFrequencyToV4L2(
-     PowerLineFrequency frequency) {
-+#if !defined(OS_NETBSD)
-   switch (frequency) {
-     case media::PowerLineFrequency::FREQUENCY_50HZ:
-       return V4L2_CID_POWER_LINE_FREQUENCY_50HZ;
-@@ -145,6 +162,9 @@ int VideoCaptureDeviceLinux::TranslatePo
-       // If we have no idea of the frequency, at least try and set it to AUTO.
-       return V4L2_CID_POWER_LINE_FREQUENCY_AUTO;
-   }
-+#else
-+  return 0;  
-+#endif
- }
- 
- }  // namespace media
diff --git a/chromium-new/patches/patch-media_capture_video_video__capture__device.cc b/chromium-new/patches/patch-media_capture_video_video__capture__device.cc
deleted file mode 100644
index 7d48dbe..0000000
--- a/chromium-new/patches/patch-media_capture_video_video__capture__device.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD$
-
---- media/capture/video/video_capture_device.cc.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/capture/video/video_capture_device.cc
-@@ -13,6 +13,10 @@
- 
- namespace media {
- 
-+const std::string VideoCaptureDevice::Name::GetModel() const {
-+  return "";
-+}
-+
- // TODO(msu.koo): http://crbug.com/532272, remove checking the switch in favour
- // of deferring GetModel() call to the actual VideoCaptureDevice object.
- const std::string VideoCaptureDevice::Name::GetNameAndModel() const {
-@@ -35,7 +39,7 @@ VideoCaptureDevice::Name::Name(const std
-     : device_name_(name), unique_id_(id) {
- }
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- VideoCaptureDevice::Name::Name(const std::string& name,
-                                const std::string& id,
-                                const CaptureApiType api_type)
-@@ -78,7 +82,7 @@ VideoCaptureDevice::Name::Name(const std
- VideoCaptureDevice::Name::~Name() {
- }
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const {
-   switch (capture_api_type()) {
-     case V4L2_SINGLE_PLANE:
diff --git a/chromium-new/patches/patch-media_capture_video_video__capture__device.h b/chromium-new/patches/patch-media_capture_video_video__capture__device.h
deleted file mode 100644
index c0b073c..0000000
--- a/chromium-new/patches/patch-media_capture_video_video__capture__device.h
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- media/capture/video/video_capture_device.h.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/capture/video/video_capture_device.h
-@@ -51,7 +51,7 @@ class MEDIA_EXPORT VideoCaptureDevice {
-     Name();
-     Name(const std::string& name, const std::string& id);
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     // Linux/CrOS targets Capture Api type: it can only be set on construction.
-     enum CaptureApiType {
-       V4L2_SINGLE_PLANE,
-@@ -82,7 +82,7 @@ class MEDIA_EXPORT VideoCaptureDevice {
- #endif
- 
- #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
--    defined(OS_ANDROID)
-+    defined(OS_ANDROID) || defined(OS_BSD)
-     Name(const std::string& name,
-          const std::string& id,
-          const CaptureApiType api_type);
-@@ -119,7 +119,7 @@ class MEDIA_EXPORT VideoCaptureDevice {
-     bool operator<(const Name& other) const { return unique_id_ < other.id(); }
- 
- #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
--    defined(OS_ANDROID)
-+    defined(OS_ANDROID) || defined(OS_BSD)
-     CaptureApiType capture_api_type() const {
-       return capture_api_class_.capture_api_type();
-     }
-@@ -139,7 +139,7 @@ class MEDIA_EXPORT VideoCaptureDevice {
-     std::string device_name_;
-     std::string unique_id_;
- #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
--    defined(OS_ANDROID)
-+    defined(OS_ANDROID) || defined(OS_BSD)
-     // This class wraps the CaptureApiType to give it a by default value if not
-     // initialized.
-     class CaptureApiClass {
diff --git a/chromium-new/patches/patch-media_capture_video_video__capture__device__factory.cc b/chromium-new/patches/patch-media_capture_video_video__capture__device__factory.cc
index e810cbd..46670c7 100644
--- a/chromium-new/patches/patch-media_capture_video_video__capture__device__factory.cc
+++ b/chromium-new/patches/patch-media_capture_video_video__capture__device__factory.cc
@@ -1,23 +1,32 @@
 $NetBSD$
 
---- media/capture/video/video_capture_device_factory.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/capture/video/video_capture_device_factory.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/capture/video/video_capture_device_factory.cc
-@@ -17,6 +17,10 @@ namespace media {
- // static
- scoped_ptr<VideoCaptureDeviceFactory> VideoCaptureDeviceFactory::CreateFactory(
+@@ -18,6 +18,10 @@ namespace media {
+ std::unique_ptr<VideoCaptureDeviceFactory>
+ VideoCaptureDeviceFactory::CreateFactory(
      scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
 +#if defined(OS_BSD)
-+  return scoped_ptr<VideoCaptureDeviceFactory>(new
-+      media::FakeVideoCaptureDeviceFactory());
++  return std::unique_ptr<VideoCaptureDeviceFactory>(
++          new media::FakeVideoCaptureDeviceFactory());
 +#else
    const base::CommandLine* command_line =
        base::CommandLine::ForCurrentProcess();
    // Use a Fake or File Video Device Factory if the command line flags are
-@@ -35,6 +39,7 @@ scoped_ptr<VideoCaptureDeviceFactory> Vi
-     return scoped_ptr<VideoCaptureDeviceFactory>(
+@@ -36,6 +40,7 @@ VideoCaptureDeviceFactory::CreateFactory
+     return std::unique_ptr<VideoCaptureDeviceFactory>(
          CreateVideoCaptureDeviceFactory(ui_task_runner));
    }
 +#endif
  }
  
  VideoCaptureDeviceFactory::VideoCaptureDeviceFactory() {
+@@ -55,7 +60,7 @@ void VideoCaptureDeviceFactory::Enumerat
+   callback.Run(std::move(device_descriptors));
+ }
+ 
+-#if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_ANDROID) && \
++#if !defined(OS_MACOSX) && !defined(OS_LINUX) && !defined(OS_BSD) && !defined(OS_ANDROID) && \
+     !defined(OS_WIN)
+ // static
+ VideoCaptureDeviceFactory*
diff --git a/chromium-new/patches/patch-media_cast_BUILD.gn b/chromium-new/patches/patch-media_cast_BUILD.gn
new file mode 100644
index 0000000..9349f9c
--- /dev/null
+++ b/chromium-new/patches/patch-media_cast_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- media/cast/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ media/cast/BUILD.gn
+@@ -343,7 +343,7 @@ test("cast_unittests") {
+   }
+ }
+ 
+-if (is_win || is_mac || (is_linux && !is_chromeos)) {
++if (is_win || is_mac || (is_linux && !is_chromeos) || is_bsd) {
+   # This is a target for the collection of cast development tools.  They are
+   # not built/linked into the Chromium browser.
+   group("testing_tools") {
+@@ -388,7 +388,7 @@ if (is_win || is_mac || (is_linux && !is
+       "//build/win:default_exe_manifest",
+     ]
+ 
+-    if (is_linux && !is_chromeos && use_x11) {
++    if ((is_linux || is_bsd) && !is_chromeos && use_x11) {
+       sources += [
+         "test/linux_output_window.cc",
+         "test/linux_output_window.h",
+@@ -483,7 +483,7 @@ if (is_win || is_mac || (is_linux && !is
+   }
+ }
+ 
+-if (is_linux && !is_chromeos) {
++if ((is_linux || is_bsd) && !is_chromeos) {
+   test("tap_proxy") {
+     sources = [
+       "test/utility/tap_proxy.cc",
diff --git a/chromium-new/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni b/chromium-new/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni
new file mode 100644
index 0000000..3680c41
--- /dev/null
+++ b/chromium-new/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- media/cdm/ppapi/ppapi_cdm_adapter.gni.orig	2016-11-10 20:02:15.000000000 +0000
++++ media/cdm/ppapi/ppapi_cdm_adapter.gni
+@@ -7,7 +7,7 @@
+ # depend on media/media_cdm_adapter.gyp:cdmadapter which would in turn modify
+ # your target with direct_dependent_settings.
+ template("ppapi_cdm_adapter") {
+-  if (is_mac || is_linux) {
++  if (is_mac || is_linux || is_bsd) {
+     _target_type = "loadable_module"
+   } else {
+     _target_type = "shared_library"
+@@ -59,7 +59,7 @@ template("ppapi_cdm_adapter") {
+       libs += [ "rt" ]
+     }
+ 
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       # CDM adapter depends on a CDM in component and non-component builds.
+       configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+     }
diff --git a/chromium-new/patches/patch-media_filters_audio__clock.cc b/chromium-new/patches/patch-media_filters_audio__clock.cc
deleted file mode 100644
index 09669db..0000000
--- a/chromium-new/patches/patch-media_filters_audio__clock.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/filters/audio_clock.cc.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/filters/audio_clock.cc
-@@ -121,7 +121,7 @@ base::TimeDelta AudioClock::TimeUntilPla
-   }
- 
-   return base::TimeDelta::FromMicroseconds(
--      std::round(frames_until_timestamp * microseconds_per_frame_));
-+      round(frames_until_timestamp * microseconds_per_frame_));
- }
- 
- void AudioClock::ContiguousAudioDataBufferedForTesting(
diff --git a/chromium-new/patches/patch-media_filters_audio__clock.h b/chromium-new/patches/patch-media_filters_audio__clock.h
deleted file mode 100644
index c2f533f..0000000
--- a/chromium-new/patches/patch-media_filters_audio__clock.h
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- media/filters/audio_clock.h.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/filters/audio_clock.h
-@@ -92,11 +92,11 @@ class MEDIA_EXPORT AudioClock {
-   //                                             1000 + 500 + 250 = 1750 ms.
-   base::TimeDelta front_timestamp() const {
-     return base::TimeDelta::FromMicroseconds(
--        std::round(front_timestamp_micros_));
-+        round(front_timestamp_micros_));
-   }
-   base::TimeDelta back_timestamp() const {
-     return base::TimeDelta::FromMicroseconds(
--        std::round(back_timestamp_micros_));
-+        round(back_timestamp_micros_));
-   }
- 
-   // Returns the amount of wall time until |timestamp| will be played by the
diff --git a/chromium-new/patches/patch-media_filters_decrypting__audio__decoder.cc b/chromium-new/patches/patch-media_filters_decrypting__audio__decoder.cc
index 11c7a70..ed6a5cc 100644
--- a/chromium-new/patches/patch-media_filters_decrypting__audio__decoder.cc
+++ b/chromium-new/patches/patch-media_filters_decrypting__audio__decoder.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- media/filters/decrypting_audio_decoder.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/filters/decrypting_audio_decoder.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/filters/decrypting_audio_decoder.cc
 @@ -29,7 +29,7 @@ static inline bool IsOutOfSync(const bas
    // Out of sync of 100ms would be pretty noticeable and we should keep any
diff --git a/chromium-new/patches/patch-media_filters_file__data__source.h b/chromium-new/patches/patch-media_filters_file__data__source.h
deleted file mode 100644
index df4eb21..0000000
--- a/chromium-new/patches/patch-media_filters_file__data__source.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- media/filters/file_data_source.h.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/filters/file_data_source.h
-@@ -7,6 +7,7 @@
- 
- #include <stdint.h>
- 
-+#include <cstdio>
- #include <string>
- 
- #include "base/files/file.h"
diff --git a/chromium-new/patches/patch-media_filters_vp9__parser.h b/chromium-new/patches/patch-media_filters_vp9__parser.h
index 24bd705..f191ffb 100644
--- a/chromium-new/patches/patch-media_filters_vp9__parser.h
+++ b/chromium-new/patches/patch-media_filters_vp9__parser.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- media/filters/vp9_parser.h.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/filters/vp9_parser.h.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/filters/vp9_parser.h
 @@ -14,6 +14,7 @@
  
diff --git a/chromium-new/patches/patch-media_formats_common_offset__byte__queue.cc b/chromium-new/patches/patch-media_formats_common_offset__byte__queue.cc
index 353f67a..af0ce2e 100644
--- a/chromium-new/patches/patch-media_formats_common_offset__byte__queue.cc
+++ b/chromium-new/patches/patch-media_formats_common_offset__byte__queue.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- media/formats/common/offset_byte_queue.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/formats/common/offset_byte_queue.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/formats/common/offset_byte_queue.cc
 @@ -46,13 +46,13 @@ void OffsetByteQueue::PeekAt(int64_t off
    *size = tail() - offset;
diff --git a/chromium-new/patches/patch-media_formats_common_offset__byte__queue.h b/chromium-new/patches/patch-media_formats_common_offset__byte__queue.h
index 267db08..844a867 100644
--- a/chromium-new/patches/patch-media_formats_common_offset__byte__queue.h
+++ b/chromium-new/patches/patch-media_formats_common_offset__byte__queue.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- media/formats/common/offset_byte_queue.h.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/formats/common/offset_byte_queue.h.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/formats/common/offset_byte_queue.h
 @@ -36,15 +36,15 @@ class MEDIA_EXPORT OffsetByteQueue {
    // a null |buf| and a |size| of zero.
diff --git a/chromium-new/patches/patch-media_formats_mp2t_es__parser__adts.cc b/chromium-new/patches/patch-media_formats_mp2t_es__parser__adts.cc
index 54541f8..b4963fd 100644
--- a/chromium-new/patches/patch-media_formats_mp2t_es__parser__adts.cc
+++ b/chromium-new/patches/patch-media_formats_mp2t_es__parser__adts.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- media/formats/mp2t/es_parser_adts.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/formats/mp2t/es_parser_adts.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/formats/mp2t/es_parser_adts.cc
 @@ -54,11 +54,11 @@ bool EsParserAdts::LookForAdtsFrame(Adts
    const uint8_t* es;
diff --git a/chromium-new/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc b/chromium-new/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc
index 4ae409a..06e9edc 100644
--- a/chromium-new/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc
+++ b/chromium-new/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- media/formats/mp2t/es_parser_mpeg1audio.cc.orig	2016-06-24 01:02:23.000000000 +0000
+--- media/formats/mp2t/es_parser_mpeg1audio.cc.orig	2016-11-10 20:02:15.000000000 +0000
 +++ media/formats/mp2t/es_parser_mpeg1audio.cc
-@@ -111,11 +111,11 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud
+@@ -109,11 +109,11 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud
    const uint8_t* es;
    es_queue_->Peek(&es, &es_size);
  
@@ -17,7 +17,7 @@ $NetBSD$
      const uint8_t* cur_buf = &es[offset];
      if (cur_buf[0] != 0xff)
        continue;
-@@ -156,7 +156,7 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud
+@@ -154,7 +154,7 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud
      return true;
    }
  
diff --git a/chromium-new/patches/patch-media_media.gyp b/chromium-new/patches/patch-media_media.gyp
deleted file mode 100644
index cf423aa..0000000
--- a/chromium-new/patches/patch-media_media.gyp
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
---- media/media.gyp.orig	2016-06-24 01:02:23.000000000 +0000
-+++ media/media.gyp
-@@ -760,7 +760,13 @@
-             ['exclude', '_alsa\\.(h|cc)$'],
-           ],
-         }],
--        ['OS=="linux"', {
-+	['OS=="freebsd"', {
-+	  'sources!': [
-+	    'capture/video/linux/v4l2_capture_delegate.cc',
-+	    'capture/video/linux/video_capture_device_factory_linux.cc',
-+	  ],
-+	}],
-+        ['OS=="linux" or os_bsd==1', {
-           'conditions': [
-             ['use_x11==1', {
-               'dependencies': [
-@@ -1059,7 +1065,7 @@
-             'base/simd/filter_yuv_sse2.cc',
-           ],
-         }],
--        ['OS!="linux" and OS!="win"', {
-+        ['OS!="linux" and OS!="win" and os_bsd!=1', {
-           'sources!': [
-             'base/keyboard_event_counter.cc',
-             'base/keyboard_event_counter.h',
diff --git a/chromium-new/patches/patch-mojo_BUILD.gn b/chromium-new/patches/patch-mojo_BUILD.gn
new file mode 100644
index 0000000..7d36e3e
--- /dev/null
+++ b/chromium-new/patches/patch-mojo_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- mojo/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ mojo/BUILD.gn
+@@ -12,7 +12,7 @@ group("mojo") {
+     "//mojo/common",
+   ]
+ 
+-  if (!(is_linux && current_cpu == "x86")) {
++  if (!((is_linux || is_bsd) && current_cpu == "x86")) {
+     # TODO(GYP): Figure out if this needs to be supported. Right now
+     # it won't work on x86 official builds because it needs stuff in the
+     # sysroot that doesn't exist.
diff --git a/chromium-new/patches/patch-mojo_edk_test_BUILD.gn b/chromium-new/patches/patch-mojo_edk_test_BUILD.gn
new file mode 100644
index 0000000..07db7a1
--- /dev/null
+++ b/chromium-new/patches/patch-mojo_edk_test_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- mojo/edk/test/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ mojo/edk/test/BUILD.gn
+@@ -48,7 +48,7 @@ source_set("run_all_unittests") {
+     "//testing/gtest",
+   ]
+ 
+-  if (is_linux && !is_component_build) {
++  if ((is_linux || is_bsd) && !is_component_build) {
+     public_configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+   }
+ }
+@@ -68,7 +68,7 @@ source_set("run_all_perftests") {
+     "run_all_perftests.cc",
+   ]
+ 
+-  if (is_linux && !is_component_build) {
++  if ((is_linux || is_bsd) && !is_component_build) {
+     public_configs = [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+   }
+ }
diff --git a/chromium-new/patches/patch-mojo_shell_public_cpp_initialize__base__and__icu.cc b/chromium-new/patches/patch-mojo_shell_public_cpp_initialize__base__and__icu.cc
deleted file mode 100644
index f60e7eb..0000000
--- a/chromium-new/patches/patch-mojo_shell_public_cpp_initialize__base__and__icu.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- mojo/shell/public/cpp/initialize_base_and_icu.cc.orig	2016-06-24 01:02:24.000000000 +0000
-+++ mojo/shell/public/cpp/initialize_base_and_icu.cc
-@@ -34,11 +34,13 @@ InitializeBase(const uint8_t* icu_data) 
-   base::SysInfo::MaxSharedMemorySize();
- #endif
- 
-+#if !defined(OS_FREEBSD) 
-   // Initialize core ICU. We must perform the full initialization before we
-   // initialize icu::TimeZone subsystem because otherwise ICU gets in a state
-   // where the timezone data is disconnected from the locale data which can
-   // cause crashes.
-   CHECK(base::i18n::InitializeICUFromRawMemory(icu_data));
-+#endif
- 
- #if !defined(OS_ANDROID)
-   // ICU DateFormat class (used in base/time_format.cc) needs to get the
diff --git a/chromium-new/patches/patch-mojo_shell_runner_init.cc b/chromium-new/patches/patch-mojo_shell_runner_init.cc
deleted file mode 100644
index f68cf35..0000000
--- a/chromium-new/patches/patch-mojo_shell_runner_init.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- mojo/shell/runner/init.cc.orig	2016-06-24 01:02:24.000000000 +0000
-+++ mojo/shell/runner/init.cc
-@@ -68,6 +68,8 @@ void WaitForDebuggerIfNecessary() {
- 
- void CallLibraryEarlyInitialization(base::NativeLibrary app_library) {
-   // Do whatever warming that the mojo application wants.
-+
-+#if !defined(OS_FREEBSD) 
-   typedef void (*LibraryEarlyInitFunction)(const uint8_t*);
-   LibraryEarlyInitFunction init_function =
-       reinterpret_cast<LibraryEarlyInitFunction>(
-@@ -79,6 +81,7 @@ void CallLibraryEarlyInitialization(base
-     const uint8_t* icu_data = base::i18n::GetRawIcuMemory();
-     init_function(icu_data);
-   }
-+#endif
- 
-   // TODO(erg): All chromium binaries load base. We might want to make a
-   // general system for other people.
diff --git a/chromium-new/patches/patch-native__client__sdk_src_BUILD.gn b/chromium-new/patches/patch-native__client__sdk_src_BUILD.gn
new file mode 100644
index 0000000..5c7f863
--- /dev/null
+++ b/chromium-new/patches/patch-native__client__sdk_src_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- native_client_sdk/src/BUILD.gn.orig	2016-11-10 20:02:15.000000000 +0000
++++ native_client_sdk/src/BUILD.gn
+@@ -7,7 +7,7 @@ import("//build/config/features.gni")
+ declare_args() {
+   # Set to true if cross compiling trusted (e.g. building sel_ldr_arm on x86)
+   # binaries is supported.
+-  enable_cross_trusted = is_linux
++  enable_cross_trusted = is_linux || is_bsd
+ 
+   # Build the nacl SDK untrusted components.  This is disabled by default since
+   # not all NaCl untrusted compilers are in goma (e.g arm-nacl-glibc)
+@@ -28,7 +28,7 @@ if (enable_nacl) {
+         "//native_client/src/trusted/service_runtime:sel_ldr",
+         "//native_client/src/trusted/validator/driver:ncval_new",
+       ]
+-      if (is_linux) {
++      if (is_linux || is_bsd) {
+         deps += [ "//native_client/src/nonsfi/loader:nonsfi_loader" ]
+       }
+     }
diff --git a/chromium-new/patches/patch-native__client_build_common.gypi b/chromium-new/patches/patch-native__client_build_common.gypi
deleted file mode 100644
index 1d7e00f..0000000
--- a/chromium-new/patches/patch-native__client_build_common.gypi
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- native_client/build/common.gypi.orig	2016-06-24 01:03:25.000000000 +0000
-+++ native_client/build/common.gypi
-@@ -58,7 +58,7 @@
-     ],
-   },
-   'conditions': [
--    ['OS=="linux" or OS=="android"', {
-+    ['OS=="linux" or OS=="android" or OS=="freebsd"', {
-       'target_defaults': {
-         'defines': [
-           '_POSIX_C_SOURCE=199506',
diff --git a/chromium-new/patches/patch-native__client_src_shared_platform_platform.gyp b/chromium-new/patches/patch-native__client_src_shared_platform_platform.gyp
deleted file mode 100644
index 0fd52e6..0000000
--- a/chromium-new/patches/patch-native__client_src_shared_platform_platform.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- native_client/src/shared/platform/platform.gyp.orig	2016-06-24 01:03:26.000000000 +0000
-+++ native_client/src/shared/platform/platform.gyp
-@@ -36,7 +36,7 @@
-       'refcount_base.cc',
-     ],
-     'conditions': [
--      ['OS=="linux" or OS=="android"', {
-+      ['OS=="linux" or OS=="android" or OS=="freebsd"', {
-         'platform_sources': [
-           'linux/nacl_clock.c',
-           'linux/nacl_host_dir.c',
diff --git a/chromium-new/patches/patch-net_BUILD.gn b/chromium-new/patches/patch-net_BUILD.gn
new file mode 100644
index 0000000..2e9acef
--- /dev/null
+++ b/chromium-new/patches/patch-net_BUILD.gn
@@ -0,0 +1,88 @@
+$NetBSD$
+
+--- net/BUILD.gn.orig	2016-11-10 20:02:16.000000000 +0000
++++ net/BUILD.gn
+@@ -175,6 +175,11 @@ component("net") {
+       ]
+       if (is_android) {
+         sources -= [ "base/openssl_private_key_store_android.cc" ]
++      } else if (is_bsd) {
++        sources -= [
++          "base/address_tracker_linux.cc",
++          "base/address_tracker_linux.h",
++        ]
+       }
+     } else {
+       if (is_android) {
+@@ -298,6 +303,13 @@ component("net") {
+       sources -= [ "disk_cache/blockfile/file_posix.cc" ]
+     }
+ 
++    if (is_bsd) {
++      sources -= [
++         "base/network_change_notifier_linux.cc",
++         "base/network_change_notifier_linux.h",
++      ]
++    }
++
+     if (is_ios || is_mac) {
+       sources += gypi_values.net_base_mac_ios_sources
+     }
+@@ -1025,7 +1037,7 @@ if (!is_ios && !is_android) {
+   }
+ }
+ 
+-if (is_linux || is_mac) {
++if (is_linux || is_bsd || is_mac) {
+   executable("cachetool") {
+     testonly = true
+     sources = [
+@@ -1054,7 +1066,7 @@ if (is_linux || is_mac) {
+   }
+ }
+ 
+-if (is_linux) {
++if (is_linux || is_bsd) {
+   static_library("epoll_server") {
+     sources = [
+       "tools/epoll_server/epoll_server.cc",
+@@ -1160,7 +1172,7 @@ if (is_android) {
+   }
+ }
+ 
+-if (is_android || is_linux) {
++if (is_android || is_linux || is_bsd) {
+   executable("disk_cache_memory_test") {
+     testonly = true
+     sources = [
+@@ -1353,7 +1365,7 @@ test("net_unittests") {
+     "third_party/nist-pkits/",
+   ]
+ 
+-  if (is_linux || is_mac || is_win) {
++  if (is_linux || is_bsd || is_mac || is_win) {
+     deps += [
+       "//third_party/pyftpdlib/",
+       "//third_party/pywebsocket/",
+@@ -1376,7 +1388,7 @@ test("net_unittests") {
+   if (is_desktop_linux) {
+     deps += [ ":epoll_quic_tools" ]
+   }
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += gypi_values.net_linux_test_sources
+     deps += [
+       ":epoll_quic_tools",
+@@ -1392,6 +1404,12 @@ test("net_unittests") {
+     sources -= [ "proxy/proxy_config_service_linux_unittest.cc" ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "base/address_tracker_linux_unittest.cc",
++    ]
++  }
++
+   if (v8_use_external_startup_data) {
+     deps += [ "//gin" ]
+   }
diff --git a/chromium-new/patches/patch-net_base_address__tracker__linux.cc b/chromium-new/patches/patch-net_base_address__tracker__linux.cc
index d42d8a2..56d5e51 100644
--- a/chromium-new/patches/patch-net_base_address__tracker__linux.cc
+++ b/chromium-new/patches/patch-net_base_address__tracker__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- net/base/address_tracker_linux.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/base/address_tracker_linux.cc.orig	2016-11-17 10:22:08.320209938 +0000
 +++ net/base/address_tracker_linux.cc
 @@ -5,7 +5,9 @@
  #include "net/base/address_tracker_linux.h"
diff --git a/chromium-new/patches/patch-net_base_address__tracker__linux.h b/chromium-new/patches/patch-net_base_address__tracker__linux.h
index 2b78d03..56d9586 100644
--- a/chromium-new/patches/patch-net_base_address__tracker__linux.h
+++ b/chromium-new/patches/patch-net_base_address__tracker__linux.h
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- net/base/address_tracker_linux.h.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/base/address_tracker_linux.h.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/base/address_tracker_linux.h
 @@ -6,10 +6,12 @@
  #define NET_BASE_ADDRESS_TRACKER_LINUX_H_
  
  #include <sys/socket.h>  // Needed to include netlink.
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
  // Mask superfluous definition of |struct net|. This is fixed in Linux 2.6.38.
  #define net net_kernel
  #include <linux/rtnetlink.h>
@@ -19,7 +19,7 @@ $NetBSD$
  class NET_EXPORT_PRIVATE AddressTrackerLinux :
      public base::MessageLoopForIO::Watcher {
   public:
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
    typedef std::map<IPAddress, struct ifaddrmsg> AddressMap;
 -
 +#else
diff --git a/chromium-new/patches/patch-net_base_address__tracker__linux__unittest.cc b/chromium-new/patches/patch-net_base_address__tracker__linux__unittest.cc
index aba147f..80b1503 100644
--- a/chromium-new/patches/patch-net_base_address__tracker__linux__unittest.cc
+++ b/chromium-new/patches/patch-net_base_address__tracker__linux__unittest.cc
@@ -1,10 +1,10 @@
 $NetBSD$
 
---- net/base/address_tracker_linux_unittest.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/base/address_tracker_linux_unittest.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/base/address_tracker_linux_unittest.cc
-@@ -13,7 +13,11 @@
- #include "net/base/ip_address.h"
- #include "testing/gtest/include/gtest/gtest.h"
+@@ -4,7 +4,11 @@
+ 
+ #include "net/base/address_tracker_linux.h"
  
 +#if defined(__linux__)
  #include <linux/if.h>
@@ -12,5 +12,5 @@ $NetBSD$
 +#include <net/if.h>
 +#endif
  
- #ifndef IFA_F_HOMEADDRESS
- #define IFA_F_HOMEADDRESS 0x10
+ #include <memory>
+ #include <unordered_set>
diff --git a/chromium-new/patches/patch-net_base_mime__util__unittest.cc b/chromium-new/patches/patch-net_base_mime__util__unittest.cc
index 091c428..0517fe6 100644
--- a/chromium-new/patches/patch-net_base_mime__util__unittest.cc
+++ b/chromium-new/patches/patch-net_base_mime__util__unittest.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- net/base/mime_util_unittest.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/base/mime_util_unittest.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/base/mime_util_unittest.cc
 @@ -241,7 +241,7 @@ TEST(MimeUtilTest, TestGetExtensionsForM
      { "MeSsAge/*",  1, "eml" },
diff --git a/chromium-new/patches/patch-net_base_network__change__notifier.cc b/chromium-new/patches/patch-net_base_network__change__notifier.cc
index b2c7b93..17acb4d 100644
--- a/chromium-new/patches/patch-net_base_network__change__notifier.cc
+++ b/chromium-new/patches/patch-net_base_network__change__notifier.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- net/base/network_change_notifier.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/base/network_change_notifier.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/base/network_change_notifier.cc
-@@ -532,7 +532,6 @@ NetworkChangeNotifier* NetworkChangeNoti
+@@ -533,7 +533,6 @@ NetworkChangeNotifier* NetworkChangeNoti
  #elif defined(OS_MACOSX)
    return new NetworkChangeNotifierMac();
  #else
@@ -10,3 +10,21 @@ $NetBSD$
    return NULL;
  #endif
  }
+@@ -753,7 +752,7 @@ void NetworkChangeNotifier::LogOperatorC
+ #endif
+ }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // static
+ const internal::AddressTrackerLinux*
+ NetworkChangeNotifier::GetAddressTracker() {
+@@ -978,7 +977,7 @@ NetworkChangeNotifier::NetworkChangeNoti
+   network_change_calculator_->Init();
+ }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ const internal::AddressTrackerLinux*
+ NetworkChangeNotifier::GetAddressTrackerInternal() const {
+   return NULL;
diff --git a/chromium-new/patches/patch-net_base_network__change__notifier.h b/chromium-new/patches/patch-net_base_network__change__notifier.h
new file mode 100644
index 0000000..377abf2
--- /dev/null
+++ b/chromium-new/patches/patch-net_base_network__change__notifier.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- net/base/network_change_notifier.h.orig	2016-11-10 20:02:16.000000000 +0000
++++ net/base/network_change_notifier.h
+@@ -26,7 +26,7 @@ struct NetworkInterface;
+ typedef std::vector<NetworkInterface> NetworkInterfaceList;
+ class URLRequest;
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ namespace internal {
+ class AddressTrackerLinux;
+ }
+@@ -332,7 +332,7 @@ class NET_EXPORT NetworkChangeNotifier {
+   // a large HOSTS file.
+   static void GetDnsConfig(DnsConfig* config);
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // Returns the AddressTrackerLinux if present.
+   static const internal::AddressTrackerLinux* GetAddressTracker();
+ #endif
+@@ -488,7 +488,7 @@ class NET_EXPORT NetworkChangeNotifier {
+       const NetworkChangeCalculatorParams& params =
+           NetworkChangeCalculatorParams());
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // Returns the AddressTrackerLinux if present.
+   // TODO(szym): Retrieve AddressMap from NetworkState. http://crbug.com/144212
+   virtual const internal::AddressTrackerLinux*
diff --git a/chromium-new/patches/patch-net_base_network__interfaces__linux.cc b/chromium-new/patches/patch-net_base_network__interfaces__linux.cc
index d44a5e6..8ecdbc7 100644
--- a/chromium-new/patches/patch-net_base_network__interfaces__linux.cc
+++ b/chromium-new/patches/patch-net_base_network__interfaces__linux.cc
@@ -1,10 +1,10 @@
 $NetBSD$
 
---- net/base/network_interfaces_linux.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/base/network_interfaces_linux.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/base/network_interfaces_linux.cc
-@@ -4,12 +4,14 @@
+@@ -6,12 +6,14 @@
  
- #include "net/base/network_interfaces_linux.h"
+ #include <memory>
  
 +#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
  #if !defined(OS_ANDROID)
@@ -13,11 +13,11 @@ $NetBSD$
  #include <linux/if.h>
  #include <linux/sockios.h>
  #include <linux/wireless.h>
-+#endif  // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
++#endif  // !defined(OS_FREEBSD)
  #include <set>
  #include <sys/ioctl.h>
  #include <sys/types.h>
-@@ -44,6 +46,7 @@ bool TryConvertNativeToNetIPAttributes(i
+@@ -49,6 +51,7 @@ bool TryConvertNativeToNetIPAttributes(i
    // are still progressing through duplicated address detection (DAD)
    // and shouldn't be used by the application layer until DAD process
    // is completed.
@@ -25,7 +25,7 @@ $NetBSD$
    if (native_attributes & (
  #if !defined(OS_ANDROID)
                                IFA_F_OPTIMISTIC | IFA_F_DADFAILED |
-@@ -61,6 +64,10 @@ bool TryConvertNativeToNetIPAttributes(i
+@@ -66,6 +69,10 @@ bool TryConvertNativeToNetIPAttributes(i
    }
  
    return true;
@@ -36,7 +36,7 @@ $NetBSD$
  }
  
  }  // namespace
-@@ -75,13 +82,15 @@ NetworkChangeNotifier::ConnectionType Ge
+@@ -80,13 +87,15 @@ NetworkChangeNotifier::ConnectionType Ge
    if (!s.is_valid())
      return NetworkChangeNotifier::CONNECTION_UNKNOWN;
  
@@ -53,7 +53,7 @@ $NetBSD$
    // Test ethtool for CONNECTION_ETHERNET
    struct ethtool_cmd ecmd = {};
    ecmd.cmd = ETHTOOL_GSET;
-@@ -90,12 +99,13 @@ NetworkChangeNotifier::ConnectionType Ge
+@@ -95,12 +104,13 @@ NetworkChangeNotifier::ConnectionType Ge
    strncpy(ifr.ifr_name, ifname.c_str(), IFNAMSIZ - 1);
    if (ioctl(s.get(), SIOCETHTOOL, &ifr) != -1)
      return NetworkChangeNotifier::CONNECTION_ETHERNET;
@@ -68,7 +68,7 @@ $NetBSD$
    base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0));
    if (!ioctl_socket.is_valid())
      return "";
-@@ -107,9 +117,11 @@ std::string GetInterfaceSSID(const std::
+@@ -112,9 +122,11 @@ std::string GetInterfaceSSID(const std::
    wreq.u.essid.length = IW_ESSID_MAX_SIZE;
    if (ioctl(ioctl_socket.get(), SIOCGIWESSID, &wreq) != -1)
      return ssid;
@@ -80,7 +80,7 @@ $NetBSD$
  bool GetNetworkListImpl(
      NetworkInterfaceList* networks,
      int policy,
-@@ -178,6 +190,7 @@ bool GetNetworkListImpl(
+@@ -183,6 +195,7 @@ bool GetNetworkListImpl(
  
    return true;
  }
@@ -88,7 +88,7 @@ $NetBSD$
  
  std::string GetWifiSSIDFromInterfaceListInternal(
      const NetworkInterfaceList& interfaces,
-@@ -202,12 +215,16 @@ bool GetNetworkList(NetworkInterfaceList
+@@ -207,12 +220,16 @@ bool GetNetworkList(NetworkInterfaceList
    if (networks == NULL)
      return false;
  
diff --git a/chromium-new/patches/patch-net_base_network__interfaces__posix.cc b/chromium-new/patches/patch-net_base_network__interfaces__posix.cc
index 37a2736..cfa6310 100644
--- a/chromium-new/patches/patch-net_base_network__interfaces__posix.cc
+++ b/chromium-new/patches/patch-net_base_network__interfaces__posix.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- net/base/network_interfaces_posix.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/base/network_interfaces_posix.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/base/network_interfaces_posix.cc
 @@ -20,6 +20,7 @@ namespace net {
  #if !defined(OS_NACL)
diff --git a/chromium-new/patches/patch-net_dns_address__sorter__posix.cc b/chromium-new/patches/patch-net_dns_address__sorter__posix.cc
index 3e8cd7f..752a25a 100644
--- a/chromium-new/patches/patch-net_dns_address__sorter__posix.cc
+++ b/chromium-new/patches/patch-net_dns_address__sorter__posix.cc
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- net/dns/address_sorter_posix.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/dns/address_sorter_posix.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/dns/address_sorter_posix.cc
-@@ -11,6 +11,9 @@
+@@ -13,6 +13,9 @@
  #include <sys/socket.h>  // Must be included before ifaddrs.h.
  #include <ifaddrs.h>
  #include <net/if.h>
-+#if !defined(OS_NETBSD)
++#if defined(OS_FREEBSD)
 +#include <net/if_var.h>
 +#endif
  #include <netinet/in_var.h>
diff --git a/chromium-new/patches/patch-net_dns_dns__config_-service__posix.cc b/chromium-new/patches/patch-net_dns_dns__config_-service__posix.cc
deleted file mode 100644
index 2193a6e..0000000
--- a/chromium-new/patches/patch-net_dns_dns__config_-service__posix.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- net/dns/dns_config_service_posix.cc.orig	2016-06-24 01:02:25.000000000 +0000
-+++ net/dns/dns_config_service_posix.cc
-@@ -118,7 +118,7 @@ class DnsConfigWatcher {
- ConfigParsePosixResult ReadDnsConfig(DnsConfig* config) {
-   ConfigParsePosixResult result;
-   config->unhandled_options = false;
--#if defined(OS_OPENBSD)
-+#if defined(OS_OPENBSD) || defined(OS_NETBSD)
-   // Note: res_ninit in glibc always returns 0 and sets RES_INIT.
-   // res_init behaves the same way.
-   memset(&_res, 0, sizeof(_res));
diff --git a/chromium-new/patches/patch-net_dns_dns__config__service__posix__unittest.cc b/chromium-new/patches/patch-net_dns_dns__config__service__posix__unittest.cc
index 4666ef2..93a0041 100644
--- a/chromium-new/patches/patch-net_dns_dns__config__service__posix__unittest.cc
+++ b/chromium-new/patches/patch-net_dns_dns__config__service__posix__unittest.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- net/dns/dns_config_service_posix_unittest.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/dns/dns_config_service_posix_unittest.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/dns/dns_config_service_posix_unittest.cc
 @@ -2,8 +2,6 @@
  // Use of this source code is governed by a BSD-style license that can be
@@ -10,4 +10,4 @@ $NetBSD$
 -
  #include "base/cancelable_callback.h"
  #include "base/files/file_util.h"
- #include "base/sys_byteorder.h"
+ #include "base/message_loop/message_loop.h"
diff --git a/chromium-new/patches/patch-net_dns_dns__reloader.cc b/chromium-new/patches/patch-net_dns_dns__reloader.cc
index 41122a1..5329b85 100644
--- a/chromium-new/patches/patch-net_dns_dns__reloader.cc
+++ b/chromium-new/patches/patch-net_dns_dns__reloader.cc
@@ -1,17 +1,51 @@
 $NetBSD$
 
---- net/dns/dns_reloader.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/dns/dns_reloader.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/dns/dns_reloader.cc
-@@ -5,7 +5,11 @@
- #include "net/dns/dns_reloader.h"
- 
+@@ -7,6 +7,10 @@
  #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
--    !defined(OS_ANDROID)
-+    !defined(OS_ANDROID) && !defined(OS_NETBSD)
-+
+     !defined(OS_ANDROID)
+ 
 +#if defined(OS_FREEBSD)
 +#include <netinet/in.h>
 +#endif
- 
++
  #include <resolv.h>
  
+ #include "base/lazy_instance.h"
+@@ -21,6 +25,8 @@ namespace net {
+ 
+ namespace {
+ 
++struct __res_state res;
++
+ // On Linux/BSD, changes to /etc/resolv.conf can go unnoticed thus resulting
+ // in DNS queries failing either because nameservers are unknown on startup
+ // or because nameserver info has changed as a result of e.g. connecting to
+@@ -61,14 +67,14 @@ class DnsReloader : public NetworkChange
+     if (!reload_state) {
+       reload_state = new ReloadState();
+       reload_state->resolver_generation = resolver_generation_;
+-      res_ninit(&_res);
++      res_ninit(&res);
+       tls_index_.Set(reload_state);
+     } else if (reload_state->resolver_generation != resolver_generation_) {
+       reload_state->resolver_generation = resolver_generation_;
+       // It is safe to call res_nclose here since we know res_ninit will have
+       // been called above.
+-      res_nclose(&_res);
+-      res_ninit(&_res);
++      res_nclose(&res);
++      res_ninit(&res);
+     }
+   }
+ 
+@@ -76,7 +82,7 @@ class DnsReloader : public NetworkChange
+   static void SlotReturnFunction(void* data) {
+     ReloadState* reload_state = static_cast<ReloadState*>(data);
+     if (reload_state)
+-      res_nclose(&_res);
++      res_nclose(&res);
+     delete reload_state;
+   }
+ 
diff --git a/chromium-new/patches/patch-net_dns_dns__session.cc b/chromium-new/patches/patch-net_dns_dns__session.cc
index 3ec3cc5..285e808 100644
--- a/chromium-new/patches/patch-net_dns_dns__session.cc
+++ b/chromium-new/patches/patch-net_dns_dns__session.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- net/dns/dns_session.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/dns/dns_session.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/dns/dns_session.cc
-@@ -224,7 +224,7 @@ void DnsSession::RecordRTT(unsigned serv
+@@ -228,7 +228,7 @@ void DnsSession::RecordRTT(unsigned serv
    base::TimeDelta current_error = rtt - estimate;
    estimate += current_error / 8;  // * alpha
    base::TimeDelta abs_error = base::TimeDelta::FromInternalValue(
diff --git a/chromium-new/patches/patch-net_dns_host__resolver__impl.cc b/chromium-new/patches/patch-net_dns_host__resolver__impl.cc
deleted file mode 100644
index a038be6..0000000
--- a/chromium-new/patches/patch-net_dns_host__resolver__impl.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- net/dns/host_resolver_impl.cc.orig	2016-06-24 01:02:25.000000000 +0000
-+++ net/dns/host_resolver_impl.cc
-@@ -1888,7 +1888,7 @@ HostResolverImpl::HostResolverImpl(const
-   NetworkChangeNotifier::AddConnectionTypeObserver(this);
-   NetworkChangeNotifier::AddDNSObserver(this);
- #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
--    !defined(OS_ANDROID)
-+    !defined(OS_ANDROID) && !defined(OS_NETBSD)
-   EnsureDnsReloaderInit();
- #endif
- 
diff --git a/chromium-new/patches/patch-net_dns_host__resolver__proc.cc b/chromium-new/patches/patch-net_dns_host__resolver__proc.cc
deleted file mode 100644
index a026e53..0000000
--- a/chromium-new/patches/patch-net_dns_host__resolver__proc.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- net/dns/host_resolver_proc.cc.orig	2016-06-24 01:02:25.000000000 +0000
-+++ net/dns/host_resolver_proc.cc
-@@ -194,7 +194,7 @@ int SystemHostResolverCall(const std::st
-   hints.ai_socktype = SOCK_STREAM;
- 
- #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
--    !defined(OS_ANDROID)
-+    !defined(OS_ANDROID) && !defined(OS_NETBSD)
-   DnsReloaderMaybeReload();
- #endif
-   int err = getaddrinfo(host.c_str(), NULL, &hints, &ai);
diff --git a/chromium-new/patches/patch-net_http_http__auth__gssapi__posix.cc b/chromium-new/patches/patch-net_http_http__auth__gssapi__posix.cc
index c6faaa4..e626e0f 100644
--- a/chromium-new/patches/patch-net_http_http__auth__gssapi__posix.cc
+++ b/chromium-new/patches/patch-net_http_http__auth__gssapi__posix.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- net/http/http_auth_gssapi_posix.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/http/http_auth_gssapi_posix.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/http/http_auth_gssapi_posix.cc
 @@ -431,8 +431,8 @@ base::NativeLibrary GSSAPISharedLibrary:
      static const char* const kDefaultLibraryNames[] = {
diff --git a/chromium-new/patches/patch-net_net.gyp b/chromium-new/patches/patch-net_net.gyp
index 7e4b9c9..1a5934b 100644
--- a/chromium-new/patches/patch-net_net.gyp
+++ b/chromium-new/patches/patch-net_net.gyp
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- net/net.gyp.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/net.gyp.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/net.gyp
-@@ -148,7 +148,7 @@
+@@ -186,7 +186,7 @@
          '<@(net_test_sources)',
        ],
        'conditions': [
@@ -11,7 +11,7 @@ $NetBSD$
            'dependencies': [
              'epoll_quic_tools',
              'epoll_server',
-@@ -672,6 +672,11 @@
+@@ -713,6 +713,11 @@
              'url_request/test_url_request_interceptor.h',
            ],
          }],
diff --git a/chromium-new/patches/patch-net_net.gypi b/chromium-new/patches/patch-net_net.gypi
deleted file mode 100644
index cf5fff0..0000000
--- a/chromium-new/patches/patch-net_net.gypi
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- net/net.gypi.orig	2016-06-24 01:02:25.000000000 +0000
-+++ net/net.gypi
-@@ -440,8 +440,8 @@
-       'android/network_library.h',
-       'android/traffic_stats.cc',
-       'android/traffic_stats.h',
--      'base/address_tracker_linux.cc',
--      'base/address_tracker_linux.h',
-+#      'base/address_tracker_linux.cc',
-+#      'base/address_tracker_linux.h',
-       'base/backoff_entry.cc',
-       'base/backoff_entry.h',
-       'base/backoff_entry_serializer.cc',
-@@ -1338,7 +1338,7 @@
-       'android/traffic_stats_unittest.cc',
-       'base/address_family_unittest.cc',
-       'base/address_list_unittest.cc',
--      'base/address_tracker_linux_unittest.cc',
-+#      'base/address_tracker_linux_unittest.cc',
-       'base/backoff_entry_serializer_unittest.cc',
-       'base/backoff_entry_unittest.cc',
-       'base/chunked_upload_data_stream_unittest.cc',
diff --git a/chromium-new/patches/patch-net_net__common.gypi b/chromium-new/patches/patch-net_net__common.gypi
deleted file mode 100644
index 21cb8cd..0000000
--- a/chromium-new/patches/patch-net_net__common.gypi
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- net/net_common.gypi.orig	2016-06-24 01:02:25.000000000 +0000
-+++ net/net_common.gypi
-@@ -235,9 +235,10 @@
-         'conditions': [
-           ['os_bsd==1', {
-             'sources!': [
-+              'base/address_tracker_linux.cc',
-               'base/network_change_notifier_linux.cc',
-               'base/network_change_notifier_netlink_linux.cc',
--              'proxy/proxy_config_service_linux.cc',
-+#              'proxy/proxy_config_service_linux.cc',
-             ],
-           },{
-             'dependencies': [
diff --git a/chromium-new/patches/patch-net_proxy_proxy__config__service__linux.cc b/chromium-new/patches/patch-net_proxy_proxy__config__service__linux.cc
index fc499b5..3b6d723 100644
--- a/chromium-new/patches/patch-net_proxy_proxy__config__service__linux.cc
+++ b/chromium-new/patches/patch-net_proxy_proxy__config__service__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- net/proxy/proxy_config_service_linux.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/proxy/proxy_config_service_linux.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/proxy/proxy_config_service_linux.cc
 @@ -11,7 +11,14 @@
  #include <limits.h>
@@ -17,37 +17,37 @@ $NetBSD$
  #include <unistd.h>
  
  #include <map>
-@@ -859,6 +866,7 @@ class SettingGetterImplKDE : public Prox
+@@ -863,6 +870,7 @@ class SettingGetterImplKDE : public Prox
   public:
    explicit SettingGetterImplKDE(base::Environment* env_var_getter)
        : inotify_fd_(-1),
 +        config_fd_(-1),
-         notify_delegate_(NULL),
+         notify_delegate_(nullptr),
          debounce_timer_(new base::OneShotTimer()),
          indirect_manual_(false),
-@@ -933,9 +941,10 @@ class SettingGetterImplKDE : public Prox
+@@ -937,9 +945,10 @@ class SettingGetterImplKDE : public Prox
      // and pending tasks may then be deleted without being run.
      // Here in the KDE version, we can safely close the file descriptor
      // anyway. (Not that it really matters; the process is exiting.)
 -    if (inotify_fd_ >= 0)
 +    if (inotify_fd_ >= 0 || config_fd_ >= 0)
        ShutDown();
-     DCHECK(inotify_fd_ < 0);
-+    DCHECK(config_fd_ < 0);
+     DCHECK_LT(inotify_fd_, 0);
++    DCHECK_LT(config_fd_, 0);
    }
  
    bool Init(const scoped_refptr<base::SingleThreadTaskRunner>& glib_task_runner,
-@@ -944,9 +953,17 @@ class SettingGetterImplKDE : public Prox
+@@ -948,9 +957,17 @@ class SettingGetterImplKDE : public Prox
      // This has to be called on the UI thread (http://crbug.com/69057).
      base::ThreadRestrictions::ScopedAllowIO allow_io;
-     DCHECK(inotify_fd_ < 0);
-+#if defined(OS_FREEBSD) || defined(OS_NETBSD)
+     DCHECK_LT(inotify_fd_, 0);
++#if defined(OS_BSD)
 +    inotify_fd_ = kqueue();
 +#else
      inotify_fd_ = inotify_init();
 +#endif
      if (inotify_fd_ < 0) {
-+#if defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_BSD)
 +      PLOG(ERROR) << "kqueue failed";
 +#else
        PLOG(ERROR) << "inotify_init failed";
@@ -55,7 +55,7 @@ $NetBSD$
        return false;
      }
      if (!base::SetNonBlocking(inotify_fd_)) {
-@@ -970,22 +987,40 @@ class SettingGetterImplKDE : public Prox
+@@ -974,22 +991,40 @@ class SettingGetterImplKDE : public Prox
        close(inotify_fd_);
        inotify_fd_ = -1;
      }
@@ -68,15 +68,15 @@ $NetBSD$
  
    bool SetUpNotifications(
        ProxyConfigServiceLinux::Delegate* delegate) override {
-     DCHECK(inotify_fd_ >= 0);
-+    DCHECK(config_fd_ >= 0);
+     DCHECK_GE(inotify_fd_, 0);
++    DCHECK_GE(config_fd_, 0);
      DCHECK(file_task_runner_->BelongsToCurrentThread());
      // We can't just watch the kioslaverc file directly, since KDE will write
      // a new copy of it and then rename it whenever settings are changed and
      // inotify watches inodes (so we'll be watching the old deleted file after
      // the first change, and it will never change again). So, we watch the
      // directory instead. We then act only on changes to the kioslaverc entry.
-+#if defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_BSD)
 +    config_fd_ = HANDLE_EINTR(open(kde_config_dir_.value().c_str(), O_RDONLY));
 +
 +    if (config_fd_ == -1)
@@ -96,11 +96,11 @@ $NetBSD$
      notify_delegate_ = delegate;
      if (!base::MessageLoopForIO::current()->WatchFileDescriptor(
              inotify_fd_, true, base::MessageLoopForIO::WATCH_READ,
-@@ -1006,7 +1041,19 @@ class SettingGetterImplKDE : public Prox
+@@ -1010,7 +1045,19 @@ class SettingGetterImplKDE : public Prox
    void OnFileCanReadWithoutBlocking(int fd) override {
      DCHECK_EQ(fd, inotify_fd_);
      DCHECK(file_task_runner_->BelongsToCurrentThread());
-+#if defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_BSD)
 +    struct kevent ev;
 +    int rv = kevent(inotify_fd_, NULL, 0, &ev, 1, NULL);
 +
@@ -116,20 +116,20 @@ $NetBSD$
    }
    void OnFileCanWriteWithoutBlocking(int fd) override { NOTREACHED(); }
  
-@@ -1279,8 +1326,11 @@ class SettingGetterImplKDE : public Prox
+@@ -1283,8 +1330,11 @@ class SettingGetterImplKDE : public Prox
    void OnChangeNotification() {
      DCHECK_GE(inotify_fd_,  0);
      DCHECK(file_task_runner_->BelongsToCurrentThread());
 -    char event_buf[(sizeof(inotify_event) + NAME_MAX + 1) * 4];
      bool kioslaverc_touched = false;
-+#if defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_BSD)
 +    kioslaverc_touched = true;
 +#else
 +    char event_buf[(sizeof(inotify_event) + NAME_MAX + 1) * 4];
      ssize_t r;
      while ((r = read(inotify_fd_, event_buf, sizeof(event_buf))) > 0) {
        // inotify returns variable-length structures, which is why we have
-@@ -1317,6 +1367,7 @@ class SettingGetterImplKDE : public Prox
+@@ -1321,6 +1371,7 @@ class SettingGetterImplKDE : public Prox
          inotify_fd_ = -1;
        }
      }
@@ -137,11 +137,11 @@ $NetBSD$
      if (kioslaverc_touched) {
        // We don't use Reset() because the timer may not yet be running.
        // (In that case Stop() is a no-op.)
-@@ -1332,6 +1383,7 @@ class SettingGetterImplKDE : public Prox
+@@ -1336,6 +1387,7 @@ class SettingGetterImplKDE : public Prox
                     std::vector<std::string> > strings_map_type;
  
    int inotify_fd_;
 +  int config_fd_;
    base::MessagePumpLibevent::FileDescriptorWatcher inotify_watcher_;
    ProxyConfigServiceLinux::Delegate* notify_delegate_;
-   scoped_ptr<base::OneShotTimer> debounce_timer_;
+   std::unique_ptr<base::OneShotTimer> debounce_timer_;
diff --git a/chromium-new/patches/patch-net_proxy_proxy__service.cc b/chromium-new/patches/patch-net_proxy_proxy__service.cc
index a072552..fb75c18 100644
--- a/chromium-new/patches/patch-net_proxy_proxy__service.cc
+++ b/chromium-new/patches/patch-net_proxy_proxy__service.cc
@@ -1,22 +1,22 @@
 $NetBSD$
 
---- net/proxy/proxy_service.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/proxy/proxy_service.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/proxy/proxy_service.cc
 @@ -47,7 +47,7 @@
  #elif defined(OS_MACOSX)
  #include "net/proxy/proxy_config_service_mac.h"
  #include "net/proxy/proxy_resolver_mac.h"
 -#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_FREEBSD)
++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_FREEBSD) || defined(OS_NETBSD)
  #include "net/proxy/proxy_config_service_linux.h"
  #elif defined(OS_ANDROID)
  #include "net/proxy/proxy_config_service_android.h"
-@@ -1513,7 +1513,7 @@ scoped_ptr<ProxyConfigService> ProxyServ
+@@ -1531,7 +1531,7 @@ ProxyService::CreateSystemProxyConfigSer
               << "profile_io_data.cc::CreateProxyConfigService and this should "
               << "be used only for examples.";
-   return make_scoped_ptr(new UnsetProxyConfigService);
+   return base::WrapUnique(new UnsetProxyConfigService);
 -#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_FREEBSD)
-   scoped_ptr<ProxyConfigServiceLinux> linux_config_service(
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   std::unique_ptr<ProxyConfigServiceLinux> linux_config_service(
        new ProxyConfigServiceLinux());
  
diff --git a/chromium-new/patches/patch-net_quic_congestion__control_rtt__stats.cc b/chromium-new/patches/patch-net_quic_congestion__control_rtt__stats.cc
deleted file mode 100644
index 2a35e6f..0000000
--- a/chromium-new/patches/patch-net_quic_congestion__control_rtt__stats.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- net/quic/congestion_control/rtt_stats.cc.orig	2016-06-24 01:02:25.000000000 +0000
-+++ net/quic/congestion_control/rtt_stats.cc
-@@ -4,7 +4,7 @@
- 
- #include "net/quic/congestion_control/rtt_stats.h"
- 
--#include <cstdlib>  // std::abs
-+#include <cstdlib>  // std::labs
- 
- using std::max;
- 
-@@ -41,7 +41,7 @@ void RttStats::ExpireSmoothedMetrics() {
-   mean_deviation_ =
-       max(mean_deviation_,
-           QuicTime::Delta::FromMicroseconds(
--              std::abs(smoothed_rtt_.Subtract(latest_rtt_).ToMicroseconds())));
-+              std::labs(smoothed_rtt_.Subtract(latest_rtt_).ToMicroseconds())));
-   smoothed_rtt_ = max(smoothed_rtt_, latest_rtt_);
- }
- 
-@@ -81,7 +81,7 @@ void RttStats::UpdateRtt(QuicTime::Delta
-   } else {
-     mean_deviation_ = QuicTime::Delta::FromMicroseconds(static_cast<int64_t>(
-         kOneMinusBeta * mean_deviation_.ToMicroseconds() +
--        kBeta * std::abs(smoothed_rtt_.Subtract(rtt_sample).ToMicroseconds())));
-+        kBeta * std::labs(smoothed_rtt_.Subtract(rtt_sample).ToMicroseconds())));
-     smoothed_rtt_ =
-         smoothed_rtt_.Multiply(kOneMinusAlpha).Add(rtt_sample.Multiply(kAlpha));
-     DVLOG(1) << " smoothed_rtt(us):" << smoothed_rtt_.ToMicroseconds()
diff --git a/chromium-new/patches/patch-net_socket_socks5__client__socket.cc b/chromium-new/patches/patch-net_socket_socks5__client__socket.cc
index a9a0937..51381ff 100644
--- a/chromium-new/patches/patch-net_socket_socks5__client__socket.cc
+++ b/chromium-new/patches/patch-net_socket_socks5__client__socket.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- net/socket/socks5_client_socket.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/socket/socks5_client_socket.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/socket/socks5_client_socket.cc
 @@ -4,6 +4,10 @@
  
diff --git a/chromium-new/patches/patch-net_udp_udp__socket__posix.cc b/chromium-new/patches/patch-net_udp_udp__socket__posix.cc
index 542d99c..c3888c4 100644
--- a/chromium-new/patches/patch-net_udp_udp__socket__posix.cc
+++ b/chromium-new/patches/patch-net_udp_udp__socket__posix.cc
@@ -1,31 +1,31 @@
 $NetBSD$
 
---- net/udp/udp_socket_posix.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/udp/udp_socket_posix.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/udp/udp_socket_posix.cc
-@@ -45,7 +45,7 @@ const int kBindRetries = 10;
+@@ -48,7 +48,7 @@ const int kBindRetries = 10;
  const int kPortStart = 1024;
  const int kPortEnd = 65535;
  
 -#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_NETBSD)
++#if defined(OS_MACOSX) || defined(OS_BSD)
  
  // Returns IPv4 address in network order.
  int GetIPv4AddressFromIndex(int socket, uint32_t index, uint32_t* address) {
-@@ -603,7 +603,7 @@ int UDPSocketPosix::SetMulticastOptions(
+@@ -672,7 +672,7 @@ int UDPSocketPosix::SetMulticastOptions(
    if (multicast_interface_ != 0) {
      switch (addr_family_) {
        case AF_INET: {
 -#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_NETBSD)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
          ip_mreqn mreq;
          mreq.imr_ifindex = multicast_interface_;
          mreq.imr_address.s_addr = htonl(INADDR_ANY);
-@@ -678,7 +678,7 @@ int UDPSocketPosix::JoinGroup(const IPAd
+@@ -747,7 +747,7 @@ int UDPSocketPosix::JoinGroup(const IPAd
        if (addr_family_ != AF_INET)
          return ERR_ADDRESS_INVALID;
  
 -#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_NETBSD)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
        ip_mreqn mreq;
        mreq.imr_ifindex = multicast_interface_;
        mreq.imr_address.s_addr = htonl(INADDR_ANY);
diff --git a/chromium-new/patches/patch-net_udp_udp__socket__unittest.cc b/chromium-new/patches/patch-net_udp_udp__socket__unittest.cc
index f836d26..2712225 100644
--- a/chromium-new/patches/patch-net_udp_udp__socket__unittest.cc
+++ b/chromium-new/patches/patch-net_udp_udp__socket__unittest.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- net/udp/udp_socket_unittest.cc.orig	2016-06-24 01:02:25.000000000 +0000
+--- net/udp/udp_socket_unittest.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ net/udp/udp_socket_unittest.cc
-@@ -266,7 +266,7 @@ TEST_F(UDPSocketTest, ConnectNonBlocking
+@@ -271,7 +271,7 @@ TEST_F(UDPSocketTest, ConnectNonBlocking
  }
  #endif
  
diff --git a/chromium-new/patches/patch-pdf_pdfium_pdfium__engine.cc b/chromium-new/patches/patch-pdf_pdfium_pdfium__engine.cc
index e691bda..c1cfc18 100644
--- a/chromium-new/patches/patch-pdf_pdfium_pdfium__engine.cc
+++ b/chromium-new/patches/patch-pdf_pdfium_pdfium__engine.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- pdf/pdfium/pdfium_engine.cc.orig	2016-06-24 01:02:26.000000000 +0000
+--- pdf/pdfium/pdfium_engine.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ pdf/pdfium/pdfium_engine.cc
-@@ -121,7 +121,7 @@ std::vector<uint32_t> GetPageNumbersFrom
+@@ -123,7 +123,7 @@ std::vector<uint32_t> GetPageNumbersFrom
    return page_numbers;
  }
  
@@ -11,7 +11,7 @@ $NetBSD$
  
  PP_Instance g_last_instance_id;
  
-@@ -507,7 +507,7 @@ bool InitializeSDK() {
+@@ -509,7 +509,7 @@ bool InitializeSDK() {
    config.m_v8EmbedderSlot = gin::kEmbedderPDFium;
    FPDF_InitLibraryWithConfig(&config);
  
@@ -20,7 +20,7 @@ $NetBSD$
    // Font loading doesn't work in the renderer sandbox in Linux.
    FPDF_SetSystemFontInfo(&g_font_info);
  #endif
-@@ -620,7 +620,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Cl
+@@ -622,7 +622,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Cl
    IFSDK_PAUSE::user = nullptr;
    IFSDK_PAUSE::NeedToPauseNow = Pause_NeedToPauseNow;
  
@@ -29,7 +29,7 @@ $NetBSD$
    // PreviewModeClient does not know its pp::Instance.
    pp::Instance* instance = client_->GetPluginInstance();
    if (instance)
-@@ -1330,7 +1330,7 @@ pp::Buffer_Dev PDFiumEngine::PrintPagesA
+@@ -1331,7 +1331,7 @@ pp::Buffer_Dev PDFiumEngine::PrintPagesA
      FPDF_ClosePage(pdf_page);
    }
  
@@ -38,7 +38,7 @@ $NetBSD$
    g_last_instance_id = client_->GetPluginInstance()->pp_instance();
  #endif
  
-@@ -2692,7 +2692,7 @@ bool PDFiumEngine::ContinuePaint(int pro
+@@ -2736,7 +2736,7 @@ bool PDFiumEngine::ContinuePaint(int pro
    DCHECK_LT(static_cast<size_t>(progressive_index), progressive_paints_.size());
    DCHECK(image_data);
  
@@ -47,7 +47,7 @@ $NetBSD$
    g_last_instance_id = client_->GetPluginInstance()->pp_instance();
  #endif
  
-@@ -3146,7 +3146,7 @@ void PDFiumEngine::SetCurrentPage(int in
+@@ -3191,7 +3191,7 @@ void PDFiumEngine::SetCurrentPage(int in
      FORM_DoPageAAction(old_page, form_, FPDFPAGE_AACTION_CLOSE);
    }
    most_visible_page_ = index;
diff --git a/chromium-new/patches/patch-ppapi_proxy_file__io__resource.cc b/chromium-new/patches/patch-ppapi_proxy_file__io__resource.cc
index a379bfa..94a6392 100644
--- a/chromium-new/patches/patch-ppapi_proxy_file__io__resource.cc
+++ b/chromium-new/patches/patch-ppapi_proxy_file__io__resource.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ppapi/proxy/file_io_resource.cc.orig	2016-06-24 01:02:26.000000000 +0000
+--- ppapi/proxy/file_io_resource.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ ppapi/proxy/file_io_resource.cc
 @@ -285,17 +285,19 @@ int32_t FileIOResource::Write(int64_t of
  
diff --git a/chromium-new/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc b/chromium-new/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc
index ef5209f..eca3480 100644
--- a/chromium-new/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc
+++ b/chromium-new/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ppapi/shared_impl/private/net_address_private_impl.cc.orig	2016-06-24 01:02:26.000000000 +0000
+--- ppapi/shared_impl/private/net_address_private_impl.cc.orig	2016-11-10 20:02:16.000000000 +0000
 +++ ppapi/shared_impl/private/net_address_private_impl.cc
 @@ -26,9 +26,12 @@
  #include <arpa/inet.h>
diff --git a/chromium-new/patches/patch-ppapi_tests_extensions_BUILD.gn b/chromium-new/patches/patch-ppapi_tests_extensions_BUILD.gn
new file mode 100644
index 0000000..c806c44
--- /dev/null
+++ b/chromium-new/patches/patch-ppapi_tests_extensions_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ppapi/tests/extensions/BUILD.gn.orig	2016-11-10 20:02:16.000000000 +0000
++++ ppapi/tests/extensions/BUILD.gn
+@@ -20,7 +20,7 @@ group("extensions") {
+     ":ppapi_tests_extensions_popup($newlib)",
+     ":ppapi_tests_extensions_socket_permissions($newlib)",
+   ]
+-  if ((target_cpu == "x86" || target_cpu == "x64") && is_linux &&
++  if ((target_cpu == "x86" || target_cpu == "x64") && (is_linux || is_bsd) &&
+       enable_nacl_nonsfi) {
+     nonsfi = "//build/toolchain/nacl:newlib_pnacl_nonsfi"
+     data_deps += [ ":ppapi_tests_extensions_packaged_app($nonsfi)" ]
diff --git a/chromium-new/patches/patch-printing_BUILD.gn b/chromium-new/patches/patch-printing_BUILD.gn
new file mode 100644
index 0000000..8456fac
--- /dev/null
+++ b/chromium-new/patches/patch-printing_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- printing/BUILD.gn.orig	2016-11-10 20:02:16.000000000 +0000
++++ printing/BUILD.gn
+@@ -125,7 +125,7 @@ component("printing") {
+   if (use_cups) {
+     configs += [ ":cups" ]
+ 
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       # rebase_path does not accept an empty string
+       if (use_sysroot) {
+         cups_sysroot = rebase_path(sysroot)
+@@ -202,7 +202,7 @@ component("printing") {
+       "printing_context_no_system_dialog.cc",
+       "printing_context_no_system_dialog.h",
+     ]
+-  } else if (is_linux) {  # Non-ChromeOS Linux.
++  } else if (is_linux || is_bsd) {  # Non-ChromeOS Linux/BSD.
+     sources += [
+       "printed_document_linux.cc",
+       "printing_context_linux.cc",
diff --git a/chromium-new/patches/patch-printing_cups__config__helper.py b/chromium-new/patches/patch-printing_cups__config__helper.py
new file mode 100644
index 0000000..ecc256b
--- /dev/null
+++ b/chromium-new/patches/patch-printing_cups__config__helper.py
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- printing/cups_config_helper.py.orig	2016-11-10 20:02:16.000000000 +0000
++++ printing/cups_config_helper.py
+@@ -65,7 +65,7 @@ def main():
+   mode = sys.argv[1]
+   if len(sys.argv) > 2 and sys.argv[2]:
+     sysroot = sys.argv[2]
+-    cups_config = os.path.join(sysroot, 'usr', 'bin', 'cups-config')
++    cups_config = os.path.join(sysroot, 'bin', 'cups-config')
+     if not os.path.exists(cups_config):
+       print 'cups-config not found: %s' % cups_config
+       return 1
diff --git a/chromium-new/patches/patch-printing_printing.gyp b/chromium-new/patches/patch-printing_printing.gyp
deleted file mode 100644
index 46284c7..0000000
--- a/chromium-new/patches/patch-printing_printing.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- printing/printing.gyp.orig	2016-06-24 01:02:26.000000000 +0000
-+++ printing/printing.gyp
-@@ -187,7 +187,7 @@
-             'backend/print_backend_chromeos.cc',
-           ],
-         }],
--        ['OS=="linux" and chromeos==0', {
-+        ['(OS=="linux" or os_bsd == 1) and chromeos==0', {
-           'sources': [
-             'printing_context_linux.cc',
-             'printing_context_linux.h',
diff --git a/chromium-new/patches/patch-remoting_host_BUILD.gn b/chromium-new/patches/patch-remoting_host_BUILD.gn
new file mode 100644
index 0000000..5bf42a3
--- /dev/null
+++ b/chromium-new/patches/patch-remoting_host_BUILD.gn
@@ -0,0 +1,49 @@
+$NetBSD$
+
+--- remoting/host/BUILD.gn.orig	2016-11-10 20:02:16.000000000 +0000
++++ remoting/host/BUILD.gn
+@@ -420,7 +420,7 @@ static_library("host") {
+     deps += [ "//components/policy:generated" ]
+   }
+ 
+-  if (is_linux && !is_chromeos) {
++  if ((is_linux || is_bsd) && !is_chromeos) {
+     libs += [ "pam" ]
+   }
+ 
+@@ -439,7 +439,7 @@ static_library("host") {
+       "input_injector_x11.cc",
+       "local_input_monitor_x11.cc",
+     ]
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       # These will already be filtered out on non-Linux.
+       sources -= [
+         "linux/unicode_to_keysym.cc",
+@@ -648,7 +648,7 @@ source_set("unit_tests") {
+     "win/worker_process_launcher_unittest.cc",
+   ]
+ 
+-  if (!use_x11 && is_linux) {
++  if (!use_x11 && (is_linux || is_bsd)) {
+     sources -= [ "linux/unicode_to_keysym_unittest.cc" ]
+   }
+   if (use_ozone || is_chromeos) {
+@@ -1217,7 +1217,7 @@ if (enable_me2me_host) {
+     if (is_desktop_linux) {
+       deps += [ "//build/config/linux/gtk2" ]
+     }
+-    if ((is_linux && !is_chromeos) || is_mac) {
++    if ((is_linux && !is_chromeos) || is_mac || is_bsd) {
+       libs = [ "pam" ]
+     }
+ 
+@@ -1359,7 +1359,7 @@ if (enable_me2me_host) {
+       }
+     }
+ 
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       copy("remoting_me2me_host_copy_script") {
+         sources = [
+           "linux/linux_me2me_host.py",
diff --git a/chromium-new/patches/patch-remoting_remoting__host.gypi b/chromium-new/patches/patch-remoting_remoting__host.gypi
deleted file mode 100644
index 2940683..0000000
--- a/chromium-new/patches/patch-remoting_remoting__host.gypi
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- remoting/remoting_host.gypi.orig	2016-06-24 01:02:26.000000000 +0000
-+++ remoting/remoting_host.gypi
-@@ -18,7 +18,7 @@
-         'remoting_host_win.gypi',
-       ],
-     }],
--    ['OS=="linux"', {
-+    ['OS=="linux" or os_bsd==1', {
-       'includes': [
-         'remoting_host_linux.gypi',
-       ],
-@@ -57,7 +57,7 @@
-             '<@(remoting_host_sources)',
-           ],
-           'conditions': [
--            ['OS=="linux"', {
-+            ['OS=="linux" or os_bsd==1', {
-               'conditions': [
-                 ['use_x11==1', {
-                   'dependencies': [
-@@ -649,7 +649,7 @@
-                 'host/it2me/it2me_native_messaging_host_main.h',
-               ],
-               'conditions': [
--                ['OS=="linux" and chromeos==0 and use_ozone==0', {
-+                ['(OS=="linux" or os_bsd==1) and chromeos==0 and use_ozone==0', {
-                   'dependencies': [
-                     # Always use GTK on Linux, even for Aura builds.
-                     '../build/linux/system.gyp:gtk2',
diff --git a/chromium-new/patches/patch-sdch_BUILD.gn b/chromium-new/patches/patch-sdch_BUILD.gn
new file mode 100644
index 0000000..b40cab2
--- /dev/null
+++ b/chromium-new/patches/patch-sdch_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- sdch/BUILD.gn.orig	2016-11-10 20:02:16.000000000 +0000
++++ sdch/BUILD.gn
+@@ -11,7 +11,7 @@ config("sdch_config") {
+ # from a config and can't be on the target directly.
+ config("sdch_warnings") {
+   cflags = []
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11:
+     cflags += [ "-Wno-deprecated-declarations" ]
+   }
+@@ -59,7 +59,7 @@ static_library("sdch") {
+     "//third_party/zlib",
+   ]
+ 
+-  if (is_linux || is_android) {
++  if (is_linux || is_bsd || is_android) {
+     include_dirs = [ "linux" ]
+   } else if (is_ios) {
+     include_dirs = [ "ios" ]
diff --git a/chromium-new/patches/patch-services_shell_standalone_context.cc b/chromium-new/patches/patch-services_shell_standalone_context.cc
new file mode 100644
index 0000000..6ce69d5
--- /dev/null
+++ b/chromium-new/patches/patch-services_shell_standalone_context.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- services/shell/standalone/context.cc.orig	2016-11-10 20:02:16.000000000 +0000
++++ services/shell/standalone/context.cc
+@@ -198,7 +198,7 @@ void Context::Init(std::unique_ptr<InitP
+     tracing_remote_interfaces->GetInterface(
+         tracing::mojom::StartupPerformanceDataCollector::Name_,
+         mojo::GetProxy(&collector).PassMessagePipe());
+-#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+     // CurrentProcessInfo::CreationTime is only defined on some platforms.
+     const base::Time creation_time = base::CurrentProcessInfo::CreationTime();
+     collector->SetShellProcessCreationTime(creation_time.ToInternalValue());
diff --git a/chromium-new/patches/patch-services_ui_ws_BUILD.gn b/chromium-new/patches/patch-services_ui_ws_BUILD.gn
new file mode 100644
index 0000000..3647290
--- /dev/null
+++ b/chromium-new/patches/patch-services_ui_ws_BUILD.gn
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- services/ui/ws/BUILD.gn.orig	2016-11-10 20:02:16.000000000 +0000
++++ services/ui/ws/BUILD.gn
+@@ -103,6 +103,11 @@ static_library("lib") {
+     "window_tree_host_factory.h",
+   ]
+ 
++  # Work around base r261801
++  if (is_bsd) {
++    defines = ["_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1"]
++  }
++
+   deps = [
+     # TODO(sad): Temporary, until the GPU process is split out of ws.
+     "//services/ui/gpu",
diff --git a/chromium-new/patches/patch-skia_BUILD.gn b/chromium-new/patches/patch-skia_BUILD.gn
new file mode 100644
index 0000000..34e69d0
--- /dev/null
+++ b/chromium-new/patches/patch-skia_BUILD.gn
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- skia/BUILD.gn.orig	2016-11-10 20:02:16.000000000 +0000
++++ skia/BUILD.gn
+@@ -234,7 +234,7 @@ config("skia_library_config") {
+   }
+ 
+   # Settings for text blitting, chosen to approximate the system browser.
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     defines += [
+       "SK_GAMMA_EXPONENT=1.2",
+       "SK_GAMMA_CONTRAST=0.2",
+@@ -425,7 +425,7 @@ component("skia") {
+     sources -= [ "//third_party/skia/src/ports/SkFontHost_mac.cpp" ]
+   }
+ 
+-  if (!is_linux) {
++  if (!is_linux && !is_bsd) {
+     sources -= [
+       "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp",
+       "//third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp",
+@@ -436,14 +436,14 @@ component("skia") {
+ 
+   # Add the files for the SkFontMgr_Android. This is used to emulate android
+   # fonts on linux. See content/zygote/zygote_main_linux.cc
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [
+       "//third_party/skia/src/ports/SkFontMgr_android.cpp",
+       "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp",
+     ]
+   }
+ 
+-  if (!is_linux && !is_android) {
++  if (!is_linux && !is_bsd && !is_android) {
+     sources -= [
+       "//third_party/skia/src/ports/SkFontHost_FreeType.cpp",
+       "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp",
+@@ -482,7 +482,7 @@ component("skia") {
+     "//base/third_party/dynamic_annotations",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     if (use_pango) {
+       configs += [ "//build/config/linux/pangocairo" ]
+     }
diff --git a/chromium-new/patches/patch-skia_ext_SkMemory__new__handler.cpp b/chromium-new/patches/patch-skia_ext_SkMemory__new__handler.cpp
index ed93bf4..3100519 100644
--- a/chromium-new/patches/patch-skia_ext_SkMemory__new__handler.cpp
+++ b/chromium-new/patches/patch-skia_ext_SkMemory__new__handler.cpp
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- skia/ext/SkMemory_new_handler.cpp.orig	2016-06-24 01:02:27.000000000 +0000
+--- skia/ext/SkMemory_new_handler.cpp.orig	2016-11-10 20:02:16.000000000 +0000
 +++ skia/ext/SkMemory_new_handler.cpp
-@@ -62,7 +62,7 @@ static void* sk_malloc_nothrow(size_t si
+@@ -68,7 +68,7 @@ static void* sk_malloc_nothrow(size_t si
      // TODO(b.kelemen): we should always use UncheckedMalloc but currently it
      // doesn't work as intended everywhere.
      void* result;
@@ -11,7 +11,7 @@ $NetBSD$
      result = malloc(size);
  #else
      // It's the responsibility of the caller to check the return value.
-@@ -89,7 +89,7 @@ void* sk_calloc(size_t size) {
+@@ -95,7 +95,7 @@ void* sk_calloc(size_t size) {
      // TODO(b.kelemen): we should always use UncheckedCalloc but currently it
      // doesn't work as intended everywhere.
      void* result;
diff --git a/chromium-new/patches/patch-skia_ext_platform__canvas.h b/chromium-new/patches/patch-skia_ext_platform__canvas.h
index 43ddd5d..5296ada 100644
--- a/chromium-new/patches/patch-skia_ext_platform__canvas.h
+++ b/chromium-new/patches/patch-skia_ext_platform__canvas.h
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- skia/ext/platform_canvas.h.orig	2016-06-24 01:02:27.000000000 +0000
+--- skia/ext/platform_canvas.h.orig	2016-11-10 20:02:16.000000000 +0000
 +++ skia/ext/platform_canvas.h
-@@ -71,7 +71,7 @@ enum OnFailureType {
+@@ -73,7 +73,7 @@ enum OnFailureType {
                                          uint8_t* context,
                                          OnFailureType failure_type);
  #elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
 -      defined(__sun) || defined(ANDROID)
-+      defined(__sun) || defined(ANDROID) || defined(OS_NETBSD)
++      defined(__sun) || defined(ANDROID) || defined(__NetBSD__)
    // Linux ---------------------------------------------------------------------
  
    // Construct a canvas from the given memory region. The memory is not cleared
diff --git a/chromium-new/patches/patch-skia_skia__chrome.gypi b/chromium-new/patches/patch-skia_skia__chrome.gypi
deleted file mode 100644
index ea1404d..0000000
--- a/chromium-new/patches/patch-skia_skia__chrome.gypi
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- skia/skia_chrome.gypi.orig	2016-06-24 01:02:27.000000000 +0000
-+++ skia/skia_chrome.gypi
-@@ -61,6 +61,11 @@
-         'ext/platform_canvas.cc',
-       ],
-     }],
-+    [ 'use_cairo == 1', {
-+      'dependencies': [
-+        '../build/linux/system.gyp:pangocairo',
-+      ],
-+    }],
-     [ 'OS == "android" and '
-       'enable_basic_printing==0 and enable_print_preview==0', {
-       'sources!': [
diff --git a/chromium-new/patches/patch-skia_skia__common.gypi b/chromium-new/patches/patch-skia_skia__common.gypi
deleted file mode 100644
index 0dc791f..0000000
--- a/chromium-new/patches/patch-skia_skia__common.gypi
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- skia/skia_common.gypi.orig	2016-06-24 01:02:27.000000000 +0000
-+++ skia/skia_common.gypi
-@@ -65,7 +65,7 @@
-     }],
- 
-     #Settings for text blitting, chosen to approximate the system browser.
--    [ 'OS == "linux"', {
-+    [ 'OS == "linux" or os_bsd == 1', {
-       'defines': [
-         'SK_GAMMA_EXPONENT=1.2',
-         'SK_GAMMA_CONTRAST=0.2',
diff --git a/chromium-new/patches/patch-sync_util_get__session__name.cc b/chromium-new/patches/patch-sync_util_get__session__name.cc
deleted file mode 100644
index 5b3764b..0000000
--- a/chromium-new/patches/patch-sync_util_get__session__name.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- sync/util/get_session_name.cc.orig	2016-06-24 01:02:27.000000000 +0000
-+++ sync/util/get_session_name.cc
-@@ -15,7 +15,7 @@
- 
- #if defined(OS_CHROMEOS)
- #include "chromeos/system/devicetype.h"
--#elif defined(OS_LINUX)
-+#elif (defined(OS_LINUX) || defined(OS_BSD))
- #include "sync/util/get_session_name_linux.h"
- #elif defined(OS_IOS)
- #include "sync/util/get_session_name_ios.h"
-@@ -51,7 +51,7 @@ std::string GetSessionNameSynchronously(
-       session_name = "Chromebook";
-       break;
-   }
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-   session_name = internal::GetHostname();
- #elif defined(OS_IOS)
-   session_name = internal::GetComputerName();
diff --git a/chromium-new/patches/patch-sync_util_get__session__name__linux.cc b/chromium-new/patches/patch-sync_util_get__session__name__linux.cc
deleted file mode 100644
index 10c450c..0000000
--- a/chromium-new/patches/patch-sync_util_get__session__name__linux.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- sync/util/get_session_name_linux.cc.orig	2016-06-24 01:02:27.000000000 +0000
-+++ sync/util/get_session_name_linux.cc
-@@ -13,8 +13,9 @@ namespace syncer {
- namespace internal {
- 
- std::string GetHostname() {
--  char hostname[HOST_NAME_MAX];
--  if (gethostname(hostname, HOST_NAME_MAX) == 0)  // Success.
-+  int len = sysconf(_SC_HOST_NAME_MAX);
-+  char hostname[len];
-+  if (gethostname(hostname, len) == 0)  // Success.
-     return hostname;
-   return base::GetLinuxDistro();
- }
diff --git a/chromium-new/patches/patch-testing_gtest_src_gtest.cc b/chromium-new/patches/patch-testing_gtest_src_gtest.cc
deleted file mode 100644
index 05bf03d..0000000
--- a/chromium-new/patches/patch-testing_gtest_src_gtest.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- testing/gtest/src/gtest.cc.orig	2016-06-24 01:03:28.000000000 +0000
-+++ testing/gtest/src/gtest.cc
-@@ -122,6 +122,10 @@
- 
- #endif  // GTEST_OS_LINUX
- 
-+#if GTEST_OS_FREEBSD
-+# include <sys/socket.h>
-+#endif
-+
- #if GTEST_HAS_EXCEPTIONS
- # include <stdexcept>
- #endif
-@@ -1930,7 +1934,7 @@ bool String::CaseInsensitiveWideCStringE
- 
- #if GTEST_OS_WINDOWS
-   return _wcsicmp(lhs, rhs) == 0;
--#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID
-+#elif GTEST_OS_LINUX && !GTEST_OS_LINUX_ANDROID && !GTEST_OS_FREEBSD
-   return wcscasecmp(lhs, rhs) == 0;
- #else
-   // Android, Mac OS X and Cygwin don't define wcscasecmp.
diff --git a/chromium-new/patches/patch-testing_perf_perf__test.cc b/chromium-new/patches/patch-testing_perf_perf__test.cc
deleted file mode 100644
index 92a5462..0000000
--- a/chromium-new/patches/patch-testing_perf_perf__test.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- testing/perf/perf_test.cc.orig	2016-06-24 01:02:27.000000000 +0000
-+++ testing/perf/perf_test.cc
-@@ -2,10 +2,10 @@
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- 
--#include "testing/perf/perf_test.h"
--
- #include <stdio.h>
- 
-+#include "testing/perf/perf_test.h"
-+
- #include "base/logging.h"
- #include "base/strings/string_number_conversions.h"
- #include "base/strings/stringprintf.h"
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
index 39a0f9c..cb367ad 100644
--- a/chromium-new/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp.orig	2016-06-24 01:02:44.000000000 +0000
+--- third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp.orig	2016-11-10 20:02:25.000000000 +0000
 +++ third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
-@@ -43,6 +43,8 @@
+@@ -46,6 +46,8 @@
  
  #if OS(WIN)
  #include <malloc.h>
-+#elif OS(FREEBSD) || defined(OS_NETBSD)
++#elif OS(FREEBSD) || OS(NETBSD)
 +#include <stdlib.h>
  #else
  #include <alloca.h>
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_core_BUILD.gn b/chromium-new/patches/patch-third__party_WebKit_Source_core_BUILD.gn
new file mode 100644
index 0000000..f70bbbf
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_core_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/core/BUILD.gn.orig	2016-11-10 20:02:25.000000000 +0000
++++ third_party/WebKit/Source/core/BUILD.gn
+@@ -282,7 +282,7 @@ target(link_target_type, "remaining") {
+     ]
+   }
+ 
+-  if (!is_linux) {
++  if (!(is_linux || is_bsd)) {
+     sources -= [
+       "layout/LayoutThemeLinux.cpp",
+       "layout/LayoutThemeLinux.h",
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_core_core.gyp b/chromium-new/patches/patch-third__party_WebKit_Source_core_core.gyp
deleted file mode 100644
index 29697d8..0000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_core_core.gyp
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/core/core.gyp.orig	2016-06-24 01:02:44.000000000 +0000
-+++ third_party/WebKit/Source/core/core.gyp
-@@ -372,7 +372,7 @@
-             'layout/LayoutThemeMac.mm',
-           ],
-         }],
--        ['OS != "linux"', {
-+        ['OS != "linux" and os_bsd != 1', {
-           'sources!': [
-             'layout/LayoutThemeLinux.cpp',
-             'layout/LayoutThemeLinux.h',
-@@ -644,7 +644,7 @@
-                 'layout/LayoutThemeMac.mm',
-               ],
-             }],
--            ['OS != "linux"', {
-+            ['OS != "linux" and OS != "openbsd" and OS != "freebsd"', {
-               'sources!': [
-                 'layout/LayoutThemeLinux.cpp',
-                 'layout/LayoutThemeLinux.h',
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_modules_battery_battery__status.h b/chromium-new/patches/patch-third__party_WebKit_Source_modules_battery_battery__status.h
deleted file mode 100644
index 223cca6..0000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_modules_battery_battery__status.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/modules/battery/battery_status.h.orig	2016-06-24 01:02:46.000000000 +0000
-+++ third_party/WebKit/Source/modules/battery/battery_status.h
-@@ -46,7 +46,7 @@ class MODULES_EXPORT BatteryStatus final
-     // of reducing the possibility of fingerprinting and triggers less level
-     // change events on platforms where the granularity is high.
-     ASSERT(level >= 0 && level <= 1);
--    return std::round(level * 100) / 100.f;
-+    return round(level * 100) / 100.f;
-   }
- 
-   bool charging_;
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_blink__platform.gyp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_blink__platform.gyp
deleted file mode 100644
index 88a1af5..0000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_blink__platform.gyp
+++ /dev/null
@@ -1,44 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/blink_platform.gyp.orig	2016-06-24 01:02:46.000000000 +0000
-+++ third_party/WebKit/Source/platform/blink_platform.gyp
-@@ -38,6 +38,9 @@
-   'targets': [{
-     'target_name': 'blink_common',
-     'type': '<(component)',
-+    'include_dirs': [
-+      '<(prefix_dir)/include',
-+    ],
-     'variables': { 'enable_wexit_time_destructors': 1 },
-     'dependencies': [
-       '../config.gyp:config',
-@@ -222,7 +225,7 @@
-           ['include', 'graphics/cpu/x86/WebGLImageConversionSSE\\.h$'],
-         ],
-       }],
--      ['OS=="linux" or OS=="android"', {
-+      ['OS=="linux" or OS=="android" or os_bsd==1', {
-         'sources/': [
-           ['include', 'fonts/linux/FontPlatformDataLinux\\.cpp$'],
-         ]
-@@ -301,7 +304,7 @@
-           ['exclude', 'scroll/ScrollbarThemeMac'],
-         ],
-       }],
--      ['OS != "linux" and OS != "mac" and OS != "win"', {
-+      ['OS != "linux" and OS != "mac" and OS != "win" and os_bsd != 1', {
-         'sources/': [
-           ['exclude', 'VDMX[^/]+\\.(cpp|h)$'],
-         ],
-@@ -347,6 +350,11 @@
-           ['exclude', 'scroll/ScrollbarThemeAura\\.(cpp|h)'],
-         ],
-       }],
-+      ['use_system_icu==1', {
-+        'defines': [
-+          'USING_SYSTEM_ICU',
-+        ],
-+      }],
-       ['"WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
-         'include_dirs': [
-           '<(DEPTH)/third_party/ffmpeg',
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp
index b07ba91..99a8945 100644
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- third_party/WebKit/Source/platform/fonts/FontCache.cpp.orig	2016-06-24 01:02:46.000000000 +0000
+--- third_party/WebKit/Source/platform/fonts/FontCache.cpp.orig	2016-11-10 20:02:26.000000000 +0000
 +++ third_party/WebKit/Source/platform/fonts/FontCache.cpp
-@@ -59,13 +59,13 @@ using namespace WTF;
+@@ -61,13 +61,13 @@ using namespace WTF;
  
  namespace blink {
  
@@ -16,5 +16,5 @@ $NetBSD$
 -#endif // !OS(WIN) && !OS(LINUX)
 +#endif // !OS(WIN) && !OS(LINUX) && !OS(FREEBSD) && !OS(OPENBSD) && !OS(NETBSD)
  
- typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCacheKeyTraits> FontPlatformDataCache;
- typedef HashMap<FallbackListCompositeKey, OwnPtr<ShapeCache>, FallbackListCompositeKeyHash, FallbackListCompositeKeyTraits> FallbackListShaperCache;
+ typedef HashMap<unsigned, std::unique_ptr<FontPlatformData>, WTF::IntHash<unsigned>, WTF::UnsignedWithZeroKeyHashTraits<unsigned>> SizedFontPlatformDataSet;
+ typedef HashMap<FontCacheKey, SizedFontPlatformDataSet, FontCacheKeyHash, FontCacheKeyTraits> FontPlatformDataCache;
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h
index 7d12f4f..0977593 100644
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- third_party/WebKit/Source/platform/fonts/FontCache.h.orig	2016-06-24 01:02:46.000000000 +0000
+--- third_party/WebKit/Source/platform/fonts/FontCache.h.orig	2016-11-10 20:02:26.000000000 +0000
 +++ third_party/WebKit/Source/platform/fonts/FontCache.h
-@@ -174,7 +174,7 @@ private:
+@@ -179,7 +179,7 @@ private:
      // Implemented on skia platforms.
      PassRefPtr<SkTypeface> createTypeface(const FontDescription&, const FontFaceCreationParams&, CString& name);
  
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp
index 772f5ed..c5bfc45 100644
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp
@@ -1,13 +1,49 @@
 $NetBSD$
 
---- third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp.orig	2016-06-24 01:02:46.000000000 +0000
+--- third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp.orig	2016-11-10 20:02:26.000000000 +0000
 +++ third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
-@@ -357,7 +357,7 @@ PassRefPtr<SharedBuffer> FontPlatformDat
- {
-     RefPtr<SharedBuffer> buffer;
+@@ -93,7 +93,7 @@ FontPlatformData::FontPlatformData(const
+     , m_syntheticBold(source.m_syntheticBold)
+     , m_syntheticItalic(source.m_syntheticItalic)
+     , m_orientation(source.m_orientation)
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+     , m_style(source.m_style)
+ #endif
+     , m_harfBuzzFace(nullptr)
+@@ -115,7 +115,7 @@ FontPlatformData::FontPlatformData(const
+     , m_syntheticBold(src.m_syntheticBold)
+     , m_syntheticItalic(src.m_syntheticItalic)
+     , m_orientation(src.m_orientation)
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+     , m_style(FontRenderStyle::querySystem(m_family, m_textSize, m_typeface->style()))
+ #endif
+     , m_harfBuzzFace(nullptr)
+@@ -142,7 +142,7 @@ FontPlatformData::FontPlatformData(PassR
+     , m_syntheticBold(syntheticBold)
+     , m_syntheticItalic(syntheticItalic)
+     , m_orientation(orientation)
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+     , m_style(FontRenderStyle::querySystem(m_family, m_textSize, m_typeface->style()))
+ #endif
+     , m_isHashTableDeletedValue(false)
+@@ -188,7 +188,7 @@ const FontPlatformData& FontPlatformData
+     m_syntheticItalic = other.m_syntheticItalic;
+     m_harfBuzzFace = nullptr;
+     m_orientation = other.m_orientation;
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+     m_style = other.m_style;
+ #endif
  
--    SkFontTableTag tag = WTF::bswap32(table);
-+    SkFontTableTag tag = bswap32(table);
-     const size_t tableSize = m_typeface->getTableSize(tag);
-     if (tableSize) {
-         Vector<char> tableBuffer(tableSize);
+@@ -216,7 +216,7 @@ bool FontPlatformData::operator==(const 
+         && m_isHashTableDeletedValue == a.m_isHashTableDeletedValue
+         && m_syntheticBold == a.m_syntheticBold
+         && m_syntheticItalic == a.m_syntheticItalic
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+         && m_style == a.m_style
+ #endif
+         && m_orientation == a.m_orientation;
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h
new file mode 100644
index 0000000..a2f423a
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h
@@ -0,0 +1,34 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/fonts/FontPlatformData.h.orig	2016-11-10 20:02:26.000000000 +0000
++++ third_party/WebKit/Source/platform/fonts/FontPlatformData.h
+@@ -46,9 +46,9 @@
+ #include "wtf/text/CString.h"
+ #include "wtf/text/StringImpl.h"
+ 
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+ #include "platform/fonts/linux/FontRenderStyle.h"
+-#endif // OS(LINUX) || OS(ANDROID)
++#endif // OS(LINUX) || OS(ANDROID) || OS(BSD)
+ 
+ #if OS(MACOSX)
+ OBJC_CLASS NSFont;
+@@ -126,7 +126,7 @@ public:
+     PassRefPtr<OpenTypeVerticalData> verticalData() const;
+     PassRefPtr<SharedBuffer> openTypeTable(SkFontTableTag) const;
+ 
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+     // The returned styles are all actual styles without FontRenderStyle::NoPreference.
+     const FontRenderStyle& getFontRenderStyle() const { return m_style; }
+ #endif
+@@ -152,7 +152,7 @@ public:
+     bool m_syntheticItalic;
+     FontOrientation m_orientation;
+ private:
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+     FontRenderStyle m_style;
+ #endif
+ 
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp
new file mode 100644
index 0000000..c0f4a88
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp.orig	2016-11-10 20:02:26.000000000 +0000
++++ third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
+@@ -51,7 +51,7 @@ namespace blink {
+ const float smallCapsFontSizeMultiplier = 0.7f;
+ const float emphasisMarkFontSizeMultiplier = 0.5f;
+ 
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+ // This is the largest VDMX table which we'll try to load and parse.
+ static const size_t maxVDMXTableSize = 1024 * 1024; // 1 MB
+ #endif
+@@ -102,7 +102,7 @@ void SimpleFontData::platformInit()
+     int vdmxAscent = 0, vdmxDescent = 0;
+     bool isVDMXValid = false;
+ 
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+     // Manually digging up VDMX metrics is only applicable when bytecode hinting using FreeType.
+     // With DirectWrite or CoreText, no bytecode hinting is ever done.
+     // This code should be pushed into FreeType (hinted font metrics).
+@@ -135,7 +135,7 @@ void SimpleFontData::platformInit()
+     } else {
+         ascent = SkScalarRoundToInt(-metrics.fAscent);
+         descent = SkScalarRoundToInt(metrics.fDescent);
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+         // When subpixel positioning is enabled, if the descent is rounded down, the descent part
+         // of the glyph may be truncated when displayed in a 'overflow: hidden' container.
+         // To avoid that, borrow 1 unit from the ascent when possible.
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp
index 2be78bc..4d2375d 100644
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp
@@ -1,31 +1,22 @@
 $NetBSD$
 
---- third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp.orig	2016-06-24 01:02:46.000000000 +0000
+--- third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp.orig	2016-11-10 20:02:26.000000000 +0000
 +++ third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp
-@@ -60,7 +60,7 @@ static PassRefPtr<SkTypeface> typefaceFo
+@@ -62,7 +62,7 @@ static PassRefPtr<SkTypeface> typefaceFo
  
  namespace blink {
  
 -#if OS(ANDROID) || OS(LINUX)
-+#if OS(ANDROID) || OS(LINUX) || OS(FREEBSD) || OS(NETBSD)
++#if OS(ANDROID) || OS(LINUX) || OS(BSD)
  // Android special locale for retrieving the color emoji font
  // based on the proposed changes in UTR #51 for introducing
  // an Emoji script code:
-@@ -171,7 +171,7 @@ PassRefPtr<SimpleFontData> FontCache::ge
-     return fontDataFromFontPlatformData(fontPlatformData, shouldRetain);
- }
- 
--#if OS(WIN) || OS(LINUX)
-+#if OS(WIN) || OS(LINUX) || OS(FREEBSD) || OS(NETBSD)
- static inline SkFontStyle fontStyle(const FontDescription& fontDescription)
- {
-     int width = static_cast<int>(fontDescription.stretch());
-@@ -232,7 +232,7 @@ PassRefPtr<SkTypeface> FontCache::create
+@@ -183,7 +183,7 @@ PassRefPtr<SkTypeface> FontCache::create
      }
  #endif
  
--#if OS(LINUX)
-+#if OS(LINUX) || OS(FREEBSD) || OS(NETBSD)
+-#if OS(LINUX) || OS(WIN)
++#if OS(LINUX) || OS(WIN) || OS(BSD)
      // On linux if the fontManager has been overridden then we should be calling the embedder
      // provided font Manager rather than calling SkTypeface::CreateFromName which may redirect the
      // call to the default font Manager.
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp
index 19819bb..757d1f7 100644
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/WebKit/Source/platform/heap/GCInfo.cpp.orig	2016-06-24 01:02:46.000000000 +0000
+--- third_party/WebKit/Source/platform/heap/GCInfo.cpp.orig	2016-11-10 20:02:27.000000000 +0000
 +++ third_party/WebKit/Source/platform/heap/GCInfo.cpp
 @@ -7,6 +7,8 @@
  #include "platform/heap/Handle.h"
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp
index bdb6eb3..95f594e 100644
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp.orig	2016-06-24 01:02:46.000000000 +0000
+--- third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp.orig	2016-11-10 20:02:27.000000000 +0000
 +++ third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
 @@ -6,6 +6,10 @@
  
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_image-decoders_png_PNGImageDecoder.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_image-decoders_png_PNGImageDecoder.cpp
deleted file mode 100644
index 3f80ba2..0000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_image-decoders_png_PNGImageDecoder.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp.orig	2016-06-24 01:02:46.000000000 +0000
-+++ third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp
-@@ -234,7 +234,7 @@ void PNGImageDecoder::headerAvailable()
- #endif
-             png_uint_32 profileLength = 0;
-             if (png_get_iCCP(png, info, &profileName, &compressionType, &profile, &profileLength)) {
--                setColorProfileAndTransform(profile, profileLength, imageHasAlpha, false /* useSRGB */);
-+                setColorProfileAndTransform(reinterpret_cast<const char*>(profile), profileLength, imageHasAlpha, false /* useSRGB */);
-             }
-         }
- #endif // PNG_iCCP_SUPPORTED
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_text_Character.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_text_Character.cpp
deleted file mode 100644
index 7891d25..0000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_text_Character.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/text/Character.cpp.orig	2016-06-24 01:02:46.000000000 +0000
-+++ third_party/WebKit/Source/platform/text/Character.cpp
-@@ -36,8 +36,8 @@
- #include <unicode/uobject.h>
- #include <unicode/uscript.h>
- 
--#if defined(USING_SYSTEM_ICU)
--#include "platform/fonts/CharacterPropertyDataGenerator.h"
-+#if defined(__FreeBSD__)
-+#include "platform/text/CharacterPropertyDataGenerator.h"
- #include <unicode/uniset.h>
- #else
- #define MUTEX_H // Prevent compile failure of utrie2.h on Windows
-@@ -49,7 +49,7 @@ using namespace Unicode;
- 
- namespace blink {
- 
--#if defined(USING_SYSTEM_ICU)
-+#if defined(__FreeBSD__)
- static icu::UnicodeSet* createUnicodeSet(
-     const UChar32* characters, size_t charactersCount,
-     const UChar32* ranges, size_t rangesCount)
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_platform_text_CharacterPropertyDataGenerator.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_platform_text_CharacterPropertyDataGenerator.cpp
deleted file mode 100644
index e1600bc..0000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_text_CharacterPropertyDataGenerator.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp.orig	2016-06-24 01:02:46.000000000 +0000
-+++ third_party/WebKit/Source/platform/text/CharacterPropertyDataGenerator.cpp
-@@ -11,12 +11,12 @@
- #include <cassert>
- #include <cstring>
- #include <stdio.h>
--#if !defined(USING_SYSTEM_ICU)
-+#if !defined(__FreeBSD__)
- #define MUTEX_H // Prevent compile failure of utrie2.h on Windows
- #include <utrie2.h>
- #endif
- 
--#if defined(USING_SYSTEM_ICU)
-+#if defined(__FreeBSD__)
- static void generate(FILE*)
- {
- }
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp
new file mode 100644
index 0000000..50212b6
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/web/PopupMenuImpl.cpp.orig	2016-11-10 20:02:27.000000000 +0000
++++ third_party/WebKit/Source/web/PopupMenuImpl.cpp
+@@ -156,7 +156,7 @@ public:
+         , m_buffer(buffer)
+     {
+         DCHECK(m_buffer);
+-#if OS(LINUX)
++#if OS(LINUX) || OS(BSD)
+         // On other platforms, the <option> background color is the same as the
+         // <select> background color. On Linux, that makes the <option>
+         // background color very dark, so by default, try to use a lighter
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_web_web.gyp b/chromium-new/patches/patch-third__party_WebKit_Source_web_web.gyp
deleted file mode 100644
index 5f57b4a..0000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_web_web.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/web/web.gyp.orig	2016-06-24 01:02:47.000000000 +0000
-+++ third_party/WebKit/Source/web/web.gyp
-@@ -118,7 +118,7 @@
-                         '../core/core.gyp:webcore',
-                      ],
-                 }],
--                ['OS == "linux"', {
-+                ['OS == "linux" or os_bsd == 1', {
-                     'dependencies': [
-                         '<(DEPTH)/build/linux/system.gyp:fontconfig',
-                     ],
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp
new file mode 100644
index 0000000..6450fc0
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/Assertions.cpp.orig	2016-11-10 20:02:27.000000000 +0000
++++ third_party/WebKit/Source/wtf/Assertions.cpp
+@@ -59,7 +59,7 @@
+ #include <windows.h>
+ #endif
+ 
+-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
++#if OS(MACOSX) || ((OS(LINUX) || OS(BSD)) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -163,7 +163,7 @@ void WTFReportAssertionFailure(const cha
+ 
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
++#if OS(MACOSX) || ((OS(LINUX) || OS(BSD)) && !defined(__UCLIBC__))
+     *size = backtrace(stack, *size);
+ #elif OS(WIN)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+@@ -214,7 +214,7 @@ FrameToNameScope::FrameToNameScope(void*
+     : m_name(0)
+     , m_cxaDemangled(0)
+ {
+-#if OS(MACOSX) || (OS(LINUX) && !defined(__UCLIBC__))
++#if OS(MACOSX) || ((OS(LINUX) || OS(BSD)) && !defined(__UCLIBC__))
+     Dl_info info;
+     if (!dladdr(addr, &info) || !info.dli_sname)
+         return;
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_Atomics.h b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_Atomics.h
new file mode 100644
index 0000000..f4a1c61
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_Atomics.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/Atomics.h.orig	2016-11-10 20:02:27.000000000 +0000
++++ third_party/WebKit/Source/wtf/Atomics.h
+@@ -137,7 +137,7 @@ ALWAYS_INLINE void atomicSetOneToZero(in
+ #if defined(THREAD_SANITIZER)
+ // The definitions below assume an LP64 data model. This is fine because
+ // TSan is only supported on x86_64 Linux.
+-#if CPU(64BIT) && OS(LINUX)
++#if CPU(64BIT) && (OS(LINUX) || OS(BSD))
+ ALWAYS_INLINE void releaseStore(volatile int* ptr, int value)
+ {
+     __tsan_atomic32_store(ptr, value, __tsan_memory_order_release);
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h
index e721302..554fb7d 100644
--- a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/WebKit/Source/wtf/ByteSwap.h.orig	2016-06-24 01:02:47.000000000 +0000
+--- third_party/WebKit/Source/wtf/ByteSwap.h.orig	2016-11-10 20:02:27.000000000 +0000
 +++ third_party/WebKit/Source/wtf/ByteSwap.h
 @@ -52,9 +52,15 @@ ALWAYS_INLINE uint16_t bswap16(uint16_t 
  
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h
new file mode 100644
index 0000000..e75c30b
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/ContainerAnnotations.h.orig	2016-11-10 20:02:27.000000000 +0000
++++ third_party/WebKit/Source/wtf/ContainerAnnotations.h
+@@ -10,7 +10,7 @@
+ 
+ // TODO(ochang): Remove the CPU(X86_64) condition to enable this for X86 once
+ // the crashes there have been fixed: http://crbug.com/461406
+-#if defined(ADDRESS_SANITIZER) && OS(LINUX) && CPU(X86_64)
++#if defined(ADDRESS_SANITIZER) && (OS(LINUX) || OS(BSD)) && CPU(X86_64)
+ #define ANNOTATE_CONTIGUOUS_CONTAINER
+ #define ANNOTATE_NEW_BUFFER(buffer, capacity, newSize) \
+     if (buffer) { \
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp
new file mode 100644
index 0000000..622c154
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/ThreadingPthreads.cpp.orig	2016-11-10 20:02:27.000000000 +0000
++++ third_party/WebKit/Source/wtf/ThreadingPthreads.cpp
+@@ -49,11 +49,15 @@
+ #include <objc/objc-auto.h>
+ #endif
+ 
+-#if OS(LINUX)
++#if OS(LINUX) || OS(BSD)
+ #include <sys/syscall.h>
+ #endif
+ 
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(BSD) && !defined(__NetBSD__)
++#include <pthread_np.h>
++#endif
++
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+ #include <unistd.h>
+ #endif
+ 
+@@ -95,6 +99,8 @@ ThreadIdentifier currentThread()
+     return pthread_mach_thread_np(pthread_self());
+ #elif OS(LINUX)
+     return syscall(__NR_gettid);
++#elif defined(__FreeBSD__)
++    return pthread_getthreadid_np();
+ #elif OS(ANDROID)
+     return gettid();
+ #else
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_wtf.gyp b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_wtf.gyp
deleted file mode 100644
index cb9cac8..0000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_wtf.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/wtf/wtf.gyp.orig	2016-06-24 01:02:47.000000000 +0000
-+++ third_party/WebKit/Source/wtf/wtf.gyp
-@@ -57,7 +57,7 @@
-       'target_name': 'wtf',
-       'type': '<(component)',
-       'include_dirs': [
--        '..',
-+        '..', '<(prefix_dir)/include',
-       ],
-       'dependencies': [
-           'wtf_config',
diff --git a/chromium-new/patches/patch-third__party_angle_src_tests_BUILD.gn b/chromium-new/patches/patch-third__party_angle_src_tests_BUILD.gn
new file mode 100644
index 0000000..9d8f184
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_angle_src_tests_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/angle/src/tests/BUILD.gn.orig	2016-11-10 20:02:57.000000000 +0000
++++ third_party/angle/src/tests/BUILD.gn
+@@ -41,7 +41,7 @@ test("angle_unittests") {
+   ]
+ }
+ 
+-if (is_win || is_linux || is_mac || is_android) {
++if (is_win || is_linux || is_mac || is_android || is_bsd) {
+   end2end_gypi = exec_script("//build/gypi_to_gn.py",
+                              [
+                                rebase_path("angle_end2end_tests.gypi"),
diff --git a/chromium-new/patches/patch-third__party_boringssl_BUILD.gn b/chromium-new/patches/patch-third__party_boringssl_BUILD.gn
new file mode 100644
index 0000000..56803ce
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_boringssl_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/boringssl/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/boringssl/BUILD.gn
+@@ -88,7 +88,7 @@ if (is_win && !is_msan) {
+     } else if (current_cpu == "x64") {
+       if (is_mac) {
+         sources += crypto_sources_mac_x86_64
+-      } else if (is_linux || is_android) {
++      } else if (is_linux || is_bsd || is_android) {
+         sources += crypto_sources_linux_x86_64
+       } else {
+         public_configs = [ ":no_asm_config" ]
+@@ -96,14 +96,14 @@ if (is_win && !is_msan) {
+     } else if (current_cpu == "x86") {
+       if (is_mac) {
+         sources += crypto_sources_mac_x86
+-      } else if (is_linux || is_android) {
++      } else if (is_linux || is_bsd || is_android) {
+         sources += crypto_sources_linux_x86
+       } else {
+         public_configs = [ ":no_asm_config" ]
+       }
+-    } else if (current_cpu == "arm" && (is_linux || is_android)) {
++    } else if (current_cpu == "arm" && (is_linux || is_bsd || is_android)) {
+       sources += crypto_sources_linux_arm
+-    } else if (current_cpu == "arm64" && (is_linux || is_android)) {
++    } else if (current_cpu == "arm64" && (is_linux || is_bsd || is_android)) {
+       sources += crypto_sources_linux_aarch64
+ 
+       # TODO(davidben): Remove explicit arch flag once https://crbug.com/576858
diff --git a/chromium-new/patches/patch-third__party_boringssl_src_crypto_bio_internal.h b/chromium-new/patches/patch-third__party_boringssl_src_crypto_bio_internal.h
deleted file mode 100644
index 3ecc1e8..0000000
--- a/chromium-new/patches/patch-third__party_boringssl_src_crypto_bio_internal.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- third_party/boringssl/src/crypto/bio/internal.h.orig	2016-06-24 01:03:30.000000000 +0000
-+++ third_party/boringssl/src/crypto/bio/internal.h
-@@ -59,6 +59,10 @@
- 
- #include <openssl/base.h>
- 
-+#if defined(__NetBSD__)
-+#define _NETBSD_SOURCE 1
-+#endif
-+
- #if !defined(OPENSSL_WINDOWS)
- #if defined(OPENSSL_PNACL)
- /* newlib uses u_short in socket.h without defining it. */
diff --git a/chromium-new/patches/patch-third__party_boringssl_src_crypto_cipher_e__chacha20poly1305.c b/chromium-new/patches/patch-third__party_boringssl_src_crypto_cipher_e__chacha20poly1305.c
deleted file mode 100644
index 1a61366..0000000
--- a/chromium-new/patches/patch-third__party_boringssl_src_crypto_cipher_e__chacha20poly1305.c
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- third_party/boringssl/src/crypto/cipher/e_chacha20poly1305.c.orig	2016-06-24 01:03:30.000000000 +0000
-+++ third_party/boringssl/src/crypto/cipher/e_chacha20poly1305.c
-@@ -93,7 +93,11 @@ static void aead_poly1305(aead_poly1305_
-                           const uint8_t nonce[12], const uint8_t *ad,
-                           size_t ad_len, const uint8_t *ciphertext,
-                           size_t ciphertext_len) {
-+#if defined(__NetBSD__)
-+  uint8_t poly1305_key[32] __attribute__((aligned(16)));
-+#else
-   alignas(16) uint8_t poly1305_key[32];
-+#endif
-   memset(poly1305_key, 0, sizeof(poly1305_key));
-   CRYPTO_chacha_20(poly1305_key, poly1305_key, sizeof(poly1305_key),
-                    c20_ctx->key, nonce, 0);
-@@ -134,7 +138,11 @@ static int seal_impl(aead_poly1305_updat
- 
-   CRYPTO_chacha_20(out, in, in_len, c20_ctx->key, nonce, 1);
- 
-+#if defined(__NetBSD__)
-+  uint8_t tag[POLY1305_TAG_LEN] __attribute__((aligned(16)));
-+#else
-   alignas(16) uint8_t tag[POLY1305_TAG_LEN];
-+#endif
-   aead_poly1305(poly1305_update, tag, c20_ctx, nonce, ad, ad_len, out, in_len);
- 
-   memcpy(out + in_len, tag, c20_ctx->tag_len);
-@@ -168,7 +176,11 @@ static int open_impl(aead_poly1305_updat
-   }
- 
-   plaintext_len = in_len - c20_ctx->tag_len;
-+#if defined(__NetBSD__)
-+  uint8_t tag[POLY1305_TAG_LEN] __attribute__((aligned(16)));
-+#else
-   alignas(16) uint8_t tag[POLY1305_TAG_LEN];
-+#endif
-   aead_poly1305(poly1305_update, tag, c20_ctx, nonce, ad, ad_len, in,
-                 plaintext_len);
-   if (CRYPTO_memcmp(tag, in + plaintext_len, c20_ctx->tag_len) != 0) {
diff --git a/chromium-new/patches/patch-third__party_boringssl_src_crypto_internal.h b/chromium-new/patches/patch-third__party_boringssl_src_crypto_internal.h
deleted file mode 100644
index ab3061b..0000000
--- a/chromium-new/patches/patch-third__party_boringssl_src_crypto_internal.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- third_party/boringssl/src/crypto/internal.h.orig	2016-06-24 01:03:30.000000000 +0000
-+++ third_party/boringssl/src/crypto/internal.h
-@@ -118,8 +118,10 @@
- #define alignof __alignof
- #endif
- #else
-+#if !defined(__NetBSD__)
- #include <stdalign.h>
- #endif
-+#endif
- 
- #if defined(OPENSSL_NO_THREADS)
- #elif defined(OPENSSL_WINDOWS)
diff --git a/chromium-new/patches/patch-third__party_boringssl_src_crypto_mem.c b/chromium-new/patches/patch-third__party_boringssl_src_crypto_mem.c
deleted file mode 100644
index 4260094..0000000
--- a/chromium-new/patches/patch-third__party_boringssl_src_crypto_mem.c
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- third_party/boringssl/src/crypto/mem.c.orig	2016-06-24 01:03:30.000000000 +0000
-+++ third_party/boringssl/src/crypto/mem.c
-@@ -56,6 +56,7 @@
- 
- #if !defined(_POSIX_C_SOURCE)
- #define _POSIX_C_SOURCE 201410L  /* needed for strdup, snprintf, vprintf etc */
-+#define _XOPEN_SOURCE
- #endif
- 
- #include <openssl/mem.h>
diff --git a/chromium-new/patches/patch-third__party_boringssl_src_crypto_poly1305_poly1305__vec.c b/chromium-new/patches/patch-third__party_boringssl_src_crypto_poly1305_poly1305__vec.c
deleted file mode 100644
index 2df431c..0000000
--- a/chromium-new/patches/patch-third__party_boringssl_src_crypto_poly1305_poly1305__vec.c
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD$
-
---- third_party/boringssl/src/crypto/poly1305/poly1305_vec.c.orig	2016-06-24 01:03:30.000000000 +0000
-+++ third_party/boringssl/src/crypto/poly1305/poly1305_vec.c
-@@ -22,6 +22,11 @@
- 
- #include "../internal.h"
- 
-+#if defined(__NetBSD__)
-+#define ALIGN(x) __attribute__((aligned(x)))
-+#else
-+#define ALIGN(x) alignas(x)
-+#endif
- 
- #if !defined(OPENSSL_WINDOWS) && defined(OPENSSL_X86_64)
- 
-@@ -33,10 +38,10 @@
- 
- typedef __m128i xmmi;
- 
--static const alignas(16) uint32_t poly1305_x64_sse2_message_mask[4] = {
-+static const ALIGN(16) uint32_t poly1305_x64_sse2_message_mask[4] = {
-     (1 << 26) - 1, 0, (1 << 26) - 1, 0};
--static const alignas(16) uint32_t poly1305_x64_sse2_5[4] = {5, 0, 5, 0};
--static const alignas(16) uint32_t poly1305_x64_sse2_1shl128[4] = {
-+static const ALIGN(16) uint32_t poly1305_x64_sse2_5[4] = {5, 0, 5, 0};
-+static const ALIGN(16) uint32_t poly1305_x64_sse2_1shl128[4] = {
-     (1 << 24), 0, (1 << 24), 0};
- 
- static inline uint128_t add128(uint128_t a, uint128_t b) { return a + b; }
diff --git a/chromium-new/patches/patch-third__party_boringssl_src_include_openssl_thread.h b/chromium-new/patches/patch-third__party_boringssl_src_include_openssl_thread.h
index 0409407..7652e24 100644
--- a/chromium-new/patches/patch-third__party_boringssl_src_include_openssl_thread.h
+++ b/chromium-new/patches/patch-third__party_boringssl_src_include_openssl_thread.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- third_party/boringssl/src/include/openssl/thread.h.orig	2016-06-24 01:03:31.000000000 +0000
+--- third_party/boringssl/src/include/openssl/thread.h.orig	2016-11-10 20:02:57.000000000 +0000
 +++ third_party/boringssl/src/include/openssl/thread.h
-@@ -87,6 +87,9 @@ typedef pthread_rwlock_t CRYPTO_MUTEX;
+@@ -88,6 +88,9 @@ typedef pthread_rwlock_t CRYPTO_MUTEX;
  typedef union crypto_mutex_st {
    double alignment;
    uint8_t padding[3*sizeof(int) + 5*sizeof(unsigned) + 16 + 8];
diff --git a/chromium-new/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h b/chromium-new/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h
index 03e7b2f..2a8409c 100644
--- a/chromium-new/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h
+++ b/chromium-new/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h.orig	2016-06-24 01:02:47.000000000 +0000
+--- third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h.orig	2016-11-10 20:02:28.000000000 +0000
 +++ third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
 @@ -334,6 +334,8 @@ class Status {
       */
diff --git a/chromium-new/patches/patch-third__party_cython_rules.gni b/chromium-new/patches/patch-third__party_cython_rules.gni
new file mode 100644
index 0000000..6a944cc
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_cython_rules.gni
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/cython/rules.gni.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/cython/rules.gni
+@@ -6,7 +6,7 @@ import("//build/toolchain/toolchain.gni"
+ 
+ template("python_binary_source_set") {
+   # Only available on linux for now.
+-  assert(is_linux)
++  assert(is_linux || is_bsd)
+   assert(defined(invoker.cython_sources) || defined(invoker.sources))
+ 
+   config_name = target_name + "_python_config"
+@@ -81,7 +81,7 @@ template("python_binary_source_set") {
+ 
+ template("python_binary_module") {
+   # Only available on linux for now.
+-  assert(is_linux)
++  assert(is_linux || is_bsd)
+ 
+   has_sources = defined(invoker.cython_sources) || defined(invoker.sources)
+ 
+@@ -92,7 +92,7 @@ template("python_binary_module") {
+   sources_target_name = target_name + "_cython_sources"
+   shared_library_name = target_name + "_shared_library"
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     shared_library_prefix = "lib"
+     shared_library_suffix = ".so"
+     python_module_suffix = ".so"
diff --git a/chromium-new/patches/patch-third__party_expat_BUILD.gn b/chromium-new/patches/patch-third__party_expat_BUILD.gn
new file mode 100644
index 0000000..61220a0
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_expat_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/expat/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/expat/BUILD.gn
+@@ -9,7 +9,7 @@ import("//testing/libfuzzer/fuzzer_test.
+ # let's not pull it in twice.
+ # Chromecast doesn't ship expat as a system library.
+ # Libfuzzer and AFL need to build library from sources.
+-if (is_linux && !is_chromecast && !use_libfuzzer && !use_afl) {
++if ((is_linux || is_bsd) && !is_chromecast && !use_libfuzzer && !use_afl) {
+   config("expat_config") {
+     libs = [ "expat" ]
+   }
diff --git a/chromium-new/patches/patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h b/chromium-new/patches/patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h
new file mode 100644
index 0000000..d51c075
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/ffmpeg/chromium/config/Chrome/netbsd/x64/config.h.orig	2016-11-28 20:15:28.378667842 +0000
++++ third_party/ffmpeg/chromium/config/Chrome/netbsd/x64/config.h
+@@ -318,7 +318,7 @@
+ #define HAVE_SLEEP 0
+ #define HAVE_STRERROR_R 1
+ #define HAVE_SYSCONF 1
+-#define HAVE_SYSCTL 1
++#define HAVE_SYSCTL 0
+ #define HAVE_USLEEP 1
+ #define HAVE_UTGETOSTYPEFROMSTRING 0
+ #define HAVE_VIRTUALALLOC 0
diff --git a/chromium-new/patches/patch-third__party_ffmpeg_chromium_scripts_generate__gyp.py b/chromium-new/patches/patch-third__party_ffmpeg_chromium_scripts_generate__gyp.py
index 5e56b31..72de20f 100644
--- a/chromium-new/patches/patch-third__party_ffmpeg_chromium_scripts_generate__gyp.py
+++ b/chromium-new/patches/patch-third__party_ffmpeg_chromium_scripts_generate__gyp.py
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/ffmpeg/chromium/scripts/generate_gyp.py.orig	2016-06-24 01:03:39.000000000 +0000
+--- third_party/ffmpeg/chromium/scripts/generate_gyp.py.orig	2016-11-10 20:02:58.000000000 +0000
 +++ third_party/ffmpeg/chromium/scripts/generate_gyp.py
 @@ -43,6 +43,8 @@ import sys
  COPYRIGHT = """# Copyright %d The Chromium Authors. All rights reserved.
diff --git a/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg.gyp b/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg.gyp
deleted file mode 100644
index 4161ff4..0000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg.gyp
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- third_party/ffmpeg/ffmpeg.gyp.orig	2016-06-24 01:03:39.000000000 +0000
-+++ third_party/ffmpeg/ffmpeg.gyp
-@@ -259,6 +259,15 @@
-               'cflags!': [
-                 '-fno-omit-frame-pointer',
-               ],
-+              # "Tomek" from freebsd-chromium@ figured this out, rene is
-+              # puzzled why this is needed. Fixes runtime on FreeBSD < 10
-+              'cflags_c': [
-+                '-fomit-frame-pointer',
-+              ],
-+              'cflags_cc': [
-+                '-fomit-frame-pointer',
-+              ],
-+              # back to upstream code
-               'debug_extra_cflags!': [
-                 '-fno-omit-frame-pointer',
-               ],
diff --git a/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni b/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
index 6609bf4..14d3b46 100644
--- a/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
+++ b/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
@@ -1,216 +1,216 @@
 $NetBSD$
 
---- third_party/ffmpeg/ffmpeg_generated.gni.orig	2016-06-24 01:03:39.000000000 +0000
+--- third_party/ffmpeg/ffmpeg_generated.gni.orig	2016-11-10 20:02:58.000000000 +0000
 +++ third_party/ffmpeg/ffmpeg_generated.gni
 @@ -12,7 +12,7 @@ ffmpeg_c_sources = []
  ffmpeg_gas_sources = []
  ffmpeg_yasm_sources = []
  
 -if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") 
|| (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") |
 | (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium"
 ) || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") 
|| (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_bra
 nding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "C
 hrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") 
|| (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && c
 urrent_cpu == "arm64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux 
 || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
    ffmpeg_c_sources += [
      "libavcodec/allcodecs.c",
      "libavcodec/autorename_libavcodec_utils.c",
-@@ -145,7 +145,7 @@ if ((is_android && current_cpu == "arm" 
+@@ -146,7 +146,7 @@ if ((is_android && current_cpu == "arm" 
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "
Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chr
 ome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_
cpu == "arm64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" &
 & ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || ((i
s_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrom
 ium") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
    ffmpeg_c_sources += [
      "libavcodec/h264pred.c",
      "libavcodec/hpeldsp.c",
-@@ -160,13 +160,13 @@ if ((is_linux && current_cpu == "arm" &&
+@@ -161,13 +161,13 @@ if ((is_linux && current_cpu == "arm" &&
    ]
  }
  
 -if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chr
omiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding 
 == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_br
anding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Ch
 rome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || 
((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "C
 hromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
    ffmpeg_c_sources += [
      "libavformat/rawdec.c",
    ]
  }
  
 -if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_l
inux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chrom
e") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_b
sd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
    ffmpeg_c_sources += [
      "libavcodec/aac_ac3_parser.c",
      "libavcodec/aac_parser.c",
-@@ -208,7 +208,7 @@ if ((is_android && current_cpu == "arm" 
+@@ -209,7 +209,7 @@ if ((is_android && current_cpu == "arm" 
    ]
  }
  
 -if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromi
um") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
-+if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chromium
OS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
++if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" 
&& ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
    ffmpeg_c_sources += [
      "libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c",
      "libavcodec/x86/constants.c",
-@@ -220,7 +220,7 @@ if ((is_android && current_cpu == "x64" 
+@@ -221,7 +221,7 @@ if ((is_android && current_cpu == "x64" 
    ]
  }
  
 -if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || 
(is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
-+if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || 
(is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
++if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpe
g_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
    ffmpeg_yasm_sources += [
      "libavcodec/x86/fft.asm",
      "libavcodec/x86/vorbisdsp.asm",
-@@ -231,7 +231,7 @@ if ((is_android && current_cpu == "x64" 
+@@ -232,7 +232,7 @@ if ((is_android && current_cpu == "x64" 
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && 
ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding ==
 "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "
x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
    ffmpeg_c_sources += [
      "libavcodec/cabac.c",
      "libavcodec/h264.c",
-@@ -254,7 +254,7 @@ if ((is_linux && current_cpu == "arm" &&
+@@ -255,7 +255,7 @@ if ((is_linux && current_cpu == "arm" &&
    ]
  }
  
 -if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "
Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) {
++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd)
 && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavcodec/arm/fft_fixed_init_arm.c",
      "libavcodec/arm/fft_init_arm.c",
-@@ -270,7 +270,7 @@ if ((is_android && current_cpu == "arm" 
+@@ -271,7 +271,7 @@ if ((is_android && current_cpu == "arm" 
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" &
& ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bs
d) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavcodec/flac.c",
      "libavcodec/flac_parser.c",
-@@ -281,7 +281,7 @@ if ((is_linux && current_cpu == "arm" &&
+@@ -282,7 +282,7 @@ if ((is_linux && current_cpu == "arm" &&
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavcodec/arm/h264pred_init_arm.c",
      "libavcodec/arm/hpeldsp_init_arm.c",
-@@ -301,7 +301,7 @@ if ((is_linux && current_cpu == "arm" &&
+@@ -302,7 +302,7 @@ if ((is_linux && current_cpu == "arm" &&
    ]
  }
  
 -if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) {
++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavutil/arm/float_dsp_init_neon.c",
    ]
-@@ -316,7 +316,7 @@ if ((is_android && current_cpu == "arm" 
+@@ -317,7 +317,7 @@ if ((is_android && current_cpu == "arm" 
    ]
  }
  
 -if ((is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win 
&& current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
++if (((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_brandi
ng == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) {
    ffmpeg_c_sources += [
      "libavcodec/x86/autorename_libavcodec_x86_videodsp_init.c",
      "libavcodec/x86/h264_intrapred_init.c",
-@@ -336,13 +336,13 @@ if ((is_linux && current_cpu == "x64" &&
+@@ -337,13 +337,13 @@ if ((is_linux && current_cpu == "x64" &&
    ]
  }
  
 -if ((is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS")) {
-+if ((is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS")) {
++if ((is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavutil/mips/float_dsp_mips.c",
    ]
  }
  
 -if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
-+if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
++if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
    ffmpeg_c_sources += [
      "libavcodec/x86/aacpsdsp_init.c",
      "libavcodec/x86/dct_init.c",
-@@ -351,7 +351,7 @@ if ((is_android && current_cpu == "x64" 
+@@ -352,7 +352,7 @@ if ((is_android && current_cpu == "x64" 
    ]
  }
  
 -if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
-+if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
++if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
    ffmpeg_yasm_sources += [
      "libavcodec/x86/aacpsdsp.asm",
      "libavcodec/x86/dct32.asm",
-@@ -360,7 +360,7 @@ if ((is_android && current_cpu == "x64" 
+@@ -361,7 +361,7 @@ if ((is_android && current_cpu == "x64" 
    ]
  }
  
 -if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/arm/aacpsdsp_init_arm.c",
      "libavcodec/arm/mpegaudiodsp_init_arm.c",
-@@ -371,7 +371,7 @@ if ((is_android && current_cpu == "arm" 
+@@ -372,7 +372,7 @@ if ((is_android && current_cpu == "arm" 
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/acelp_filters.c",
      "libavcodec/acelp_pitch_delay.c",
-@@ -426,7 +426,7 @@ if ((is_linux && current_cpu == "arm" &&
+@@ -427,7 +427,7 @@ if ((is_linux && current_cpu == "arm" &&
    ]
  }
  
 -if ((is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS")) {
++if (((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavcodec/mips/h264pred_init_mips.c",
      "libavcodec/mips/hpeldsp_init_mips.c",
-@@ -434,7 +434,7 @@ if ((is_linux && current_cpu == "mipsel"
+@@ -435,7 +435,7 @@ if ((is_linux && current_cpu == "mipsel"
    ]
  }
  
 -if ((is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS")) {
-+if ((is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS")) {
++if ((is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavcodec/aarch64/fft_init_aarch64.c",
      "libavcodec/aarch64/vorbisdsp_init.c",
-@@ -449,7 +449,7 @@ if ((is_android && current_cpu == "arm64
+@@ -450,7 +450,7 @@ if ((is_android && current_cpu == "arm64
    ]
  }
  
 -if ((is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavcodec/aarch64/h264pred_init.c",
      "libavcodec/aarch64/hpeldsp_init_aarch64.c",
-@@ -462,7 +462,7 @@ if ((is_linux && current_cpu == "arm64" 
+@@ -463,7 +463,7 @@ if ((is_linux && current_cpu == "arm64" 
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavcodec/arm/flacdsp_init_arm.c",
    ]
-@@ -471,7 +471,7 @@ if ((is_linux && current_cpu == "arm" &&
+@@ -472,7 +472,7 @@ if ((is_linux && current_cpu == "arm" &&
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/arm/h264chroma_init_arm.c",
      "libavcodec/arm/h264dsp_init_arm.c",
-@@ -482,7 +482,7 @@ if ((is_linux && current_cpu == "arm" &&
+@@ -483,7 +483,7 @@ if ((is_linux && current_cpu == "arm" &&
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavcodec/arm/hpeldsp_init_neon.c",
      "libavcodec/arm/vp8dsp_init_neon.c",
-@@ -495,14 +495,14 @@ if ((is_linux && current_cpu == "arm" &&
+@@ -496,14 +496,14 @@ if ((is_linux && current_cpu == "arm" &&
    ]
  }
  
 -if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_gas_sources += [
      "libavcodec/arm/aacpsdsp_neon.S",
      "libavcodec/arm/sbrdsp_neon.S",
@@ -218,104 +218,104 @@ $NetBSD$
  }
  
 -if ((is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
++if (((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) {
    ffmpeg_c_sources += [
      "libavcodec/x86/h264_qpel.c",
      "libavcodec/x86/h264chroma_init.c",
-@@ -523,7 +523,7 @@ if ((is_linux && current_cpu == "x64" &&
+@@ -524,7 +524,7 @@ if ((is_linux && current_cpu == "x64" &&
    ]
  }
  
 -if ((is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
-+if ((is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
++if ((is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/mips/aacdec_mips.c",
      "libavcodec/mips/aacpsdsp_mips.c",
-@@ -532,7 +532,7 @@ if ((is_android && current_cpu == "mips6
+@@ -533,7 +533,7 @@ if ((is_android && current_cpu == "mips6
    ]
  }
  
 -if ((is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS")) {
++if (((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS")) {
    ffmpeg_c_sources += [
      "libavcodec/x86/flacdsp_init.c",
    ]
-@@ -547,7 +547,7 @@ if ((is_win && current_cpu == "x64" && f
+@@ -548,7 +548,7 @@ if ((is_win && current_cpu == "x64" && f
    ]
  }
  
 -if ((is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
++if (((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/mips/h264chroma_init_mips.c",
      "libavcodec/mips/h264dsp_init_mips.c",
-@@ -555,7 +555,7 @@ if ((is_linux && current_cpu == "mipsel"
+@@ -556,7 +556,7 @@ if ((is_linux && current_cpu == "mipsel"
    ]
  }
  
 -if ((is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
-+if ((is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
++if ((is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/aarch64/imdct15_init.c",
      "libavcodec/aarch64/mpegaudiodsp_init.c",
-@@ -566,7 +566,7 @@ if ((is_android && current_cpu == "arm64
+@@ -567,7 +567,7 @@ if ((is_android && current_cpu == "arm64
    ]
  }
  
 -if ((is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/aarch64/h264chroma_init_aarch64.c",
      "libavcodec/aarch64/h264dsp_init_aarch64.c",
-@@ -580,7 +580,7 @@ if ((is_linux && current_cpu == "arm64" 
+@@ -581,7 +581,7 @@ if ((is_linux && current_cpu == "arm64" 
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/arm/blockdsp_init_arm.c",
      "libavcodec/arm/idctdsp_init_arm.c",
-@@ -604,13 +604,13 @@ if ((is_linux && current_cpu == "arm" &&
+@@ -605,13 +605,13 @@ if ((is_linux && current_cpu == "arm" &&
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/neon/autorename_libavcodec_neon_mpegvideo.c",
    ]
  }
  
 -if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_gas_sources += [
      "libavcodec/arm/h264cmc_neon.S",
      "libavcodec/arm/h264dsp_neon.S",
-@@ -625,7 +625,7 @@ if ((is_win && current_cpu == "x64" && f
+@@ -626,7 +626,7 @@ if ((is_win && current_cpu == "x64" && f
    ]
  }
  
 -if ((is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
-+if (((is_linux || os_bsd == 1) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || os_bsd == 1) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
++if (((is_linux || is_bsd) && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
    ffmpeg_c_sources += [
      "libavcodec/x86/blockdsp_init.c",
      "libavcodec/x86/fdct.c",
-@@ -652,7 +652,7 @@ if ((is_linux && current_cpu == "x64" &&
+@@ -653,7 +653,7 @@ if ((is_linux && current_cpu == "x64" &&
    ]
  }
  
 -if (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") {
-+if ((is_linux || os_bsd == 1) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") {
++if ((is_linux || is_bsd) && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") {
    ffmpeg_c_sources += [
      "libavcodec/mips/blockdsp_init_mips.c",
      "libavcodec/mips/h263dsp_init_mips.c",
-@@ -665,7 +665,7 @@ if (is_linux && current_cpu == "mipsel" 
+@@ -666,7 +666,7 @@ if (is_linux && current_cpu == "mipsel" 
    ]
  }
  
 -if (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") {
-+if ((is_linux || os_bsd == 1) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") {
++if ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") {
    ffmpeg_c_sources += [
      "libavcodec/arm/blockdsp_init_neon.c",
      "libavcodec/arm/idctdsp_init_neon.c",
diff --git a/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gypi b/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gypi
deleted file mode 100644
index 58f39ba..0000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gypi
+++ /dev/null
@@ -1,397 +0,0 @@
-$NetBSD$
-
---- third_party/ffmpeg/ffmpeg_generated.gypi.orig	2016-06-24 01:03:39.000000000 +0000
-+++ third_party/ffmpeg/ffmpeg_generated.gypi
-@@ -8,7 +8,7 @@
- {
-   'variables': {
-     'conditions': [
--      ['OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS"', {
-+      ['(OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS"', {
-         'c_sources': [
-           'libavcodec/arm/blockdsp_init_neon.c',
-           'libavcodec/arm/idctdsp_init_neon.c',
-@@ -19,8 +19,8 @@
-           'libavcodec/arm/mpegvideo_neon.S',
-           'libavcodec/arm/simple_idct_neon.S',
-         ],
--      }],  # OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS"
--      ['OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS"', {
-+      }],  # (OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS"
-+      ['(OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS"', {
-         'c_sources': [
-           'libavcodec/mips/blockdsp_init_mips.c',
-           'libavcodec/mips/h263dsp_init_mips.c',
-@@ -31,8 +31,8 @@
-           'libavcodec/mips/qpeldsp_init_mips.c',
-           'libavcodec/mips/xvididct_init_mips.c',
-         ],
--      }],  # OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS"
--      ['(OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # (OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS"
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/x86/blockdsp_init.c',
-           'libavcodec/x86/fdct.c',
-@@ -57,26 +57,26 @@
-           'libavcodec/x86/simple_idct10.asm',
-           'libavcodec/x86/xvididct.asm',
-         ],
--      }],  # (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS")
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS")
-       ['(OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-         'asm_sources': [
-           'libavutil/x86/emms.asm',
-         ],
-       }],  # (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS")', {
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS")', {
-         'asm_sources': [
-           'libavcodec/arm/h264cmc_neon.S',
-           'libavcodec/arm/h264dsp_neon.S',
-           'libavcodec/arm/h264idct_neon.S',
-           'libavcodec/arm/h264qpel_neon.S',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/neon/autorename_libavcodec_neon_mpegvideo.c',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/arm/blockdsp_init_arm.c',
-           'libavcodec/arm/idctdsp_init_arm.c',
-@@ -98,8 +98,8 @@
-           'libavcodec/arm/simple_idct_armv5te.S',
-           'libavcodec/arm/simple_idct_armv6.S',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS")
--      ['(OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/aarch64/h264chroma_init_aarch64.c',
-           'libavcodec/aarch64/h264dsp_init_aarch64.c',
-@@ -111,8 +111,8 @@
-           'libavcodec/aarch64/autorename_libavcodec_aarch64_h264idct_neon.S',
-           'libavcodec/aarch64/autorename_libavcodec_aarch64_h264qpel_neon.S',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")
--      ['(OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")
-+      ['(OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/aarch64/imdct15_init.c',
-           'libavcodec/aarch64/mpegaudiodsp_init.c',
-@@ -121,36 +121,36 @@
-           'libavcodec/aarch64/imdct15_neon.S',
-           'libavcodec/aarch64/mpegaudiodsp_neon.S',
-         ],
--      }],  # (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")
--      ['(OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/mips/h264chroma_init_mips.c',
-           'libavcodec/mips/h264dsp_init_mips.c',
-           'libavcodec/mips/h264qpel_init_mips.c',
-         ],
--      }],  # (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS")
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS")
-       ['(OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-         'c_sources': [
-           'compat/msvcrt/snprintf.c',
-         ],
-       }],  # (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
--      ['(OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS")', {
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavcodec/x86/flacdsp_init.c',
-         ],
-         'asm_sources': [
-           'libavcodec/x86/flacdsp.asm',
-         ],
--      }],  # (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS")
-+      ['(OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/mips/aacdec_mips.c',
-           'libavcodec/mips/aacpsdsp_mips.c',
-           'libavcodec/mips/aacsbr_mips.c',
-           'libavcodec/mips/sbrdsp_mips.c',
-         ],
--      }],  # (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS")
--      ['(OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-+      }],  # (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-         'c_sources': [
-           'libavcodec/x86/h264_qpel.c',
-           'libavcodec/x86/h264chroma_init.c',
-@@ -169,14 +169,14 @@
-           'libavcodec/x86/h264_weight_10bit.asm',
-           'libavcodec/x86/qpel.asm',
-         ],
--      }],  # (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
--      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
-+      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS")', {
-         'asm_sources': [
-           'libavcodec/arm/aacpsdsp_neon.S',
-           'libavcodec/arm/sbrdsp_neon.S',
-         ],
--      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS")', {
-+      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavcodec/arm/hpeldsp_init_neon.c',
-           'libavcodec/arm/vp8dsp_init_neon.c',
-@@ -187,8 +187,8 @@
-           'libavcodec/arm/vp3dsp_neon.S',
-           'libavcodec/arm/vp8dsp_neon.S',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/arm/h264chroma_init_arm.c',
-           'libavcodec/arm/h264dsp_init_arm.c',
-@@ -197,16 +197,16 @@
-         'asm_sources': [
-           'libavcodec/arm/startcode_armv6.S',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavcodec/arm/flacdsp_init_arm.c',
-         ],
-         'asm_sources': [
-           'libavcodec/arm/flacdsp_arm.S',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavcodec/aarch64/h264pred_init.c',
-           'libavcodec/aarch64/hpeldsp_init_aarch64.c',
-@@ -217,8 +217,8 @@
-           'libavcodec/aarch64/autorename_libavcodec_aarch64_hpeldsp_neon.S',
-           'libavcodec/aarch64/videodsp.S',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS")
-+      ['(OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavcodec/aarch64/fft_init_aarch64.c',
-           'libavcodec/aarch64/vorbisdsp_init.c',
-@@ -231,15 +231,15 @@
-           'libavcodec/aarch64/vorbisdsp_neon.S',
-           'libavutil/aarch64/float_dsp_neon.S',
-         ],
--      }],  # (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS")', {
-+      }],  # (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavcodec/mips/h264pred_init_mips.c',
-           'libavcodec/mips/hpeldsp_init_mips.c',
-           'libavcodec/mips/vp8dsp_init_mips.c',
-         ],
--      }],  # (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/acelp_filters.c',
-           'libavcodec/acelp_pitch_delay.c',
-@@ -292,8 +292,8 @@
-           'libavformat/avidec.c',
-           'libavformat/gsmdec.c',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS")
--      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS")
-+      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS")', {
-         'c_sources': [
-           'libavcodec/arm/aacpsdsp_init_arm.c',
-           'libavcodec/arm/mpegaudiodsp_init_arm.c',
-@@ -302,29 +302,29 @@
-         'asm_sources': [
-           'libavcodec/arm/mpegaudiodsp_fixed_armv6.S',
-         ],
--      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS")
--      ['(OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-+      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS")
-+      ['(OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-         'asm_sources': [
-           'libavcodec/x86/aacpsdsp.asm',
-           'libavcodec/x86/dct32.asm',
-           'libavcodec/x86/imdct36.asm',
-           'libavcodec/x86/sbrdsp.asm',
-         ],
--      }],  # (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
--      ['(OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-+      }],  # (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
-+      ['(OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-         'c_sources': [
-           'libavcodec/x86/aacpsdsp_init.c',
-           'libavcodec/x86/dct_init.c',
-           'libavcodec/x86/mpegaudiodsp.c',
-           'libavcodec/x86/sbrdsp_init.c',
-         ],
--      }],  # (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
--      ['(OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS")', {
-+      }],  # (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
-+      ['(OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavutil/mips/float_dsp_mips.c',
-         ],
--      }],  # (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_b
randing == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-+      }],  # (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chr
ome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-         'c_sources': [
-           'libavcodec/x86/autorename_libavcodec_x86_videodsp_init.c',
-           'libavcodec/x86/h264_intrapred_init.c',
-@@ -342,8 +342,8 @@
-           'libavcodec/x86/vp8dsp.asm',
-           'libavcodec/x86/vp8dsp_loopfilter.asm',
-         ],
--      }],  # (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffm
peg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
--      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding ==
 "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
-+      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavutil/arm/float_dsp_init_neon.c',
-         ],
-@@ -356,8 +356,8 @@
-           'libavcodec/arm/rdft_neon.S',
-           'libavutil/arm/autorename_libavutil_arm_float_dsp_neon.S',
-         ],
--      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")', {
-+      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavcodec/arm/h264pred_init_arm.c',
-           'libavcodec/arm/hpeldsp_init_arm.c',
-@@ -375,8 +375,8 @@
-           'libavcodec/arm/vp8_armv6.S',
-           'libavcodec/arm/vp8dsp_armv6.S',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "
ChromiumOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_b
randing == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavcodec/flac.c',
-           'libavcodec/flac_parser.c',
-@@ -385,8 +385,8 @@
-           'libavcodec/flacdsp.c',
-           'libavformat/autorename_libavformat_flacdec.c',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding
 == "ChromiumOS")
--      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linu
x" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffm
peg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS")
-+      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Ch
romeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")', {
-         'c_sources': [
-           'libavcodec/arm/fft_fixed_init_arm.c',
-           'libavcodec/arm/fft_init_arm.c',
-@@ -400,8 +400,8 @@
-           'libavcodec/arm/mdct_vfp.S',
-           'libavutil/arm/float_dsp_vfp.S',
-         ],
--      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == 
"linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "
mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-+      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding =
= "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome
OS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-         'c_sources': [
-           'libavcodec/cabac.c',
-           'libavcodec/h264.c',
-@@ -422,8 +422,8 @@
-           'libavcodec/h264qpel.c',
-           'libavcodec/startcode.c',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS
 == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
--      ['(OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and f
fmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "C
hromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
-+      ['(OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding 
== "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-         'asm_sources': [
-           'libavcodec/x86/fft.asm',
-           'libavcodec/x86/vorbisdsp.asm',
-@@ -432,8 +432,8 @@
-           'libavutil/x86/float_dsp.asm',
-           'libavutil/x86/lls.asm',
-         ],
--      }],  # (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" 
and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
--      ['(OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x
64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-+      }],  # (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_bran
ding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
-+      ['(OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chromium"
) or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-         'c_sources': [
-           'libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c',
-           'libavcodec/x86/constants.c',
-@@ -443,13 +443,13 @@
-           'libavutil/x86/fixed_dsp_init.c',
-           'libavutil/x86/lls_init.c',
-         ],
--      }],  # (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch 
== "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
-+      }],  # (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chro
mium") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
-       ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_b
randing == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-         'c_sources': [
-           'compat/strtod.c',
-         ],
-       }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffm
peg_branding == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
--      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding
 == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-+      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeO
S") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-         'c_sources': [
-           'libavcodec/aac_ac3_parser.c',
-           'libavcodec/aac_parser.c',
-@@ -483,13 +483,13 @@
-           'libavformat/mov_chan.c',
-           'libavformat/mp3dec.c',
-         ],
--      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_bra
nding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
--      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" a
nd ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == 
 "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-+      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Ch
romeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
-+      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpe
g_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS =
 = "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")', {
-         'c_sources': [
-           'libavformat/rawdec.c',
-         ],
--      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "a
rm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (O
 S == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
--      ['(OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64" and 
ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "ma
 c" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-+      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and 
ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (
 (OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome")
-+      ['((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "a
rm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding ==
  "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-         'c_sources': [
-           'libavcodec/h264pred.c',
-           'libavcodec/hpeldsp.c',
-@@ -502,8 +502,8 @@
-           'libavcodec/vp8_parser.c',
-           'libavcodec/vp8dsp.c',
-         ],
--      }],  # (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64"
 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS =
 = "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
--      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_b
randing == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm64
 " and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or (
 OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")', {
-+      }],  # ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch 
== "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_brandi
 ng == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
-+      ['(OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffmpeg_b
randing == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding ==
  "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == "linu
 x" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_brandin
 g == "Chromium")', {
-         'c_sources': [
-           'libavcodec/allcodecs.c',
-           'libavcodec/autorename_libavcodec_utils.c',
-@@ -634,7 +634,7 @@
-           'libavutil/twofish.c',
-           'libavutil/utils.c',
-         ],
--      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffm
peg_branding == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "
 arm64" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromeOS")
  or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "linux" and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chromium")
-+      }],  # (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "arm64" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mips64el" and ffmpeg_branding == "Chromium") or (OS == "android" and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "mipsel" and ffm
peg_branding == "Chromium") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "android" and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and arm_neon == 1 and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm" and ffmpeg_brandi
 ng == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "arm64" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "ia32" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromeOS") or ((OS == 
 "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "mipsel" and ffmpeg_branding == "ChromiumOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chrome") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromeOS") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "Chromium") or ((OS == "linux" or os_bsd == 1) and target_arch == "x64" and ffmpeg_branding == "ChromiumOS") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "mac" and target_arch == "x64" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "ia32" and ffmpeg_branding == "Chromium") or (OS == "win" and target_arch == "x64" and ffmpeg_branding == "Chrome") or (OS == "win" and target_arch == "x64" and ffmpeg_br
 anding == "Chromium")
-     ],  # conditions
-   },
- }
diff --git a/chromium-new/patches/patch-third__party_ffmpeg_libavutil_autorename__libavutil__cpu.c b/chromium-new/patches/patch-third__party_ffmpeg_libavutil_autorename__libavutil__cpu.c
deleted file mode 100644
index fa37ed3..0000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_libavutil_autorename__libavutil__cpu.c
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
---- third_party/ffmpeg/libavutil/autorename_libavutil_cpu.c.orig	2016-06-24 01:03:40.000000000 +0000
-+++ third_party/ffmpeg/libavutil/autorename_libavutil_cpu.c
-@@ -24,6 +24,12 @@
- #include "opt.h"
- #include "common.h"
- 
-+#if defined(__NetBSD__)
-+#define _NETBSD_SOURCE 1
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#endif
-+
- #if HAVE_SCHED_GETAFFINITY
- #ifndef _GNU_SOURCE
- # define _GNU_SOURCE
-@@ -34,6 +40,7 @@
- #include <windows.h>
- #endif
- #if HAVE_SYSCTL
-+#define __BSD_VISIBLE 1
- #if HAVE_SYS_PARAM_H
- #include <sys/param.h>
- #endif
diff --git a/chromium-new/patches/patch-third__party_ffmpeg_libavutil_cpu.c b/chromium-new/patches/patch-third__party_ffmpeg_libavutil_cpu.c
deleted file mode 100644
index 6f85056..0000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_libavutil_cpu.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- third_party/ffmpeg/libavutil/cpu.c.orig	2016-06-24 01:03:40.000000000 +0000
-+++ third_party/ffmpeg/libavutil/cpu.c
-@@ -24,6 +24,9 @@
- #include "opt.h"
- #include "common.h"
- 
-+/* TODO(rene) work around a compile error with GCC 4.6.4 on FreeBSD */
-+#define __BSD_VISIBLE 1
-+
- #if HAVE_SCHED_GETAFFINITY
- #ifndef _GNU_SOURCE
- # define _GNU_SOURCE
diff --git a/chromium-new/patches/patch-third__party_ffmpeg_libavutil_mem.c b/chromium-new/patches/patch-third__party_ffmpeg_libavutil_mem.c
deleted file mode 100644
index 12bb872..0000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_libavutil_mem.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/ffmpeg/libavutil/mem.c.orig	2016-06-24 01:03:40.000000000 +0000
-+++ third_party/ffmpeg/libavutil/mem.c
-@@ -32,7 +32,7 @@
- #include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
--#if HAVE_MALLOC_H
-+#if HAVE_MALLOC_H && !defined(__FreeBSD__)
- #include <malloc.h>
- #endif
- 
diff --git a/chromium-new/patches/patch-third__party_fontconfig_BUILD.gn b/chromium-new/patches/patch-third__party_fontconfig_BUILD.gn
new file mode 100644
index 0000000..feb5c45
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_fontconfig_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/fontconfig/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/fontconfig/BUILD.gn
+@@ -2,7 +2,7 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+ 
+-assert(is_linux)
++assert(is_linux || is_bsd)
+ 
+ config("fontconfig_config") {
+   include_dirs = [ "src" ]
diff --git a/chromium-new/patches/patch-third__party_freetype2_BUILD.gn b/chromium-new/patches/patch-third__party_freetype2_BUILD.gn
new file mode 100644
index 0000000..028259e
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_freetype2_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/freetype2/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/freetype2/BUILD.gn
+@@ -2,7 +2,7 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+ 
+-assert(is_linux, "This file should only be depended on from Linux.")
++assert(is_linux || is_bsd, "This file should only be depended on from Linux.")
+ 
+ config("freetype2_config") {
+   include_dirs = [
diff --git a/chromium-new/patches/patch-third__party_glslang_BUILD.gn b/chromium-new/patches/patch-third__party_glslang_BUILD.gn
new file mode 100644
index 0000000..d161381
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_glslang_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- third_party/glslang/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/glslang/BUILD.gn
+@@ -8,7 +8,7 @@ config("glslang_config") {
+   include_dirs = [ "src" ]
+ 
+   defines = []
+-  if (is_linux || is_android) {
++  if (is_linux || is_bsd || is_android) {
+     defines += [ "GLSLANG_OSINCLUDE_UNIX" ]
+   } else if (is_win) {
+     defines += [ "GLSLANG_OSINCLUDE_WIN32" ]
+@@ -132,7 +132,7 @@ static_library("glslang") {
+     "src/glslang/Public/ShaderLang.h",
+   ]
+ 
+-  if (is_linux || is_android) {
++  if (is_linux || is_bsd || is_android) {
+     sources += [ "src/glslang/OSDependent/Unix/ossource.cpp" ]
+   } else if (is_win) {
+     sources += [
diff --git a/chromium-new/patches/patch-third__party_harfbuzz-ng_BUILD.gn b/chromium-new/patches/patch-third__party_harfbuzz-ng_BUILD.gn
new file mode 100644
index 0000000..bba49ef
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_harfbuzz-ng_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- third_party/harfbuzz-ng/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/harfbuzz-ng/BUILD.gn
+@@ -50,7 +50,7 @@ if (use_system_harfbuzz) {
+ 
+   # See also chrome/browser/ui/libgtk2ui/BUILD.gn which pulls this.
+   config("pangoft2_link_hack") {
+-    if (is_linux && use_pango && !is_chromeos && !is_official_build &&
++    if ((is_linux || is_bsd) && use_pango && !is_chromeos && !is_official_build &&
+         current_cpu != "arm" && current_cpu != "mipsel" && !is_component_build) {
+       # These symbols are referenced from libpangoft2, which will be
+       # dynamically linked later.
+@@ -193,7 +193,7 @@ if (use_system_harfbuzz) {
+     # in the tree, all symbols pango needs must be included, or
+     # pango uses mixed versions of harfbuzz and leads to crash.
+     # See crbug.com/462689.
+-    if (is_linux && use_pango && !is_chromeos && !is_official_build &&
++    if ((is_linux || is_bsd) && use_pango && !is_chromeos && !is_official_build &&
+         current_cpu != "arm" && current_cpu != "mipsel") {
+       deps += [ "//build/linux:freetype2" ]
+       configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
diff --git a/chromium-new/patches/patch-third__party_icu_android_patch__locale.sh b/chromium-new/patches/patch-third__party_icu_android_patch__locale.sh
new file mode 100644
index 0000000..5d6a064
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_icu_android_patch__locale.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/icu/android/patch_locale.sh.orig	2016-11-10 20:02:59.000000000 +0000
++++ third_party/icu/android/patch_locale.sh
+@@ -26,7 +26,7 @@ cd source/data
+ for i in curr/*.txt
+ do
+   locale=$(basename $i .txt)
+-  [ $locale == 'supplementalData' ] && continue;
++  [ $locale = 'supplementalData' ] && continue;
+   echo "Overwriting $i for $locale"
+   sed -n -r -i \
+     '1, /^'${locale}'\{$/ p
diff --git a/chromium-new/patches/patch-third__party_icu_source_configure b/chromium-new/patches/patch-third__party_icu_source_configure
new file mode 100644
index 0000000..13a0adf
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_icu_source_configure
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- third_party/icu/source/configure.orig	2016-11-10 20:02:59.000000000 +0000
++++ third_party/icu/source/configure
+@@ -7765,13 +7765,13 @@ fi
+ # Now that we're done using CPPFLAGS etc. for tests, we can change it
+ # for build.
+ 
+-if test "${CC}" == "clang"; then
++if test "${CC}" = "clang"; then
+    CLANGCFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+ else
+    CLANGCFLAGS=""
+ fi
+ 
+-if test "${CXX}" == "clang++"; then
++if test "${CXX}" = "clang++"; then
+    CLANGCXXFLAGS="-Qunused-arguments -Wno-parentheses-equality"
+ else
+    CLANGCXXFLAGS=""
diff --git a/chromium-new/patches/patch-third__party_khronos_khronos.gyp b/chromium-new/patches/patch-third__party_khronos_khronos.gyp
deleted file mode 100644
index 668c09d..0000000
--- a/chromium-new/patches/patch-third__party_khronos_khronos.gyp
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- third_party/khronos/khronos.gyp.orig	2016-06-24 01:02:48.000000000 +0000
-+++ third_party/khronos/khronos.gyp
-@@ -11,6 +11,7 @@
-         'include_dirs': [
-           '.',
-           '../../gpu',  # Contains GLES2/gl2chromium.h
-+          '<(prefix_dir)/include',
-         ],
-       },
-     },
diff --git a/chromium-new/patches/patch-third__party_leveldatabase_env__chromium.cc b/chromium-new/patches/patch-third__party_leveldatabase_env__chromium.cc
index f46da5b..9a768b1 100644
--- a/chromium-new/patches/patch-third__party_leveldatabase_env__chromium.cc
+++ b/chromium-new/patches/patch-third__party_leveldatabase_env__chromium.cc
@@ -1,11 +1,11 @@
 $NetBSD$
 
---- third_party/leveldatabase/env_chromium.cc.orig	2016-06-24 01:02:48.000000000 +0000
+--- third_party/leveldatabase/env_chromium.cc.orig	2016-11-10 20:02:28.000000000 +0000
 +++ third_party/leveldatabase/env_chromium.cc
-@@ -21,7 +21,11 @@
- #include "base/threading/thread_restrictions.h"
+@@ -23,7 +23,11 @@
  #include "base/trace_event/trace_event.h"
  #include "third_party/leveldatabase/chromium_logger.h"
+ #include "third_party/leveldatabase/src/include/leveldb/options.h"
 +#if defined(OS_BSD)
 +#include <re2/re2.h>
 +#else
diff --git a/chromium-new/patches/patch-third__party_libXNVCtrl_libXNVCtrl.gyp b/chromium-new/patches/patch-third__party_libXNVCtrl_libXNVCtrl.gyp
deleted file mode 100644
index c07301c..0000000
--- a/chromium-new/patches/patch-third__party_libXNVCtrl_libXNVCtrl.gyp
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- third_party/libXNVCtrl/libXNVCtrl.gyp.orig	2016-06-24 01:02:48.000000000 +0000
-+++ third_party/libXNVCtrl/libXNVCtrl.gyp
-@@ -13,6 +13,9 @@
-         'NVCtrlLib.h',
-         'nv_control.h',
-       ],
-+      'include_dirs': [
-+        '<(prefix_dir)/include',
-+      ],
-     },
-   ],
- }
diff --git a/chromium-new/patches/patch-third__party_libjingle_libjingle.gyp b/chromium-new/patches/patch-third__party_libjingle_libjingle.gyp
deleted file mode 100644
index a8ead1d..0000000
--- a/chromium-new/patches/patch-third__party_libjingle_libjingle.gyp
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- third_party/libjingle/libjingle.gyp.orig	2016-06-24 01:02:48.000000000 +0000
-+++ third_party/libjingle/libjingle.gyp
-@@ -121,6 +121,8 @@
-         ['os_bsd==1', {
-           'defines': [
-             'BSD',
-+            'WEBRTC_LINUX',
-+            'WEBRTC_BSD',
-           ],
-         }],
-         ['OS=="openbsd"', {
-@@ -191,6 +193,8 @@
-       ['os_bsd==1', {
-         'defines': [
-           'BSD',
-+          'WEBRTC_LINUX',
-+          'WEBRTC_BSD',
-         ],
-       }],
-       ['OS=="openbsd"', {
diff --git a/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h b/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
index b07c43e..eba5cee 100644
--- a/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
+++ b/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/memory/singleton.h.orig	2016-06-24 01:03:50.000000000 +0000
+--- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/memory/singleton.h.orig	2016-11-10 20:03:01.000000000 +0000
 +++ third_party/libphonenumber/dist/cpp/src/phonenumbers/base/memory/singleton.h
 @@ -56,7 +56,7 @@ template <class T> boost::once_flag Sing
  #include "phonenumbers/base/logging.h"
diff --git a/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h b/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
index 234d317..5b4ca26 100644
--- a/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
+++ b/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/synchronization/lock.h.orig	2016-06-24 01:03:50.000000000 +0000
+--- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/synchronization/lock.h.orig	2016-11-10 20:03:01.000000000 +0000
 +++ third_party/libphonenumber/dist/cpp/src/phonenumbers/base/synchronization/lock.h
 @@ -37,7 +37,7 @@ typedef boost::mutex::scoped_lock AutoLo
  // Dummy lock implementation on non-POSIX platforms. If you are running on a
diff --git a/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h b/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
index 4cb50ff..60c1d45 100644
--- a/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
+++ b/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/thread_checker.h.orig	2016-06-24 01:03:50.000000000 +0000
+--- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/thread_checker.h.orig	2016-11-10 20:03:01.000000000 +0000
 +++ third_party/libphonenumber/dist/cpp/src/phonenumbers/base/thread_checker.h
 @@ -23,6 +23,7 @@
  // user of the library know that it can't be used in a thread-safe manner when
diff --git a/chromium-new/patches/patch-third__party_libphonenumber_libphonenumber.gyp b/chromium-new/patches/patch-third__party_libphonenumber_libphonenumber.gyp
deleted file mode 100644
index 1f47380..0000000
--- a/chromium-new/patches/patch-third__party_libphonenumber_libphonenumber.gyp
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- third_party/libphonenumber/libphonenumber.gyp.orig	2016-06-24 01:02:48.000000000 +0000
-+++ third_party/libphonenumber/libphonenumber.gyp
-@@ -11,6 +11,7 @@
-       # generated protocol headers to be available with "phonenumbers" include
-       # path, e.g. #include "phonenumbers/foo.pb.h".
-       '<(SHARED_INTERMEDIATE_DIR)/protoc_out/third_party/libphonenumber',
-+      '<(prefix_dir)/include',
-     ],
-     'defines': [
-       'I18N_PHONENUMBERS_USE_ALTERNATE_FORMATS=1',
diff --git a/chromium-new/patches/patch-third__party_libpng_libpng.gyp b/chromium-new/patches/patch-third__party_libpng_libpng.gyp
deleted file mode 100644
index 09fa751..0000000
--- a/chromium-new/patches/patch-third__party_libpng_libpng.gyp
+++ /dev/null
@@ -1,120 +0,0 @@
-$NetBSD$
-
---- third_party/libpng/libpng.gyp.orig	2016-07-11 12:43:07.907561444 +0000
-+++ third_party/libpng/libpng.gyp
-@@ -1,4 +1,4 @@
--# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-+# Copyright 2013 The Chromium Authors. All rights reserved.
- # Use of this source code is governed by a BSD-style license that can be
- # found in the LICENSE file.
- 
-@@ -6,89 +6,33 @@
-   'targets': [
-     {
-       'target_name': 'libpng',
-+      'type': 'none',
-       'dependencies': [
-         '../zlib/zlib.gyp:zlib',
-       ],
--      'variables': {
--        # Upstream uses self-assignment to avoid warnings.
--        'clang_warning_flags': [ '-Wno-self-assign' ]
--      },
--      'defines': [
--        'CHROME_PNG_WRITE_SUPPORT',
--        'PNG_USER_CONFIG',
--      ],
--      'sources': [
--        'png.c',
--        'png.h',
--        'pngconf.h',
--        'pngerror.c',
--        'pnggccrd.c',
--        'pngget.c',
--        'pngmem.c',
--        'pngpread.c',
--        'pngread.c',
--        'pngrio.c',
--        'pngrtran.c',
--        'pngrutil.c',
--        'pngset.c',
--        'pngtrans.c',
--        'pngusr.h',
--        'pngvcrd.c',
--        'pngwio.c',
--        'pngwrite.c',
--        'pngwtran.c',
--        'pngwutil.c',
--      ],
-       'direct_dependent_settings': {
--        'include_dirs': [
--          '.',
-+        'cflags': [
-+          '<!@(pkg-config --cflags libpng)',
-+        ],
-+      },
-+      'link_settings': {
-+        'ldflags': [
-+          '<!@(pkg-config --libs-only-L --libs-only-other libpng)',
-         ],
--        'defines': [
--          'CHROME_PNG_WRITE_SUPPORT',
--          'PNG_USER_CONFIG',
-+        'libraries': [
-+          '<!@(pkg-config --libs-only-l libpng)',
-         ],
-       },
--      'export_dependent_settings': [
--        '../zlib/zlib.gyp:zlib',
--      ],
--      # TODO(jschuh): http://crbug.com/167187
--      'msvs_disabled_warnings': [ 4267 ],
--      'conditions': [
--        ['OS!="win"', {'product_name': 'png'}],
--        ['OS=="win"', {
--          'type': '<(component)',
--        }, {
--          # Chromium libpng does not support building as a shared_library
--          # on non-Windows platforms.
--          'type': 'static_library',
--        }],
--        ['OS=="win" and component=="shared_library"', {
--          'defines': [
--            'PNG_BUILD_DLL',
--            'PNG_NO_MODULEDEF',
--          ],
--          'direct_dependent_settings': {
--            'defines': [
--              'PNG_USE_DLL',
--            ],
--          },
--        }],
--        ['OS=="android" or chromecast==1', {
--          'conditions': [
--            ['OS=="android"', {
--              'toolsets': ['target', 'host'],
--            }],
--          ],
--          'defines': [
--            'CHROME_PNG_READ_PACK_SUPPORT',  # Required by freetype.
--          ],
--          'direct_dependent_settings': {
--            'defines': [
--              'CHROME_PNG_READ_PACK_SUPPORT',
--            ],
--          },
--        }],
-+      'variables': {
-+        'headers_root_path': '.',
-+        'header_filenames': [
-+          'png.h',
-+          'pngconf.h',
-+        ],
-+      },
-+      'includes': [
-+        '../../build/shim_headers.gypi',
-       ],
-     },
--  ]
-+  ],
- }
diff --git a/chromium-new/patches/patch-third__party_libusb_BUILD.gn b/chromium-new/patches/patch-third__party_libusb_BUILD.gn
new file mode 100644
index 0000000..c93dd3c
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_libusb_BUILD.gn
@@ -0,0 +1,263 @@
+$NetBSD$
+
+--- third_party/libusb/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/libusb/BUILD.gn
+@@ -6,8 +6,25 @@ assert(!is_android && !is_ios)
+ 
+ import("//build/config/features.gni")
+ 
+-config("libusb_config") {
+-  include_dirs = [ "src/libusb" ]
++declare_args() {
++  use_system_libusb = is_bsd
++}
++
++
++if (use_system_libusb) {
++  config("libusb_config") {
++    defines = ["USE_SYSTEM_LIBUSB"]
++    libs = ["usb"]
++   }
++
++  source_set("libusb") {
++    public_configs = [ ":libusb_config" ]
++  }
++} else {
++
++  config("libusb_config") {
++    include_dirs = [ "src/libusb" ]
++  }
+ }
+ 
+ config("libusb_warnings") {
+@@ -21,118 +38,119 @@ config("libusb_warnings") {
+   }
+ }
+ 
+-static_library("libusb") {
+-  sources = [
+-    "src/config.h",
+-    "src/libusb/core.c",
+-    "src/libusb/descriptor.c",
+-    "src/libusb/hotplug.c",
+-    "src/libusb/hotplug.h",
+-    "src/libusb/interrupt.c",
+-    "src/libusb/interrupt.h",
+-    "src/libusb/io.c",
+-    "src/libusb/libusb.h",
+-    "src/libusb/libusbi.h",
+-    "src/libusb/os/darwin_usb.c",
+-    "src/libusb/os/darwin_usb.h",
+-    "src/libusb/os/poll_posix.c",
+-    "src/libusb/os/poll_posix.h",
+-    "src/libusb/os/poll_windows.c",
+-    "src/libusb/os/poll_windows.h",
+-    "src/libusb/os/threads_posix.c",
+-    "src/libusb/os/threads_posix.h",
+-    "src/libusb/os/threads_windows.c",
+-    "src/libusb/os/threads_windows.h",
+-    "src/libusb/os/windows_common.h",
+-    "src/libusb/os/windows_usb.c",
+-    "src/libusb/os/windows_usb.h",
+-    "src/libusb/strerror.c",
+-    "src/libusb/sync.c",
+-    "src/libusb/version.h",
+-    "src/libusb/version_nano.h",
+-    "src/msvc/config.h",
+-    "src/msvc/inttypes.h",
+-    "src/msvc/stdint.h",
+-  ]
+-  deps = []
+-  include_dirs = [ "src/libusb/os" ]
+-
+-  configs -= [ "//build/config/compiler:chromium_code" ]
+-  configs += [
+-    "//build/config/compiler:no_chromium_code",
+-
+-    # Must be after no_chromium_code for warning flags to be ordered correctly.
+-    ":libusb_warnings",
+-  ]
+-
+-  public_configs = [ ":libusb_config" ]
+-
+-  if (is_posix) {
+-    defines = [
+-      "DEFAULT_VISIBILITY=",
+-      "HAVE_GETTIMEOFDAY=1",
+-      "HAVE_POLL_H=1",
+-      "HAVE_SYS_TIME_H=1",
+-      "LIBUSB_DESCRIBE=\"1.0.16\"",
+-      "POLL_NFDS_TYPE=nfds_t",
+-      "THREADS_POSIX=1",
+-    ]
+-  }
+-
+-  if (is_mac) {
+-    defines += [
+-      "OS_DARWIN=1",
++if (!use_system_libusb) {
++  static_library("libusb") {
++    sources = [
++      "src/config.h",
++      "src/libusb/core.c",
++      "src/libusb/descriptor.c",
++      "src/libusb/hotplug.c",
++      "src/libusb/hotplug.h",
++      "src/libusb/interrupt.c",
++      "src/libusb/interrupt.h",
++      "src/libusb/io.c",
++      "src/libusb/libusb.h",
++      "src/libusb/libusbi.h",
++      "src/libusb/os/darwin_usb.c",
++      "src/libusb/os/darwin_usb.h",
++      "src/libusb/os/poll_posix.c",
++      "src/libusb/os/poll_posix.h",
++      "src/libusb/os/poll_windows.c",
++      "src/libusb/os/poll_windows.h",
++      "src/libusb/os/threads_posix.c",
++      "src/libusb/os/threads_posix.h",
++      "src/libusb/os/threads_windows.c",
++      "src/libusb/os/threads_windows.h",
++      "src/libusb/os/windows_common.h",
++      "src/libusb/os/windows_usb.c",
++      "src/libusb/os/windows_usb.h",
++      "src/libusb/strerror.c",
++      "src/libusb/sync.c",
++      "src/libusb/version.h",
++      "src/libusb/version_nano.h",
++      "src/msvc/config.h",
++      "src/msvc/inttypes.h",
++      "src/msvc/stdint.h",
++      ]
++        deps = []
++        include_dirs = [ "src/libusb/os" ]
++
++        configs -= [ "//build/config/compiler:chromium_code" ]
++        configs += [
++        "//build/config/compiler:no_chromium_code",
++
++# Must be after no_chromium_code for warning flags to be ordered correctly.
++      ":libusb_warnings",
++        ]
++
++          public_configs = [ ":libusb_config" ]
++
++          if (is_posix) {
++            defines = [
++              "DEFAULT_VISIBILITY=",
++            "HAVE_GETTIMEOFDAY=1",
++            "HAVE_POLL_H=1",
++            "HAVE_SYS_TIME_H=1",
++            "LIBUSB_DESCRIBE=\"1.0.16\"",
++            "POLL_NFDS_TYPE=nfds_t",
++            "THREADS_POSIX=1",
++            ]
++          }
++
++    if (is_mac) {
++      defines += [
++        "OS_DARWIN=1",
+ 
+-      # Needed on OSX 10.12 to silence a deprecation warning.
++# Needed on OSX 10.12 to silence a deprecation warning.
+       "OBJC_SILENCE_GC_DEPRECATIONS=1",
+-    ]
+-  } else {
+-    sources -= [
+-      "src/libusb/os/darwin_usb.c",
++      ]
++    } else {
++      sources -= [
++        "src/libusb/os/darwin_usb.c",
+       "src/libusb/os/darwin_usb.h",
+-    ]
+-  }
++      ]
++    }
+ 
+-  if (is_linux) {
+-    sources += [
+-      "src/libusb/os/linux_usbfs.c",
++    if (is_linux) {
++      sources += [
++        "src/libusb/os/linux_usbfs.c",
+       "src/libusb/os/linux_usbfs.h",
+-    ]
+-    defines += [
+-      "OS_LINUX=1",
++      ]
++        defines += [
++        "OS_LINUX=1",
+       "_GNU_SOURCE=1",
+-    ]
+-  }
++        ]
++    }
+ 
+-  if (is_chromeos) {
+-    defines += [ "USBI_TIMERFD_AVAILABLE" ]
+-  }
++    if (is_chromeos) {
++      defines += [ "USBI_TIMERFD_AVAILABLE" ]
++    }
+ 
+-  if (use_udev) {
+-    sources += [ "src/libusb/os/linux_udev.cc" ]
+-    defines += [
+-      "HAVE_LIBUDEV=1",
+-      "USE_UDEV=1",
+-    ]
+-    deps += [ "//build/linux/libudev" ]
+-  }
++    if (use_udev) {
++      sources += [ "src/libusb/os/linux_udev.cc" ]
++        defines += [
++        "HAVE_LIBUDEV=1",
++        "USE_UDEV=1",
++        ]
++          deps += [ "//build/linux/libudev" ]
++    }
+ 
+-  if (is_linux && !use_udev) {
+-    sources += [ "src/libusb/os/linux_netlink.c" ]
+-    defines += [ "HAVE_LINUX_NETLINK_H" ]
+-  }
++    if (is_linux && !use_udev) {
++      sources += [ "src/libusb/os/linux_netlink.c" ]
++        defines += [ "HAVE_LINUX_NETLINK_H" ]
++    }
+ 
+-  if (is_win) {
+-    include_dirs += [ "src/msvc" ]
+-    sources -= [
+-      "src/libusb/os/poll_posix.c",
+-      "src/libusb/os/threads_posix.c",
+-    ]
+-    libs = [ "setupapi.lib" ]
+-  } else {
+-    include_dirs += [ "src" ]
+-    sources -= [
+-      "src/libusb/os/poll_windows.c",
++    if (is_win) {
++      include_dirs += [ "src/msvc" ]
++        sources -= [
++        "src/libusb/os/poll_posix.c",
++        "src/libusb/os/threads_posix.c",
++        ]
++          libs = [ "setupapi.lib" ]
++    } else {
++      include_dirs += [ "src" ]
++        sources -= [
++        "src/libusb/os/poll_windows.c",
+       "src/libusb/os/poll_windows.h",
+       "src/libusb/os/threads_windows.c",
+       "src/libusb/os/threads_windows.h",
+@@ -142,6 +160,7 @@ static_library("libusb") {
+       "src/msvc/config.h",
+       "src/msvc/inttypes.h",
+       "src/msvc/stdint.h",
+-    ]
++        ]
++    }
+   }
+ }
diff --git a/chromium-new/patches/patch-third__party_libyuv_include_libyuv_row.h b/chromium-new/patches/patch-third__party_libyuv_include_libyuv_row.h
index 9017b64..c148e16 100644
--- a/chromium-new/patches/patch-third__party_libyuv_include_libyuv_row.h
+++ b/chromium-new/patches/patch-third__party_libyuv_include_libyuv_row.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- third_party/libyuv/include/libyuv/row.h.orig	2016-06-24 01:03:54.000000000 +0000
+--- third_party/libyuv/include/libyuv/row.h.orig	2016-11-10 20:03:02.000000000 +0000
 +++ third_party/libyuv/include/libyuv/row.h
-@@ -160,10 +160,14 @@ extern "C" {
+@@ -167,10 +167,14 @@ extern "C" {
  #define HAS_ARGBSHADEROW_SSE2
  #define HAS_ARGBSUBTRACTROW_SSE2
  #define HAS_ARGBUNATTENUATEROW_SSE2
@@ -17,7 +17,7 @@ $NetBSD$
  #define HAS_RGBCOLORTABLEROW_X86
  #define HAS_SOBELROW_SSE2
  #define HAS_SOBELTOPLANEROW_SSE2
-@@ -173,8 +177,7 @@ extern "C" {
+@@ -180,8 +184,7 @@ extern "C" {
  
  // The following functions fail on gcc/clang 32 bit with fpic and framepointer.
  // caveat: clangcl uses row_win.cc which works.
@@ -27,7 +27,7 @@ $NetBSD$
  // TODO(fbarchard): fix build error on x86 debug
  // https://code.google.com/p/libyuv/issues/detail?id=524
  #define HAS_I411TOARGBROW_SSSE3
-@@ -202,7 +205,7 @@ extern "C" {
+@@ -209,7 +212,7 @@ extern "C" {
  #define HAS_COPYROW_AVX
  #define HAS_H422TOARGBROW_AVX2
  #define HAS_I400TOARGBROW_AVX2
@@ -36,7 +36,7 @@ $NetBSD$
  // TODO(fbarchard): fix build error on android_full_debug=1
  // https://code.google.com/p/libyuv/issues/detail?id=517
  #define HAS_I422ALPHATOARGBROW_AVX2
-@@ -215,7 +218,9 @@ extern "C" {
+@@ -222,7 +225,9 @@ extern "C" {
  #define HAS_I422TORGB565ROW_AVX2
  #define HAS_I422TORGBAROW_AVX2
  #define HAS_I444TOARGBROW_AVX2
@@ -46,7 +46,7 @@ $NetBSD$
  #define HAS_J422TOARGBROW_AVX2
  #define HAS_MERGEUVROW_AVX2
  #define HAS_MIRRORROW_AVX2
-@@ -238,8 +243,10 @@ extern "C" {
+@@ -245,8 +250,10 @@ extern "C" {
  #define HAS_ARGBMULTIPLYROW_AVX2
  #define HAS_ARGBSUBTRACTROW_AVX2
  #define HAS_ARGBUNATTENUATEROW_AVX2
diff --git a/chromium-new/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc b/chromium-new/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc
index 6972ff4..0053511 100644
--- a/chromium-new/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc
+++ b/chromium-new/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/libyuv/source/mjpeg_decoder.cc.orig	2016-06-24 01:03:54.000000000 +0000
+--- third_party/libyuv/source/mjpeg_decoder.cc.orig	2016-11-10 20:03:02.000000000 +0000
 +++ third_party/libyuv/source/mjpeg_decoder.cc
 @@ -25,7 +25,6 @@
  #endif
diff --git a/chromium-new/patches/patch-third__party_mesa_BUILD.gn b/chromium-new/patches/patch-third__party_mesa_BUILD.gn
new file mode 100644
index 0000000..7ea654d
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_mesa_BUILD.gn
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- third_party/mesa/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/mesa/BUILD.gn
+@@ -90,6 +90,10 @@ config("mesa_internal_config") {
+     defines += [ "_GNU_SOURCE" ]
+   }
+ 
++  if (is_bsd) {
++    defines += [ "_BSD_SOURCE" ]
++  }
++
+   if (is_win) {
+     defines += [
+       # Generated files use const only if __cplusplus or __STDC__ is defined.
+@@ -757,7 +761,8 @@ loadable_module("osmesa") {
+   ]
+ 
+   # Required for the allocator implementation, which is not used on Mac.
+-  if (!is_mac) {
++  # For BSD, there's no poing to include everything.
++  if (!is_mac && !is_bsd) {
+     deps += [ "//base" ]
+   }
+ 
diff --git a/chromium-new/patches/patch-third__party_mesa_src_src_mesa_main_arrayobj.c b/chromium-new/patches/patch-third__party_mesa_src_src_mesa_main_arrayobj.c
deleted file mode 100644
index 1fdbd70..0000000
--- a/chromium-new/patches/patch-third__party_mesa_src_src_mesa_main_arrayobj.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- third_party/mesa/src/src/mesa/main/arrayobj.c.orig	2016-06-24 01:03:55.000000000 +0000
-+++ third_party/mesa/src/src/mesa/main/arrayobj.c
-@@ -52,6 +52,10 @@
- #include "varray.h"
- #include "main/dispatch.h"
- 
-+#if defined(__NetBSD__)
-+#include <sys/bitops.h>
-+#define ffsll ffs64
-+#endif
- 
- /**
-  * Look up the array object for the given ID.
diff --git a/chromium-new/patches/patch-third__party_minigbm_BUILD.gn b/chromium-new/patches/patch-third__party_minigbm_BUILD.gn
new file mode 100644
index 0000000..367081a
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_minigbm_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/minigbm/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/minigbm/BUILD.gn
+@@ -4,7 +4,7 @@
+ 
+ import("//build/config/linux/pkg_config.gni")
+ 
+-assert(is_linux)
++assert(is_linux || is_bsd)
+ 
+ declare_args() {
+   # Controls whether the build should use the version of minigbm library
diff --git a/chromium-new/patches/patch-third__party_opus_BUILD.gn b/chromium-new/patches/patch-third__party_opus_BUILD.gn
new file mode 100644
index 0000000..9b984dc
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_opus_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/opus/BUILD.gn.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/opus/BUILD.gn
+@@ -14,7 +14,7 @@ use_opus_arm_optimization = current_cpu 
+ # If OPUS Run Time CPU Detections (RTCD) shall be used.
+ # Based on the conditions in celt/arm/armcpu.c:
+ # defined(_MSC_VER) || defined(__linux__).
+-use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux)
++use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux || is_bsd)
+ 
+ config("opus_config") {
+   include_dirs = [ "src/include" ]
diff --git a/chromium-new/patches/patch-third__party_ots_include_opentype-sanitiser.h b/chromium-new/patches/patch-third__party_ots_include_opentype-sanitiser.h
index 668407ca..3015b89 100644
--- a/chromium-new/patches/patch-third__party_ots_include_opentype-sanitiser.h
+++ b/chromium-new/patches/patch-third__party_ots_include_opentype-sanitiser.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/ots/include/opentype-sanitiser.h.orig	2016-06-24 01:02:48.000000000 +0000
+--- third_party/ots/include/opentype-sanitiser.h.orig	2016-11-10 20:02:28.000000000 +0000
 +++ third_party/ots/include/opentype-sanitiser.h
 @@ -22,6 +22,7 @@ typedef unsigned __int64 uint64_t;
  #else
diff --git a/chromium-new/patches/patch-third__party_pdfium_build_standalone.gypi b/chromium-new/patches/patch-third__party_pdfium_build_standalone.gypi
deleted file mode 100644
index 61c3185..0000000
--- a/chromium-new/patches/patch-third__party_pdfium_build_standalone.gypi
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- third_party/pdfium/build/standalone.gypi.orig	2016-06-24 01:03:58.000000000 +0000
-+++ third_party/pdfium/build/standalone.gypi
-@@ -18,7 +18,7 @@
-       'variables': {
-         'variables': {
-           'conditions': [
--            ['OS=="linux" or OS=="mac"', {
-+            ['OS=="linux" or OS=="mac" or OS=="freebsd"', {
-               # This handles the Unix platforms we generally deal with.
-               # Anything else gets passed through, which probably won't work
-               # very well; such hosts should pass an explicit target_arch
-@@ -31,7 +31,7 @@
-                                        s/aarch64/arm64/;\
-                                        s/mips.*/mipsel/")',
-             }, {
--              # OS!="linux" and OS!="mac"
-+              # OS!="linux" and OS!="mac" and OS!="freebsd"
-               'host_arch%': 'ia32',
-             }],
-           ],
-@@ -266,7 +266,7 @@
-       # means we have to turn off this warning (and be careful about how
-       # object destruction happens in such cases).
-       4611,
--
-+}
-       # TODO(thestig): These warnings are level 4. They will be slowly
-       # removed as code is fixed.
-       4100, # Unreferenced formal parameter
diff --git a/chromium-new/patches/patch-third__party_pdfium_core_fxcrt_include_fx__system.h b/chromium-new/patches/patch-third__party_pdfium_core_fxcrt_include_fx__system.h
index 1438307..7624916 100644
--- a/chromium-new/patches/patch-third__party_pdfium_core_fxcrt_include_fx__system.h
+++ b/chromium-new/patches/patch-third__party_pdfium_core_fxcrt_include_fx__system.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/pdfium/core/fxcrt/include/fx_system.h.orig	2016-06-24 01:03:58.000000000 +0000
+--- third_party/pdfium/core/fxcrt/include/fx_system.h.orig	2016-11-10 20:03:03.000000000 +0000
 +++ third_party/pdfium/core/fxcrt/include/fx_system.h
 @@ -40,7 +40,7 @@
  #elif defined(_WIN64)
diff --git a/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp b/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
index b3dd7a3..2d3cd69 100644
--- a/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
+++ b/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp.orig	2016-06-24 01:03:59.000000000 +0000
+--- third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp.orig	2016-11-10 20:03:03.000000000 +0000
 +++ third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp
-@@ -590,11 +590,12 @@ CFX_WideString CJS_Date::ToString() cons
+@@ -458,11 +458,12 @@ v8::Local<v8::Date> CJS_Date::ToV8Date(C
  }
  
  double _getLocalTZA() {
@@ -16,7 +16,7 @@ $NetBSD$
  #if _MSC_VER >= 1900
    // In gcc and in Visual Studio prior to VS 2015 'timezone' is a global
    // variable declared in time.h. That variable was deprecated and in VS 2015
-@@ -602,7 +603,11 @@ double _getLocalTZA() {
+@@ -470,7 +471,11 @@ double _getLocalTZA() {
    long timezone = 0;
    _get_timezone(&timezone);
  #endif
diff --git a/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp b/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
index f5979d9..f29481c 100644
--- a/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
+++ b/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
@@ -1,10 +1,10 @@
 $NetBSD$
 
---- third_party/pdfium/fpdfsdk/javascript/PublicMethods.cpp.orig	2016-06-24 01:03:59.000000000 +0000
+--- third_party/pdfium/fpdfsdk/javascript/PublicMethods.cpp.orig	2016-11-10 20:03:03.000000000 +0000
 +++ third_party/pdfium/fpdfsdk/javascript/PublicMethods.cpp
-@@ -61,6 +61,103 @@ static const FX_WCHAR* const fullmonths[
-     L"May",       L"June",     L"July",     L"August",
-     L"September", L"October",  L"November", L"December"};
+@@ -64,6 +64,103 @@ const FX_WCHAR* const fullmonths[] = {L"
+                                       L"July",    L"August",   L"September",
+                                       L"October", L"November", L"December"};
  
 +#if defined(__FreeBSD__) || defined(__NetBSD__)
 +/*
@@ -103,6 +103,6 @@ $NetBSD$
 +}
 +#endif // defined(__FreeBSD__)
 +
- bool CJS_PublicMethods::IsNumber(const FX_WCHAR* str) {
-   CFX_WideString sTrim = StrTrim(str);
-   const FX_WCHAR* pTrim = sTrim.c_str();
+ CFX_ByteString StrTrim(const CFX_ByteString& pStr) {
+   CFX_ByteString result(pStr);
+   result.TrimLeft(' ');
diff --git a/chromium-new/patches/patch-third__party_pdfium_pdfium.gyp b/chromium-new/patches/patch-third__party_pdfium_pdfium.gyp
deleted file mode 100644
index 1b3fe2b..0000000
--- a/chromium-new/patches/patch-third__party_pdfium_pdfium.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/pdfium/pdfium.gyp.orig	2016-06-24 01:03:59.000000000 +0000
-+++ third_party/pdfium/pdfium.gyp
-@@ -75,7 +75,7 @@
-       ['pdf_enable_xfa==1', {
-         'defines': ['PDF_ENABLE_XFA'],
-       }],
--      ['OS=="linux"', {
-+      ['OS=="linux" or OS=="freebsd"', {
-         'conditions': [
-           ['target_arch=="x64"', {
-             'defines' : [ '_FX_CPU_=_FX_X64_', ],
diff --git a/chromium-new/patches/patch-third__party_pdfium_skia_BUILD.gn b/chromium-new/patches/patch-third__party_pdfium_skia_BUILD.gn
new file mode 100644
index 0000000..8a04d28
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_pdfium_skia_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/pdfium/skia/BUILD.gn.orig	2016-11-10 20:03:03.000000000 +0000
++++ third_party/pdfium/skia/BUILD.gn
+@@ -180,7 +180,7 @@ config("skia_library_config") {
+   }
+ 
+   # Settings for text blitting, chosen to approximate the system browser.
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     defines += [
+       "SK_GAMMA_EXPONENT=1.2",
+       "SK_GAMMA_CONTRAST=0.2",
+@@ -329,7 +329,7 @@ component("skia") {
+       "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp",
+     ]
+   }
+-  if (!is_linux && !is_android && !is_win && !is_mac) {
++  if (!is_linux && !is_android && !is_win && !is_mac && !is_bsd) {
+     sources -= [
+       "//third_party/skia/src/ports/SkFontHost_FreeType.cpp",
+       "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp",
+@@ -358,7 +358,7 @@ component("skia") {
+     "../third_party:fx_zlib",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//third_party/icu:icuuc" ]
+   }
+ 
diff --git a/chromium-new/patches/patch-third__party_pdfium_third__party_base_logging.h b/chromium-new/patches/patch-third__party_pdfium_third__party_base_logging.h
deleted file mode 100644
index acf0b38..0000000
--- a/chromium-new/patches/patch-third__party_pdfium_third__party_base_logging.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/pdfium/third_party/base/logging.h.orig	2016-06-24 01:03:59.000000000 +0000
-+++ third_party/pdfium/third_party/base/logging.h
-@@ -10,7 +10,7 @@
- 
- #ifndef _WIN32
- #define NULL_DEREF_IF_POSSIBLE \
--  *(reinterpret_cast<volatile char*>(NULL) + 42) = 0x42;
-+  *(reinterpret_cast<volatile char*>(__null) + 42) = 0x42;
- #else
- #define NULL_DEREF_IF_POSSIBLE
- #endif
diff --git a/chromium-new/patches/patch-third__party_protobuf_post__process__dist.sh b/chromium-new/patches/patch-third__party_protobuf_post__process__dist.sh
new file mode 100644
index 0000000..2e737b7
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_protobuf_post__process__dist.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/protobuf/post_process_dist.sh.orig	2016-11-10 20:02:28.000000000 +0000
++++ third_party/protobuf/post_process_dist.sh
+@@ -15,7 +15,7 @@
+ #    non-testdata .txt files are converted to Windows-style line endings.
+ # 5) Cleans up after itself.
+ 
+-if [ "$1" == "" ]; then
++if [ "$1" = "" ]; then
+   echo "USAGE:  $0 DISTFILE" >&2
+   exit 1
+ fi
diff --git a/chromium-new/patches/patch-third__party_sfntly_sfntly.gyp b/chromium-new/patches/patch-third__party_sfntly_sfntly.gyp
deleted file mode 100644
index 3242057..0000000
--- a/chromium-new/patches/patch-third__party_sfntly_sfntly.gyp
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- third_party/sfntly/sfntly.gyp.orig	2016-06-24 01:02:49.000000000 +0000
-+++ third_party/sfntly/sfntly.gyp
-@@ -127,6 +127,7 @@
-       ],
-       'include_dirs': [
-         'src/cpp/src',
-+        '<(prefix_dir)/include',
-       ],
-       # This macro must be define to suppress the use of exception
-       'defines': [
diff --git a/chromium-new/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h b/chromium-new/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
index 26fc461..35da2f0 100644
--- a/chromium-new/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
+++ b/chromium-new/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/skia/src/gpu/GrAutoLocaleSetter.h.orig	2016-06-24 01:04:04.000000000 +0000
+--- third_party/skia/src/gpu/GrAutoLocaleSetter.h.orig	2016-11-01 21:00:04.000000000 +0000
 +++ third_party/skia/src/gpu/GrAutoLocaleSetter.h
 @@ -22,7 +22,7 @@
  #include <xlocale.h>
diff --git a/chromium-new/patches/patch-third__party_skia_src_opts_opts__check__x86.cpp b/chromium-new/patches/patch-third__party_skia_src_opts_opts__check__x86.cpp
deleted file mode 100644
index 26b6dc4..0000000
--- a/chromium-new/patches/patch-third__party_skia_src_opts_opts__check__x86.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- third_party/skia/src/opts/opts_check_x86.cpp.orig	2016-06-24 01:04:04.000000000 +0000
-+++ third_party/skia/src/opts/opts_check_x86.cpp
-@@ -110,6 +110,13 @@ static inline bool supports_simd(int min
-          * instructions. So for that particular case we disable our SSSE3 options.
-          */
-         return false;
-+#elif (__NetBSD__)
-+      /* NetBSD/amd64 7.99.34 is configured for nocona and nocona does not
-+         support SSSE3. However CPU itself supports SSSE3 and gSIMDLevel()
-+         returns SSSE3 is ready. This inconsistency causes runtime error,
-+         sk_throw(), in S32_*_SSSE3()
-+         in third_party/skia/src/opts/SkBitmapProcState_opts_SSSE3.cpp . */
-+        return false;
- #else
-         return minLevel <= *gSIMDLevel.get(get_SIMD_level);
- #endif
diff --git a/chromium-new/patches/patch-third__party_sqlite_BUILD.gn b/chromium-new/patches/patch-third__party_sqlite_BUILD.gn
new file mode 100644
index 0000000..e9becfe
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_sqlite_BUILD.gn
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- third_party/sqlite/BUILD.gn.orig	2016-11-10 20:02:29.000000000 +0000
++++ third_party/sqlite/BUILD.gn
+@@ -20,7 +20,7 @@ if (!use_system_sqlite) {
+       # sqlite3Fts3InitTok).
+       cflags += [ "-Wno-unused-function" ]
+     }
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       cflags += [
+         # SQLite doesn"t believe in compiler warnings,
+         # preferring testing.
+@@ -177,7 +177,7 @@ if (!use_system_sqlite) {
+     public_configs = [ ":sqlite_export" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     executable("sqlite_shell") {
+       # So shell.c can find the correct sqlite3.h.
+       include_dirs = [ "amalgamation" ]
+@@ -206,7 +206,7 @@ if (use_system_sqlite) {
+ 
+   config("sqlite_config") {
+     defines = [ "USE_SYSTEM_SQLITE" ]
+-    if (is_ios) {
++    if (is_ios || is_bsd) {
+       libs = [ "sqlite3" ]
+     } else {
+       assert(false, "extra flags to use system sqlite3 library missing")
+@@ -225,7 +225,7 @@ if (use_system_sqlite) {
+     }
+   }
+ 
+-  if (is_ios) {
++  if (is_ios || is_bsd) {
+     source_set("sqlite_recover") {
+       sources = [
+         # TODO(shess): Move out of the SQLite source tree, perhaps to ext/.
diff --git a/chromium-new/patches/patch-third__party_sqlite_sqlite.gyp b/chromium-new/patches/patch-third__party_sqlite_sqlite.gyp
deleted file mode 100644
index abad207..0000000
--- a/chromium-new/patches/patch-third__party_sqlite_sqlite.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/sqlite/sqlite.gyp.orig	2016-06-24 01:02:49.000000000 +0000
-+++ third_party/sqlite/sqlite.gyp
-@@ -123,6 +123,8 @@
-           },
-           'include_dirs': [
-             'amalgamation',
-+            # FreeBSD ...
-+            '<(prefix_dir)/include',
-           ],
-           'dependencies': [
-             '../icu/icu.gyp:icui18n',
diff --git a/chromium-new/patches/patch-third__party_swiftshader_third__party_LLVM_utils_buildit_build__llvm b/chromium-new/patches/patch-third__party_swiftshader_third__party_LLVM_utils_buildit_build__llvm
new file mode 100644
index 0000000..750a30d
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_swiftshader_third__party_LLVM_utils_buildit_build__llvm
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- third_party/swiftshader/third_party/LLVM/utils/buildit/build_llvm.orig	2016-11-10 20:03:06.000000000 +0000
++++ third_party/swiftshader/third_party/LLVM/utils/buildit/build_llvm
+@@ -187,7 +187,7 @@ make $LOCAL_MAKEFLAGS $OPTIMIZE_OPTS UNI
+     LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \
+     OPTIMIZE_OPTION='-O3' VERBOSE=1 install
+ 
+-if ! test $? == 0 ; then
++if ! test $? = 0 ; then
+     echo "error: LLVM 'make install' failed!"
+     exit 1
+ fi 
+@@ -305,7 +305,7 @@ if [ "$INSTALL_LIBLTO" = "yes" ]; then
+   # PPC objects!
+   $STRIP -arch all -Sl $DT_HOME/lib/libLTO.dylib
+ 
+-  if [ "x$DISABLE_USR_LINKS" == "x" ]; then
++  if [ "x$DISABLE_USR_LINKS" = "x" ]; then
+     # Add a symlink in /usr/lib for B&I.
+     mkdir -p $DEST_DIR/usr/lib/
+     (cd $DEST_DIR/usr/lib && \
diff --git a/chromium-new/patches/patch-third__party_usrsctp_BUILD.gn b/chromium-new/patches/patch-third__party_usrsctp_BUILD.gn
new file mode 100644
index 0000000..74366cb
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_usrsctp_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- third_party/usrsctp/BUILD.gn.orig	2016-11-10 20:02:29.000000000 +0000
++++ third_party/usrsctp/BUILD.gn
+@@ -112,6 +112,12 @@ static_library("usrsctp") {
+       "__Userspace_os_Linux",
+       "_GNU_SOURCE",
+     ]
++  } else if (is_bsd) {
++    # For now, freebsd hard coding, differentiate different bsd is a plan
++    defines += [
++      "__Userspace_os_FreeBSD",
++    ]
++    cflags += [ "-U__FreeBSD__" ]
+   } else if (is_mac || is_ios) {
+     defines += [
+       "HAVE_SA_LEN",
diff --git a/chromium-new/patches/patch-third__party_usrsctp_usrsctp.gyp b/chromium-new/patches/patch-third__party_usrsctp_usrsctp.gyp
deleted file mode 100644
index 34413c2..0000000
--- a/chromium-new/patches/patch-third__party_usrsctp_usrsctp.gyp
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- third_party/usrsctp/usrsctp.gyp.orig	2016-06-24 01:02:50.000000000 +0000
-+++ third_party/usrsctp/usrsctp.gyp
-@@ -111,6 +111,14 @@
-           'cflags!': [ '-Werror', '-Wall' ],
-           'cflags': [ '-w' ],
-         }],
-+        ['OS=="freebsd"', {
-+          'defines': [
-+            'HAVE_SCONN_LEN',
-+            '__Userspace_os_FreeBSD',
-+          ],
-+          'cflags!': [ '-Werror', '-Wall' ],
-+          'cflags': [ '-U__FreeBSD__', '-w' ],
-+        }],
-         ['OS=="mac" or OS=="ios"', {
-           'defines': [
-             'HAVE_SA_LEN',
diff --git a/chromium-new/patches/patch-third__party_webrtc_BUILD.gn b/chromium-new/patches/patch-third__party_webrtc_BUILD.gn
new file mode 100644
index 0000000..086cdf3
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_webrtc_BUILD.gn
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- third_party/webrtc/BUILD.gn.orig	2016-11-10 20:03:05.000000000 +0000
++++ third_party/webrtc/BUILD.gn
+@@ -60,6 +60,9 @@ config("common_inherited_config") {
+   if (is_linux) {
+     defines += [ "WEBRTC_LINUX" ]
+   }
++  if (is_bsd) {
++    defines += [ "WEBRTC_BSD" ]
++  }
+   if (is_mac) {
+     defines += [ "WEBRTC_MAC" ]
+   }
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_httpcommon.cc b/chromium-new/patches/patch-third__party_webrtc_base_httpcommon.cc
index af1dadf..3a2d9a6 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_httpcommon.cc
+++ b/chromium-new/patches/patch-third__party_webrtc_base_httpcommon.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/base/httpcommon.cc.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/httpcommon.cc.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/httpcommon.cc
 @@ -384,7 +384,7 @@ bool HttpDateToSeconds(const std::string
      gmt = non_gmt + kTimeZoneOffsets[zindex] * 60 * 60;
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_ifaddrs__converter.h b/chromium-new/patches/patch-third__party_webrtc_base_ifaddrs__converter.h
index 45dcfc2..b284e03 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_ifaddrs__converter.h
+++ b/chromium-new/patches/patch-third__party_webrtc_base_ifaddrs__converter.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/base/ifaddrs_converter.h.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/ifaddrs_converter.h.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/ifaddrs_converter.h
 @@ -14,6 +14,8 @@
  #if defined(WEBRTC_ANDROID)
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_ipaddress.h b/chromium-new/patches/patch-third__party_webrtc_base_ipaddress.h
index c7f2ea5..0b58b2f 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_ipaddress.h
+++ b/chromium-new/patches/patch-third__party_webrtc_base_ipaddress.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/base/ipaddress.h.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/ipaddress.h.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/ipaddress.h
 @@ -17,6 +17,10 @@
  #include <arpa/inet.h>
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_linux.cc b/chromium-new/patches/patch-third__party_webrtc_base_linux.cc
index 1c6b4f8..60081d8 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_linux.cc
+++ b/chromium-new/patches/patch-third__party_webrtc_base_linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/base/linux.cc.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/linux.cc.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/linux.cc
 @@ -8,7 +8,7 @@
   *  be found in the AUTHORS file in the root of the source tree.
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_linux.h b/chromium-new/patches/patch-third__party_webrtc_base_linux.h
index e68ef93..99b9b5f 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_linux.h
+++ b/chromium-new/patches/patch-third__party_webrtc_base_linux.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/base/linux.h.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/linux.h.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/linux.h
 @@ -11,7 +11,7 @@
  #ifndef WEBRTC_BASE_LINUX_H_
@@ -10,7 +10,7 @@ $NetBSD$
 +#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
  #include <string>
  #include <map>
- #include <vector>
+ #include <memory>
 @@ -114,5 +114,5 @@ int ReadCpuMaxFreq();
  
  }  // namespace rtc
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_network.cc b/chromium-new/patches/patch-third__party_webrtc_base_network.cc
index ccc8ae7..402ef91 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_network.cc
+++ b/chromium-new/patches/patch-third__party_webrtc_base_network.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/base/network.cc.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/network.cc.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/network.cc
 @@ -14,7 +14,7 @@
  // linux/if.h can't be included at the same time as the posix sys/if.h, and
@@ -11,7 +11,7 @@ $NetBSD$
  #include <linux/if.h>
  #include <linux/route.h>
  #elif !defined(__native_client__)
-@@ -631,7 +631,7 @@ bool BasicNetworkManager::CreateNetworks
+@@ -656,7 +656,7 @@ bool BasicNetworkManager::CreateNetworks
  }
  #endif  // WEBRTC_WIN
  
@@ -20,7 +20,7 @@ $NetBSD$
  bool IsDefaultRoute(const std::string& network_name) {
    FileStream fs;
    if (!fs.Open("/proc/net/route", "r", NULL)) {
-@@ -674,7 +674,7 @@ bool BasicNetworkManager::IsIgnoredNetwo
+@@ -699,7 +699,7 @@ bool BasicNetworkManager::IsIgnoredNetwo
        strncmp(network.name().c_str(), "vboxnet", 7) == 0) {
      return true;
    }
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_network.h b/chromium-new/patches/patch-third__party_webrtc_base_network.h
index eff575d..7a1b95a 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_network.h
+++ b/chromium-new/patches/patch-third__party_webrtc_base_network.h
@@ -1,9 +1,9 @@
 $NetBSD$
 
---- third_party/webrtc/base/network.h.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/network.h.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/network.h
 @@ -23,6 +23,10 @@
- #include "webrtc/base/scoped_ptr.h"
+ #include "webrtc/base/messagehandler.h"
  #include "webrtc/base/sigslot.h"
  
 +#if defined(WEBRTC_BSD)
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_physicalsocketserver.cc b/chromium-new/patches/patch-third__party_webrtc_base_physicalsocketserver.cc
index f15ddb7..94db01f 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_physicalsocketserver.cc
+++ b/chromium-new/patches/patch-third__party_webrtc_base_physicalsocketserver.cc
@@ -1,8 +1,17 @@
 $NetBSD$
 
---- third_party/webrtc/base/physicalsocketserver.cc.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/physicalsocketserver.cc.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/physicalsocketserver.cc
-@@ -245,7 +245,7 @@ int PhysicalSocket::GetOption(Option opt
+@@ -59,7 +59,7 @@ typedef void* SockOptArg;
+ 
+ #endif  // WEBRTC_POSIX
+ 
+-#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__)
++#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) && !defined(WEBRTC_BSD)
+ 
+ int64_t GetSocketRecvTimestamp(int socket) {
+   struct timeval tv_ioctl;
+@@ -276,7 +276,7 @@ int PhysicalSocket::GetOption(Option opt
    socklen_t optlen = sizeof(*value);
    int ret = ::getsockopt(s_, slevel, sopt, (SockOptArg)value, &optlen);
    if (ret != -1 && opt == OPT_DONTFRAGMENT) {
@@ -11,7 +20,7 @@ $NetBSD$
      *value = (*value != IP_PMTUDISC_DONT) ? 1 : 0;
  #endif
    }
-@@ -258,7 +258,7 @@ int PhysicalSocket::SetOption(Option opt
+@@ -289,7 +289,7 @@ int PhysicalSocket::SetOption(Option opt
    if (TranslateOption(opt, &slevel, &sopt) == -1)
      return -1;
    if (opt == OPT_DONTFRAGMENT) {
@@ -20,7 +29,7 @@ $NetBSD$
      value = (value) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
  #endif
    }
-@@ -533,10 +533,10 @@ int PhysicalSocket::TranslateOption(Opti
+@@ -571,10 +571,10 @@ int PhysicalSocket::TranslateOption(Opti
        *slevel = IPPROTO_IP;
        *sopt = IP_DONTFRAGMENT;
        break;
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_platform__thread.cc b/chromium-new/patches/patch-third__party_webrtc_base_platform__thread.cc
index 78cf760..3606d44 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_platform__thread.cc
+++ b/chromium-new/patches/patch-third__party_webrtc_base_platform__thread.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/base/platform_thread.cc.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/platform_thread.cc.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/platform_thread.cc
 @@ -12,11 +12,20 @@
  
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_stringutils.h b/chromium-new/patches/patch-third__party_webrtc_base_stringutils.h
index 8a9bed3..442bf73 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_stringutils.h
+++ b/chromium-new/patches/patch-third__party_webrtc_base_stringutils.h
@@ -1,19 +1,13 @@
 $NetBSD$
 
---- third_party/webrtc/base/stringutils.h.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/stringutils.h.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/stringutils.h
-@@ -23,11 +23,11 @@
+@@ -23,7 +23,7 @@
  #endif  // WEBRTC_WIN 
  
  #if defined(WEBRTC_POSIX)
 -#ifdef BSD
-+#if defined(WEBRTC_BSD) || defined(BSD)
++#if defined(BSD) || defined(WEBRTC_BSD)
  #include <stdlib.h>
--#else  // BSD
-+#else  // WEBRTC_BSD
+ #else  // BSD
  #include <alloca.h>
--#endif  // !BSD
-+#endif  // !WEBRTC_BSD
- #endif  // WEBRTC_POSIX
- 
- #include <string>
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_systeminfo.cc b/chromium-new/patches/patch-third__party_webrtc_base_systeminfo.cc
index e667ec4..013e241 100644
--- a/chromium-new/patches/patch-third__party_webrtc_base_systeminfo.cc
+++ b/chromium-new/patches/patch-third__party_webrtc_base_systeminfo.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/base/systeminfo.cc.orig	2016-06-24 01:04:14.000000000 +0000
+--- third_party/webrtc/base/systeminfo.cc.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/base/systeminfo.cc
 @@ -20,8 +20,12 @@
  #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
diff --git a/chromium-new/patches/patch-third__party_webrtc_build_common.gypi b/chromium-new/patches/patch-third__party_webrtc_build_common.gypi
deleted file mode 100644
index 14858b3..0000000
--- a/chromium-new/patches/patch-third__party_webrtc_build_common.gypi
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/build/common.gypi.orig	2016-06-24 01:04:14.000000000 +0000
-+++ third_party/webrtc/build/common.gypi
-@@ -402,6 +402,13 @@
-           'WEBRTC_LINUX',
-         ],
-       }],
-+      ['os_bsd==1', {
-+        'defines': [
-+          'WEBRTC_BSD',
-+          'WEBRTC_LINUX',
-+          'WEBRTC_THREAD_RR',
-+        ],
-+      }],
-       ['OS=="mac"', {
-         'defines': [
-           'WEBRTC_MAC',
-@@ -485,7 +492,7 @@
-             'WEBRTC_WIN',
-           ],
-         }],
--        ['OS=="linux"', {
-+        ['OS=="linux" or os_bsd==1', {
-           'defines': [
-             'WEBRTC_LINUX',
-           ],
diff --git a/chromium-new/patches/patch-third__party_webrtc_common__audio_wav__file.h b/chromium-new/patches/patch-third__party_webrtc_common__audio_wav__file.h
index d1bac09..e4abb66 100644
--- a/chromium-new/patches/patch-third__party_webrtc_common__audio_wav__file.h
+++ b/chromium-new/patches/patch-third__party_webrtc_common__audio_wav__file.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/common_audio/wav_file.h.orig	2016-06-24 01:04:15.000000000 +0000
+--- third_party/webrtc/common_audio/wav_file.h.orig	2016-11-10 20:03:05.000000000 +0000
 +++ third_party/webrtc/common_audio/wav_file.h
 @@ -14,6 +14,7 @@
  #ifdef __cplusplus
diff --git a/chromium-new/patches/patch-third__party_webrtc_modules_audio__device_audio__device.gypi b/chromium-new/patches/patch-third__party_webrtc_modules_audio__device_audio__device.gypi
deleted file mode 100644
index 99c0902..0000000
--- a/chromium-new/patches/patch-third__party_webrtc_modules_audio__device_audio__device.gypi
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/modules/audio_device/audio_device.gypi.orig	2016-06-24 01:04:15.000000000 +0000
-+++ third_party/webrtc/modules/audio_device/audio_device.gypi
-@@ -47,7 +47,7 @@
-         'fine_audio_buffer.h',
-       ],
-       'conditions': [
--        ['OS=="linux"', {
-+        ['OS=="linux" or os_bsd==1', {
-           'include_dirs': [
-             'linux',
-           ],
-@@ -113,7 +113,7 @@
-                 ],
-               },
-             }],
--            ['OS=="linux"', {
-+            ['OS=="linux" or OS=="freebsd"', {
-               'sources': [
-                 'linux/alsasymboltable_linux.cc',
-                 'linux/alsasymboltable_linux.h',
diff --git a/chromium-new/patches/patch-third__party_webrtc_modules_desktop__capture_desktop__capture.gypi b/chromium-new/patches/patch-third__party_webrtc_modules_desktop__capture_desktop__capture.gypi
deleted file mode 100644
index 69bb9a3..0000000
--- a/chromium-new/patches/patch-third__party_webrtc_modules_desktop__capture_desktop__capture.gypi
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/modules/desktop_capture/desktop_capture.gypi.orig	2016-06-24 01:04:15.000000000 +0000
-+++ third_party/webrtc/modules/desktop_capture/desktop_capture.gypi
-@@ -114,6 +114,11 @@
-             ],
-           },
-         }],
-+        ['os_bsd==1', {
-+          'include_dirs': [
-+            '<(prefix_dir)/include',
-+          ],
-+        }],
-         ['OS!="win" and OS!="mac" and use_x11==0', {
-           'sources': [
-             "mouse_cursor_monitor_null.cc",
diff --git a/chromium-new/patches/patch-third__party_webrtc_modules_remote__bitrate__estimator_overuse__detector.cc b/chromium-new/patches/patch-third__party_webrtc_modules_remote__bitrate__estimator_overuse__detector.cc
index d2f101e..360de3c 100644
--- a/chromium-new/patches/patch-third__party_webrtc_modules_remote__bitrate__estimator_overuse__detector.cc
+++ b/chromium-new/patches/patch-third__party_webrtc_modules_remote__bitrate__estimator_overuse__detector.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc.orig	2016-06-24 01:04:15.000000000 +0000
+--- third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc.orig	2016-11-10 20:03:06.000000000 +0000
 +++ third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc
 @@ -14,6 +14,7 @@
  #include <stdlib.h>
diff --git a/chromium-new/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc b/chromium-new/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc
index 6029c14..37a4a6d 100644
--- a/chromium-new/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc
+++ b/chromium-new/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc
@@ -1,12 +1,12 @@
 $NetBSD$
 
---- third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc.orig	2016-06-24 01:04:15.000000000 +0000
+--- third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc.orig	2016-11-10 20:03:06.000000000 +0000
 +++ third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
-@@ -14,6 +14,7 @@
+@@ -13,6 +13,7 @@
  #include <string.h>
  
  #include <algorithm>
 +#include <cstdlib>
  #include <iterator>
+ #include <utility>
  
- #include "webrtc/base/checks.h"
diff --git a/chromium-new/patches/patch-third__party_webrtc_modules_video__coding_receiver.cc b/chromium-new/patches/patch-third__party_webrtc_modules_video__coding_receiver.cc
index c8f0d24..b0b8dd3 100644
--- a/chromium-new/patches/patch-third__party_webrtc_modules_video__coding_receiver.cc
+++ b/chromium-new/patches/patch-third__party_webrtc_modules_video__coding_receiver.cc
@@ -1,15 +1,15 @@
 $NetBSD$
 
---- third_party/webrtc/modules/video_coding/receiver.cc.orig	2016-06-24 01:04:15.000000000 +0000
+--- third_party/webrtc/modules/video_coding/receiver.cc.orig	2016-11-10 20:03:06.000000000 +0000
 +++ third_party/webrtc/modules/video_coding/receiver.cc
-@@ -159,8 +159,8 @@ VCMEncodedFrame* VCMReceiver::FrameForDe
+@@ -165,8 +165,8 @@ VCMEncodedFrame* VCMReceiver::FrameForDe
    // Assume that render timing errors are due to changes in the video stream.
-   if (*next_render_time_ms < 0) {
+   if (render_time_ms < 0) {
      timing_error = true;
--  } else if (std::abs(*next_render_time_ms - now_ms) > max_video_delay_ms_) {
--    int frame_delay = static_cast<int>(std::abs(*next_render_time_ms - now_ms));
-+  } else if (std::labs(*next_render_time_ms - now_ms) > max_video_delay_ms_) {
-+    int frame_delay = static_cast<int>(std::labs(*next_render_time_ms - now_ms));
+-  } else if (std::abs(render_time_ms - now_ms) > max_video_delay_ms_) {
+-    int frame_delay = static_cast<int>(std::abs(render_time_ms - now_ms));
++  } else if (std::labs(render_time_ms - now_ms) > max_video_delay_ms_) {
++    int frame_delay = static_cast<int>(std::labs(render_time_ms - now_ms));
      LOG(LS_WARNING) << "A frame about to be decoded is out of the configured "
                      << "delay bounds (" << frame_delay << " > "
                      << max_video_delay_ms_
diff --git a/chromium-new/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn b/chromium-new/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn
new file mode 100644
index 0000000..506c262
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/webrtc/system_wrappers/BUILD.gn.orig	2016-11-10 20:03:06.000000000 +0000
++++ third_party/webrtc/system_wrappers/BUILD.gn
+@@ -115,7 +115,7 @@ source_set("system_wrappers") {
+     libs += [ "rt" ]
+   }
+ 
+-  if (is_linux || is_android) {
++  if (is_linux || is_android || is_bsd) {
+     sources += [ "source/atomic32_non_darwin_unix.cc" ]
+   }
+ 
diff --git a/chromium-new/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__posix.cc b/chromium-new/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__posix.cc
deleted file mode 100644
index 9ebe29f..0000000
--- a/chromium-new/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__posix.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/system_wrappers/source/atomic32_posix.cc.orig	2016-06-24 01:04:15.000000000 +0000
-+++ third_party/webrtc/system_wrappers/source/atomic32_posix.cc
-@@ -12,7 +12,11 @@
- 
- #include <assert.h>
- #include <inttypes.h>
-+#if defined(WEBRTC_BSD)
-+#include <stdlib.h>
-+#else
- #include <malloc.h>
-+#endif
- 
- #include "webrtc/common_types.h"
- 
diff --git a/chromium-new/patches/patch-third__party_webrtc_voice__engine_voice__engine__defines.h b/chromium-new/patches/patch-third__party_webrtc_voice__engine_voice__engine__defines.h
deleted file mode 100644
index 4123a34..0000000
--- a/chromium-new/patches/patch-third__party_webrtc_voice__engine_voice__engine__defines.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/voice_engine/voice_engine_defines.h.orig	2016-06-24 01:04:15.000000000 +0000
-+++ third_party/webrtc/voice_engine/voice_engine_defines.h
-@@ -210,7 +210,7 @@ inline int VoEChannelId(int moduleId) {
- #include <pthread.h>
- #include <sys/socket.h>
- #include <sys/types.h>
--#ifndef QNX
-+#if !defined(QNX) && !defined(WEBRTC_BSD)
- #include <linux/net.h>
- #ifndef ANDROID
- #include <sys/soundcard.h>
diff --git a/chromium-new/patches/patch-third__party_widevine_cdm_BUILD.gn b/chromium-new/patches/patch-third__party_widevine_cdm_BUILD.gn
new file mode 100644
index 0000000..2e20bd4
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_widevine_cdm_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/widevine/cdm/BUILD.gn.orig	2016-11-10 20:02:29.000000000 +0000
++++ third_party/widevine/cdm/BUILD.gn
+@@ -25,7 +25,7 @@ if (is_android) {
+     widevine_cdm_version_h_file =
+         "chromeos/$widevine_arch/widevine_cdm_version.h"
+     widevine_cdm_binary_files = [ "chromeos/$widevine_arch/libwidevinecdm.so" ]
+-  } else if (is_linux) {
++  } else if (is_linux || is_bsd) {
+     widevine_cdm_version_h_file = "linux/$widevine_arch/widevine_cdm_version.h"
+     widevine_cdm_binary_files = [ "linux/$widevine_arch/libwidevinecdm.so" ]
+   } else if (is_win) {
+@@ -151,7 +151,7 @@ if ((is_chrome_branded || enable_widevin
+       ":widevinecdm",
+     ]
+ 
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       ldflags =
+           [ rebase_path("$root_out_dir/$widevine_cdm_path/libwidevinecdm.so",
+                         root_build_dir) ]
+@@ -174,7 +174,7 @@ if ((is_chrome_branded || enable_widevin
+ # This target exists for tests to depend on that pulls in a runtime dependency
+ # on the license server.
+ source_set("widevine_test_license_server") {
+-  if (is_chrome_branded && is_linux) {
++  if (is_chrome_branded && is_linux || is_bsd) {
+     deps = [
+       # TODO(jrummell)
+       # This target should be removed and targets should have data_deps on this target:
diff --git a/chromium-new/patches/patch-third__party_widevine_cdm_stub_widevine__cdm__version.h b/chromium-new/patches/patch-third__party_widevine_cdm_stub_widevine__cdm__version.h
new file mode 100644
index 0000000..fafa2d3
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_widevine_cdm_stub_widevine__cdm__version.h
@@ -0,0 +1,11 @@
+$NetBSD$
+
+--- third_party/widevine/cdm/stub/widevine_cdm_version.h.orig	2016-11-10 20:02:29.000000000 +0000
++++ third_party/widevine/cdm/stub/widevine_cdm_version.h
+@@ -11,5 +11,6 @@
+ #include "third_party/widevine/cdm/widevine_cdm_common.h"
+ 
+ #define WIDEVINE_CDM_AVAILABLE
++#define WIDEVINE_CDM_VERSION_STRING "pkgsrc-version"
+ 
+ #endif  // WIDEVINE_CDM_VERSION_H_
diff --git a/chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal b/chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal
new file mode 100644
index 0000000..7020e40
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal
@@ -0,0 +1,62 @@
+$NetBSD$
+
+--- third_party/xdg-utils/scripts/xdg-terminal.orig	2016-11-10 20:03:05.000000000 +0000
++++ third_party/xdg-utils/scripts/xdg-terminal
+@@ -302,7 +302,7 @@ detectDE()
+     elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
+     elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
+     elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
+-    elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde;
++    elif [ x"$DESKTOP_SESSION" = x"LXDE" ]; then DE=lxde;
+     else DE=""
+     fi
+ }
+@@ -331,7 +331,7 @@ terminal_kde()
+     terminal_exec=`which $terminal 2>/dev/null`
+ 
+     if [ -x "$terminal_exec" ]; then
+-        if [ x"$1" == x"" ]; then
++        if [ x"$1" = x"" ]; then
+             $terminal_exec
+         else
+             $terminal_exec -e "$1"
+@@ -358,10 +358,10 @@ terminal_gnome()
+     terminal_exec=`which $term_exec 2>/dev/null`
+ 
+     if [ -x "$terminal_exec" ]; then
+-        if [ x"$1" == x"" ]; then
++        if [ x"$1" = x"" ]; then
+             $terminal_exec
+         else
+-            if [ x"$term_exec_arg" == x"" ]; then
++            if [ x"$term_exec_arg" = x"" ]; then
+                 $terminal_exec "$1"
+             else
+                 $terminal_exec "$term_exec_arg" "$1"
+@@ -380,7 +380,7 @@ terminal_gnome()
+ 
+ terminal_xfce()
+ {
+-    if [ x"$1" == x"" ]; then
++    if [ x"$1" = x"" ]; then
+         exo-open --launch TerminalEmulator
+     else
+         exo-open --launch TerminalEmulator "$1"
+@@ -396,7 +396,7 @@ terminal_xfce()
+ terminal_generic()
+ {
+     # if $TERM is not set, try xterm
+-    if [ x"$TERM" == x"" ]; then
++    if [ x"$TERM" = x"" ]; then
+         TERM=xterm
+     fi
+ 
+@@ -416,7 +416,7 @@ terminal_generic()
+ terminal_lxde()
+ {
+     if which lxterminal &>/dev/null; then
+-        if [ x"$1" == x"" ]; then
++        if [ x"$1" = x"" ]; then
+             lxterminal
+         else
+             lxterminal -e "$1"
diff --git a/chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal.in b/chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal.in
new file mode 100644
index 0000000..ac0872b
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal.in
@@ -0,0 +1,53 @@
+$NetBSD$
+
+--- third_party/xdg-utils/scripts/xdg-terminal.in.orig	2016-11-10 20:03:05.000000000 +0000
++++ third_party/xdg-utils/scripts/xdg-terminal.in
+@@ -35,7 +35,7 @@ terminal_kde()
+     terminal_exec=`which $terminal 2>/dev/null`
+ 
+     if [ -x "$terminal_exec" ]; then
+-        if [ x"$1" == x"" ]; then
++        if [ x"$1" = x"" ]; then
+             $terminal_exec
+         else
+             $terminal_exec -e "$1"
+@@ -62,10 +62,10 @@ terminal_gnome()
+     terminal_exec=`which $term_exec 2>/dev/null`
+ 
+     if [ -x "$terminal_exec" ]; then
+-        if [ x"$1" == x"" ]; then
++        if [ x"$1" = x"" ]; then
+             $terminal_exec
+         else
+-            if [ x"$term_exec_arg" == x"" ]; then
++            if [ x"$term_exec_arg" = x"" ]; then
+                 $terminal_exec "$1"
+             else
+                 $terminal_exec "$term_exec_arg" "$1"
+@@ -84,7 +84,7 @@ terminal_gnome()
+ 
+ terminal_xfce()
+ {
+-    if [ x"$1" == x"" ]; then
++    if [ x"$1" = x"" ]; then
+         exo-open --launch TerminalEmulator
+     else
+         exo-open --launch TerminalEmulator "$1"
+@@ -100,7 +100,7 @@ terminal_xfce()
+ terminal_generic()
+ {
+     # if $TERM is not set, try xterm
+-    if [ x"$TERM" == x"" ]; then
++    if [ x"$TERM" = x"" ]; then
+         TERM=xterm
+     fi
+ 
+@@ -120,7 +120,7 @@ terminal_generic()
+ terminal_lxde()
+ {
+     if which lxterminal &>/dev/null; then
+-        if [ x"$1" == x"" ]; then
++        if [ x"$1" = x"" ]; then
+             lxterminal
+         else
+             lxterminal -e "$1"
diff --git a/chromium-new/patches/patch-third__party_yasm_BUILD.gn b/chromium-new/patches/patch-third__party_yasm_BUILD.gn
new file mode 100644
index 0000000..d9e4455
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_yasm_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- third_party/yasm/BUILD.gn.orig	2016-11-10 20:02:29.000000000 +0000
++++ third_party/yasm/BUILD.gn
+@@ -32,7 +32,12 @@ import("//build/config/compiler/compiler
+ if (current_toolchain == host_toolchain) {
+   # Various files referenced by multiple targets.
+   yasm_gen_include_dir = "$target_gen_dir/include"
+-  config_makefile = "source/config/$host_os/Makefile"
++  # HACK for All BSD derivatives use openbsd include directory
++  if (is_bsd) {
++    config_makefile = "source/config/openbsd/Makefile"
++  } else {
++    config_makefile = "source/config/$host_os/Makefile"
++  }
+   version_file = "version.mac"
+ 
+   import("//build/compiled_action.gni")
diff --git a/chromium-new/patches/patch-third__party_zlib_BUILD.gn b/chromium-new/patches/patch-third__party_zlib_BUILD.gn
new file mode 100644
index 0000000..f6de8cc
--- /dev/null
+++ b/chromium-new/patches/patch-third__party_zlib_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/zlib/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
++++ third_party/zlib/BUILD.gn
+@@ -115,7 +115,7 @@ static_library("minizip") {
+       "contrib/minizip/iowin32.h",
+     ]
+   }
+-  if (is_mac || is_ios || is_android) {
++  if (is_mac || is_ios || is_android || is_bsd) {
+     # Mac, Android and the BSDs don't have fopen64, ftello64, or fseeko64. We
+     # use fopen, ftell, and fseek instead on these systems.
+     defines = [ "USE_FILE32API" ]
diff --git a/chromium-new/patches/patch-tools_battor__agent_BUILD.gn b/chromium-new/patches/patch-tools_battor__agent_BUILD.gn
new file mode 100644
index 0000000..9fad757
--- /dev/null
+++ b/chromium-new/patches/patch-tools_battor__agent_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/battor_agent/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
++++ tools/battor_agent/BUILD.gn
+@@ -5,7 +5,7 @@
+ import("//testing/test.gni")
+ 
+ # Works only on desktop platforms.
+-assert(is_win || is_linux || is_mac)
++assert(is_win || is_linux || is_bsd || is_mac)
+ 
+ executable("battor_agent") {
+   sources = [
diff --git a/chromium-new/patches/patch-tools_gn_args.cc b/chromium-new/patches/patch-tools_gn_args.cc
new file mode 100644
index 0000000..b8daf3a
--- /dev/null
+++ b/chromium-new/patches/patch-tools_gn_args.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- tools/gn/args.cc.orig	2016-11-10 20:02:30.000000000 +0000
++++ tools/gn/args.cc
+@@ -258,8 +258,12 @@ void Args::SetSystemVarsLocked(Scope* de
+   os = "linux";
+ #elif defined(OS_ANDROID)
+   os = "android";
++#elif defined(OS_FREEBSD)
++  os = "freebsd";
+ #elif defined(OS_NETBSD)
+   os = "netbsd";
++#elif defined(OS_OPENBSD)
++  os = "openbsd";
+ #else
+   #error Unknown OS type.
+ #endif
diff --git a/chromium-new/patches/patch-tools_gn_bootstrap_bootstrap.py b/chromium-new/patches/patch-tools_gn_bootstrap_bootstrap.py
new file mode 100644
index 0000000..f74016c
--- /dev/null
+++ b/chromium-new/patches/patch-tools_gn_bootstrap_bootstrap.py
@@ -0,0 +1,65 @@
+$NetBSD$
+
+--- tools/gn/bootstrap/bootstrap.py.orig	2016-11-10 20:02:30.000000000 +0000
++++ tools/gn/bootstrap/bootstrap.py
+@@ -23,6 +23,7 @@ import os
+ import shutil
+ import subprocess
+ import sys
++import platform
+ import tempfile
+ 
+ BOOTSTRAP_DIR = os.path.dirname(os.path.abspath(__file__))
+@@ -31,8 +32,11 @@ SRC_ROOT = os.path.dirname(os.path.dirna
+ 
+ is_win = sys.platform.startswith('win')
+ is_linux = sys.platform.startswith('linux')
++is_bsd = platform.system().lower().endswith('bsd')
++is_freebsd = sys.platform.startswith('freebsd')
++is_netbsd = sys.platform.startswith('netbsd')
+ is_mac = sys.platform.startswith('darwin')
+-is_posix = is_linux or is_mac
++is_posix = is_linux or is_mac or is_bsd
+ 
+ def check_call(cmd, **kwargs):
+   logging.debug('Running: %s', ' '.join(cmd))
+@@ -594,6 +598,39 @@ def write_gn_ninja(path, root_gen_dir, o
+         'base/third_party/libevent/epoll.c',
+     ])
+ 
++  if is_bsd:
++    libs.extend(['-lexecinfo', '-lkvm'])
++    ldflags.extend(['-pthread'])
++
++    static_libraries['xdg_user_dirs'] = {
++        'sources': [
++            'base/third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
++        ],
++        'tool': 'cxx',
++    }
++    static_libraries['base']['sources'].extend([
++        #'base/allocator/allocator_shim.cc',
++        #'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
++        'base/memory/shared_memory_posix.cc',
++        'base/nix/xdg_util.cc',
++        #'base/process/internal_linux.cc',
++        'base/process/process_handle_' + platform.system().lower() + '.cc',
++        'base/process/process_iterator_' + platform.system().lower() + '.cc',
++        # 'base/process/process_linux.cc',
++        'base/process/process_metrics_'+ platform.system().lower() + '.cc',
++        'base/strings/sys_string_conversions_posix.cc',
++        'base/sys_info_' + platform.system().lower() + '.cc',
++        'base/threading/platform_thread_' + platform.system().lower() + '.cc',
++        # 'base/trace_event/malloc_dump_provider.cc',
++    ])
++    static_libraries['libevent']['include_dirs'].extend([
++        os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', platform.system().lower())
++    ])
++    static_libraries['libevent']['sources'].extend([
++        'base/third_party/libevent/kqueue.c',
++    ])
++    # Suppressing warnings
++    cflags.extend(['-Wno-deprecated-register', '-Wno-parentheses-equality'])
+ 
+   if is_mac:
+     static_libraries['base']['sources'].extend([
diff --git a/chromium-new/patches/patch-tools_gn_gn__unittests.isolate b/chromium-new/patches/patch-tools_gn_gn__unittests.isolate
new file mode 100644
index 0000000..e163999
--- /dev/null
+++ b/chromium-new/patches/patch-tools_gn_gn__unittests.isolate
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/gn/gn_unittests.isolate.orig	2016-11-10 20:02:30.000000000 +0000
++++ tools/gn/gn_unittests.isolate
+@@ -3,7 +3,7 @@
+ # found in the LICENSE file.
+ {
+   'conditions': [
+-    ['OS=="linux" or OS=="mac" or OS=="win"', {
++    ['OS=="linux" or OS=="bsd" or OS=="mac" or OS=="win"', {
+       'variables': {
+         'command': [
+           '<(PRODUCT_DIR)/gn_unittests<(EXECUTABLE_SUFFIX)',
diff --git a/chromium-new/patches/patch-tools_gyp_pylib_gyp_generator_make.py b/chromium-new/patches/patch-tools_gyp_pylib_gyp_generator_make.py
deleted file mode 100644
index da49fb2..0000000
--- a/chromium-new/patches/patch-tools_gyp_pylib_gyp_generator_make.py
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD$
-
---- tools/gyp/pylib/gyp/generator/make.py.orig	2016-06-24 01:04:17.000000000 +0000
-+++ tools/gyp/pylib/gyp/generator/make.py
-@@ -276,7 +276,7 @@ CC.target ?= %(CC.target)s
- CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
- CXX.target ?= %(CXX.target)s
- CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
--LINK.target ?= %(LINK.target)s
-+LINK.target ?= %(CXX.target)s
- LDFLAGS.target ?= $(LDFLAGS)
- AR.target ?= $(AR)
- 
-@@ -285,13 +285,13 @@ LINK ?= $(CXX.target)
- 
- # TODO(evan): move all cross-compilation logic to gyp-time so we don't need
- # to replicate this environment fallback in make as well.
--CC.host ?= %(CC.host)s
--CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
--CXX.host ?= %(CXX.host)s
--CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
--LINK.host ?= %(LINK.host)s
--LDFLAGS.host ?=
--AR.host ?= %(AR.host)s
-+CC.host ?= $(CC)
-+CFLAGS.host ?= $(CFLAGS)
-+CXX.host ?= $(CXX)
-+CXXFLAGS.host ?= $(CXXFLAGS)
-+LINK.host ?= $(CXX)
-+LDFLAGS.host ?= $(LDFLAGS)
-+AR.host ?= $(AR)
- 
- # Define a dir function that can handle spaces.
- # http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
-@@ -1816,7 +1816,7 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj)
-       return modules
- 
-     # Retrieve the default value of 'SHARED_LIB_SUFFIX'
--    params = {'flavor': 'linux'}
-+    params = {'flavor': 'freebsd'}
-     default_variables = {}
-     CalculateVariables(default_variables, params)
- 
diff --git a/chromium-new/patches/patch-tools_gyp_test_additional-targets_src_dir1_actions.gyp b/chromium-new/patches/patch-tools_gyp_test_additional-targets_src_dir1_actions.gyp
deleted file mode 100644
index f20cc88..0000000
--- a/chromium-new/patches/patch-tools_gyp_test_additional-targets_src_dir1_actions.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- tools/gyp/test/additional-targets/src/dir1/actions.gyp.orig	2016-06-24 01:04:17.000000000 +0000
-+++ tools/gyp/test/additional-targets/src/dir1/actions.gyp
-@@ -47,7 +47,7 @@
-     },
-   ],
-   'conditions': [
--    ['OS=="linux"', {
-+    ['OS=="linux" or OS=="freebsd"', {
-       'target_defaults': {
-         'cflags': ['-fPIC'],
-       },
diff --git a/chromium-new/patches/patch-tools_gyp_test_library_src_library.gyp b/chromium-new/patches/patch-tools_gyp_test_library_src_library.gyp
deleted file mode 100644
index b968f89..0000000
--- a/chromium-new/patches/patch-tools_gyp_test_library_src_library.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- tools/gyp/test/library/src/library.gyp.orig	2016-06-24 01:04:17.000000000 +0000
-+++ tools/gyp/test/library/src/library.gyp
-@@ -48,7 +48,7 @@
-     },
-   ],
-   'conditions': [
--    ['OS=="linux"', {
-+    ['OS=="linux" or OS=="freebsd"', {
-       'target_defaults': {
-         # Support 64-bit shared libs (also works fine for 32-bit).
-         'cflags': ['-fPIC'],
diff --git a/chromium-new/patches/patch-ui_accessibility_accessibility.gyp b/chromium-new/patches/patch-ui_accessibility_accessibility.gyp
deleted file mode 100644
index da0941a..0000000
--- a/chromium-new/patches/patch-ui_accessibility_accessibility.gyp
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/accessibility/accessibility.gyp.orig	2016-06-24 01:02:52.000000000 +0000
-+++ ui/accessibility/accessibility.gyp
-@@ -68,7 +68,7 @@
-             '../../third_party/iaccessible2/iaccessible2.gyp:iaccessible2'
-           ],
-         }],
--        ['OS=="linux" and chromeos==0 and use_x11==1', {
-+        ['(OS=="linux" or os_bsd==1) and chromeos==0 and use_x11==1', {
-           'dependencies': [
-             '../../build/linux/system.gyp:atk',
-             '../../build/linux/system.gyp:gconf',
-@@ -85,7 +85,7 @@
-             ],
-           },
-         }],
--        ['OS!="linux" or chromeos==1 or use_x11==0', {
-+        ['(OS!="linux" and os_bsd==0) or chromeos==1 or use_x11==0', {
-           'sources!': [
-             'platform/ax_platform_node_auralinux.cc',
-             'platform/ax_platform_node_auralinux.h',
diff --git a/chromium-new/patches/patch-ui_accessibility_platform_ax__platform__node.h b/chromium-new/patches/patch-ui_accessibility_platform_ax__platform__node.h
index 540a0d4..0a52a68 100644
--- a/chromium-new/patches/patch-ui_accessibility_platform_ax__platform__node.h
+++ b/chromium-new/patches/patch-ui_accessibility_platform_ax__platform__node.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/accessibility/platform/ax_platform_node.h.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/accessibility/platform/ax_platform_node.h.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/accessibility/platform/ax_platform_node.h
 @@ -22,7 +22,7 @@
  #define PLATFORM_HAS_AX_PLATFORM_NODE_IMPL 1
diff --git a/chromium-new/patches/patch-ui_app__list_app__list__constants.cc b/chromium-new/patches/patch-ui_app__list_app__list__constants.cc
index 25d1bba..9ba61b7 100644
--- a/chromium-new/patches/patch-ui_app__list_app__list__constants.cc
+++ b/chromium-new/patches/patch-ui_app__list_app__list__constants.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- ui/app_list/app_list_constants.cc.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/app_list/app_list_constants.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/app_list/app_list_constants.cc
-@@ -148,7 +148,7 @@ const char kSearchQueryLength[] = "Apps.
+@@ -154,7 +154,7 @@ const char kSearchQueryLength[] = "Apps.
  const char kSearchResultDistanceFromOrigin[] =
      "Apps.AppListSearchResultDistanceFromOrigin";
  
 -#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_LINUX) || defined(OS_FREEBSD)
  #if defined(GOOGLE_CHROME_BUILD)
  const char kAppListWMClass[] = "chrome_app_list";
  #else  // CHROMIUM_BUILD
diff --git a/chromium-new/patches/patch-ui_app__list_app__list__constants.h b/chromium-new/patches/patch-ui_app__list_app__list__constants.h
index 19a0153..0104827 100644
--- a/chromium-new/patches/patch-ui_app__list_app__list__constants.h
+++ b/chromium-new/patches/patch-ui_app__list_app__list__constants.h
@@ -1,14 +1,14 @@
 $NetBSD$
 
---- ui/app_list/app_list_constants.h.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/app_list/app_list_constants.h.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/app_list/app_list_constants.h
-@@ -92,8 +92,8 @@ APP_LIST_EXPORT extern const char kSearc
+@@ -95,8 +95,8 @@ APP_LIST_EXPORT extern const char kSearc
  APP_LIST_EXPORT extern const char kSearchQueryLength[];
  APP_LIST_EXPORT extern const char kSearchResultDistanceFromOrigin[];
  
 -#if defined(OS_LINUX)
 -// The WM_CLASS name for the app launcher window on Linux.
-+#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_LINUX) || defined(OS_FREEBSD)
 +// The WM_CLASS name for the app launcher window on Linux/FreeBSD.
  APP_LIST_EXPORT extern const char kAppListWMClass[];
  #endif
diff --git a/chromium-new/patches/patch-ui_app__list_app__list__menu.cc b/chromium-new/patches/patch-ui_app__list_app__list__menu.cc
index 7677d9f..d1a7d75 100644
--- a/chromium-new/patches/patch-ui_app__list_app__list__menu.cc
+++ b/chromium-new/patches/patch-ui_app__list_app__list__menu.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- ui/app_list/app_list_menu.cc.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/app_list/app_list_menu.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/app_list/app_list_menu.cc
-@@ -35,7 +35,7 @@ void AppListMenu::InitMenu() {
-                                users_[i].email.empty() ? users_[i].name
-                                                        : users_[i].email,
-                                0 /* group_id */);
--#elif defined(OS_WIN) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
-+#elif defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS))
+@@ -30,7 +30,7 @@ void AppListMenu::InitMenu() {
+   // only 1 user.
+   if (users_.size() > 1) {
+     for (size_t i = 0; i < users_.size(); ++i) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
        menu_model_.AddItem(SELECT_PROFILE + i, users_[i].name);
        int menu_index = menu_model_.GetIndexOfCommandId(SELECT_PROFILE + i);
        menu_model_.SetSublabel(menu_index, users_[i].email);
diff --git a/chromium-new/patches/patch-ui_app__list_views_app__list__item__view.cc b/chromium-new/patches/patch-ui_app__list_views_app__list__item__view.cc
new file mode 100644
index 0000000..d99fff6
--- /dev/null
+++ b/chromium-new/patches/patch-ui_app__list_views_app__list__item__view.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/app_list/views/app_list_item_view.cc.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/app_list/views/app_list_item_view.cc
+@@ -55,7 +55,7 @@ gfx::FontList GetFontList() {
+   const gfx::FontList& font_list = rb.GetFontList(kItemTextFontStyle);
+ // The font is different on each platform. The font size is adjusted on some
+ // platforms to keep a consistent look.
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   // Reducing the font size by 2 makes it the same as the Windows font size.
+   const int kFontSizeDelta = -2;
+   return font_list.DeriveWithSizeDelta(kFontSizeDelta);
diff --git a/chromium-new/patches/patch-ui_app__list_views_app__list__view.cc b/chromium-new/patches/patch-ui_app__list_views_app__list__view.cc
index 7130df6..42759cc 100644
--- a/chromium-new/patches/patch-ui_app__list_views_app__list__view.cc
+++ b/chromium-new/patches/patch-ui_app__list_views_app__list__view.cc
@@ -1,22 +1,22 @@
 $NetBSD$
 
---- ui/app_list/views/app_list_view.cc.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/app_list/views/app_list_view.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/app_list/views/app_list_view.cc
-@@ -80,7 +80,7 @@ bool SupportsShadow() {
-           ::switches::kDisableDwmComposition)) {
-     return false;
-   }
--#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#elif (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+@@ -70,7 +70,7 @@ const int kArrowOffset = 10;
+ 
+ // Determines whether the current environment supports shadows bubble borders.
+ bool SupportsShadow() {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
    // Shadows are not supported on (non-ChromeOS) Linux.
    return false;
  #endif
-@@ -606,7 +606,7 @@ void AppListView::OnBeforeBubbleWidgetIn
-   // the taskbar for these versions of Windows.
-   if (base::win::GetVersion() >= base::win::VERSION_WIN7)
-     params->force_show_in_taskbar = true;
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
+@@ -567,7 +567,7 @@ void AppListView::OnBeforeBubbleWidgetIn
+   if (!params->native_widget && delegate_ && delegate_->ForceNativeDesktop())
+     params->native_widget = new views::DesktopNativeWidgetAura(widget);
+ #endif
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
    // Set up a custom WM_CLASS for the app launcher window. This allows task
    // switchers in X11 environments to distinguish it from main browser windows.
    params->wm_class_name = kAppListWMClass;
diff --git a/chromium-new/patches/patch-ui_aura_BUILD.gn b/chromium-new/patches/patch-ui_aura_BUILD.gn
new file mode 100644
index 0000000..aca1c53
--- /dev/null
+++ b/chromium-new/patches/patch-ui_aura_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/aura/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/aura/BUILD.gn
+@@ -280,7 +280,7 @@ test("aura_unittests") {
+     "//ui/gl:test_support",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//third_party/mesa" ]
+   }
+ 
diff --git a/chromium-new/patches/patch-ui_base_BUILD.gn b/chromium-new/patches/patch-ui_base_BUILD.gn
index d2dca0d..f2bb2df 100644
--- a/chromium-new/patches/patch-ui_base_BUILD.gn
+++ b/chromium-new/patches/patch-ui_base_BUILD.gn
@@ -1,13 +1,63 @@
 $NetBSD$
 
---- ui/base/BUILD.gn.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/base/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/base/BUILD.gn
-@@ -433,7 +433,7 @@ component("base") {
-     deps += [ "//ui/gfx/x" ]
+@@ -347,7 +347,7 @@ component("base") {
+     sources += [ "touch/touch_device_android.cc" ]
+   } else if (is_ios) {
+     sources += [ "touch/touch_device_ios.cc" ]
+-  } else if (is_linux) {
++  } else if (is_linux || is_bsd) {
+     sources += [ "touch/touch_device_linux.cc" ]
+   } else {
+     # Empty implementation for all other cases.
+@@ -449,11 +449,11 @@ component("base") {
+     ]
    }
  
 -  if (!use_aura || !is_linux) {
-+  if (!use_aura) {
++  if (!use_aura || !(is_linux || is_bsd)) {
      sources -= [ "resource/resource_bundle_auralinux.cc" ]
    }
  
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//build/linux:fontconfig" ]
+   }
+ 
+@@ -461,7 +461,7 @@ component("base") {
+     configs += [ "//build/config/linux:glib" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     if (!toolkit_views && !use_aura) {
+       sources -= [
+         "dragdrop/drag_utils.cc",
+@@ -794,7 +794,7 @@ test("ui_base_unittests") {
+       "ime/win/imm32_manager_unittest.cc",
+       "ime/win/tsf_input_scope_unittest.cc",
+     ]
+-    if (is_linux && use_aura && !is_chromeos) {
++    if ((is_linux || is_bsd) && use_aura && !is_chromeos) {
+       sources += [ "ime/input_method_auralinux_unittest.cc" ]
+     }
+     if (use_x11) {
+@@ -917,7 +917,7 @@ test("ui_base_unittests") {
+     ]
+   }
+ 
+-  if (is_android || is_linux || is_mac || is_win) {
++  if (is_android || is_linux || is_bsd || is_mac || is_win) {
+     # TODO(brettw): We should be able to depend on //ui/resources:ui_test_pak
+     # instead of depending directly on the non-test .pak files, but depending
+     # on ui_test_pak seems to have no effect.
+@@ -930,7 +930,7 @@ test("ui_base_unittests") {
+       "//third_party/mesa:osmesa",
+     ]
+   }
+-  if (is_linux || is_win) {
++  if (is_linux || is_bsd || is_win) {
+     data += [
+       # TODO(brettw): Remove these two lines.
+       "$root_out_dir/ui/en-US.pak",
diff --git a/chromium-new/patches/patch-ui_base_ime_BUILD.gn b/chromium-new/patches/patch-ui_base_ime_BUILD.gn
new file mode 100644
index 0000000..30dd684
--- /dev/null
+++ b/chromium-new/patches/patch-ui_base_ime_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/base/ime/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/base/ime/BUILD.gn
+@@ -123,7 +123,7 @@ component("ime") {
+     ":text_input_types",
+   ]
+ 
+-  if (!use_aura || (!is_linux && !use_ozone)) {
++  if (!use_aura || (!(is_linux || is_bsd) && !use_ozone) || !is_bsd) {
+     sources -= [
+       "input_method_auralinux.cc",
+       "input_method_auralinux.h",
+@@ -137,7 +137,7 @@ component("ime") {
+     ]
+   }
+ 
+-  if (!is_chromeos && is_linux) {
++  if (!is_chromeos && (is_linux || is_bsd)) {
+     sources += [
+       "linux/text_edit_command_auralinux.cc",
+       "linux/text_edit_command_auralinux.h",
diff --git a/chromium-new/patches/patch-ui_base_ime_ime__engine__handler__interface.h b/chromium-new/patches/patch-ui_base_ime_ime__engine__handler__interface.h
index 3238a6f..b49888a 100644
--- a/chromium-new/patches/patch-ui_base_ime_ime__engine__handler__interface.h
+++ b/chromium-new/patches/patch-ui_base_ime_ime__engine__handler__interface.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/base/ime/ime_engine_handler_interface.h.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/base/ime/ime_engine_handler_interface.h.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/base/ime/ime_engine_handler_interface.h
 @@ -138,7 +138,7 @@ class UI_BASE_IME_EXPORT IMEEngineHandle
    // Hides the input view window (from API call).
diff --git a/chromium-new/patches/patch-ui_base_ime_input__method__factory.cc b/chromium-new/patches/patch-ui_base_ime_input__method__factory.cc
index 8f46372..b17cfbb 100644
--- a/chromium-new/patches/patch-ui_base_ime_input__method__factory.cc
+++ b/chromium-new/patches/patch-ui_base_ime_input__method__factory.cc
@@ -1,22 +1,26 @@
 $NetBSD$
 
---- ui/base/ime/input_method_factory.cc.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/base/ime/input_method_factory.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/base/ime/input_method_factory.cc
-@@ -14,7 +14,7 @@
+@@ -14,8 +14,8 @@
+ #include "ui/base/ime/input_method_win.h"
  #elif defined(OS_MACOSX)
  #include "ui/base/ime/input_method_mac.h"
- #elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11) && \
+-#elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11) && \
 -      !defined(OS_CHROMEOS)
-+      !defined(OS_CHROMEOS) || defined(OS_BSD)
++#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD)) && \
++	defined(USE_X11) && !defined(OS_CHROMEOS)
  #include "ui/base/ime/input_method_auralinux.h"
  #elif defined(OS_ANDROID)
  #include "ui/base/ime/input_method_android.h"
-@@ -56,7 +56,7 @@ scoped_ptr<InputMethod> CreateInputMetho
+@@ -56,8 +56,8 @@ std::unique_ptr<InputMethod> CreateInput
+   return base::MakeUnique<InputMethodWin>(delegate, widget);
  #elif defined(OS_MACOSX)
-   return make_scoped_ptr(new InputMethodMac(delegate));
- #elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11) && \
+   return base::MakeUnique<InputMethodMac>(delegate);
+-#elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11) && \
 -      !defined(OS_CHROMEOS)
-+      !defined(OS_CHROMEOS) || defined(OS_BSD)
-   return make_scoped_ptr(new InputMethodAuraLinux(delegate));
++#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD)) && \
++  defined(USE_X11) && !defined(OS_CHROMEOS)
+   return base::MakeUnique<InputMethodAuraLinux>(delegate);
  #elif defined(OS_ANDROID)
-   return make_scoped_ptr(new InputMethodAndroid(delegate));
+   return base::MakeUnique<InputMethodAndroid>(delegate);
diff --git a/chromium-new/patches/patch-ui_base_ime_input__method__initializer.cc b/chromium-new/patches/patch-ui_base_ime_input__method__initializer.cc
index 18ffb74..e27701f 100644
--- a/chromium-new/patches/patch-ui_base_ime_input__method__initializer.cc
+++ b/chromium-new/patches/patch-ui_base_ime_input__method__initializer.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/base/ime/input_method_initializer.cc.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/base/ime/input_method_initializer.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/base/ime/input_method_initializer.cc
 @@ -8,14 +8,14 @@
  
diff --git a/chromium-new/patches/patch-ui_base_resource_resource__bundle.cc b/chromium-new/patches/patch-ui_base_resource_resource__bundle.cc
index c94200f..303c156 100644
--- a/chromium-new/patches/patch-ui_base_resource_resource__bundle.cc
+++ b/chromium-new/patches/patch-ui_base_resource_resource__bundle.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ui/base/resource/resource_bundle.cc.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/base/resource/resource_bundle.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/base/resource/resource_bundle.cc
-@@ -612,7 +612,7 @@ void ResourceBundle::ReloadFonts() {
+@@ -638,7 +638,7 @@ void ResourceBundle::ReloadFonts() {
  }
  
  ScaleFactor ResourceBundle::GetMaxScaleFactor() const {
@@ -11,12 +11,12 @@ $NetBSD$
    return max_scale_factor_;
  #else
    return GetSupportedScaleFactors().back();
-@@ -674,7 +674,7 @@ void ResourceBundle::InitSharedInstance(
- #elif defined(OS_MACOSX)
-   if (base::mac::IsOSLionOrLater())
-     supported_scale_factors.push_back(SCALE_FACTOR_200P);
--#elif defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN)
-+#elif defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+@@ -698,7 +698,7 @@ void ResourceBundle::InitSharedInstance(
+     supported_scale_factors.push_back(SCALE_FACTOR_100P);
+   }
+ #elif defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_LINUX) || \
+-    defined(OS_WIN)
++    defined(OS_WIN) || defined(OS_BSD)
    supported_scale_factors.push_back(SCALE_FACTOR_200P);
  #endif
    ui::SetSupportedScaleFactors(supported_scale_factors);
diff --git a/chromium-new/patches/patch-ui_base_ui__base.gyp b/chromium-new/patches/patch-ui_base_ui__base.gyp
deleted file mode 100644
index f6117b3..0000000
--- a/chromium-new/patches/patch-ui_base_ui__base.gyp
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- ui/base/ui_base.gyp.orig	2016-06-24 01:02:52.000000000 +0000
-+++ ui/base/ui_base.gyp
-@@ -456,7 +456,7 @@
-             'x/selection_utils.h',
-           ]
-         }],
--        ['use_aura==0 or OS!="linux"', {
-+        ['use_aura==0 or (OS!="linux" and os_bsd!=1)', {
-           'sources!': [
-             'resource/resource_bundle_auralinux.cc',
-           ],
-@@ -480,7 +480,7 @@
-             '../../build/linux/system.gyp:glib',
-           ],
-         }],
--        ['OS=="linux"', {
-+        ['OS=="linux" or os_bsd==1', {
-           'conditions': [
-             ['toolkit_views==0 and use_aura==0', {
-               # Note: because of gyp predence rules this has to be defined as
-@@ -513,7 +513,7 @@
-             'clipboard/clipboard_aurax11.cc',
-           ],
-         }],
--        ['chromeos==1 or (use_aura==1 and OS=="linux" and use_x11==0)', {
-+        ['chromeos==1 or (use_aura==1 and (OS=="linux" or os_bsd==1) and use_x11==0)', {
-           'sources!': [
-             'dragdrop/os_exchange_data_provider_aurax11.cc',
-           ],
diff --git a/chromium-new/patches/patch-ui_base_ui__features.gni b/chromium-new/patches/patch-ui_base_ui__features.gni
new file mode 100644
index 0000000..ac91be3
--- /dev/null
+++ b/chromium-new/patches/patch-ui_base_ui__features.gni
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- ui/base/ui_features.gni.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/base/ui_features.gni
+@@ -2,4 +2,4 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+ 
+-enable_hidpi = is_mac || is_win || is_linux
++enable_hidpi = is_mac || is_win || is_linux || is_bsd
diff --git a/chromium-new/patches/patch-ui_base_webui_web__ui__util.cc b/chromium-new/patches/patch-ui_base_webui_web__ui__util.cc
index 754493c..76a7f31 100644
--- a/chromium-new/patches/patch-ui_base_webui_web__ui__util.cc
+++ b/chromium-new/patches/patch-ui_base_webui_web__ui__util.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/base/webui/web_ui_util.cc.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/base/webui/web_ui_util.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/base/webui/web_ui_util.cc
 @@ -165,7 +165,7 @@ std::string GetFontFamily() {
  
diff --git a/chromium-new/patches/patch-ui_compositor_BUILD.gn b/chromium-new/patches/patch-ui_compositor_BUILD.gn
new file mode 100644
index 0000000..df39b07
--- /dev/null
+++ b/chromium-new/patches/patch-ui_compositor_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/compositor/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/compositor/BUILD.gn
+@@ -200,7 +200,7 @@ test("compositor_unittests") {
+     "//ui/gl",
+     "//ui/resources",
+   ]
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//third_party/mesa:osmesa" ]
+   }
+ }
diff --git a/chromium-new/patches/patch-ui_events_event__switches.cc b/chromium-new/patches/patch-ui_events_event__switches.cc
index bed2994..431c8e7 100644
--- a/chromium-new/patches/patch-ui_events_event__switches.cc
+++ b/chromium-new/patches/patch-ui_events_event__switches.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- ui/events/event_switches.cc.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/events/event_switches.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/events/event_switches.cc
 @@ -28,7 +28,7 @@ const char kTouchEventsDisabled[] = "dis
  const char kCompensateForUnstablePinchZoom[] =
      "compensate-for-unstable-pinch-zoom";
  
 -#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
  // Tells chrome to interpret events from these devices as touch events. Only
  // available with XInput 2 (i.e. X server 1.8 or above). The id's of the
  // devices can be retrieved from 'xinput list'.
diff --git a/chromium-new/patches/patch-ui_events_event__switches.h b/chromium-new/patches/patch-ui_events_event__switches.h
index 831b831..1333934 100644
--- a/chromium-new/patches/patch-ui_events_event__switches.h
+++ b/chromium-new/patches/patch-ui_events_event__switches.h
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- ui/events/event_switches.h.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/events/event_switches.h.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/events/event_switches.h
 @@ -18,7 +18,7 @@ EVENTS_BASE_EXPORT extern const char kTo
  EVENTS_BASE_EXPORT extern const char kTouchEventsDisabled[];
  EVENTS_BASE_EXPORT extern const char kCompensateForUnstablePinchZoom[];
  
 -#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_NETBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
  EVENTS_BASE_EXPORT extern const char kTouchDevices[];
  #endif
  
diff --git a/chromium-new/patches/patch-ui_events_keycodes_dom_keycode__converter.cc b/chromium-new/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
index 47617a5..369728d 100644
--- a/chromium-new/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
+++ b/chromium-new/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/events/keycodes/dom/keycode_converter.cc.orig	2016-06-24 01:02:52.000000000 +0000
+--- ui/events/keycodes/dom/keycode_converter.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/events/keycodes/dom/keycode_converter.cc
 @@ -19,7 +19,7 @@ namespace {
  // and DOM Level 3 |code| strings.
diff --git a/chromium-new/patches/patch-ui_gfx_BUILD.gn b/chromium-new/patches/patch-ui_gfx_BUILD.gn
new file mode 100644
index 0000000..8537b82
--- /dev/null
+++ b/chromium-new/patches/patch-ui_gfx_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/gfx/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/gfx/BUILD.gn
+@@ -376,7 +376,7 @@ component("gfx") {
+   }
+ 
+   # Linux.
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//build/linux:fontconfig" ]
+   }
+ 
+@@ -577,7 +577,7 @@ static_library("test_support") {
+       "test/ui_cocoa_test_helper.mm",
+     ]
+   }
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//build/linux:fontconfig" ]
+   }
+ }
diff --git a/chromium-new/patches/patch-ui_gfx_canvas__skia.cc b/chromium-new/patches/patch-ui_gfx_canvas__skia.cc
index f6422d7..c0b2901 100644
--- a/chromium-new/patches/patch-ui_gfx_canvas__skia.cc
+++ b/chromium-new/patches/patch-ui_gfx_canvas__skia.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ui/gfx/canvas_skia.cc.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/gfx/canvas_skia.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/gfx/canvas_skia.cc
-@@ -246,7 +246,7 @@ void Canvas::DrawStringRectWithShadows(c
+@@ -209,7 +209,7 @@ void Canvas::DrawStringRectWithShadows(c
      Range range = StripAcceleratorChars(flags, &adjusted_text);
      bool elide_text = ((flags & NO_ELLIPSIS) == 0);
  
diff --git a/chromium-new/patches/patch-ui_gfx_codec_jpeg__codec.cc b/chromium-new/patches/patch-ui_gfx_codec_jpeg__codec.cc
deleted file mode 100644
index 39a0c50..0000000
--- a/chromium-new/patches/patch-ui_gfx_codec_jpeg__codec.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- ui/gfx/codec/jpeg_codec.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/gfx/codec/jpeg_codec.cc
-@@ -13,6 +13,7 @@
- 
- extern "C" {
- #if defined(USE_SYSTEM_LIBJPEG)
-+#include <stdio.h>
- #include <jpeglib.h>
- #elif defined(USE_LIBJPEG_TURBO)
- #include "third_party/libjpeg_turbo/jpeglib.h"
diff --git a/chromium-new/patches/patch-ui_gfx_color__utils.cc b/chromium-new/patches/patch-ui_gfx_color__utils.cc
deleted file mode 100644
index 2eeee72..0000000
--- a/chromium-new/patches/patch-ui_gfx_color__utils.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD$
-
---- ui/gfx/color_utils.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/gfx/color_utils.cc
-@@ -42,7 +42,7 @@ int calcHue(double temp1, double temp2, 
-   else if (hue * 3.0 < 2.0)
-     result = temp1 + (temp2 - temp1) * (2.0 / 3.0 - hue) * 6.0;
- 
--  return static_cast<int>(std::round(result * 255));
-+  return static_cast<int>(round(result * 255));
- }
- 
- // Assumes sRGB.
-@@ -85,7 +85,7 @@ double GetRelativeLuminance(SkColor colo
- }
- 
- uint8_t GetLuma(SkColor color) {
--  return static_cast<uint8_t>(std::round((0.299 * SkColorGetR(color)) +
-+  return static_cast<uint8_t>(round((0.299 * SkColorGetR(color)) +
-                                          (0.587 * SkColorGetG(color)) +
-                                          (0.114 * SkColorGetB(color))));
- }
-@@ -223,9 +223,9 @@ SkColor HSLShift(SkColor color, const HS
-     b += (255.0 - b) * ((shift.l - 0.5) * 2.0);
-   }
-   return SkColorSetARGB(alpha,
--                        static_cast<int>(std::round(r)),
--                        static_cast<int>(std::round(g)),
--                        static_cast<int>(std::round(b)));
-+                        static_cast<int>(round(r)),
-+                        static_cast<int>(round(g)),
-+                        static_cast<int>(round(b)));
- }
- 
- void BuildLumaHistogram(const SkBitmap& bitmap, int histogram[256]) {
-@@ -275,10 +275,10 @@ SkColor AlphaBlend(SkColor foreground, S
-   double b = (SkColorGetB(foreground) * f_weight +
-               SkColorGetB(background) * b_weight) / 255.0;
- 
--  return SkColorSetARGB(static_cast<int>(std::round(normalizer)),
--                        static_cast<int>(std::round(r)),
--                        static_cast<int>(std::round(g)),
--                        static_cast<int>(std::round(b)));
-+  return SkColorSetARGB(static_cast<int>(round(normalizer)),
-+                        static_cast<int>(round(r)),
-+                        static_cast<int>(round(g)),
-+                        static_cast<int>(round(b)));
- }
- 
- bool IsDark(SkColor color) {
diff --git a/chromium-new/patches/patch-ui_gfx_font__fallback__linux.cc b/chromium-new/patches/patch-ui_gfx_font__fallback__linux.cc
index 12be8a7..05bf995 100644
--- a/chromium-new/patches/patch-ui_gfx_font__fallback__linux.cc
+++ b/chromium-new/patches/patch-ui_gfx_font__fallback__linux.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/gfx/font_fallback_linux.cc.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/gfx/font_fallback_linux.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/gfx/font_fallback_linux.cc
 @@ -15,6 +15,10 @@
  #include "base/memory/ptr_util.h"
diff --git a/chromium-new/patches/patch-ui_gfx_font__render__params.h b/chromium-new/patches/patch-ui_gfx_font__render__params.h
index 5f437c2..8be09db 100644
--- a/chromium-new/patches/patch-ui_gfx_font__render__params.h
+++ b/chromium-new/patches/patch-ui_gfx_font__render__params.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ui/gfx/font_render_params.h.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/gfx/font_render_params.h.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/gfx/font_render_params.h
-@@ -102,13 +102,13 @@ GFX_EXPORT FontRenderParams GetFontRende
+@@ -106,13 +106,13 @@ GFX_EXPORT FontRenderParams GetFontRende
      const FontRenderParamsQuery& query,
      std::string* family_out);
  
diff --git a/chromium-new/patches/patch-ui_gfx_render__text.cc b/chromium-new/patches/patch-ui_gfx_render__text.cc
index 6968582..755e1cc 100644
--- a/chromium-new/patches/patch-ui_gfx_render__text.cc
+++ b/chromium-new/patches/patch-ui_gfx_render__text.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ui/gfx/render_text.cc.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/gfx/render_text.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/gfx/render_text.cc
-@@ -946,32 +946,33 @@ void RenderText::SetDisplayOffset(int ho
+@@ -999,32 +999,33 @@ void RenderText::SetDisplayOffset(int ho
    const int extra_content = GetContentWidth() - display_rect_.width();
    const int cursor_width = cursor_enabled_ ? 1 : 0;
  
diff --git a/chromium-new/patches/patch-ui_gl_BUILD.gn b/chromium-new/patches/patch-ui_gl_BUILD.gn
new file mode 100644
index 0000000..06e74dd
--- /dev/null
+++ b/chromium-new/patches/patch-ui_gl_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/gl/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/gl/BUILD.gn
+@@ -12,7 +12,7 @@ declare_args() {
+   enable_swiftshader = is_chrome_branded && is_win
+ }
+ 
+-use_egl = is_win || is_android || is_linux
++use_egl = is_win || is_android || is_linux || is_bsd
+ use_glx = use_x11
+ 
+ if (is_android) {
+@@ -169,7 +169,7 @@ component("gl") {
+       "gl_surface_egl.h",
+     ]
+   }
+-  if (is_android || is_linux) {
++  if (is_android || is_linux || is_bsd) {
+     sources += [
+       "gl_implementation_osmesa.cc",
+       "gl_implementation_osmesa.h",
diff --git a/chromium-new/patches/patch-ui_gl_gl.gyp b/chromium-new/patches/patch-ui_gl_gl.gyp
deleted file mode 100644
index 767b8e2..0000000
--- a/chromium-new/patches/patch-ui_gl_gl.gyp
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/gl/gl.gyp.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/gl/gl.gyp
-@@ -130,7 +130,7 @@
-         'trace_util.h',
-       ],
-       'conditions': [
--        ['OS in ("win", "android", "linux")', {
-+        ['OS in ("win", "android", "linux", "freebsd", "openbsd", "netbsd")', {
-           'sources': [
-             'egl_util.cc',
-             'egl_util.h',
-@@ -151,7 +151,7 @@
-             '<(DEPTH)/third_party/khronos',
-         ],
-         }],
--        ['OS in ("android", "linux")', {
-+        ['OS in ("android", "linux", "freebsd", "openbsd", "netbsd")', {
-           'sources': [
-             'gl_implementation_osmesa.cc',
-             'gl_implementation_osmesa.h',
diff --git a/chromium-new/patches/patch-ui_gl_gl__gl__api__implementation.cc b/chromium-new/patches/patch-ui_gl_gl__gl__api__implementation.cc
deleted file mode 100644
index ecd7a28..0000000
--- a/chromium-new/patches/patch-ui_gl_gl__gl__api__implementation.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- ui/gl/gl_gl_api_implementation.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/gl/gl_gl_api_implementation.cc
-@@ -555,7 +555,11 @@ bool VirtualGLApi::MakeCurrent(GLContext
-     // context loss handling in virtual context mode.
-     // There should be no other errors from the previous context leaking into
-     // the new context.
-+#if defined(OS_NETBSD)
-+    DCHECK(error == GL_NO_ERROR) <<
-+#else
-     DCHECK(error == GL_NO_ERROR || error == GL_CONTEXT_LOST_KHR) <<
-+#endif
-         "GL error was: " << error;
- #endif
- 
diff --git a/chromium-new/patches/patch-ui_gl_gl__implementation__x11.cc b/chromium-new/patches/patch-ui_gl_gl__implementation__x11.cc
deleted file mode 100644
index 0b523e5..0000000
--- a/chromium-new/patches/patch-ui_gl_gl__implementation__x11.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/gl/gl_implementation_x11.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/gl/gl_implementation_x11.cc
-@@ -33,7 +33,7 @@ void GL_BINDING_CALL MarshalDepthRangeTo
-   glDepthRangef(static_cast<GLclampf>(z_near), static_cast<GLclampf>(z_far));
- }
- 
--#if defined(OS_OPENBSD)
-+#if defined(OS_OPENBSD) || defined(OS_NETBSD)
- const char kGLLibraryName[] = "libGL.so";
- #else
- const char kGLLibraryName[] = "libGL.so.1";
diff --git a/chromium-new/patches/patch-ui_gl_gl__surface__glx.cc b/chromium-new/patches/patch-ui_gl_gl__surface__glx.cc
deleted file mode 100644
index 5ab8f7e..0000000
--- a/chromium-new/patches/patch-ui_gl_gl__surface__glx.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/gl/gl_surface_glx.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/gl/gl_surface_glx.cc
-@@ -48,7 +48,7 @@ bool g_glx_get_msc_rate_oml_supported = 
- bool g_glx_sgi_video_sync_supported = false;
- 
- static const int kGetVSyncParametersMinSeconds =
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     // See crbug.com/373489
-     // On Linux, querying the vsync parameters might burn CPU for up to an
-     // entire vsync, so we only query periodically to reduce CPU usage.
diff --git a/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.cc b/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.cc
index 9902524..72b4880 100644
--- a/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.cc
+++ b/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/gl/sync_control_vsync_provider.cc.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/gl/sync_control_vsync_provider.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/gl/sync_control_vsync_provider.cc
 @@ -11,7 +11,7 @@
  #include "base/trace_event/trace_event.h"
@@ -11,7 +11,7 @@ $NetBSD$
  // These constants define a reasonable range for a calculated refresh interval.
  // Calculating refreshes out of this range will be considered a fatal error.
  const int64_t kMinVsyncIntervalUs = base::Time::kMicrosecondsPerSecond / 400;
-@@ -38,7 +38,7 @@ SyncControlVSyncProvider::~SyncControlVS
+@@ -39,7 +39,7 @@ SyncControlVSyncProvider::~SyncControlVS
  void SyncControlVSyncProvider::GetVSyncParameters(
      const UpdateVSyncCallback& callback) {
    TRACE_EVENT0("gpu", "SyncControlVSyncProvider::GetVSyncParameters");
@@ -20,7 +20,7 @@ $NetBSD$
    base::TimeTicks timebase;
  
    // The actual clock used for the system time returned by glXGetSyncValuesOML
-@@ -154,7 +154,7 @@ void SyncControlVSyncProvider::GetVSyncP
+@@ -155,7 +155,7 @@ void SyncControlVSyncProvider::GetVSyncP
    last_timebase_ = timebase;
    last_media_stream_counter_ = media_stream_counter;
    callback.Run(timebase, last_good_interval_);
@@ -28,4 +28,4 @@ $NetBSD$
 +#endif  // defined(OS_LINUX) || defined(OS_BSD)
  }
  
- }  // namespace gfx
+ }  // namespace gl
diff --git a/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.h b/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.h
new file mode 100644
index 0000000..9cf98a0
--- /dev/null
+++ b/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/gl/sync_control_vsync_provider.h.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/gl/sync_control_vsync_provider.h
+@@ -31,7 +31,7 @@ class SyncControlVSyncProvider : public 
+   virtual bool GetMscRate(int32_t* numerator, int32_t* denominator) = 0;
+ 
+  private:
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   base::TimeTicks last_timebase_;
+   uint64_t last_media_stream_counter_ = 0;
+   base::TimeDelta last_good_interval_;
diff --git a/chromium-new/patches/patch-ui_message__center_message__center__style.h b/chromium-new/patches/patch-ui_message__center_message__center__style.h
index 0c15044..bea57b4 100644
--- a/chromium-new/patches/patch-ui_message__center_message__center__style.h
+++ b/chromium-new/patches/patch-ui_message__center_message__center__style.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ui/message_center/message_center_style.h.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/message_center/message_center_style.h.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/message_center/message_center_style.h
-@@ -111,7 +111,7 @@ const int kButtonHorizontalPadding = 16;
+@@ -115,7 +115,7 @@ const int kButtonHorizontalPadding = 16;
  const int kButtonIconTopPadding = 11;      // In DIPs.
  const int kButtonIconToTitlePadding = 16;  // In DIPs.
  
diff --git a/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.cc b/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.cc
index 0c598f8..64c57ba 100644
--- a/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.cc
+++ b/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ui/message_center/views/message_center_button_bar.cc.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/message_center/views/message_center_button_bar.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/message_center/views/message_center_button_bar.cc
-@@ -96,7 +96,7 @@ MessageCenterButtonBar::MessageCenterBut
+@@ -95,7 +95,7 @@ MessageCenterButtonBar::MessageCenterBut
      const base::string16& title)
      : message_center_view_(message_center_view),
        message_center_(message_center),
@@ -11,7 +11,7 @@ $NetBSD$
        close_bubble_button_(NULL),
  #endif
        title_arrow_(NULL),
-@@ -171,7 +171,7 @@ MessageCenterButtonBar::MessageCenterBut
+@@ -170,7 +170,7 @@ MessageCenterButtonBar::MessageCenterBut
                                     IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL);
    button_container_->AddChildView(settings_button_);
  
@@ -20,7 +20,7 @@ $NetBSD$
    close_bubble_button_ = new views::ImageButton(this);
    close_bubble_button_->SetImage(
        views::Button::STATE_NORMAL,
-@@ -233,7 +233,7 @@ void MessageCenterButtonBar::ViewVisibil
+@@ -232,7 +232,7 @@ void MessageCenterButtonBar::ViewVisibil
                      0,
                      0);
  
@@ -29,7 +29,7 @@ $NetBSD$
    // The close-bubble button.
    column->AddColumn(views::GridLayout::LEADING,
                      views::GridLayout::LEADING,
-@@ -248,7 +248,7 @@ void MessageCenterButtonBar::ViewVisibil
+@@ -247,7 +247,7 @@ void MessageCenterButtonBar::ViewVisibil
      layout->AddView(title_arrow_);
    layout->AddView(notification_label_);
    layout->AddView(button_container_);
@@ -38,7 +38,7 @@ $NetBSD$
    layout->AddView(close_bubble_button_);
  #endif
  }
-@@ -295,7 +295,7 @@ void MessageCenterButtonBar::ButtonPress
+@@ -297,7 +297,7 @@ void MessageCenterButtonBar::ButtonPress
      else
        message_center()->EnterQuietModeWithExpire(base::TimeDelta::FromDays(1));
      quiet_mode_button_->SetToggled(message_center()->IsQuietMode());
diff --git a/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.h b/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.h
index 552e547..3ff753e 100644
--- a/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.h
+++ b/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ui/message_center/views/message_center_button_bar.h.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/message_center/views/message_center_button_bar.h.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/message_center/views/message_center_button_bar.h
-@@ -73,7 +73,7 @@ class MessageCenterButtonBar : public vi
+@@ -76,7 +76,7 @@ class MessageCenterButtonBar : public vi
    // close-on-deactivation is off. This is a tentative solution. Once pkotwicz
    // Fixes the problem of focus-follow-mouse, close-on-deactivation will be
    // back and this field will be removed. See crbug.com/319516.
diff --git a/chromium-new/patches/patch-ui_message__center_views_message__center__view.cc b/chromium-new/patches/patch-ui_message__center_views_message__center__view.cc
deleted file mode 100644
index 710ed7f..0000000
--- a/chromium-new/patches/patch-ui_message__center_views_message__center__view.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/message_center/views/message_center_view.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/message_center/views/message_center_view.cc
-@@ -44,7 +44,7 @@ namespace message_center {
- namespace {
- 
- const SkColor kNoNotificationsTextColor = SkColorSetRGB(0xb4, 0xb4, 0xb4);
--#if defined(OS_LINUX) && defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && defined(OS_CHROMEOS)
- const SkColor kTransparentColor = SkColorSetARGB(0, 0, 0, 0);
- #endif
- 
-@@ -82,7 +82,7 @@ NoNotificationMessageView::NoNotificatio
-   label_->SetEnabledColor(kNoNotificationsTextColor);
-   // Set transparent background to ensure that subpixel rendering
-   // is disabled. See crbug.com/169056
--#if defined(OS_LINUX) && defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && defined(OS_CHROMEOS)
-   label_->SetBackgroundColor(kTransparentColor);
- #endif
-   AddChildView(label_);
diff --git a/chromium-new/patches/patch-ui_message__center_views_message__view__factory.cc b/chromium-new/patches/patch-ui_message__center_views_message__view__factory.cc
new file mode 100644
index 0000000..e2a933b
--- /dev/null
+++ b/chromium-new/patches/patch-ui_message__center_views_message__view__factory.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/message_center/views/message_view_factory.cc.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/message_center/views/message_view_factory.cc
+@@ -43,7 +43,7 @@ MessageView* MessageViewFactory::Create(
+       notification_view = new NotificationView(controller, notification);
+   }
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   // Don't create shadows for notification toasts on linux wih aura.
+   if (top_level)
+     return notification_view;
diff --git a/chromium-new/patches/patch-ui_message__center_views_notification__view.cc b/chromium-new/patches/patch-ui_message__center_views_notification__view.cc
deleted file mode 100644
index 1232c88..0000000
--- a/chromium-new/patches/patch-ui_message__center_views_notification__view.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/message_center/views/notification_view.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/message_center/views/notification_view.cc
-@@ -173,7 +173,7 @@ NotificationView* NotificationView::Crea
-   NotificationView* notification_view =
-       new NotificationView(controller, notification);
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   // Don't create shadows for notification toasts on linux wih aura.
-   if (top_level)
-     return notification_view;
diff --git a/chromium-new/patches/patch-ui_resources_ui__resources.grd b/chromium-new/patches/patch-ui_resources_ui__resources.grd
index fbe24d9..27cf261 100644
--- a/chromium-new/patches/patch-ui_resources_ui__resources.grd
+++ b/chromium-new/patches/patch-ui_resources_ui__resources.grd
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/resources/ui_resources.grd.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/resources/ui_resources.grd.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/resources/ui_resources.grd
 @@ -15,7 +15,7 @@
        <!-- KEEP THESE IN ALPHABETICAL ORDER!  DO NOT ADD TO RANDOM PLACES JUST
diff --git a/chromium-new/patches/patch-ui_views_BUILD.gn b/chromium-new/patches/patch-ui_views_BUILD.gn
new file mode 100644
index 0000000..aa19c30
--- /dev/null
+++ b/chromium-new/patches/patch-ui_views_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/views/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/views/BUILD.gn
+@@ -60,7 +60,7 @@ component("views") {
+   if (use_x11 && !is_chromeos) {
+     deps += [ "//ui/display/util" ]
+   }
+-  if (is_linux && !is_chromeos) {
++  if ((is_linux || is_bsd) && !is_chromeos) {
+     sources -= [ "window/window_button_order_provider.cc" ]
+     deps += [ "//ui/shell_dialogs" ]
+   } else {
+@@ -128,7 +128,7 @@ component("views") {
+       } else if (use_ozone) {
+         sources += gypi_values.views_desktop_aura_ozone_sources
+       }
+-      if (is_linux) {
++      if (is_linux || is_bsd) {
+         sources += gypi_values.views_desktop_aura_linux_sources
+       }
+     }
diff --git a/chromium-new/patches/patch-ui_views_accessibility_native__view__accessibility.h b/chromium-new/patches/patch-ui_views_accessibility_native__view__accessibility.h
index e73b004..5d503c5 100644
--- a/chromium-new/patches/patch-ui_views_accessibility_native__view__accessibility.h
+++ b/chromium-new/patches/patch-ui_views_accessibility_native__view__accessibility.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/views/accessibility/native_view_accessibility.h.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/views/accessibility/native_view_accessibility.h.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/views/accessibility/native_view_accessibility.h
 @@ -22,7 +22,7 @@
  #define PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL 1
diff --git a/chromium-new/patches/patch-ui_views_bubble_bubble__delegate.cc b/chromium-new/patches/patch-ui_views_bubble_bubble__delegate.cc
deleted file mode 100644
index ee6bb8d..0000000
--- a/chromium-new/patches/patch-ui_views_bubble_bubble__delegate.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/bubble/bubble_delegate.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/views/bubble/bubble_delegate.cc
-@@ -96,7 +96,7 @@ Widget* BubbleDelegateView::CreateBubble
-   // the parent frame and let DWM handle compositing.  If not, then we don't
-   // want to allow the bubble to extend the frame because it will be clipped.
-   bubble_delegate->set_adjust_if_offscreen(ui::win::IsAeroGlassEnabled());
--#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
-+#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD)
-   // Linux clips bubble windows that extend outside their parent window bounds.
-   // Mac never adjusts.
-   bubble_delegate->set_adjust_if_offscreen(false);
diff --git a/chromium-new/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc b/chromium-new/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc
new file mode 100644
index 0000000..09d0a61
--- /dev/null
+++ b/chromium-new/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/bubble/bubble_dialog_delegate.cc.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/views/bubble/bubble_dialog_delegate.cc
+@@ -72,7 +72,7 @@ Widget* BubbleDialogDelegateView::Create
+   // the parent frame and let DWM handle compositing.  If not, then we don't
+   // want to allow the bubble to extend the frame because it will be clipped.
+   bubble_delegate->set_adjust_if_offscreen(ui::win::IsAeroGlassEnabled());
+-#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD)
+   // Linux clips bubble windows that extend outside their parent window bounds.
+   // Mac never adjusts.
+   bubble_delegate->set_adjust_if_offscreen(false);
diff --git a/chromium-new/patches/patch-ui_views_controls_button_label__button.cc b/chromium-new/patches/patch-ui_views_controls_button_label__button.cc
deleted file mode 100644
index 78663bd..0000000
--- a/chromium-new/patches/patch-ui_views_controls_button_label__button.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/views/controls/button/label_button.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/views/controls/button/label_button.cc
-@@ -31,7 +31,7 @@ namespace {
- // The default spacing between the icon and text.
- const int kSpacing = 5;
- 
--#if !(defined(OS_LINUX) && !defined(OS_CHROMEOS))
-+#if !((defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS))
- // Default text and shadow colors for STYLE_BUTTON.
- const SkColor kStyleButtonTextColor = SK_ColorBLACK;
- const SkColor kStyleButtonShadowColor = SK_ColorWHITE;
-@@ -484,7 +484,7 @@ void LabelButton::ResetColorsFromNativeT
-     // confusion. These details should either be pushed into ui::NativeThemeWin
-     // or should be obsoleted by rendering buttons with paint calls instead of
-     // with static assets. http://crbug.com/350498
--#if !(defined(OS_LINUX) && !defined(OS_CHROMEOS))
-+#if !((defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS))
-     constant_text_color = true;
-     colors[STATE_NORMAL] = kStyleButtonTextColor;
-     label_->SetBackgroundColor(theme->GetSystemColor(
diff --git a/chromium-new/patches/patch-ui_views_controls_scrollbar_base__scroll__bar.cc b/chromium-new/patches/patch-ui_views_controls_scrollbar_base__scroll__bar.cc
deleted file mode 100644
index bf51d30..0000000
--- a/chromium-new/patches/patch-ui_views_controls_scrollbar_base__scroll__bar.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/controls/scrollbar/base_scroll_bar.cc.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/views/controls/scrollbar/base_scroll_bar.cc
-@@ -24,7 +24,7 @@
- #include "ui/views/controls/scrollbar/base_scroll_bar_thumb.h"
- #include "ui/views/widget/widget.h"
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #include "ui/gfx/screen.h"
- #endif
- 
diff --git a/chromium-new/patches/patch-ui_views_controls_textfield_textfield.cc b/chromium-new/patches/patch-ui_views_controls_textfield_textfield.cc
index 922f1de..9a468b9 100644
--- a/chromium-new/patches/patch-ui_views_controls_textfield_textfield.cc
+++ b/chromium-new/patches/patch-ui_views_controls_textfield_textfield.cc
@@ -1,44 +1,34 @@
 $NetBSD$
 
---- ui/views/controls/textfield/textfield.cc.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/views/controls/textfield/textfield.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/views/controls/textfield/textfield.cc
-@@ -47,7 +47,7 @@
- #include "base/win/win_util.h"
+@@ -51,7 +51,7 @@
+ #include "ui/base/win/osk_display_manager.h"
  #endif
  
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
 +#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
  #include "base/strings/utf_string_conversions.h"
- #include "ui/events/linux/text_edit_command_auralinux.h"
- #include "ui/events/linux/text_edit_key_bindings_delegate_auralinux.h"
-@@ -130,7 +130,7 @@ int GetCommandForKeyEvent(const ui::KeyE
+ #include "ui/base/ime/linux/text_edit_command_auralinux.h"
+ #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
+@@ -156,14 +156,14 @@ ui::TextEditCommand GetCommandForKeyEven
      case ui::VKEY_BACK:
-       if (!control || has_selection)
-         return IDS_DELETE_BACKWARD;
+       if (!control)
+         return ui::TextEditCommand::DELETE_BACKWARD;
 -#if defined(OS_LINUX)
 +#if defined(OS_LINUX) || defined(OS_BSD)
        // Only erase by line break on Linux and ChromeOS.
        if (shift)
-         return IDS_DELETE_TO_BEGINNING_OF_LINE;
-@@ -139,7 +139,7 @@ int GetCommandForKeyEvent(const ui::KeyE
+         return ui::TextEditCommand::DELETE_TO_BEGINNING_OF_LINE;
+ #endif
+       return ui::TextEditCommand::DELETE_WORD_BACKWARD;
      case ui::VKEY_DELETE:
-       if (!control || has_selection)
-         return (shift && has_selection) ? IDS_APP_CUT : IDS_DELETE_FORWARD;
 -#if defined(OS_LINUX)
 +#if defined(OS_LINUX) || defined(OS_BSD)
        // Only erase by line break on Linux and ChromeOS.
-       if (shift)
-         return IDS_DELETE_TO_END_OF_LINE;
-@@ -154,7 +154,7 @@ int GetCommandForKeyEvent(const ui::KeyE
-   }
- }
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- // Convert a custom text edit |command| to the equivalent views command ID.
- int GetViewsCommand(const ui::TextEditCommandAuraLinux& command, bool rtl) {
-   const bool select = command.extend_selection();
-@@ -642,7 +642,7 @@ bool Textfield::OnMousePressed(const ui:
+       if (shift && control)
+         return ui::TextEditCommand::DELETE_TO_END_OF_LINE;
+@@ -596,7 +596,7 @@ bool Textfield::OnMousePressed(const ui:
        OnAfterUserAction();
      }
  
@@ -47,7 +37,7 @@ $NetBSD$
      if (event.IsOnlyMiddleMouseButton()) {
        if (GetRenderText()->IsPointInSelection(event.location())) {
          OnBeforeUserAction();
-@@ -711,7 +711,7 @@ bool Textfield::OnKeyPressed(const ui::K
+@@ -665,7 +665,7 @@ bool Textfield::OnKeyPressed(const ui::K
    if (!textfield)
      return handled;
  
@@ -56,7 +46,7 @@ $NetBSD$
    ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
        ui::GetTextEditKeyBindingsDelegate();
    std::vector<ui::TextEditCommandAuraLinux> commands;
-@@ -846,7 +846,7 @@ void Textfield::AboutToRequestFocusFromT
+@@ -805,7 +805,7 @@ void Textfield::AboutToRequestFocusFromT
  }
  
  bool Textfield::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) {
@@ -65,8 +55,8 @@ $NetBSD$
    // Skip any accelerator handling that conflicts with custom keybindings.
    ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
        ui::GetTextEditKeyBindingsDelegate();
-@@ -1105,7 +1105,7 @@ void Textfield::WriteDragDataForView(Vie
-   scoped_ptr<gfx::Canvas> canvas(
+@@ -1065,7 +1065,7 @@ void Textfield::WriteDragDataForView(Vie
+   std::unique_ptr<gfx::Canvas> canvas(
        GetCanvasForDragImage(GetWidget(), label.size()));
    label.SetEnabledColor(GetTextColor());
 -#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
@@ -74,7 +64,7 @@ $NetBSD$
    // Desktop Linux Aura does not yet support transparency in drag images.
    canvas->DrawColor(GetBackgroundColor());
  #endif
-@@ -1880,7 +1880,7 @@ void Textfield::CreateTouchSelectionCont
+@@ -2004,7 +2004,7 @@ void Textfield::CreateTouchSelectionCont
  }
  
  void Textfield::UpdateSelectionClipboard() const {
diff --git a/chromium-new/patches/patch-ui_views_controls_webview_BUILD.gn b/chromium-new/patches/patch-ui_views_controls_webview_BUILD.gn
new file mode 100644
index 0000000..b82b2f0
--- /dev/null
+++ b/chromium-new/patches/patch-ui_views_controls_webview_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/controls/webview/BUILD.gn.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/views/controls/webview/BUILD.gn
+@@ -39,7 +39,7 @@ component("webview") {
+     "//ui/views",
+   ]
+ 
+-  if (is_linux || is_android) {
++  if (is_linux || is_bsd || is_android) {
+     sources += [ "unhandled_keyboard_event_handler_default.cc" ]
+   }
+ }
diff --git a/chromium-new/patches/patch-ui_views_controls_webview_webview.gyp b/chromium-new/patches/patch-ui_views_controls_webview_webview.gyp
deleted file mode 100644
index 594c6e7..0000000
--- a/chromium-new/patches/patch-ui_views_controls_webview_webview.gyp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/controls/webview/webview.gyp.orig	2016-06-24 01:02:53.000000000 +0000
-+++ ui/views/controls/webview/webview.gyp
-@@ -42,7 +42,7 @@
-         'webview_export.h',
-       ],
-       'conditions': [
--        ['OS=="linux" or OS=="android"', {
-+        ['OS=="linux" or OS=="android" or os_bsd==1', {
-           'sources': [ 'unhandled_keyboard_event_handler_default.cc', ],
-         }],
-       ],
diff --git a/chromium-new/patches/patch-ui_views_examples_widget__example.cc b/chromium-new/patches/patch-ui_views_examples_widget__example.cc
index 863baee..b1e152f 100644
--- a/chromium-new/patches/patch-ui_views_examples_widget__example.cc
+++ b/chromium-new/patches/patch-ui_views_examples_widget__example.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/views/examples/widget_example.cc.orig	2016-06-24 01:02:53.000000000 +0000
+--- ui/views/examples/widget_example.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/views/examples/widget_example.cc
 @@ -77,7 +77,7 @@ void WidgetExample::CreateExampleView(Vi
    BuildButton(container, "Popup widget", POPUP);
diff --git a/chromium-new/patches/patch-ui_views_style_platform__style.cc b/chromium-new/patches/patch-ui_views_style_platform__style.cc
index 52de969..bff98b4 100644
--- a/chromium-new/patches/patch-ui_views_style_platform__style.cc
+++ b/chromium-new/patches/patch-ui_views_style_platform__style.cc
@@ -1,13 +1,13 @@
 $NetBSD$
 
---- ui/views/style/platform_style.cc.orig	2016-06-24 01:02:54.000000000 +0000
+--- ui/views/style/platform_style.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/views/style/platform_style.cc
-@@ -55,7 +55,7 @@ scoped_ptr<ScrollBar> PlatformStyle::Cre
- }
+@@ -17,7 +17,7 @@
+ #include "ui/views/controls/focusable_border.h"
+ #include "ui/views/controls/scrollbar/native_scroll_bar.h"
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #define DESKTOP_LINUX
  #endif
  
--#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
-+#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(OS_CHROMEOS)
- // static
- scoped_ptr<Border> PlatformStyle::CreateThemedLabelButtonBorder(
-     LabelButton* button) {
diff --git a/chromium-new/patches/patch-ui_views_views.gyp b/chromium-new/patches/patch-ui_views_views.gyp
deleted file mode 100644
index 58d0579..0000000
--- a/chromium-new/patches/patch-ui_views_views.gyp
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
---- ui/views/views.gyp.orig	2016-06-24 01:02:54.000000000 +0000
-+++ ui/views/views.gyp
-@@ -712,12 +712,12 @@
-             '../display/display.gyp:display_util',
-           ],
-         }],
--        ['OS=="linux" and chromeos==0 and use_ozone==0', {
-+        ['(OS=="linux" or os_bsd==1) and chromeos==0 and use_ozone==0', {
-           'dependencies': [
-             '../../build/linux/system.gyp:atk',
-            ],
-         }],
--        ['OS=="linux" and chromeos==0', {
-+        ['(OS=="linux" or os_bsd==1) and chromeos==0', {
-           'dependencies': [
-             '../shell_dialogs/shell_dialogs.gyp:shell_dialogs',
-           ],
-@@ -787,7 +787,7 @@
-         ['use_aura and chromeos == 0', {
-           'sources': [ '<@(views_desktop_aura_sources)' ],
-           'conditions': [
--            ['OS == "linux"', {
-+            ['OS == "linux" or os_bsd == 1', {
-               'sources': [ '<@(views_desktop_aura_linux_sources)' ],
-             }],
-             ['use_x11 == 1', {
diff --git a/chromium-new/patches/patch-ui_views_views__delegate.cc b/chromium-new/patches/patch-ui_views_views__delegate.cc
index ccf28db..44a26c3 100644
--- a/chromium-new/patches/patch-ui_views_views__delegate.cc
+++ b/chromium-new/patches/patch-ui_views_views__delegate.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/views/views_delegate.cc.orig	2016-06-24 01:02:54.000000000 +0000
+--- ui/views/views_delegate.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/views/views_delegate.cc
 @@ -70,7 +70,7 @@ HICON ViewsDelegate::GetDefaultWindowIco
  bool ViewsDelegate::IsWindowInMetro(gfx::NativeWindow window) const {
diff --git a/chromium-new/patches/patch-ui_views_views__delegate.h b/chromium-new/patches/patch-ui_views_views__delegate.h
index 5d9dc86..17aa807 100644
--- a/chromium-new/patches/patch-ui_views_views__delegate.h
+++ b/chromium-new/patches/patch-ui_views_views__delegate.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/views/views_delegate.h.orig	2016-06-24 01:02:54.000000000 +0000
+--- ui/views/views_delegate.h.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/views/views_delegate.h
 @@ -141,7 +141,7 @@ class VIEWS_EXPORT ViewsDelegate {
    // Returns true if the window passed in is in the Windows 8 metro
diff --git a/chromium-new/patches/patch-ui_views_views__switches.cc b/chromium-new/patches/patch-ui_views_views__switches.cc
index 4dd2480..cf435ae 100644
--- a/chromium-new/patches/patch-ui_views_views__switches.cc
+++ b/chromium-new/patches/patch-ui_views_views__switches.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/views/views_switches.cc.orig	2016-06-24 01:02:54.000000000 +0000
+--- ui/views/views_switches.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/views/views_switches.cc
 @@ -18,7 +18,7 @@ const char kDisableViewsRectBasedTargeti
      "disable-views-rect-based-targeting";
diff --git a/chromium-new/patches/patch-ui_views_window_custom__frame__view.cc b/chromium-new/patches/patch-ui_views_window_custom__frame__view.cc
index 069feed..f62e4fb 100644
--- a/chromium-new/patches/patch-ui_views_window_custom__frame__view.cc
+++ b/chromium-new/patches/patch-ui_views_window_custom__frame__view.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ui/views/window/custom_frame_view.cc.orig	2016-06-24 01:02:54.000000000 +0000
+--- ui/views/window/custom_frame_view.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/views/window/custom_frame_view.cc
-@@ -288,7 +288,7 @@ int CustomFrameView::NonClientTopBorderH
+@@ -287,7 +287,7 @@ int CustomFrameView::NonClientTopBorderH
  int CustomFrameView::CaptionButtonY() const {
    // Maximized buttons start at window top so that even if their images aren't
    // drawn flush with the screen edge, they still obey Fitts' Law.
diff --git a/chromium-new/patches/patch-ui_views_window_dialog__delegate.cc b/chromium-new/patches/patch-ui_views_window_dialog__delegate.cc
index d71b918..aa2295a 100644
--- a/chromium-new/patches/patch-ui_views_window_dialog__delegate.cc
+++ b/chromium-new/patches/patch-ui_views_window_dialog__delegate.cc
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- ui/views/window/dialog_delegate.cc.orig	2016-06-24 01:02:54.000000000 +0000
+--- ui/views/window/dialog_delegate.cc.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/views/window/dialog_delegate.cc
-@@ -51,7 +51,7 @@ Widget* DialogDelegate::CreateDialogWidg
+@@ -56,7 +56,7 @@ Widget::InitParams DialogDelegate::GetDi
    params.bounds = bounds;
    DialogDelegate* dialog = delegate->AsDialogDelegate();
  
@@ -10,4 +10,4 @@ $NetBSD$
 +#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
    // The new style doesn't support unparented dialogs on Linux desktop.
    if (dialog)
-     dialog->supports_new_style_ &= parent != NULL;
+     dialog->supports_custom_frame_ &= parent != NULL;
diff --git a/chromium-new/patches/patch-ui_webui_resources_js_cr.js b/chromium-new/patches/patch-ui_webui_resources_js_cr.js
index 2df654b..55ea62b 100644
--- a/chromium-new/patches/patch-ui_webui_resources_js_cr.js
+++ b/chromium-new/patches/patch-ui_webui_resources_js_cr.js
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- ui/webui/resources/js/cr.js.orig	2016-06-24 01:02:54.000000000 +0000
+--- ui/webui/resources/js/cr.js.orig	2016-11-10 20:02:30.000000000 +0000
 +++ ui/webui/resources/js/cr.js
 @@ -451,6 +451,11 @@ var cr = cr || function() {
      get doc() {
diff --git a/chromium-new/patches/patch-ui_webui_resources_js_icon.js b/chromium-new/patches/patch-ui_webui_resources_js_icon.js
new file mode 100644
index 0000000..2afe954
--- /dev/null
+++ b/chromium-new/patches/patch-ui_webui_resources_js_icon.js
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/webui/resources/js/icon.js.orig	2016-11-10 20:02:30.000000000 +0000
++++ ui/webui/resources/js/icon.js
+@@ -9,7 +9,7 @@ cr.define('cr.icon', function() {
+    */
+   function getSupportedScaleFactors() {
+     var supportedScaleFactors = [];
+-    if (cr.isMac || cr.isChromeOS || cr.isWindows || cr.isLinux) {
++    if (cr.isMac || cr.isChromeOS || cr.isWindows || cr.isLinux || cr.isBSD) {
+       // All desktop platforms support zooming which also updates the
+       // renderer's device scale factors (a.k.a devicePixelRatio), and
+       // these platforms has high DPI assets for 2.0x. Use 1x and 2x in
diff --git a/chromium-new/patches/patch-ui_webui_resources_js_util.js b/chromium-new/patches/patch-ui_webui_resources_js_util.js
deleted file mode 100644
index 1941f1b..0000000
--- a/chromium-new/patches/patch-ui_webui_resources_js_util.js
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/webui/resources/js/util.js.orig	2016-06-24 01:02:54.000000000 +0000
-+++ ui/webui/resources/js/util.js
-@@ -52,7 +52,7 @@ function announceAccessibleMessage(msg) 
-  */
- function getSupportedScaleFactors() {
-   var supportedScaleFactors = [];
--  if (cr.isMac || cr.isChromeOS || cr.isWindows || cr.isLinux) {
-+  if (cr.isMac || cr.isChromeOS || cr.isWindows || cr.isLinux || cr.isBSD) {
-     // All desktop platforms support zooming which also updates the
-     // renderer's device scale factors (a.k.a devicePixelRatio), and
-     // these platforms has high DPI assets for 2.0x. Use 1x and 2x in
diff --git a/chromium-new/patches/patch-v8_BUILD.gn b/chromium-new/patches/patch-v8_BUILD.gn
new file mode 100644
index 0000000..aca9c52
--- /dev/null
+++ b/chromium-new/patches/patch-v8_BUILD.gn
@@ -0,0 +1,41 @@
+$NetBSD$
+
+--- v8/BUILD.gn.orig	2016-11-10 20:03:08.000000000 +0000
++++ v8/BUILD.gn
+@@ -2096,6 +2098,14 @@ v8_source_set("v8_libbase") {
+       "dl",
+       "rt",
+     ]
++  } else if (is_netbsd) {
++    sources += [
++      "src/base/debug/stack_trace_posix.cc",
++      "src/base/platform/platform-netbsd.cc",
++    ]
++    libs = [
++      "execinfo", "rt",
++    ]
+   } else if (is_android) {
+     if (current_toolchain == host_toolchain) {
+       libs = [
+@@ -2237,6 +2247,10 @@ if (current_toolchain == v8_snapshot_too
+       "//build/config/sanitizers:deps",
+       "//build/win:default_exe_manifest",
+     ]
++
++    libs = [
++      "execinfo", "rt",
++    ]
+   }
+ }
+ 
+@@ -2263,6 +2277,10 @@ v8_executable("mkpeephole") {
+     "//build/config/sanitizers:deps",
+     "//build/win:default_exe_manifest",
+   ]
++
++  libs = [
++    "execinfo",
++  ]
+ }
+ 
+ ###############################################################################
diff --git a/chromium-new/patches/patch-v8_src_base_platform_platform-netbsd.cc b/chromium-new/patches/patch-v8_src_base_platform_platform-netbsd.cc
new file mode 100644
index 0000000..e2d7443
--- /dev/null
+++ b/chromium-new/patches/patch-v8_src_base_platform_platform-netbsd.cc
@@ -0,0 +1,301 @@
+$NetBSD$
+
+--- v8/src/base/platform/platform-netbsd.cc.orig	2016-11-16 11:20:44.815744887 +0000
++++ v8/src/base/platform/platform-netbsd.cc
+@@ -0,0 +1,296 @@
++// Copyright 2012 the V8 project authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++// Platform-specific code for OpenBSD and NetBSD goes here. For the
++// POSIX-compatible parts, the implementation is in platform-posix.cc.
++
++#include <pthread.h>
++#include <semaphore.h>
++#include <signal.h>
++#include <stdlib.h>
++#include <sys/resource.h>
++#include <sys/syscall.h>
++#include <sys/time.h>
++#include <sys/types.h>
++
++#include <errno.h>
++#include <fcntl.h>      // open
++#include <stdarg.h>
++#include <strings.h>    // index
++#include <sys/mman.h>   // mmap & munmap
++#include <sys/stat.h>   // open
++#include <unistd.h>     // sysconf
++
++#include <cmath>
++
++#undef MAP_TYPE
++
++#include "src/base/macros.h"
++#include "src/base/platform/platform.h"
++
++
++namespace v8 {
++namespace base {
++
++
++const char* OS::LocalTimezone(double time, TimezoneCache* cache) {
++  if (std::isnan(time)) return "";
++  time_t tv = static_cast<time_t>(std::floor(time/msPerSecond));
++  struct tm tm;
++  struct tm* t = localtime_r(&tv, &tm);
++  if (NULL == t) return "";
++  return t->tm_zone;
++}
++
++
++double OS::LocalTimeOffset(TimezoneCache* cache) {
++  time_t tv = time(NULL);
++  struct tm tm;
++  struct tm* t = localtime_r(&tv, &tm);
++  // tm_gmtoff includes any daylight savings offset, so subtract it.
++  return static_cast<double>(t->tm_gmtoff * msPerSecond -
++                             (t->tm_isdst > 0 ? 3600 * msPerSecond : 0));
++}
++
++
++void* OS::Allocate(const size_t requested,
++                   size_t* allocated,
++                   bool is_executable) {
++  const size_t msize = RoundUp(requested, AllocateAlignment());
++  int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0);
++  void* addr = OS::GetRandomMmapAddr();
++  void* mbase = mmap(addr, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
++  if (mbase == MAP_FAILED) return NULL;
++  *allocated = msize;
++  return mbase;
++}
++
++
++std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
++  std::vector<SharedLibraryAddress> result;
++  // This function assumes that the layout of the file is as follows:
++  // hex_start_addr-hex_end_addr rwxp <unused data> [binary_file_name]
++  // If we encounter an unexpected situation we abort scanning further entries.
++  FILE* fp = fopen("/proc/self/maps", "r");
++  if (fp == NULL) return result;
++
++  // Allocate enough room to be able to store a full file name.
++  const int kLibNameLen = FILENAME_MAX + 1;
++  char* lib_name = reinterpret_cast<char*>(malloc(kLibNameLen));
++
++  // This loop will terminate once the scanning hits an EOF.
++  while (true) {
++    uintptr_t start, end;
++    char attr_r, attr_w, attr_x, attr_p;
++    // Parse the addresses and permission bits at the beginning of the line.
++    if (fscanf(fp, "%" V8PRIxPTR "-%" V8PRIxPTR, &start, &end) != 2) break;
++    if (fscanf(fp, " %c%c%c%c", &attr_r, &attr_w, &attr_x, &attr_p) != 4) break;
++
++    int c;
++    if (attr_r == 'r' && attr_w != 'w' && attr_x == 'x') {
++      // Found a read-only executable entry. Skip characters until we reach
++      // the beginning of the filename or the end of the line.
++      do {
++        c = getc(fp);
++      } while ((c != EOF) && (c != '\n') && (c != '/'));
++      if (c == EOF) break;  // EOF: Was unexpected, just exit.
++
++      // Process the filename if found.
++      if (c == '/') {
++        ungetc(c, fp);  // Push the '/' back into the stream to be read below.
++
++        // Read to the end of the line. Exit if the read fails.
++        if (fgets(lib_name, kLibNameLen, fp) == NULL) break;
++
++        // Drop the newline character read by fgets. We do not need to check
++        // for a zero-length string because we know that we at least read the
++        // '/' character.
++        lib_name[strlen(lib_name) - 1] = '\0';
++      } else {
++        // No library name found, just record the raw address range.
++        snprintf(lib_name, kLibNameLen,
++                 "%08" V8PRIxPTR "-%08" V8PRIxPTR, start, end);
++      }
++      result.push_back(SharedLibraryAddress(lib_name, start, end));
++    } else {
++      // Entry not describing executable data. Skip to end of line to set up
++      // reading the next entry.
++      do {
++        c = getc(fp);
++      } while ((c != EOF) && (c != '\n'));
++      if (c == EOF) break;
++    }
++  }
++  free(lib_name);
++  fclose(fp);
++  return result;
++}
++
++
++void OS::SignalCodeMovingGC() {
++  // Support for ll_prof.py.
++  //
++  // The Linux profiler built into the kernel logs all mmap's with
++  // PROT_EXEC so that analysis tools can properly attribute ticks. We
++  // do a mmap with a name known by ll_prof.py and immediately munmap
++  // it. This injects a GC marker into the stream of events generated
++  // by the kernel and allows us to synchronize V8 code log and the
++  // kernel log.
++  int size = sysconf(_SC_PAGESIZE);
++  FILE* f = fopen(OS::GetGCFakeMMapFile(), "w+");
++  if (f == NULL) {
++    OS::PrintError("Failed to open %s\n", OS::GetGCFakeMMapFile());
++    OS::Abort();
++  }
++  void* addr = mmap(NULL, size, PROT_READ | PROT_EXEC, MAP_PRIVATE,
++                    fileno(f), 0);
++  DCHECK(addr != MAP_FAILED);
++  OS::Free(addr, size);
++  fclose(f);
++}
++
++
++
++// Constants used for mmap.
++static const int kMmapFd = -1;
++static const int kMmapFdOffset = 0;
++
++
++VirtualMemory::VirtualMemory() : address_(NULL), size_(0) { }
++
++
++VirtualMemory::VirtualMemory(size_t size)
++    : address_(ReserveRegion(size)), size_(size) { }
++
++
++VirtualMemory::VirtualMemory(size_t size, size_t alignment)
++    : address_(NULL), size_(0) {
++  DCHECK((alignment % OS::AllocateAlignment()) == 0);
++  size_t request_size = RoundUp(size + alignment,
++                                static_cast<intptr_t>(OS::AllocateAlignment()));
++  void* reservation = mmap(OS::GetRandomMmapAddr(),
++                           request_size,
++                           PROT_NONE,
++                           MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
++                           kMmapFd,
++                           kMmapFdOffset);
++  if (reservation == MAP_FAILED) return;
++
++  uint8_t* base = static_cast<uint8_t*>(reservation);
++  uint8_t* aligned_base = RoundUp(base, alignment);
++  DCHECK_LE(base, aligned_base);
++
++  // Unmap extra memory reserved before and after the desired block.
++  if (aligned_base != base) {
++    size_t prefix_size = static_cast<size_t>(aligned_base - base);
++    OS::Free(base, prefix_size);
++    request_size -= prefix_size;
++  }
++
++  size_t aligned_size = RoundUp(size, OS::AllocateAlignment());
++  DCHECK_LE(aligned_size, request_size);
++
++  if (aligned_size != request_size) {
++    size_t suffix_size = request_size - aligned_size;
++    OS::Free(aligned_base + aligned_size, suffix_size);
++    request_size -= suffix_size;
++  }
++
++  DCHECK(aligned_size == request_size);
++
++  address_ = static_cast<void*>(aligned_base);
++  size_ = aligned_size;
++}
++
++
++VirtualMemory::~VirtualMemory() {
++  if (IsReserved()) {
++    bool result = ReleaseRegion(address(), size());
++    DCHECK(result);
++    USE(result);
++  }
++}
++
++
++bool VirtualMemory::IsReserved() {
++  return address_ != NULL;
++}
++
++
++void VirtualMemory::Reset() {
++  address_ = NULL;
++  size_ = 0;
++}
++
++
++bool VirtualMemory::Commit(void* address, size_t size, bool is_executable) {
++  return CommitRegion(address, size, is_executable);
++}
++
++
++bool VirtualMemory::Uncommit(void* address, size_t size) {
++  return UncommitRegion(address, size);
++}
++
++
++bool VirtualMemory::Guard(void* address) {
++  OS::Guard(address, OS::CommitPageSize());
++  return true;
++}
++
++
++void* VirtualMemory::ReserveRegion(size_t size) {
++  void* result = mmap(OS::GetRandomMmapAddr(),
++                      size,
++                      PROT_NONE,
++                      MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
++                      kMmapFd,
++                      kMmapFdOffset);
++
++  if (result == MAP_FAILED) return NULL;
++
++  return result;
++}
++
++
++bool VirtualMemory::CommitRegion(void* base, size_t size, bool is_executable) {
++  int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0);
++  if (MAP_FAILED == mmap(base,
++                         size,
++                         prot,
++                         MAP_PRIVATE | MAP_ANON | MAP_FIXED,
++                         kMmapFd,
++                         kMmapFdOffset)) {
++    return false;
++  }
++  return true;
++}
++
++
++bool VirtualMemory::UncommitRegion(void* base, size_t size) {
++  return mmap(base,
++              size,
++              PROT_NONE,
++              MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED,
++              kMmapFd,
++              kMmapFdOffset) != MAP_FAILED;
++}
++
++bool VirtualMemory::ReleasePartialRegion(void* base, size_t size,
++                                         void* free_start, size_t free_size) {
++  return munmap(free_start, free_size) == 0;
++}
++
++bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
++  return munmap(base, size) == 0;
++}
++
++
++bool VirtualMemory::HasLazyCommits() {
++  // TODO(alph): implement for the platform.
++  return false;
++}
++
++}  // namespace base
++}  // namespace v8
diff --git a/chromium-new/patches/patch-v8_src_base_platform_platform-posix.cc b/chromium-new/patches/patch-v8_src_base_platform_platform-posix.cc
index 8e1bf65..b4eb81e 100644
--- a/chromium-new/patches/patch-v8_src_base_platform_platform-posix.cc
+++ b/chromium-new/patches/patch-v8_src_base_platform_platform-posix.cc
@@ -1,23 +1,19 @@
 $NetBSD$
 
---- v8/src/base/platform/platform-posix.cc.orig	2016-06-24 01:04:22.000000000 +0000
+--- v8/src/base/platform/platform-posix.cc.orig	2016-11-10 20:03:08.000000000 +0000
 +++ v8/src/base/platform/platform-posix.cc
-@@ -55,6 +55,14 @@
- #include <sys/prctl.h>  // NOLINT, for prctl
+@@ -27,6 +27,10 @@
+ #include <sys/sysctl.h>  // NOLINT, for sysctl
  #endif
  
-+#if V8_OS_FREEBSD && !defined(__DragonFly__)
-+#include <sys/thr.h>   // for thr_self
-+#endif
-+
-+#if V8_OS_NETBSD
-+#include <lwp.h>       // for _lwp_self
++#if defined(__NetBSD__)
++#include <lwp.h>	// for _lwp_self
 +#endif
 +
- #if !defined(V8_OS_NACL) && !defined(_AIX)
- #include <sys/syscall.h>
- #endif
-@@ -343,6 +351,12 @@ int OS::GetCurrentThreadId() {
+ #undef MAP_TYPE
+ 
+ #if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT)
+@@ -329,6 +333,12 @@ int OS::GetCurrentThreadId() {
    return static_cast<int>(syscall(__NR_gettid));
  #elif V8_OS_ANDROID
    return static_cast<int>(gettid());
@@ -30,7 +26,7 @@ $NetBSD$
  #elif V8_OS_AIX
    return static_cast<int>(thread_self());
  #elif V8_OS_SOLARIS
-@@ -550,8 +564,13 @@ Thread::Thread(const Options& options)
+@@ -532,8 +542,13 @@ Thread::Thread(const Options& options)
      : data_(new PlatformData),
        stack_size_(options.stack_size()),
        start_semaphore_(NULL) {
@@ -44,7 +40,7 @@ $NetBSD$
    }
    set_name(options.name());
  }
-@@ -567,7 +586,7 @@ static void SetThreadName(const char* na
+@@ -549,7 +564,7 @@ static void SetThreadName(const char* na
    pthread_set_name_np(pthread_self(), name);
  #elif V8_OS_NETBSD
    STATIC_ASSERT(Thread::kMaxThreadNameLength <= PTHREAD_MAX_NAMELEN_NP);
diff --git a/chromium-new/patches/patch-v8_src_base_platform_platform.h b/chromium-new/patches/patch-v8_src_base_platform_platform.h
index d5de92e..3053955 100644
--- a/chromium-new/patches/patch-v8_src_base_platform_platform.h
+++ b/chromium-new/patches/patch-v8_src_base_platform_platform.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- v8/src/base/platform/platform.h.orig	2016-06-24 01:04:22.000000000 +0000
+--- v8/src/base/platform/platform.h.orig	2016-11-10 20:03:08.000000000 +0000
 +++ v8/src/base/platform/platform.h
 @@ -22,6 +22,7 @@
  #define V8_BASE_PLATFORM_PLATFORM_H_
diff --git a/chromium-new/patches/patch-v8_src_compiler_graph-visualizer.cc b/chromium-new/patches/patch-v8_src_compiler_graph-visualizer.cc
deleted file mode 100644
index 885d744..0000000
--- a/chromium-new/patches/patch-v8_src_compiler_graph-visualizer.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- v8/src/compiler/graph-visualizer.cc.orig	2016-06-24 01:04:22.000000000 +0000
-+++ v8/src/compiler/graph-visualizer.cc
-@@ -5,6 +5,7 @@
- #include "src/compiler/graph-visualizer.h"
- 
- #include <sstream>
-+#include <cstdio>
- #include <string>
- 
- #include "src/code-stubs.h"
-@@ -26,7 +27,7 @@ namespace internal {
- namespace compiler {
- 
- 
--FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
-+std::FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
-                             const char* suffix, const char* mode) {
-   EmbeddedVector<char, 256> filename(0);
-   base::SmartArrayPointer<char> debug_name = info->GetDebugName();
diff --git a/chromium-new/patches/patch-v8_src_compiler_graph-visualizer.h b/chromium-new/patches/patch-v8_src_compiler_graph-visualizer.h
deleted file mode 100644
index b7a1ecc..0000000
--- a/chromium-new/patches/patch-v8_src_compiler_graph-visualizer.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- v8/src/compiler/graph-visualizer.h.orig	2016-06-24 01:04:22.000000000 +0000
-+++ v8/src/compiler/graph-visualizer.h
-@@ -5,7 +5,7 @@
- #ifndef V8_COMPILER_GRAPH_VISUALIZER_H_
- #define V8_COMPILER_GRAPH_VISUALIZER_H_
- 
--#include <stdio.h>
-+#include <cstdio>
- #include <iosfwd>
- 
- namespace v8 {
-@@ -21,7 +21,7 @@ class RegisterAllocationData;
- class Schedule;
- class SourcePositionTable;
- 
--FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
-+std::FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
-                             const char* suffix, const char* mode);
- 
- struct AsJSON {
diff --git a/chromium-new/patches/patch-v8_src_log-utils.h b/chromium-new/patches/patch-v8_src_log-utils.h
deleted file mode 100644
index 5fdf323..0000000
--- a/chromium-new/patches/patch-v8_src_log-utils.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- v8/src/log-utils.h.orig	2016-06-24 01:04:23.000000000 +0000
-+++ v8/src/log-utils.h
-@@ -9,6 +9,9 @@
- 
- #include <cstdarg>
- 
-+#include <cstdarg>
-+#include <cstdio>
-+
- #include "src/allocation.h"
- #include "src/base/platform/mutex.h"
- #include "src/flags.h"
diff --git a/chromium-new/patches/patch-v8_tools_run-llprof.sh b/chromium-new/patches/patch-v8_tools_run-llprof.sh
index a04a483..9253ba1 100644
--- a/chromium-new/patches/patch-v8_tools_run-llprof.sh
+++ b/chromium-new/patches/patch-v8_tools_run-llprof.sh
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- v8/tools/run-llprof.sh.orig	2016-06-24 01:04:23.000000000 +0000
+--- v8/tools/run-llprof.sh.orig	2016-11-10 20:03:08.000000000 +0000
 +++ v8/tools/run-llprof.sh
 @@ -46,7 +46,7 @@ framework, then calls the low level tick
  EOF


Home | Main Index | Thread Index | Old Index