pkgsrc-WIP-changes archive

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

move chromium-new to chromium



Module Name:	pkgsrc-wip
Committed By:	coypu <coypu%sdf.org@localhost>
Pushed By:	coypu
Date:		Sat Feb 18 09:57:17 2017 +0200
Changeset:	74a0b02bc8028c2d8291d7830bff3467f34236ba

Added Files:
	chromium/DESCR
	chromium/Makefile
	chromium/PLIST
	chromium/TODO
	chromium/distinfo
	chromium/options.mk
	chromium/patches/patch-BUILD.gn
	chromium/patches/patch-apps_ui_views_app__window__frame__view.cc
	chromium/patches/patch-ash_display_mirror__window__controller.cc
	chromium/patches/patch-ash_shell.cc
	chromium/patches/patch-base_BUILD.gn
	chromium/patches/patch-base_allocator_BUILD.gn
	chromium/patches/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
	chromium/patches/patch-base_allocator_allocator__shim__override__libc__symbols.h
	chromium/patches/patch-base_allocator_allocator__shim__unittest.cc
	chromium/patches/patch-base_base__paths__posix.cc
	chromium/patches/patch-base_debug_debugger__posix.cc
	chromium/patches/patch-base_debug_proc__maps__linux.cc
	chromium/patches/patch-base_debug_stack__trace__posix.cc
	chromium/patches/patch-base_debug_thread__heap__usage__tracker.cc
	chromium/patches/patch-base_files_file__path__unittest.cc
	chromium/patches/patch-base_files_file__path__watcher__kqueue.h
	chromium/patches/patch-base_files_file__util.h
	chromium/patches/patch-base_linux__util.cc
	chromium/patches/patch-base_native__library__posix.cc
	chromium/patches/patch-base_posix_unix__domain__socket__linux.cc
	chromium/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc
	chromium/patches/patch-base_process_internal__linux.h
	chromium/patches/patch-base_process_launch.cc
	chromium/patches/patch-base_process_launch.h
	chromium/patches/patch-base_process_launch__posix.cc
	chromium/patches/patch-base_process_memory.h
	chromium/patches/patch-base_process_memory__stubs.cc
	chromium/patches/patch-base_process_memory__unittest.cc
	chromium/patches/patch-base_process_process__handle__freebsd.cc
	chromium/patches/patch-base_process_process__handle__netbsd.cc
	chromium/patches/patch-base_process_process__info__linux.cc
	chromium/patches/patch-base_process_process__iterator.h
	chromium/patches/patch-base_process_process__iterator__freebsd.cc
	chromium/patches/patch-base_process_process__iterator__netbsd.cc
	chromium/patches/patch-base_process_process__metrics.h
	chromium/patches/patch-base_process_process__metrics__freebsd.cc
	chromium/patches/patch-base_process_process__metrics__netbsd.cc
	chromium/patches/patch-base_process_process__posix.cc
	chromium/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
	chromium/patches/patch-base_security__unittest.cc
	chromium/patches/patch-base_sys__info__freebsd.cc
	chromium/patches/patch-base_sys__info__netbsd.cc
	chromium/patches/patch-base_sys__info__posix.cc
	chromium/patches/patch-base_test_BUILD.gn
	chromium/patches/patch-base_test_launcher_test__launcher.cc
	chromium/patches/patch-base_test_test__file__util__posix.cc
	chromium/patches/patch-base_third__party_libevent_BUILD.gn
	chromium/patches/patch-base_third__party_libevent_event-config.h
	chromium/patches/patch-base_third__party_libevent_netbsd_config.h
	chromium/patches/patch-base_third__party_libevent_netbsd_event-config.h
	chromium/patches/patch-base_threading_platform__thread.h
	chromium/patches/patch-base_threading_platform__thread__linux.cc
	chromium/patches/patch-base_threading_platform__thread__netbsd.cc
	chromium/patches/patch-base_threading_platform__thread__posix.cc
	chromium/patches/patch-base_trace__event_malloc__dump__provider.cc
	chromium/patches/patch-base_trace__event_process__memory__dump.cc
	chromium/patches/patch-base_trace__event_process__memory__dump.h
	chromium/patches/patch-breakpad_BUILD.gn
	chromium/patches/patch-build_config_BUILD.gn
	chromium/patches/patch-build_config_BUILDCONFIG.gn
	chromium/patches/patch-build_config_allocator.gni
	chromium/patches/patch-build_config_clang_BUILD.gn
	chromium/patches/patch-build_config_compiler_BUILD.gn
	chromium/patches/patch-build_config_crypto.gni
	chromium/patches/patch-build_config_features.gni
	chromium/patches/patch-build_config_linux_gtk2_BUILD.gn
	chromium/patches/patch-build_config_linux_gtk3_BUILD.gn
	chromium/patches/patch-build_config_linux_pkg-config.py
	chromium/patches/patch-build_config_sanitizers_BUILD.gn
	chromium/patches/patch-build_config_sanitizers_sanitizers.gni
	chromium/patches/patch-build_config_ui.gni
	chromium/patches/patch-build_linux_libpci_BUILD.gn
	chromium/patches/patch-build_secondary_third__party_nss_BUILD.gn
	chromium/patches/patch-build_toolchain_gcc__toolchain.gni
	chromium/patches/patch-build_toolchain_get__concurrent__links.py
	chromium/patches/patch-cc_layers_scrollbar__layer__impl__base.cc
	chromium/patches/patch-cc_trees_property__tree.cc
	chromium/patches/patch-chrome_BUILD.gn
	chromium/patches/patch-chrome_app_chrome__command__ids.h
	chromium/patches/patch-chrome_app_chrome__main__delegate.cc
	chromium/patches/patch-chrome_app_chrome__main__delegate.h
	chromium/patches/patch-chrome_app_chromium__strings.grd
	chromium/patches/patch-chrome_app_generated__resources.grd
	chromium/patches/patch-chrome_app_resources_locale__settings.grd
	chromium/patches/patch-chrome_browser_BUILD.gn
	chromium/patches/patch-chrome_browser_about__flags.cc
	chromium/patches/patch-chrome_browser_browser__process__impl.cc
	chromium/patches/patch-chrome_browser_browser__process__impl.h
	chromium/patches/patch-chrome_browser_browser__resources.grd
	chromium/patches/patch-chrome_browser_chrome__browser__main.cc
	chromium/patches/patch-chrome_browser_chrome__browser__main__linux.cc
	chromium/patches/patch-chrome_browser_chrome__browser__main__posix.cc
	chromium/patches/patch-chrome_browser_chrome__content__browser__client.cc
	chromium/patches/patch-chrome_browser_chrome__content__browser__client.h
	chromium/patches/patch-chrome_browser_defaults.cc
	chromium/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc
	chromium/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
	chromium/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
	chromium/patches/patch-chrome_browser_download_download__commands.cc
	chromium/patches/patch-chrome_browser_download_download__commands.h
	chromium/patches/patch-chrome_browser_download_download__prefs.cc
	chromium/patches/patch-chrome_browser_download_download__prefs.h
	chromium/patches/patch-chrome_browser_download_download__query.cc
	chromium/patches/patch-chrome_browser_download_download__shelf__context__menu.cc
	chromium/patches/patch-chrome_browser_extensions_BUILD.gn
	chromium/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc
	chromium/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc
	chromium/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
	chromium/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc
	chromium/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc
	chromium/patches/patch-chrome_browser_extensions_api_omnibox_omnibox__api.cc
	chromium/patches/patch-chrome_browser_extensions_bookmark__app__helper.cc
	chromium/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
	chromium/patches/patch-chrome_browser_extensions_external__provider__impl.cc
	chromium/patches/patch-chrome_browser_gpu_gl__string__manager.cc
	chromium/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc
	chromium/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc
	chromium/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
	chromium/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
	chromium/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
	chromium/patches/patch-chrome_browser_memory__details.cc
	chromium/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
	chromium/patches/patch-chrome_browser_net_async__dns__field__trial.cc
	chromium/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc
	chromium/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
	chromium/patches/patch-chrome_browser_platform__util.h
	chromium/patches/patch-chrome_browser_plugins_plugins__resource__service.cc
	chromium/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc
	chromium/patches/patch-chrome_browser_process__singleton__posix.cc
	chromium/patches/patch-chrome_browser_profiles_profile__impl__io__data.cc
	chromium/patches/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc
	chromium/patches/patch-chrome_browser_renderer__preferences__util.cc
	chromium/patches/patch-chrome_browser_resources_safe__browsing_BUILD.gn
	chromium/patches/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
	chromium/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
	chromium/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc
	chromium/patches/patch-chrome_browser_search_local__files__ntp__source.cc
	chromium/patches/patch-chrome_browser_speech_tts__controller__impl.cc
	chromium/patches/patch-chrome_browser_sync_chrome__sync__client.cc
	chromium/patches/patch-chrome_browser_tracing_crash__service__uploader.cc
	chromium/patches/patch-chrome_browser_ui_BUILD.gn
	chromium/patches/patch-chrome_browser_ui_browser__command__controller.cc
	chromium/patches/patch-chrome_browser_ui_browser__view__prefs.cc
	chromium/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
	chromium/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
	chromium/patches/patch-chrome_browser_ui_libgtkui_BUILD.gn
	chromium/patches/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc
	chromium/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
	chromium/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
	chromium/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc
	chromium/patches/patch-chrome_browser_ui_views_accelerator__table.cc
	chromium/patches/patch-chrome_browser_ui_views_app__list_linux_app__list__linux.cc
	chromium/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
	chromium/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc
	chromium/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
	chromium/patches/patch-chrome_browser_ui_views_first__run__dialog.cc
	chromium/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
	chromium/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
	chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
	chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
	chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
	chromium/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
	chromium/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
	chromium/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc
	chromium/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
	chromium/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc
	chromium/patches/patch-chrome_browser_ui_webui_about__ui.cc
	chromium/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
	chromium/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
	chromium/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc
	chromium/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h
	chromium/patches/patch-chrome_browser_web__applications_web__app.cc
	chromium/patches/patch-chrome_browser_web__applications_web__app.h
	chromium/patches/patch-chrome_common_BUILD.gn
	chromium/patches/patch-chrome_common_chrome__paths.cc
	chromium/patches/patch-chrome_common_chrome__paths.h
	chromium/patches/patch-chrome_common_chrome__paths__internal.h
	chromium/patches/patch-chrome_common_chrome__switches.cc
	chromium/patches/patch-chrome_common_chrome__switches.h
	chromium/patches/patch-chrome_common_extensions_chrome__extensions__client.cc
	chromium/patches/patch-chrome_common_extensions_command.cc
	chromium/patches/patch-chrome_common_features.gni
	chromium/patches/patch-chrome_common_pref__names.cc
	chromium/patches/patch-chrome_common_pref__names.h
	chromium/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc
	chromium/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h
	chromium/patches/patch-chrome_test_BUILD.gn
	chromium/patches/patch-chrome_test_base_in__process__browser__test.cc
	chromium/patches/patch-chrome_test_base_testing__browser__process.h
	chromium/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
	chromium/patches/patch-chromecast_BUILD.gn
	chromium/patches/patch-chromecast_browser_BUILD.gn
	chromium/patches/patch-chromecast_browser_metrics_BUILD.gn
	chromium/patches/patch-chromecast_crash_BUILD.gn
	chromium/patches/patch-components_BUILD.gn
	chromium/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
	chromium/patches/patch-components_content__settings_core_browser_website__settings__registry.cc
	chromium/patches/patch-components_content__settings_core_browser_website__settings__registry.h
	chromium/patches/patch-components_cookie__config_cookie__store__util.cc
	chromium/patches/patch-components_crash_content_app_BUILD.gn
	chromium/patches/patch-components_crash_content_browser_BUILD.gn
	chromium/patches/patch-components_drive_drive__api__util.cc
	chromium/patches/patch-components_feedback_anonymizer__tool.cc
	chromium/patches/patch-components_flags__ui_flags__state.cc
	chromium/patches/patch-components_gcm__driver_gcm__client.h
	chromium/patches/patch-components_gcm__driver_gcm__client__impl.cc
	chromium/patches/patch-components_json__schema_json__schema__validator.cc
	chromium/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc
	chromium/patches/patch-components_metrics_BUILD.gn
	chromium/patches/patch-components_metrics_drive__metrics__provider__linux.cc
	chromium/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc
	chromium/patches/patch-components_neterror_resources_neterror.js
	chromium/patches/patch-components_os__crypt_os__crypt.h
	chromium/patches/patch-components_password__manager_core_browser_import_csv__reader.cc
	chromium/patches/patch-components_plugins_renderer_BUILD.gn
	chromium/patches/patch-components_plugins_renderer_plugin__placeholder.cc
	chromium/patches/patch-components_policy_BUILD.gn
	chromium/patches/patch-components_policy_core_common_schema.cc
	chromium/patches/patch-components_policy_resources_policy__templates.json
	chromium/patches/patch-components_policy_tools_generate__policy__source.py
	chromium/patches/patch-components_storage__monitor_BUILD.gn
	chromium/patches/patch-components_storage__monitor_storage__monitor.cc
	chromium/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc
	chromium/patches/patch-components_storage__monitor_storage__monitor__freebsd.h
	chromium/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc
	chromium/patches/patch-components_storage__monitor_storage__monitor__netbsd.h
	chromium/patches/patch-components_sync_base_get__session__name__linux.cc
	chromium/patches/patch-components_update__client_update__query__params.cc
	chromium/patches/patch-components_url__matcher_regex__set__matcher.cc
	chromium/patches/patch-components_url__matcher_url__matcher__factory.cc
	chromium/patches/patch-components_variations_proto_study.proto
	chromium/patches/patch-components_webcrypto_algorithms_test__helpers.cc
	chromium/patches/patch-content_app_BUILD.gn
	chromium/patches/patch-content_app_content__main__runner.cc
	chromium/patches/patch-content_browser_BUILD.gn
	chromium/patches/patch-content_browser_accessibility_browser__accessibility.h
	chromium/patches/patch-content_browser_accessibility_browser__accessibility__manager.h
	chromium/patches/patch-content_browser_browser__main__loop.cc
	chromium/patches/patch-content_browser_child__process__launcher.cc
	chromium/patches/patch-content_browser_device__sensors_data__fetcher__shared__memory.h
	chromium/patches/patch-content_browser_devtools_protocol_color__picker.cc
	chromium/patches/patch-content_browser_download_base__file.cc
	chromium/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
	chromium/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
	chromium/patches/patch-content_browser_gpu_gpu__internals__ui.cc
	chromium/patches/patch-content_browser_gpu_gpu__process__host.cc
	chromium/patches/patch-content_browser_media_media__internals.cc
	chromium/patches/patch-content_browser_memory_memory__coordinator__impl.cc
	chromium/patches/patch-content_browser_memory_memory__monitor.cc
	chromium/patches/patch-content_browser_ppapi__plugin__process__host.cc
	chromium/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
	chromium/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
	chromium/patches/patch-content_browser_tracing_tracing__controller__impl.cc
	chromium/patches/patch-content_browser_utility__process__host__impl.cc
	chromium/patches/patch-content_common_BUILD.gn
	chromium/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc
	chromium/patches/patch-content_common_set__process__title__linux.cc
	chromium/patches/patch-content_common_set__process__title__linux.h
	chromium/patches/patch-content_gpu_BUILD.gn
	chromium/patches/patch-content_gpu_gpu__child__thread.cc
	chromium/patches/patch-content_gpu_gpu__main.cc
	chromium/patches/patch-content_gpu_in__process__gpu__thread.cc
	chromium/patches/patch-content_public_common_child__process__host.h
	chromium/patches/patch-content_public_common_content__switches.cc
	chromium/patches/patch-content_public_common_content__switches.h
	chromium/patches/patch-content_public_common_renderer__preferences.h
	chromium/patches/patch-content_public_test_browser__test__base.cc
	chromium/patches/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
	chromium/patches/patch-content_renderer_pepper_pepper__media__device__manager.cc
	chromium/patches/patch-content_renderer_render__thread__impl.cc
	chromium/patches/patch-content_renderer_renderer__blink__platform__impl.cc
	chromium/patches/patch-content_renderer_renderer__blink__platform__impl.h
	chromium/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
	chromium/patches/patch-content_renderer_webscrollbarbehavior__impl__aura.cc
	chromium/patches/patch-content_shell_BUILD.gn
	chromium/patches/patch-content_shell_browser_shell__browser__context.cc
	chromium/patches/patch-content_shell_browser_shell__browser__main__parts.cc
	chromium/patches/patch-content_test_BUILD.gn
	chromium/patches/patch-crypto_nss__util.cc
	chromium/patches/patch-device_BUILD.gn
	chromium/patches/patch-device_battery_BUILD.gn
	chromium/patches/patch-device_bluetooth_BUILD.gn
	chromium/patches/patch-device_gamepad_gamepad__provider.cc
	chromium/patches/patch-device_geolocation_BUILD.gn
	chromium/patches/patch-device_geolocation_location__arbitrator.cc
	chromium/patches/patch-device_hid_BUILD.gn
	chromium/patches/patch-device_media__transfer__protocol_media__transfer__protocol__daemon__client.h
	chromium/patches/patch-device_media__transfer__protocol_media__transfer__protocol__manager.h
	chromium/patches/patch-device_serial_BUILD.gn
	chromium/patches/patch-device_serial_serial__io__handler__posix.cc
	chromium/patches/patch-device_time__zone__monitor_time__zone__monitor.cc
	chromium/patches/patch-device_time__zone__monitor_time__zone__monitor__linux.cc
	chromium/patches/patch-device_usb_usb__context.cc
	chromium/patches/patch-device_usb_usb__context__unittest.cc
	chromium/patches/patch-device_usb_usb__device__handle__impl.cc
	chromium/patches/patch-device_usb_usb__device__handle__impl.h
	chromium/patches/patch-device_usb_usb__device__impl.cc
	chromium/patches/patch-device_usb_usb__error.cc
	chromium/patches/patch-device_usb_usb__service__impl.cc
	chromium/patches/patch-device_usb_usb__service__impl.h
	chromium/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc
	chromium/patches/patch-extensions_browser_api_networking__private_networking__private__event__router__factory.cc
	chromium/patches/patch-extensions_browser_api_serial_serial__api.cc
	chromium/patches/patch-extensions_browser_api_web__request_form__data__parser.cc
	chromium/patches/patch-extensions_common_image__util.cc
	chromium/patches/patch-extensions_common_stack__frame.cc
	chromium/patches/patch-gpu_BUILD.gn
	chromium/patches/patch-gpu_command__buffer_service_program__manager.cc
	chromium/patches/patch-gpu_config_BUILD.gn
	chromium/patches/patch-gpu_config_gpu__control__list.cc
	chromium/patches/patch-gpu_config_gpu__control__list__unittest.cc
	chromium/patches/patch-gpu_config_gpu__info__collector.cc
	chromium/patches/patch-gpu_config_gpu__test__config.cc
	chromium/patches/patch-gpu_gles2__conform__support_BUILD.gn
	chromium/patches/patch-gpu_gles2__conform__support_native_BUILD.gn
	chromium/patches/patch-gpu_ipc_client_BUILD.gn
	chromium/patches/patch-gpu_ipc_service_BUILD.gn
	chromium/patches/patch-gpu_ipc_service_gpu__init.cc
	chromium/patches/patch-gpu_tools_compositor__model__bench_BUILD.gn
	chromium/patches/patch-gpu_vulkan_BUILD.gn
	chromium/patches/patch-ipc_ipc__channel.h
	chromium/patches/patch-ipc_ipc__channel__common.cc
	chromium/patches/patch-ipc_ipc__message__utils.cc
	chromium/patches/patch-ipc_ipc__message__utils.h
	chromium/patches/patch-ipc_unix__domain__socket__util.cc
	chromium/patches/patch-media_audio_BUILD.gn
	chromium/patches/patch-media_audio_alsa_audio__manager__alsa.cc
	chromium/patches/patch-media_audio_audio__manager.cc
	chromium/patches/patch-media_audio_audio__manager.h
	chromium/patches/patch-media_base_BUILD.gn
	chromium/patches/patch-media_capture_BUILD.gn
	chromium/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
	chromium/patches/patch-media_capture_video_file__video__capture__device__factory.cc
	chromium/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
	chromium/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
	chromium/patches/patch-media_capture_video_video__capture__device__client.cc
	chromium/patches/patch-media_capture_video_video__capture__device__factory.cc
	chromium/patches/patch-media_cast_BUILD.gn
	chromium/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni
	chromium/patches/patch-media_ffmpeg_ffmpeg__common.h
	chromium/patches/patch-media_filters_ffmpeg__demuxer.cc
	chromium/patches/patch-media_filters_vp9__parser.h
	chromium/patches/patch-media_formats_common_offset__byte__queue.cc
	chromium/patches/patch-media_formats_common_offset__byte__queue.h
	chromium/patches/patch-media_formats_mp2t_es__parser__adts.cc
	chromium/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc
	chromium/patches/patch-mojo_BUILD.gn
	chromium/patches/patch-mojo_edk_embedder_platform__channel__utils__posix.cc
	chromium/patches/patch-mojo_edk_test_BUILD.gn
	chromium/patches/patch-native__client__sdk_src_BUILD.gn
	chromium/patches/patch-net_BUILD.gn
	chromium/patches/patch-net_base_address__tracker__linux.h
	chromium/patches/patch-net_base_address__tracker__linux__unittest.cc
	chromium/patches/patch-net_base_mime__util__unittest.cc
	chromium/patches/patch-net_base_network__change__notifier.cc
	chromium/patches/patch-net_base_network__change__notifier.h
	chromium/patches/patch-net_base_network__interfaces__linux.cc
	chromium/patches/patch-net_base_network__interfaces__posix.cc
	chromium/patches/patch-net_dns_address__sorter__posix.cc
	chromium/patches/patch-net_dns_dns__config__service__posix__unittest.cc
	chromium/patches/patch-net_dns_dns__reloader.cc
	chromium/patches/patch-net_http_http__auth__gssapi__posix.cc
	chromium/patches/patch-net_http_http__network__session.cc
	chromium/patches/patch-net_proxy_proxy__config__service__linux.cc
	chromium/patches/patch-net_proxy_proxy__service.cc
	chromium/patches/patch-net_socket_socks5__client__socket.cc
	chromium/patches/patch-net_socket_udp__socket__posix.cc
	chromium/patches/patch-net_tools_get__server__time_get__server__time.cc
	chromium/patches/patch-net_url__request_url__request__context__builder.cc
	chromium/patches/patch-pdf_pdfium_pdfium__engine.cc
	chromium/patches/patch-ppapi_proxy_file__io__resource.cc
	chromium/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc
	chromium/patches/patch-ppapi_tests_extensions_BUILD.gn
	chromium/patches/patch-printing_BUILD.gn
	chromium/patches/patch-printing_cups__config__helper.py
	chromium/patches/patch-remoting_host_BUILD.gn
	chromium/patches/patch-sdch_BUILD.gn
	chromium/patches/patch-services_service__manager_runner_host_BUILD.gn
	chromium/patches/patch-services_service__manager_standalone_context.cc
	chromium/patches/patch-services_ui_BUILD.gn
	chromium/patches/patch-services_ui_ime_BUILD.gn
	chromium/patches/patch-services_ui_public_cpp_gles2__context.cc
	chromium/patches/patch-services_ui_surfaces_surfaces__context__provider.cc
	chromium/patches/patch-skia_BUILD.gn
	chromium/patches/patch-skia_ext_SkMemory__new__handler.cpp
	chromium/patches/patch-skia_ext_platform__canvas.h
	chromium/patches/patch-testing_gtest_src_gtest.cc
	chromium/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
	chromium/patches/patch-third__party_WebKit_Source_core_layout_BUILD.gn
	chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp
	chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h
	chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp
	chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h
	chromium/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp
	chromium/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp
	chromium/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp
	chromium/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp
	chromium/patches/patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp
	chromium/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp
	chromium/patches/patch-third__party_WebKit_Source_wtf_Atomics.h
	chromium/patches/patch-third__party_WebKit_Source_wtf_BUILD.gn
	chromium/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h
	chromium/patches/patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h
	chromium/patches/patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp
	chromium/patches/patch-third__party_angle_BUILD.gn
	chromium/patches/patch-third__party_angle_gni_angle.gni
	chromium/patches/patch-third__party_angle_src_tests_BUILD.gn
	chromium/patches/patch-third__party_boringssl_BUILD.gn
	chromium/patches/patch-third__party_boringssl_src_crypto_ex__data.c
	chromium/patches/patch-third__party_boringssl_src_include_openssl_thread.h
	chromium/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h
	chromium/patches/patch-third__party_expat_BUILD.gn
	chromium/patches/patch-third__party_ffmpeg_BUILD.gn
	chromium/patches/patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h
	chromium/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
	chromium/patches/patch-third__party_ffmpeg_libavutil_cpu.c
	chromium/patches/patch-third__party_ffmpeg_libavutil_mem.c
	chromium/patches/patch-third__party_fontconfig_BUILD.gn
	chromium/patches/patch-third__party_freetype2_BUILD.gn
	chromium/patches/patch-third__party_glslang_BUILD.gn
	chromium/patches/patch-third__party_harfbuzz-ng_BUILD.gn
	chromium/patches/patch-third__party_icu_android_patch__locale.sh
	chromium/patches/patch-third__party_icu_source_configure
	chromium/patches/patch-third__party_leveldatabase_env__chromium.cc
	chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
	chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
	chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
	chromium/patches/patch-third__party_libusb_BUILD.gn
	chromium/patches/patch-third__party_libxml_BUILD.gn
	chromium/patches/patch-third__party_libxslt_BUILD.gn
	chromium/patches/patch-third__party_libyuv_include_libyuv_row.h
	chromium/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc
	chromium/patches/patch-third__party_mesa_BUILD.gn
	chromium/patches/patch-third__party_minigbm_BUILD.gn
	chromium/patches/patch-third__party_opus_BUILD.gn
	chromium/patches/patch-third__party_ots_include_opentype-sanitiser.h
	chromium/patches/patch-third__party_pdfium_BUILD.gn
	chromium/patches/patch-third__party_pdfium_core_fxcrt_fx__system.h
	chromium/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
	chromium/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
	chromium/patches/patch-third__party_pdfium_skia_BUILD.gn
	chromium/patches/patch-third__party_pdfium_third__party_base_logging.h
	chromium/patches/patch-third__party_protobuf_post__process__dist.sh
	chromium/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
	chromium/patches/patch-third__party_sqlite_BUILD.gn
	chromium/patches/patch-third__party_usrsctp_BUILD.gn
	chromium/patches/patch-third__party_webrtc_BUILD.gn
	chromium/patches/patch-third__party_webrtc_base_BUILD.gn
	chromium/patches/patch-third__party_webrtc_base_httpcommon.cc
	chromium/patches/patch-third__party_webrtc_base_ifaddrs__converter.h
	chromium/patches/patch-third__party_webrtc_base_ipaddress.h
	chromium/patches/patch-third__party_webrtc_base_linux.cc
	chromium/patches/patch-third__party_webrtc_base_linux.h
	chromium/patches/patch-third__party_webrtc_base_network.cc
	chromium/patches/patch-third__party_webrtc_base_network.h
	chromium/patches/patch-third__party_webrtc_base_physicalsocketserver.cc
	chromium/patches/patch-third__party_webrtc_base_platform__thread.cc
	chromium/patches/patch-third__party_webrtc_base_stringutils.h
	chromium/patches/patch-third__party_webrtc_base_systeminfo.cc
	chromium/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn
	chromium/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc
	chromium/patches/patch-third__party_webrtc_modules_video__coding_BUILD.gn
	chromium/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn
	chromium/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc
	chromium/patches/patch-third__party_webrtc_voice__engine_voice__engine__defines.h
	chromium/patches/patch-third__party_widevine_cdm_BUILD.gn
	chromium/patches/patch-third__party_widevine_cdm_stub_widevine__cdm__version.h
	chromium/patches/patch-third__party_xdg-utils_scripts_xdg-terminal
	chromium/patches/patch-third__party_xdg-utils_scripts_xdg-terminal.in
	chromium/patches/patch-third__party_yasm_BUILD.gn
	chromium/patches/patch-third__party_zlib_BUILD.gn
	chromium/patches/patch-tools_battor__agent_BUILD.gn
	chromium/patches/patch-tools_gn_args.cc
	chromium/patches/patch-tools_gn_bootstrap_bootstrap.py
	chromium/patches/patch-tools_variations_fieldtrial__to__struct.py
	chromium/patches/patch-ui_accessibility_platform_ax__platform__node.h
	chromium/patches/patch-ui_app__list_app__list__constants.cc
	chromium/patches/patch-ui_app__list_app__list__constants.h
	chromium/patches/patch-ui_app__list_views_app__list__item__view.cc
	chromium/patches/patch-ui_app__list_views_app__list__view.cc
	chromium/patches/patch-ui_aura_BUILD.gn
	chromium/patches/patch-ui_base_BUILD.gn
	chromium/patches/patch-ui_base_ime_BUILD.gn
	chromium/patches/patch-ui_base_ime_ime__engine__handler__interface.h
	chromium/patches/patch-ui_base_ime_input__method__factory.cc
	chromium/patches/patch-ui_base_ime_input__method__initializer.cc
	chromium/patches/patch-ui_base_resource_resource__bundle.cc
	chromium/patches/patch-ui_base_ui__features.gni
	chromium/patches/patch-ui_base_webui_web__ui__util.cc
	chromium/patches/patch-ui_compositor_BUILD.gn
	chromium/patches/patch-ui_events_event__switches.cc
	chromium/patches/patch-ui_events_event__switches.h
	chromium/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
	chromium/patches/patch-ui_gfx_BUILD.gn
	chromium/patches/patch-ui_gfx_canvas__skia.cc
	chromium/patches/patch-ui_gfx_font__fallback__linux.cc
	chromium/patches/patch-ui_gfx_font__render__params.h
	chromium/patches/patch-ui_gfx_render__text.cc
	chromium/patches/patch-ui_gl_BUILD.gn
	chromium/patches/patch-ui_gl_sync__control__vsync__provider.cc
	chromium/patches/patch-ui_gl_sync__control__vsync__provider.h
	chromium/patches/patch-ui_message__center_message__center__style.h
	chromium/patches/patch-ui_message__center_views_message__center__button__bar.cc
	chromium/patches/patch-ui_message__center_views_message__center__button__bar.h
	chromium/patches/patch-ui_message__center_views_message__view__factory.cc
	chromium/patches/patch-ui_resources_ui__resources.grd
	chromium/patches/patch-ui_views_BUILD.gn
	chromium/patches/patch-ui_views_accessibility_native__view__accessibility.h
	chromium/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc
	chromium/patches/patch-ui_views_controls_label.cc
	chromium/patches/patch-ui_views_controls_textfield_textfield.cc
	chromium/patches/patch-ui_views_controls_webview_BUILD.gn
	chromium/patches/patch-ui_views_corewm_tooltip__aura.cc
	chromium/patches/patch-ui_views_examples_widget__example.cc
	chromium/patches/patch-ui_views_selection__controller.cc
	chromium/patches/patch-ui_views_style_platform__style.cc
	chromium/patches/patch-ui_views_views__delegate.cc
	chromium/patches/patch-ui_views_views__delegate.h
	chromium/patches/patch-ui_views_views__switches.cc
	chromium/patches/patch-ui_views_window_custom__frame__view.cc
	chromium/patches/patch-ui_views_window_dialog__delegate.cc
	chromium/patches/patch-ui_webui_resources_js_cr.js
	chromium/patches/patch-ui_webui_resources_js_icon.js
	chromium/patches/patch-v8_BUILD.gn
	chromium/patches/patch-v8_src_base_platform_platform-netbsd.cc
	chromium/patches/patch-v8_src_base_platform_platform-posix.cc
	chromium/patches/patch-v8_src_base_platform_platform.h
	chromium/patches/patch-v8_src_globals.h
	chromium/patches/patch-v8_tools_run-llprof.sh
Removed Files:
	chromium-new/DESCR
	chromium-new/Makefile
	chromium-new/PLIST
	chromium-new/TODO
	chromium-new/distinfo
	chromium-new/options.mk
	chromium-new/patches/patch-BUILD.gn
	chromium-new/patches/patch-apps_ui_views_app__window__frame__view.cc
	chromium-new/patches/patch-ash_display_mirror__window__controller.cc
	chromium-new/patches/patch-ash_shell.cc
	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_base__paths__posix.cc
	chromium-new/patches/patch-base_debug_debugger__posix.cc
	chromium-new/patches/patch-base_debug_proc__maps__linux.cc
	chromium-new/patches/patch-base_debug_stack__trace__posix.cc
	chromium-new/patches/patch-base_debug_thread__heap__usage__tracker.cc
	chromium-new/patches/patch-base_files_file__path__unittest.cc
	chromium-new/patches/patch-base_files_file__path__watcher__kqueue.h
	chromium-new/patches/patch-base_files_file__util.h
	chromium-new/patches/patch-base_linux__util.cc
	chromium-new/patches/patch-base_native__library__posix.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__freebsd.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__posix.cc
	chromium-new/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
	chromium-new/patches/patch-base_security__unittest.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_BUILD.gn
	chromium-new/patches/patch-base_test_launcher_test__launcher.cc
	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.h
	chromium-new/patches/patch-base_threading_platform__thread__linux.cc
	chromium-new/patches/patch-base_threading_platform__thread__netbsd.cc
	chromium-new/patches/patch-base_threading_platform__thread__posix.cc
	chromium-new/patches/patch-base_trace__event_malloc__dump__provider.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-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-cc_layers_scrollbar__layer__impl__base.cc
	chromium-new/patches/patch-cc_trees_property__tree.cc
	chromium-new/patches/patch-chrome_BUILD.gn
	chromium-new/patches/patch-chrome_app_chrome__command__ids.h
	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_BUILD.gn
	chromium-new/patches/patch-chrome_browser_about__flags.cc
	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_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_BUILD.gn
	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_api_omnibox_omnibox__api.cc
	chromium-new/patches/patch-chrome_browser_extensions_bookmark__app__helper.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_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_net_async__dns__field__trial.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_platform__util.h
	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_profiles_profile__impl__io__data.cc
	chromium-new/patches/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc
	chromium-new/patches/patch-chrome_browser_renderer__preferences__util.cc
	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_incident__reporting_incident__handler__util.cc
	chromium-new/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc
	chromium-new/patches/patch-chrome_browser_search_local__files__ntp__source.cc
	chromium-new/patches/patch-chrome_browser_speech_tts__controller__impl.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_BUILD.gn
	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_libgtkui_BUILD.gn
	chromium-new/patches/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc
	chromium-new/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.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_accelerator__table.cc
	chromium-new/patches/patch-chrome_browser_ui_views_app__list_linux_app__list__linux.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_frame_system__menu__model__delegate.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_BUILD.gn
	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_chrome__extensions__client.cc
	chromium-new/patches/patch-chrome_common_extensions_command.cc
	chromium-new/patches/patch-chrome_common_features.gni
	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_BUILD.gn
	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-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_autofill_content_renderer_password__form__conversion__utils.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_cookie__config_cookie__store__util.cc
	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_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_gcm__driver_gcm__client.h
	chromium-new/patches/patch-components_gcm__driver_gcm__client__impl.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_BUILD.gn
	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_os__crypt_os__crypt.h
	chromium-new/patches/patch-components_password__manager_core_browser_import_csv__reader.cc
	chromium-new/patches/patch-components_plugins_renderer_BUILD.gn
	chromium-new/patches/patch-components_plugins_renderer_plugin__placeholder.cc
	chromium-new/patches/patch-components_policy_BUILD.gn
	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_BUILD.gn
	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_sync_base_get__session__name__linux.cc
	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_variations_proto_study.proto
	chromium-new/patches/patch-components_webcrypto_algorithms_test__helpers.cc
	chromium-new/patches/patch-content_app_BUILD.gn
	chromium-new/patches/patch-content_app_content__main__runner.cc
	chromium-new/patches/patch-content_browser_BUILD.gn
	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_device__sensors_data__fetcher__shared__memory.h
	chromium-new/patches/patch-content_browser_devtools_protocol_color__picker.cc
	chromium-new/patches/patch-content_browser_download_base__file.cc
	chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
	chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
	chromium-new/patches/patch-content_browser_gpu_gpu__internals__ui.cc
	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_memory_memory__coordinator__impl.cc
	chromium-new/patches/patch-content_browser_memory_memory__monitor.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_tracing_tracing__controller__impl.cc
	chromium-new/patches/patch-content_browser_utility__process__host__impl.cc
	chromium-new/patches/patch-content_common_BUILD.gn
	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_BUILD.gn
	chromium-new/patches/patch-content_gpu_gpu__child__thread.cc
	chromium-new/patches/patch-content_gpu_gpu__main.cc
	chromium-new/patches/patch-content_gpu_in__process__gpu__thread.cc
	chromium-new/patches/patch-content_public_common_child__process__host.h
	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_common_renderer__preferences.h
	chromium-new/patches/patch-content_public_test_browser__test__base.cc
	chromium-new/patches/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
	chromium-new/patches/patch-content_renderer_pepper_pepper__media__device__manager.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__aura.cc
	chromium-new/patches/patch-content_shell_BUILD.gn
	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-content_test_BUILD.gn
	chromium-new/patches/patch-crypto_nss__util.cc
	chromium-new/patches/patch-device_BUILD.gn
	chromium-new/patches/patch-device_battery_BUILD.gn
	chromium-new/patches/patch-device_bluetooth_BUILD.gn
	chromium-new/patches/patch-device_gamepad_gamepad__provider.cc
	chromium-new/patches/patch-device_geolocation_BUILD.gn
	chromium-new/patches/patch-device_geolocation_location__arbitrator.cc
	chromium-new/patches/patch-device_hid_BUILD.gn
	chromium-new/patches/patch-device_media__transfer__protocol_media__transfer__protocol__daemon__client.h
	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-device_serial_serial__io__handler__posix.cc
	chromium-new/patches/patch-device_time__zone__monitor_time__zone__monitor.cc
	chromium-new/patches/patch-device_time__zone__monitor_time__zone__monitor__linux.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_networking__private_networking__private__event__router__factory.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_BUILD.gn
	chromium-new/patches/patch-gpu_command__buffer_service_program__manager.cc
	chromium-new/patches/patch-gpu_config_BUILD.gn
	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-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_ipc_service_gpu__init.cc
	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__common.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_BUILD.gn
	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_BUILD.gn
	chromium-new/patches/patch-media_capture_BUILD.gn
	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_v4l2__capture__delegate.cc
	chromium-new/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
	chromium-new/patches/patch-media_capture_video_video__capture__device__client.cc
	chromium-new/patches/patch-media_capture_video_video__capture__device__factory.cc
	chromium-new/patches/patch-media_cast_BUILD.gn
	chromium-new/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni
	chromium-new/patches/patch-media_ffmpeg_ffmpeg__common.h
	chromium-new/patches/patch-media_filters_ffmpeg__demuxer.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-mojo_BUILD.gn
	chromium-new/patches/patch-mojo_edk_embedder_platform__channel__utils__posix.cc
	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_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__change__notifier.h
	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_http_http__auth__gssapi__posix.cc
	chromium-new/patches/patch-net_http_http__network__session.cc
	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_socket_udp__socket__posix.cc
	chromium-new/patches/patch-net_tools_get__server__time_get__server__time.cc
	chromium-new/patches/patch-net_url__request_url__request__context__builder.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-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_service__manager_runner_host_BUILD.gn
	chromium-new/patches/patch-services_service__manager_standalone_context.cc
	chromium-new/patches/patch-services_ui_BUILD.gn
	chromium-new/patches/patch-services_ui_ime_BUILD.gn
	chromium-new/patches/patch-services_ui_public_cpp_gles2__context.cc
	chromium-new/patches/patch-services_ui_surfaces_surfaces__context__provider.cc
	chromium-new/patches/patch-skia_BUILD.gn
	chromium-new/patches/patch-skia_ext_SkMemory__new__handler.cpp
	chromium-new/patches/patch-skia_ext_platform__canvas.h
	chromium-new/patches/patch-testing_gtest_src_gtest.cc
	chromium-new/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
	chromium-new/patches/patch-third__party_WebKit_Source_core_layout_BUILD.gn
	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_FontPlatformData.h
	chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.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_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_BUILD.gn
	chromium-new/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.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_BUILD.gn
	chromium-new/patches/patch-third__party_angle_gni_angle.gni
	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_boringssl_src_crypto_ex__data.c
	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_expat_BUILD.gn
	chromium-new/patches/patch-third__party_ffmpeg_BUILD.gn
	chromium-new/patches/patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h
	chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
	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_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_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_libusb_BUILD.gn
	chromium-new/patches/patch-third__party_libxml_BUILD.gn
	chromium-new/patches/patch-third__party_libxslt_BUILD.gn
	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_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_ots_include_opentype-sanitiser.h
	chromium-new/patches/patch-third__party_pdfium_BUILD.gn
	chromium-new/patches/patch-third__party_pdfium_core_fxcrt_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_pdfium_skia_BUILD.gn
	chromium-new/patches/patch-third__party_pdfium_third__party_base_logging.h
	chromium-new/patches/patch-third__party_protobuf_post__process__dist.sh
	chromium-new/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
	chromium-new/patches/patch-third__party_sqlite_BUILD.gn
	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_base_BUILD.gn
	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_modules_audio__device_BUILD.gn
	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_BUILD.gn
	chromium-new/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn
	chromium-new/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc
	chromium-new/patches/patch-third__party_webrtc_voice__engine_voice__engine__defines.h
	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_variations_fieldtrial__to__struct.py
	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_views_app__list__item__view.cc
	chromium-new/patches/patch-ui_app__list_views_app__list__view.cc
	chromium-new/patches/patch-ui_aura_BUILD.gn
	chromium-new/patches/patch-ui_base_BUILD.gn
	chromium-new/patches/patch-ui_base_ime_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_ui__features.gni
	chromium-new/patches/patch-ui_base_webui_web__ui__util.cc
	chromium-new/patches/patch-ui_compositor_BUILD.gn
	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_BUILD.gn
	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_BUILD.gn
	chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.cc
	chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.h
	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_message__center_views_message__view__factory.cc
	chromium-new/patches/patch-ui_resources_ui__resources.grd
	chromium-new/patches/patch-ui_views_BUILD.gn
	chromium-new/patches/patch-ui_views_accessibility_native__view__accessibility.h
	chromium-new/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc
	chromium-new/patches/patch-ui_views_controls_label.cc
	chromium-new/patches/patch-ui_views_controls_textfield_textfield.cc
	chromium-new/patches/patch-ui_views_controls_webview_BUILD.gn
	chromium-new/patches/patch-ui_views_corewm_tooltip__aura.cc
	chromium-new/patches/patch-ui_views_examples_widget__example.cc
	chromium-new/patches/patch-ui_views_selection__controller.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-ui_webui_resources_js_icon.js
	chromium-new/patches/patch-v8_BUILD.gn
	chromium-new/patches/patch-v8_src_base_platform_platform-netbsd.cc
	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_src_globals.h
	chromium-new/patches/patch-v8_tools_run-llprof.sh

Log Message:
move chromium-new to chromium

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

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

diffstat:
 chromium-new/DESCR                                 |   3 -
 chromium-new/Makefile                              | 372 --------------
 chromium-new/PLIST                                 | 216 ---------
 chromium-new/TODO                                  |   5 -
 chromium-new/distinfo                              | 535 ---------------------
 chromium-new/options.mk                            |  33 --
 chromium-new/patches/patch-BUILD.gn                | 175 -------
 ...patch-apps_ui_views_app__window__frame__view.cc |  13 -
 ...patch-ash_display_mirror__window__controller.cc |  16 -
 chromium-new/patches/patch-ash_shell.cc            |  13 -
 chromium-new/patches/patch-base_BUILD.gn           | 103 ----
 chromium-new/patches/patch-base_allocator_BUILD.gn |  14 -
 ...llocator__shim__default__dispatch__to__glibc.cc |  88 ----
 ...ator_allocator__shim__override__libc__symbols.h |  13 -
 ...tch-base_allocator_allocator__shim__unittest.cc |  63 ---
 .../patches/patch-base_base__paths__posix.cc       |  47 --
 .../patches/patch-base_debug_debugger__posix.cc    |  62 ---
 .../patches/patch-base_debug_proc__maps__linux.cc  |  13 -
 .../patch-base_debug_stack__trace__posix.cc        |  23 -
 ...atch-base_debug_thread__heap__usage__tracker.cc |  18 -
 .../patch-base_files_file__path__unittest.cc       |  13 -
 .../patch-base_files_file__path__watcher__kqueue.h |  15 -
 chromium-new/patches/patch-base_files_file__util.h |  13 -
 chromium-new/patches/patch-base_linux__util.cc     |  20 -
 .../patches/patch-base_native__library__posix.cc   |  13 -
 ...patch-base_posix_unix__domain__socket__linux.cc |  47 --
 ..._posix_unix__domain__socket__linux__unittest.cc |  20 -
 .../patches/patch-base_process_internal__linux.h   |  13 -
 chromium-new/patches/patch-base_process_launch.cc  |  13 -
 chromium-new/patches/patch-base_process_launch.h   |  22 -
 .../patches/patch-base_process_launch__posix.cc    |  21 -
 chromium-new/patches/patch-base_process_memory.h   |  13 -
 .../patches/patch-base_process_memory__stubs.cc    |  20 -
 .../patches/patch-base_process_memory__unittest.cc |  24 -
 .../patch-base_process_process__handle__freebsd.cc |  13 -
 .../patch-base_process_process__handle__netbsd.cc  |  71 ---
 .../patch-base_process_process__info__linux.cc     |  74 ---
 .../patches/patch-base_process_process__iterator.h |  27 --
 ...atch-base_process_process__iterator__freebsd.cc |  38 --
 ...patch-base_process_process__iterator__netbsd.cc | 151 ------
 .../patches/patch-base_process_process__metrics.h  |  35 --
 ...patch-base_process_process__metrics__freebsd.cc |  38 --
 .../patch-base_process_process__metrics__netbsd.cc | 208 --------
 .../patches/patch-base_process_process__posix.cc   |  92 ----
 ...profiler_stack__sampling__profiler__unittest.cc |  13 -
 .../patches/patch-base_security__unittest.cc       |  13 -
 .../patches/patch-base_sys__info__freebsd.cc       |  74 ---
 .../patches/patch-base_sys__info__netbsd.cc        |  82 ----
 .../patches/patch-base_sys__info__posix.cc         |  22 -
 chromium-new/patches/patch-base_test_BUILD.gn      |  13 -
 .../patch-base_test_launcher_test__launcher.cc     |  15 -
 .../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.h        |  13 -
 ...patch-base_threading_platform__thread__linux.cc |  32 --
 ...atch-base_threading_platform__thread__netbsd.cc | 102 ----
 ...patch-base_threading_platform__thread__posix.cc |  13 -
 ...tch-base_trace__event_malloc__dump__provider.cc |  13 -
 ...atch-base_trace__event_process__memory__dump.cc |  13 -
 ...patch-base_trace__event_process__memory__dump.h |  13 -
 chromium-new/patches/patch-breakpad_BUILD.gn       |  13 -
 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        |  21 -
 .../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   |  16 -
 chromium-new/patches/patch-build_config_ui.gni     |  43 --
 .../patches/patch-build_linux_libpci_BUILD.gn      |  56 ---
 ...patch-build_secondary_third__party_nss_BUILD.gn |  13 -
 .../patch-build_toolchain_gcc__toolchain.gni       |  48 --
 ...patch-build_toolchain_get__concurrent__links.py |  19 -
 ...patch-cc_layers_scrollbar__layer__impl__base.cc |  15 -
 .../patches/patch-cc_trees_property__tree.cc       |  22 -
 chromium-new/patches/patch-chrome_BUILD.gn         |  31 --
 .../patch-chrome_app_chrome__command__ids.h        |  13 -
 .../patch-chrome_app_chrome__main__delegate.cc     |  67 ---
 .../patch-chrome_app_chrome__main__delegate.h      |  13 -
 .../patches/patch-chrome_app_chromium__strings.grd |  13 -
 .../patch-chrome_app_generated__resources.grd      |  40 --
 ...patch-chrome_app_resources_locale__settings.grd |  13 -
 chromium-new/patches/patch-chrome_browser_BUILD.gn |  22 -
 .../patches/patch-chrome_browser_about__flags.cc   |  22 -
 .../patch-chrome_browser_browser__process__impl.cc |  22 -
 .../patch-chrome_browser_browser__process__impl.h  |  13 -
 .../patch-chrome_browser_browser__resources.grd    |  13 -
 .../patch-chrome_browser_chrome__browser__main.cc  |  27 --
 ...-chrome_browser_chrome__browser__main__linux.cc |  29 --
 ...-chrome_browser_chrome__browser__main__posix.cc |  24 -
 ...ome_browser_chrome__content__browser__client.cc |  76 ---
 ...rome_browser_chrome__content__browser__client.h |  13 -
 .../patches/patch-chrome_browser_defaults.cc       |  13 -
 ...rome_browser_diagnostics_diagnostics__writer.cc |  13 -
 ...hrome_browser_diagnostics_diagnostics__writer.h |  13 -
 ...download_chrome__download__manager__delegate.cc |  22 -
 ...h-chrome_browser_download_download__commands.cc |  40 --
 ...ch-chrome_browser_download_download__commands.h |  14 -
 ...atch-chrome_browser_download_download__prefs.cc |  67 ---
 ...patch-chrome_browser_download_download__prefs.h |  22 -
 ...atch-chrome_browser_download_download__query.cc |  16 -
 ...wser_download_download__shelf__context__menu.cc |  13 -
 .../patch-chrome_browser_extensions_BUILD.gn       |  26 -
 ...owser_extensions_activity__log_activity__log.cc |  16 -
 ..._writer__private_image__writer__private__api.cc |  17 -
 ...ser_extensions_api_input__ime_input__ime__api.h |  13 -
 ...er_extensions_api_messaging_message__service.cc |  37 --
 ...pi_music__manager__private_device__id__linux.cc |  68 ---
 ..._browser_extensions_api_omnibox_omnibox__api.cc |  13 -
 ...ome_browser_extensions_bookmark__app__helper.cc |  13 -
 ..._browser__context__keyed__service__factories.cc |  22 -
 ..._browser_extensions_external__provider__impl.cc |  22 -
 ...patch-chrome_browser_gpu_gl__string__manager.cc |  13 -
 ...tch-chrome_browser_gpu_gpu__feature__checker.cc |  13 -
 ...ser_interstitials_chrome__controller__client.cc |  22 -
 ..._galleries_fileapi_mtp__device__map__service.cc |  17 -
 ...dia__galleries_media__file__system__registry.cc |  16 -
 ...e_browser_media_webrtc_webrtc__log__uploader.cc |  15 -
 .../patch-chrome_browser_memory__details.cc        |  22 -
 ...chrome__browser__main__extra__parts__metrics.cc |  20 -
 ...-chrome_browser_net_async__dns__field__trial.cc |  13 -
 ...tions_message__center__notification__manager.cc |  13 -
 ...d__manager_chrome__password__manager__client.cc |  16 -
 .../patches/patch-chrome_browser_platform__util.h  |  13 -
 ...e_browser_plugins_plugins__resource__service.cc |  13 -
 ...me_browser_policy_policy__prefs__browsertest.cc |  13 -
 ...tch-chrome_browser_process__singleton__posix.cc |  36 --
 ...ome_browser_profiles_profile__impl__io__data.cc |  13 -
 ...r__context__menu_render__view__context__menu.cc |  31 --
 ...h-chrome_browser_renderer__preferences__util.cc |  40 --
 ...hrome_browser_resources_safe__browsing_BUILD.gn |  13 -
 ...ources_safe__browsing_gen__file__type__proto.py |  21 -
 ..._incident__reporting_incident__handler__util.cc |  17 -
 ..._browser_safe__browsing_permission__reporter.cc |  13 -
 ...ome_browser_search_local__files__ntp__source.cc |  18 -
 ...-chrome_browser_speech_tts__controller__impl.cc |  18 -
 ...tch-chrome_browser_sync_chrome__sync__client.cc |  13 -
 ...ome_browser_tracing_crash__service__uploader.cc |  15 -
 .../patches/patch-chrome_browser_ui_BUILD.gn       |  13 -
 ...rome_browser_ui_browser__command__controller.cc |  40 --
 ...patch-chrome_browser_ui_browser__view__prefs.cc |  13 -
 ..._exclusive__access_exclusive__access__bubble.cc |  13 -
 ...ui_input__method_input__method__engine__base.cc |  13 -
 .../patch-chrome_browser_ui_libgtkui_BUILD.gn      |  13 -
 ...hrome_browser_ui_libgtkui_print__dialog__gtk.cc |  12 -
 ...chrome_browser_ui_startup_bad__flags__prompt.cc |  13 -
 ...browser_ui_startup_startup__browser__creator.cc |  25 -
 ...h-chrome_browser_ui_toolbar_app__menu__model.cc |  13 -
 ...h-chrome_browser_ui_views_accelerator__table.cc |  31 --
 ...er_ui_views_app__list_linux_app__list__linux.cc |  13 -
 ...pps_chrome__native__app__window__views__aura.cc |  22 -
 ...ome_browser_ui_views_chrome__views__delegate.cc |  31 --
 ...rome_browser_ui_views_chrome__views__delegate.h |  22 -
 ...h-chrome_browser_ui_views_first__run__dialog.cc |  15 -
 ...chrome_browser_ui_views_frame_browser__frame.cc |  27 --
 ...-chrome_browser_ui_views_frame_browser__view.cc |  13 -
 ..._ui_views_frame_opaque__browser__frame__view.cc |  22 -
 ...s_frame_opaque__browser__frame__view__layout.cc |  13 -
 ...ue__browser__frame__view__platform__specific.cc |  13 -
 ..._ui_views_frame_system__menu__model__builder.cc |  22 -
 ...ui_views_frame_system__menu__model__delegate.cc |  22 -
 ...message__center_message__center__frame__view.cc |  13 -
 ..._browser_ui_views_tabs_tab__drag__controller.cc |  31 --
 ...atch-chrome_browser_ui_views_tabs_tab__strip.cc |  13 -
 .../patch-chrome_browser_ui_webui_about__ui.cc     |  72 ---
 ...i_webui_chrome__web__ui__controller__factory.cc |  13 -
 ..._webui_extensions_extension__loader__handler.cc |  16 -
 ...r_ui_webui_options_browser__options__handler.cc |  47 --
 ...er_ui_webui_options_browser__options__handler.h |  13 -
 ...ch-chrome_browser_web__applications_web__app.cc |  13 -
 ...tch-chrome_browser_web__applications_web__app.h |  13 -
 chromium-new/patches/patch-chrome_common_BUILD.gn  |  18 -
 .../patches/patch-chrome_common_chrome__paths.cc   |  55 ---
 .../patches/patch-chrome_common_chrome__paths.h    |  31 --
 .../patch-chrome_common_chrome__paths__internal.h  |  13 -
 .../patch-chrome_common_chrome__switches.cc        |  13 -
 .../patches/patch-chrome_common_chrome__switches.h |  13 -
 ...common_extensions_chrome__extensions__client.cc |  16 -
 .../patch-chrome_common_extensions_command.cc      |  13 -
 .../patches/patch-chrome_common_features.gni       |  13 -
 .../patches/patch-chrome_common_pref__names.cc     |  31 --
 .../patches/patch-chrome_common_pref__names.h      |  31 --
 ...derer_pepper_pepper__flash__font__file__host.cc |  40 --
 ...nderer_pepper_pepper__flash__font__file__host.h |  22 -
 chromium-new/patches/patch-chrome_test_BUILD.gn    | 169 -------
 ...-chrome_test_base_in__process__browser__test.cc |  15 -
 ...ch-chrome_test_base_testing__browser__process.h |  15 -
 ...rome_test_chromedriver_chrome_chrome__finder.cc |  22 -
 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 -
 ...t_renderer_password__form__conversion__utils.cc |  16 -
 ...ngs_core_browser_website__settings__registry.cc |  14 -
 ...ings_core_browser_website__settings__registry.h |  17 -
 ...omponents_cookie__config_cookie__store__util.cc |  26 -
 .../patch-components_crash_content_app_BUILD.gn    |  13 -
 ...patch-components_crash_content_browser_BUILD.gn |  23 -
 .../patch-components_drive_drive__api__util.cc     |  16 -
 .../patch-components_feedback_anonymizer__tool.cc  |  16 -
 .../patch-components_flags__ui_flags__state.cc     |  13 -
 .../patch-components_gcm__driver_gcm__client.h     |  12 -
 ...tch-components_gcm__driver_gcm__client__impl.cc |  14 -
 ...ponents_json__schema_json__schema__validator.cc |  16 -
 ...ed__service_core_dependency__graph__unittest.cc |  16 -
 .../patches/patch-components_metrics_BUILD.gn      |  36 --
 ...ents_metrics_drive__metrics__provider__linux.cc |  18 -
 ...trics_system__memory__stats__recorder__linux.cc |  20 -
 ...patch-components_neterror_resources_neterror.js |  13 -
 .../patches/patch-components_os__crypt_os__crypt.h |  22 -
 ...ord__manager_core_browser_import_csv__reader.cc |  16 -
 .../patch-components_plugins_renderer_BUILD.gn     |  19 -
 ...ponents_plugins_renderer_plugin__placeholder.cc |  16 -
 .../patches/patch-components_policy_BUILD.gn       |  21 -
 .../patch-components_policy_core_common_schema.cc  |  16 -
 ...ponents_policy_resources_policy__templates.json |  49 --
 ...onents_policy_tools_generate__policy__source.py |  13 -
 .../patch-components_storage__monitor_BUILD.gn     |  34 --
 ...components_storage__monitor_storage__monitor.cc |  20 -
 ...s_storage__monitor_storage__monitor__freebsd.cc | 106 ----
 ...ts_storage__monitor_storage__monitor__freebsd.h |  50 --
 ...ts_storage__monitor_storage__monitor__netbsd.cc |  59 ---
 ...nts_storage__monitor_storage__monitor__netbsd.h |  50 --
 ...mponents_sync_base_get__session__name__linux.cc |  24 -
 ...ponents_update__client_update__query__params.cc |  15 -
 ...-components_url__matcher_regex__set__matcher.cc |  18 -
 ...omponents_url__matcher_url__matcher__factory.cc |  16 -
 .../patch-components_variations_proto_study.proto  |  12 -
 ...omponents_webcrypto_algorithms_test__helpers.cc |  16 -
 chromium-new/patches/patch-content_app_BUILD.gn    |  13 -
 .../patch-content_app_content__main__runner.cc     |  44 --
 .../patches/patch-content_browser_BUILD.gn         |  70 ---
 ..._browser_accessibility_browser__accessibility.h |  13 -
 ...accessibility_browser__accessibility__manager.h |  22 -
 .../patch-content_browser_browser__main__loop.cc   |  41 --
 ...tch-content_browser_child__process__launcher.cc |  49 --
 ...device__sensors_data__fetcher__shared__memory.h |  13 -
 ...tent_browser_devtools_protocol_color__picker.cc |  13 -
 .../patch-content_browser_download_base__file.cc   |  22 -
 ...rowser_gpu_gpu__data__manager__impl__private.cc |  47 --
 ...browser_gpu_gpu__data__manager__impl__private.h |  13 -
 ...patch-content_browser_gpu_gpu__internals__ui.cc |  31 --
 ...patch-content_browser_gpu_gpu__process__host.cc |  13 -
 ...patch-content_browser_media_media__internals.cc |  13 -
 ...ent_browser_memory_memory__coordinator__impl.cc |  17 -
 ...patch-content_browser_memory_memory__monitor.cc |  23 -
 ...content_browser_ppapi__plugin__process__host.cc |  50 --
 ...r_renderer__host_render__process__host__impl.cc |  54 ---
 ...derer__host_render__widget__host__view__aura.cc |  31 --
 ...nt_browser_tracing_tracing__controller__impl.cc |  13 -
 ...content_browser_utility__process__host__impl.cc |  96 ----
 chromium-new/patches/patch-content_common_BUILD.gn |  29 --
 ...ndbox__linux_sandbox__debug__handling__linux.cc |  31 --
 ...ch-content_common_set__process__title__linux.cc |  21 -
 ...tch-content_common_set__process__title__linux.h |  22 -
 chromium-new/patches/patch-content_gpu_BUILD.gn    |  12 -
 .../patch-content_gpu_gpu__child__thread.cc        |  20 -
 .../patches/patch-content_gpu_gpu__main.cc         |  45 --
 .../patch-content_gpu_in__process__gpu__thread.cc  |  13 -
 ...ch-content_public_common_child__process__host.h |  22 -
 ...atch-content_public_common_content__switches.cc |  13 -
 ...patch-content_public_common_content__switches.h |  13 -
 ...h-content_public_common_renderer__preferences.h |  13 -
 ...atch-content_public_test_browser__test__base.cc |  15 -
 ...media_webrtc_processed__local__audio__source.cc |  15 -
 ...nderer_pepper_pepper__media__device__manager.cc |  18 -
 .../patch-content_renderer_render__thread__impl.cc |  36 --
 ...ent_renderer_renderer__blink__platform__impl.cc |  58 ---
 ...tent_renderer_renderer__blink__platform__impl.h |  13 -
 ...er_renderer__main__platform__delegate__linux.cc |  21 -
 ...nt_renderer_webscrollbarbehavior__impl__aura.cc |  22 -
 chromium-new/patches/patch-content_shell_BUILD.gn  |  40 --
 ...ontent_shell_browser_shell__browser__context.cc |  22 -
 ...nt_shell_browser_shell__browser__main__parts.cc |  22 -
 chromium-new/patches/patch-content_test_BUILD.gn   |  40 --
 chromium-new/patches/patch-crypto_nss__util.cc     |  30 --
 chromium-new/patches/patch-device_BUILD.gn         |  13 -
 chromium-new/patches/patch-device_battery_BUILD.gn |  13 -
 .../patches/patch-device_bluetooth_BUILD.gn        |  13 -
 .../patch-device_gamepad_gamepad__provider.cc      |  13 -
 .../patches/patch-device_geolocation_BUILD.gn      |  13 -
 ...atch-device_geolocation_location__arbitrator.cc |  13 -
 chromium-new/patches/patch-device_hid_BUILD.gn     |  18 -
 ...col_media__transfer__protocol__daemon__client.h |  13 -
 ...__protocol_media__transfer__protocol__manager.h |  13 -
 chromium-new/patches/patch-device_serial_BUILD.gn  |  26 -
 ...tch-device_serial_serial__io__handler__posix.cc |  13 -
 ...vice_time__zone__monitor_time__zone__monitor.cc |  13 -
 ...me__zone__monitor_time__zone__monitor__linux.cc |  24 -
 .../patches/patch-device_usb_usb__context.cc       |  28 --
 .../patch-device_usb_usb__context__unittest.cc     |  16 -
 .../patch-device_usb_usb__device__handle__impl.cc  |  17 -
 .../patch-device_usb_usb__device__handle__impl.h   |  17 -
 .../patches/patch-device_usb_usb__device__impl.cc  |  16 -
 .../patches/patch-device_usb_usb__error.cc         |  16 -
 .../patches/patch-device_usb_usb__service__impl.cc |  61 ---
 .../patches/patch-device_usb_usb__service__impl.h  |  42 --
 ...i_declarative__webrequest_webrequest__action.cc |  16 -
 ..._networking__private__event__router__factory.cc |  19 -
 ...ch-extensions_browser_api_serial_serial__api.cc |  19 -
 ..._browser_api_web__request_form__data__parser.cc |  16 -
 .../patches/patch-extensions_common_image__util.cc |  16 -
 .../patch-extensions_common_stack__frame.cc        |  16 -
 chromium-new/patches/patch-gpu_BUILD.gn            |  13 -
 ...gpu_command__buffer_service_program__manager.cc |  16 -
 chromium-new/patches/patch-gpu_config_BUILD.gn     |  29 --
 .../patches/patch-gpu_config_gpu__control__list.cc |  34 --
 ...atch-gpu_config_gpu__control__list__unittest.cc |  14 -
 .../patch-gpu_config_gpu__info__collector.cc       |  15 -
 .../patches/patch-gpu_config_gpu__test__config.cc  |  32 --
 .../patch-gpu_gles2__conform__support_BUILD.gn     |  22 -
 ...tch-gpu_gles2__conform__support_native_BUILD.gn |  13 -
 chromium-new/patches/patch-gpu_ipc_client_BUILD.gn |  12 -
 .../patches/patch-gpu_ipc_service_BUILD.gn         |  18 -
 .../patches/patch-gpu_ipc_service_gpu__init.cc     |  40 --
 ...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__common.cc      |  13 -
 .../patches/patch-ipc_ipc__message__utils.cc       |  13 -
 .../patches/patch-ipc_ipc__message__utils.h        |  13 -
 .../patch-ipc_unix__domain__socket__util.cc        |  13 -
 chromium-new/patches/patch-media_audio_BUILD.gn    |  27 --
 .../patch-media_audio_alsa_audio__manager__alsa.cc |  56 ---
 .../patches/patch-media_audio_audio__manager.cc    |  31 --
 .../patches/patch-media_audio_audio__manager.h     |  13 -
 chromium-new/patches/patch-media_base_BUILD.gn     |  22 -
 chromium-new/patches/patch-media_capture_BUILD.gn  |  21 -
 ..._video_fake__video__capture__device__factory.cc |  13 -
 ..._video_file__video__capture__device__factory.cc |  13 -
 ..._capture_video_linux_v4l2__capture__delegate.cc |  27 --
 ...re_video_linux_video__capture__device__linux.cc |  64 ---
 ...capture_video_video__capture__device__client.cc |  13 -
 ...apture_video_video__capture__device__factory.cc |  32 --
 chromium-new/patches/patch-media_cast_BUILD.gn     |  31 --
 .../patch-media_cdm_ppapi_ppapi__cdm__adapter.gni  |  22 -
 .../patches/patch-media_ffmpeg_ffmpeg__common.h    |  21 -
 .../patches/patch-media_filters_ffmpeg__demuxer.cc |  29 --
 .../patches/patch-media_filters_vp9__parser.h      |  12 -
 ...tch-media_formats_common_offset__byte__queue.cc |  22 -
 ...atch-media_formats_common_offset__byte__queue.h |  24 -
 .../patch-media_formats_mp2t_es__parser__adts.cc   |  28 --
 ...ch-media_formats_mp2t_es__parser__mpeg1audio.cc |  28 --
 chromium-new/patches/patch-mojo_BUILD.gn           |  13 -
 ...edk_embedder_platform__channel__utils__posix.cc |  13 -
 chromium-new/patches/patch-mojo_edk_test_BUILD.gn  |  22 -
 .../patches/patch-native__client__sdk_src_BUILD.gn |  22 -
 chromium-new/patches/patch-net_BUILD.gn            |  88 ----
 .../patch-net_base_address__tracker__linux.h       |  30 --
 ...h-net_base_address__tracker__linux__unittest.cc |  16 -
 .../patches/patch-net_base_mime__util__unittest.cc |  13 -
 .../patch-net_base_network__change__notifier.cc    |  30 --
 .../patch-net_base_network__change__notifier.h     |  31 --
 .../patch-net_base_network__interfaces__linux.cc   | 107 -----
 .../patch-net_base_network__interfaces__posix.cc   |  20 -
 .../patch-net_dns_address__sorter__posix.cc        |  14 -
 ...et_dns_dns__config__service__posix__unittest.cc |  13 -
 .../patches/patch-net_dns_dns__reloader.cc         |  51 --
 .../patch-net_http_http__auth__gssapi__posix.cc    |  15 -
 .../patch-net_http_http__network__session.cc       |  14 -
 ...atch-net_proxy_proxy__config__service__linux.cc | 147 ------
 .../patches/patch-net_proxy_proxy__service.cc      |  22 -
 .../patch-net_socket_socks5__client__socket.cc     |  15 -
 .../patches/patch-net_socket_udp__socket__posix.cc |  31 --
 ...et_tools_get__server__time_get__server__time.cc |  22 -
 ..._url__request_url__request__context__builder.cc |  13 -
 .../patches/patch-pdf_pdfium_pdfium__engine.cc     |  67 ---
 .../patch-ppapi_proxy_file__io__resource.cc        |  50 --
 ...ed__impl_private_net__address__private__impl.cc |  18 -
 .../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-remoting_host_BUILD.gn  |  49 --
 chromium-new/patches/patch-sdch_BUILD.gn           |  22 -
 ...-services_service__manager_runner_host_BUILD.gn |  13 -
 ...services_service__manager_standalone_context.cc |  13 -
 chromium-new/patches/patch-services_ui_BUILD.gn    |  20 -
 .../patches/patch-services_ui_ime_BUILD.gn         |  12 -
 .../patch-services_ui_public_cpp_gles2__context.cc |  13 -
 ...ices_ui_surfaces_surfaces__context__provider.cc |  13 -
 chromium-new/patches/patch-skia_BUILD.gn           |  48 --
 .../patch-skia_ext_SkMemory__new__handler.cpp      |  22 -
 .../patches/patch-skia_ext_platform__canvas.h      |  13 -
 .../patches/patch-testing_gtest_src_gtest.cc       |  24 -
 ...bKit_Source_bindings_core_v8_V8ScriptRunner.cpp |  13 -
 ...third__party_WebKit_Source_core_layout_BUILD.gn |  13 -
 ...arty_WebKit_Source_platform_fonts_FontCache.cpp |  16 -
 ..._party_WebKit_Source_platform_fonts_FontCache.h |  22 -
 ...bKit_Source_platform_fonts_FontPlatformData.cpp |  49 --
 ...WebKit_Source_platform_fonts_FontPlatformData.h |  34 --
 ...WebKit_Source_platform_fonts_SimpleFontData.cpp |  31 --
 ...it_Source_platform_fonts_skia_FontCacheSkia.cpp |  22 -
 ...d__party_WebKit_Source_platform_heap_GCInfo.cpp |  13 -
 ...WebKit_Source_platform_heap_StackFrameDepth.cpp |  51 --
 ...hird__party_WebKit_Source_web_PopupMenuImpl.cpp |  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_BUILD.gn  |  15 -
 ...patch-third__party_WebKit_Source_wtf_ByteSwap.h |  26 -
 ..._party_WebKit_Source_wtf_ContainerAnnotations.h |  13 -
 ...__party_WebKit_Source_wtf_ThreadingPthreads.cpp |  31 --
 .../patches/patch-third__party_angle_BUILD.gn      |  39 --
 .../patches/patch-third__party_angle_gni_angle.gni |  13 -
 .../patch-third__party_angle_src_tests_BUILD.gn    |  67 ---
 .../patches/patch-third__party_boringssl_BUILD.gn  |  31 --
 ...ch-third__party_boringssl_src_crypto_ex__data.c |  15 -
 ...d__party_boringssl_src_include_openssl_thread.h |  14 -
 ...on_src_google_cacheinvalidation_include_types.h |  13 -
 .../patches/patch-third__party_expat_BUILD.gn      |  13 -
 .../patches/patch-third__party_ffmpeg_BUILD.gn     |  20 -
 ...mpeg_chromium_config_Chrome_netbsd_x64_config.h |  13 -
 ...patch-third__party_ffmpeg_ffmpeg__generated.gni | 287 -----------
 .../patch-third__party_ffmpeg_libavutil_cpu.c      |  20 -
 .../patch-third__party_ffmpeg_libavutil_mem.c      |  14 -
 .../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 -
 ...tch-third__party_leveldatabase_env__chromium.cc |  16 -
 ...st_cpp_src_phonenumbers_base_memory_singleton.h |  13 -
 ...pp_src_phonenumbers_base_synchronization_lock.h |  13 -
 ...ist_cpp_src_phonenumbers_base_thread__checker.h |  21 -
 .../patches/patch-third__party_libusb_BUILD.gn     | 263 ----------
 .../patches/patch-third__party_libxml_BUILD.gn     |  13 -
 .../patches/patch-third__party_libxslt_BUILD.gn    |  13 -
 .../patch-third__party_libyuv_include_libyuv_row.h |  39 --
 ...ch-third__party_libyuv_source_mjpeg__decoder.cc |  12 -
 .../patches/patch-third__party_mesa_BUILD.gn       |  25 -
 .../patches/patch-third__party_minigbm_BUILD.gn    |  13 -
 .../patches/patch-third__party_opus_BUILD.gn       |  13 -
 ...h-third__party_ots_include_opentype-sanitiser.h |  12 -
 .../patches/patch-third__party_pdfium_BUILD.gn     |  13 -
 ...tch-third__party_pdfium_core_fxcrt_fx__system.h |  13 -
 ...__party_pdfium_fpdfsdk_javascript_JS__Value.cpp |  30 --
 ...rty_pdfium_fpdfsdk_javascript_PublicMethods.cpp | 108 -----
 .../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 -
 ...-third__party_skia_src_gpu_GrAutoLocaleSetter.h |  13 -
 .../patches/patch-third__party_sqlite_BUILD.gn     |  40 --
 .../patches/patch-third__party_usrsctp_BUILD.gn    |  17 -
 .../patches/patch-third__party_webrtc_BUILD.gn     |  14 -
 .../patch-third__party_webrtc_base_BUILD.gn        |  12 -
 .../patch-third__party_webrtc_base_httpcommon.cc   |  13 -
 ...h-third__party_webrtc_base_ifaddrs__converter.h |  13 -
 .../patch-third__party_webrtc_base_ipaddress.h     |  15 -
 .../patch-third__party_webrtc_base_linux.cc        |  19 -
 .../patches/patch-third__party_webrtc_base_linux.h |  20 -
 .../patch-third__party_webrtc_base_network.cc      |  31 --
 .../patch-third__party_webrtc_base_network.h       |  15 -
 ...hird__party_webrtc_base_physicalsocketserver.cc |  47 --
 ...ch-third__party_webrtc_base_platform__thread.cc |  50 --
 .../patch-third__party_webrtc_base_stringutils.h   |  19 -
 .../patch-third__party_webrtc_base_systeminfo.cc   |  42 --
 ...rd__party_webrtc_modules_audio__device_BUILD.gn |  22 -
 ..._rtp__rtcp_source_forward__error__correction.cc |  12 -
 ...rd__party_webrtc_modules_video__coding_BUILD.gn |  26 -
 ...h-third__party_webrtc_system__wrappers_BUILD.gn |  22 -
 ..._wrappers_source_atomic32__non__darwin__unix.cc |  13 -
 ...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 ---
 ...atch-tools_variations_fieldtrial__to__struct.py |  13 -
 ...-ui_accessibility_platform_ax__platform__node.h |  13 -
 .../patch-ui_app__list_app__list__constants.cc     |  13 -
 .../patch-ui_app__list_app__list__constants.h      |  15 -
 ...tch-ui_app__list_views_app__list__item__view.cc |  13 -
 .../patch-ui_app__list_views_app__list__view.cc    |  22 -
 chromium-new/patches/patch-ui_aura_BUILD.gn        |  13 -
 chromium-new/patches/patch-ui_base_BUILD.gn        |  63 ---
 chromium-new/patches/patch-ui_base_ime_BUILD.gn    |  22 -
 ...h-ui_base_ime_ime__engine__handler__interface.h |  13 -
 .../patch-ui_base_ime_input__method__factory.cc    |  24 -
 ...patch-ui_base_ime_input__method__initializer.cc |  39 --
 .../patch-ui_base_resource_resource__bundle.cc     |  22 -
 .../patches/patch-ui_base_ui__features.gni         |  10 -
 .../patches/patch-ui_base_webui_web__ui__util.cc   |  13 -
 chromium-new/patches/patch-ui_compositor_BUILD.gn  |  13 -
 .../patches/patch-ui_events_event__switches.cc     |  13 -
 .../patches/patch-ui_events_event__switches.h      |  13 -
 ...ch-ui_events_keycodes_dom_keycode__converter.cc |  13 -
 chromium-new/patches/patch-ui_gfx_BUILD.gn         |  22 -
 chromium-new/patches/patch-ui_gfx_canvas__skia.cc  |  13 -
 .../patches/patch-ui_gfx_font__fallback__linux.cc  |  15 -
 .../patches/patch-ui_gfx_font__render__params.h    |  20 -
 chromium-new/patches/patch-ui_gfx_render__text.cc  |  48 --
 chromium-new/patches/patch-ui_gl_BUILD.gn          |  22 -
 .../patch-ui_gl_sync__control__vsync__provider.cc  |  65 ---
 .../patch-ui_gl_sync__control__vsync__provider.h   |  22 -
 ...tch-ui_message__center_message__center__style.h |  13 -
 ...e__center_views_message__center__button__bar.cc |  49 --
 ...ge__center_views_message__center__button__bar.h |  13 -
 ...message__center_views_message__view__factory.cc |  13 -
 .../patches/patch-ui_resources_ui__resources.grd   |  13 -
 chromium-new/patches/patch-ui_views_BUILD.gn       |  22 -
 ...ews_accessibility_native__view__accessibility.h |  13 -
 ...tch-ui_views_bubble_bubble__dialog__delegate.cc |  13 -
 .../patches/patch-ui_views_controls_label.cc       |  22 -
 .../patch-ui_views_controls_textfield_textfield.cc |  75 ---
 .../patch-ui_views_controls_webview_BUILD.gn       |  13 -
 .../patches/patch-ui_views_corewm_tooltip__aura.cc |  13 -
 .../patch-ui_views_examples_widget__example.cc     |  13 -
 .../patch-ui_views_selection__controller.cc        |  13 -
 .../patch-ui_views_style_platform__style.cc        |  13 -
 .../patches/patch-ui_views_views__delegate.cc      |  13 -
 .../patches/patch-ui_views_views__delegate.h       |  13 -
 .../patches/patch-ui_views_views__switches.cc      |  13 -
 .../patch-ui_views_window_custom__frame__view.cc   |  13 -
 .../patch-ui_views_window_dialog__delegate.cc      |  13 -
 .../patches/patch-ui_webui_resources_js_cr.js      |  16 -
 .../patches/patch-ui_webui_resources_js_icon.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   |  51 --
 .../patches/patch-v8_src_base_platform_platform.h  |  12 -
 chromium-new/patches/patch-v8_src_globals.h        |  16 -
 chromium-new/patches/patch-v8_tools_run-llprof.sh  |  13 -
 chromium/DESCR                                     |   3 +
 chromium/Makefile                                  | 372 ++++++++++++++
 chromium/PLIST                                     | 216 +++++++++
 chromium/TODO                                      |   5 +
 chromium/distinfo                                  | 535 +++++++++++++++++++++
 chromium/options.mk                                |  33 ++
 chromium/patches/patch-BUILD.gn                    | 175 +++++++
 ...patch-apps_ui_views_app__window__frame__view.cc |  13 +
 ...patch-ash_display_mirror__window__controller.cc |  16 +
 chromium/patches/patch-ash_shell.cc                |  13 +
 chromium/patches/patch-base_BUILD.gn               | 103 ++++
 chromium/patches/patch-base_allocator_BUILD.gn     |  14 +
 ...llocator__shim__default__dispatch__to__glibc.cc |  88 ++++
 ...ator_allocator__shim__override__libc__symbols.h |  13 +
 ...tch-base_allocator_allocator__shim__unittest.cc |  63 +++
 chromium/patches/patch-base_base__paths__posix.cc  |  47 ++
 .../patches/patch-base_debug_debugger__posix.cc    |  62 +++
 .../patches/patch-base_debug_proc__maps__linux.cc  |  13 +
 .../patch-base_debug_stack__trace__posix.cc        |  23 +
 ...atch-base_debug_thread__heap__usage__tracker.cc |  18 +
 .../patch-base_files_file__path__unittest.cc       |  13 +
 .../patch-base_files_file__path__watcher__kqueue.h |  15 +
 chromium/patches/patch-base_files_file__util.h     |  13 +
 chromium/patches/patch-base_linux__util.cc         |  20 +
 .../patches/patch-base_native__library__posix.cc   |  13 +
 ...patch-base_posix_unix__domain__socket__linux.cc |  47 ++
 ..._posix_unix__domain__socket__linux__unittest.cc |  20 +
 .../patches/patch-base_process_internal__linux.h   |  13 +
 chromium/patches/patch-base_process_launch.cc      |  13 +
 chromium/patches/patch-base_process_launch.h       |  22 +
 .../patches/patch-base_process_launch__posix.cc    |  21 +
 chromium/patches/patch-base_process_memory.h       |  13 +
 .../patches/patch-base_process_memory__stubs.cc    |  20 +
 .../patches/patch-base_process_memory__unittest.cc |  24 +
 .../patch-base_process_process__handle__freebsd.cc |  13 +
 .../patch-base_process_process__handle__netbsd.cc  |  71 +++
 .../patch-base_process_process__info__linux.cc     |  74 +++
 .../patches/patch-base_process_process__iterator.h |  27 ++
 ...atch-base_process_process__iterator__freebsd.cc |  38 ++
 ...patch-base_process_process__iterator__netbsd.cc | 151 ++++++
 .../patches/patch-base_process_process__metrics.h  |  35 ++
 ...patch-base_process_process__metrics__freebsd.cc |  38 ++
 .../patch-base_process_process__metrics__netbsd.cc | 208 ++++++++
 .../patches/patch-base_process_process__posix.cc   |  92 ++++
 ...profiler_stack__sampling__profiler__unittest.cc |  13 +
 chromium/patches/patch-base_security__unittest.cc  |  13 +
 chromium/patches/patch-base_sys__info__freebsd.cc  |  74 +++
 chromium/patches/patch-base_sys__info__netbsd.cc   |  82 ++++
 chromium/patches/patch-base_sys__info__posix.cc    |  22 +
 chromium/patches/patch-base_test_BUILD.gn          |  13 +
 .../patch-base_test_launcher_test__launcher.cc     |  15 +
 .../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.h        |  13 +
 ...patch-base_threading_platform__thread__linux.cc |  32 ++
 ...atch-base_threading_platform__thread__netbsd.cc | 102 ++++
 ...patch-base_threading_platform__thread__posix.cc |  13 +
 ...tch-base_trace__event_malloc__dump__provider.cc |  13 +
 ...atch-base_trace__event_process__memory__dump.cc |  13 +
 ...patch-base_trace__event_process__memory__dump.h |  13 +
 chromium/patches/patch-breakpad_BUILD.gn           |  13 +
 chromium/patches/patch-build_config_BUILD.gn       |  22 +
 chromium/patches/patch-build_config_BUILDCONFIG.gn | 146 ++++++
 chromium/patches/patch-build_config_allocator.gni  |  13 +
 chromium/patches/patch-build_config_clang_BUILD.gn |  22 +
 .../patches/patch-build_config_compiler_BUILD.gn   | 102 ++++
 chromium/patches/patch-build_config_crypto.gni     |  10 +
 chromium/patches/patch-build_config_features.gni   |  21 +
 .../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   |  16 +
 chromium/patches/patch-build_config_ui.gni         |  43 ++
 chromium/patches/patch-build_linux_libpci_BUILD.gn |  56 +++
 ...patch-build_secondary_third__party_nss_BUILD.gn |  13 +
 .../patch-build_toolchain_gcc__toolchain.gni       |  48 ++
 ...patch-build_toolchain_get__concurrent__links.py |  19 +
 ...patch-cc_layers_scrollbar__layer__impl__base.cc |  15 +
 chromium/patches/patch-cc_trees_property__tree.cc  |  22 +
 chromium/patches/patch-chrome_BUILD.gn             |  31 ++
 .../patch-chrome_app_chrome__command__ids.h        |  13 +
 .../patch-chrome_app_chrome__main__delegate.cc     |  67 +++
 .../patch-chrome_app_chrome__main__delegate.h      |  13 +
 .../patches/patch-chrome_app_chromium__strings.grd |  13 +
 .../patch-chrome_app_generated__resources.grd      |  40 ++
 ...patch-chrome_app_resources_locale__settings.grd |  13 +
 chromium/patches/patch-chrome_browser_BUILD.gn     |  22 +
 .../patches/patch-chrome_browser_about__flags.cc   |  22 +
 .../patch-chrome_browser_browser__process__impl.cc |  22 +
 .../patch-chrome_browser_browser__process__impl.h  |  13 +
 .../patch-chrome_browser_browser__resources.grd    |  13 +
 .../patch-chrome_browser_chrome__browser__main.cc  |  27 ++
 ...-chrome_browser_chrome__browser__main__linux.cc |  29 ++
 ...-chrome_browser_chrome__browser__main__posix.cc |  24 +
 ...ome_browser_chrome__content__browser__client.cc |  76 +++
 ...rome_browser_chrome__content__browser__client.h |  13 +
 chromium/patches/patch-chrome_browser_defaults.cc  |  13 +
 ...rome_browser_diagnostics_diagnostics__writer.cc |  13 +
 ...hrome_browser_diagnostics_diagnostics__writer.h |  13 +
 ...download_chrome__download__manager__delegate.cc |  22 +
 ...h-chrome_browser_download_download__commands.cc |  40 ++
 ...ch-chrome_browser_download_download__commands.h |  14 +
 ...atch-chrome_browser_download_download__prefs.cc |  67 +++
 ...patch-chrome_browser_download_download__prefs.h |  22 +
 ...atch-chrome_browser_download_download__query.cc |  16 +
 ...wser_download_download__shelf__context__menu.cc |  13 +
 .../patch-chrome_browser_extensions_BUILD.gn       |  26 +
 ...owser_extensions_activity__log_activity__log.cc |  16 +
 ..._writer__private_image__writer__private__api.cc |  17 +
 ...ser_extensions_api_input__ime_input__ime__api.h |  13 +
 ...er_extensions_api_messaging_message__service.cc |  37 ++
 ...pi_music__manager__private_device__id__linux.cc |  68 +++
 ..._browser_extensions_api_omnibox_omnibox__api.cc |  13 +
 ...ome_browser_extensions_bookmark__app__helper.cc |  13 +
 ..._browser__context__keyed__service__factories.cc |  22 +
 ..._browser_extensions_external__provider__impl.cc |  22 +
 ...patch-chrome_browser_gpu_gl__string__manager.cc |  13 +
 ...tch-chrome_browser_gpu_gpu__feature__checker.cc |  13 +
 ...ser_interstitials_chrome__controller__client.cc |  22 +
 ..._galleries_fileapi_mtp__device__map__service.cc |  17 +
 ...dia__galleries_media__file__system__registry.cc |  16 +
 ...e_browser_media_webrtc_webrtc__log__uploader.cc |  15 +
 .../patch-chrome_browser_memory__details.cc        |  22 +
 ...chrome__browser__main__extra__parts__metrics.cc |  20 +
 ...-chrome_browser_net_async__dns__field__trial.cc |  13 +
 ...tions_message__center__notification__manager.cc |  13 +
 ...d__manager_chrome__password__manager__client.cc |  16 +
 .../patches/patch-chrome_browser_platform__util.h  |  13 +
 ...e_browser_plugins_plugins__resource__service.cc |  13 +
 ...me_browser_policy_policy__prefs__browsertest.cc |  13 +
 ...tch-chrome_browser_process__singleton__posix.cc |  36 ++
 ...ome_browser_profiles_profile__impl__io__data.cc |  13 +
 ...r__context__menu_render__view__context__menu.cc |  31 ++
 ...h-chrome_browser_renderer__preferences__util.cc |  40 ++
 ...hrome_browser_resources_safe__browsing_BUILD.gn |  13 +
 ...ources_safe__browsing_gen__file__type__proto.py |  21 +
 ..._incident__reporting_incident__handler__util.cc |  17 +
 ..._browser_safe__browsing_permission__reporter.cc |  13 +
 ...ome_browser_search_local__files__ntp__source.cc |  18 +
 ...-chrome_browser_speech_tts__controller__impl.cc |  18 +
 ...tch-chrome_browser_sync_chrome__sync__client.cc |  13 +
 ...ome_browser_tracing_crash__service__uploader.cc |  15 +
 chromium/patches/patch-chrome_browser_ui_BUILD.gn  |  13 +
 ...rome_browser_ui_browser__command__controller.cc |  40 ++
 ...patch-chrome_browser_ui_browser__view__prefs.cc |  13 +
 ..._exclusive__access_exclusive__access__bubble.cc |  13 +
 ...ui_input__method_input__method__engine__base.cc |  13 +
 .../patch-chrome_browser_ui_libgtkui_BUILD.gn      |  13 +
 ...hrome_browser_ui_libgtkui_print__dialog__gtk.cc |  12 +
 ...chrome_browser_ui_startup_bad__flags__prompt.cc |  13 +
 ...browser_ui_startup_startup__browser__creator.cc |  25 +
 ...h-chrome_browser_ui_toolbar_app__menu__model.cc |  13 +
 ...h-chrome_browser_ui_views_accelerator__table.cc |  31 ++
 ...er_ui_views_app__list_linux_app__list__linux.cc |  13 +
 ...pps_chrome__native__app__window__views__aura.cc |  22 +
 ...ome_browser_ui_views_chrome__views__delegate.cc |  31 ++
 ...rome_browser_ui_views_chrome__views__delegate.h |  22 +
 ...h-chrome_browser_ui_views_first__run__dialog.cc |  15 +
 ...chrome_browser_ui_views_frame_browser__frame.cc |  27 ++
 ...-chrome_browser_ui_views_frame_browser__view.cc |  13 +
 ..._ui_views_frame_opaque__browser__frame__view.cc |  22 +
 ...s_frame_opaque__browser__frame__view__layout.cc |  13 +
 ...ue__browser__frame__view__platform__specific.cc |  13 +
 ..._ui_views_frame_system__menu__model__builder.cc |  22 +
 ...ui_views_frame_system__menu__model__delegate.cc |  22 +
 ...message__center_message__center__frame__view.cc |  13 +
 ..._browser_ui_views_tabs_tab__drag__controller.cc |  31 ++
 ...atch-chrome_browser_ui_views_tabs_tab__strip.cc |  13 +
 .../patch-chrome_browser_ui_webui_about__ui.cc     |  72 +++
 ...i_webui_chrome__web__ui__controller__factory.cc |  13 +
 ..._webui_extensions_extension__loader__handler.cc |  16 +
 ...r_ui_webui_options_browser__options__handler.cc |  47 ++
 ...er_ui_webui_options_browser__options__handler.h |  13 +
 ...ch-chrome_browser_web__applications_web__app.cc |  13 +
 ...tch-chrome_browser_web__applications_web__app.h |  13 +
 chromium/patches/patch-chrome_common_BUILD.gn      |  18 +
 .../patches/patch-chrome_common_chrome__paths.cc   |  55 +++
 .../patches/patch-chrome_common_chrome__paths.h    |  31 ++
 .../patch-chrome_common_chrome__paths__internal.h  |  13 +
 .../patch-chrome_common_chrome__switches.cc        |  13 +
 .../patches/patch-chrome_common_chrome__switches.h |  13 +
 ...common_extensions_chrome__extensions__client.cc |  16 +
 .../patch-chrome_common_extensions_command.cc      |  13 +
 chromium/patches/patch-chrome_common_features.gni  |  13 +
 .../patches/patch-chrome_common_pref__names.cc     |  31 ++
 chromium/patches/patch-chrome_common_pref__names.h |  31 ++
 ...derer_pepper_pepper__flash__font__file__host.cc |  40 ++
 ...nderer_pepper_pepper__flash__font__file__host.h |  22 +
 chromium/patches/patch-chrome_test_BUILD.gn        | 169 +++++++
 ...-chrome_test_base_in__process__browser__test.cc |  15 +
 ...ch-chrome_test_base_testing__browser__process.h |  15 +
 ...rome_test_chromedriver_chrome_chrome__finder.cc |  22 +
 chromium/patches/patch-chromecast_BUILD.gn         |  13 +
 chromium/patches/patch-chromecast_browser_BUILD.gn |  13 +
 .../patch-chromecast_browser_metrics_BUILD.gn      |  13 +
 chromium/patches/patch-chromecast_crash_BUILD.gn   |  13 +
 chromium/patches/patch-components_BUILD.gn         |  15 +
 ...t_renderer_password__form__conversion__utils.cc |  16 +
 ...ngs_core_browser_website__settings__registry.cc |  14 +
 ...ings_core_browser_website__settings__registry.h |  17 +
 ...omponents_cookie__config_cookie__store__util.cc |  26 +
 .../patch-components_crash_content_app_BUILD.gn    |  13 +
 ...patch-components_crash_content_browser_BUILD.gn |  23 +
 .../patch-components_drive_drive__api__util.cc     |  16 +
 .../patch-components_feedback_anonymizer__tool.cc  |  16 +
 .../patch-components_flags__ui_flags__state.cc     |  13 +
 .../patch-components_gcm__driver_gcm__client.h     |  12 +
 ...tch-components_gcm__driver_gcm__client__impl.cc |  14 +
 ...ponents_json__schema_json__schema__validator.cc |  16 +
 ...ed__service_core_dependency__graph__unittest.cc |  16 +
 chromium/patches/patch-components_metrics_BUILD.gn |  36 ++
 ...ents_metrics_drive__metrics__provider__linux.cc |  18 +
 ...trics_system__memory__stats__recorder__linux.cc |  20 +
 ...patch-components_neterror_resources_neterror.js |  13 +
 .../patches/patch-components_os__crypt_os__crypt.h |  22 +
 ...ord__manager_core_browser_import_csv__reader.cc |  16 +
 .../patch-components_plugins_renderer_BUILD.gn     |  19 +
 ...ponents_plugins_renderer_plugin__placeholder.cc |  16 +
 chromium/patches/patch-components_policy_BUILD.gn  |  21 +
 .../patch-components_policy_core_common_schema.cc  |  16 +
 ...ponents_policy_resources_policy__templates.json |  49 ++
 ...onents_policy_tools_generate__policy__source.py |  13 +
 .../patch-components_storage__monitor_BUILD.gn     |  34 ++
 ...components_storage__monitor_storage__monitor.cc |  20 +
 ...s_storage__monitor_storage__monitor__freebsd.cc | 106 ++++
 ...ts_storage__monitor_storage__monitor__freebsd.h |  50 ++
 ...ts_storage__monitor_storage__monitor__netbsd.cc |  59 +++
 ...nts_storage__monitor_storage__monitor__netbsd.h |  50 ++
 ...mponents_sync_base_get__session__name__linux.cc |  24 +
 ...ponents_update__client_update__query__params.cc |  15 +
 ...-components_url__matcher_regex__set__matcher.cc |  18 +
 ...omponents_url__matcher_url__matcher__factory.cc |  16 +
 .../patch-components_variations_proto_study.proto  |  12 +
 ...omponents_webcrypto_algorithms_test__helpers.cc |  16 +
 chromium/patches/patch-content_app_BUILD.gn        |  13 +
 .../patch-content_app_content__main__runner.cc     |  44 ++
 chromium/patches/patch-content_browser_BUILD.gn    |  70 +++
 ..._browser_accessibility_browser__accessibility.h |  13 +
 ...accessibility_browser__accessibility__manager.h |  22 +
 .../patch-content_browser_browser__main__loop.cc   |  41 ++
 ...tch-content_browser_child__process__launcher.cc |  49 ++
 ...device__sensors_data__fetcher__shared__memory.h |  13 +
 ...tent_browser_devtools_protocol_color__picker.cc |  13 +
 .../patch-content_browser_download_base__file.cc   |  22 +
 ...rowser_gpu_gpu__data__manager__impl__private.cc |  47 ++
 ...browser_gpu_gpu__data__manager__impl__private.h |  13 +
 ...patch-content_browser_gpu_gpu__internals__ui.cc |  31 ++
 ...patch-content_browser_gpu_gpu__process__host.cc |  13 +
 ...patch-content_browser_media_media__internals.cc |  13 +
 ...ent_browser_memory_memory__coordinator__impl.cc |  17 +
 ...patch-content_browser_memory_memory__monitor.cc |  23 +
 ...content_browser_ppapi__plugin__process__host.cc |  50 ++
 ...r_renderer__host_render__process__host__impl.cc |  54 +++
 ...derer__host_render__widget__host__view__aura.cc |  31 ++
 ...nt_browser_tracing_tracing__controller__impl.cc |  13 +
 ...content_browser_utility__process__host__impl.cc |  96 ++++
 chromium/patches/patch-content_common_BUILD.gn     |  29 ++
 ...ndbox__linux_sandbox__debug__handling__linux.cc |  31 ++
 ...ch-content_common_set__process__title__linux.cc |  21 +
 ...tch-content_common_set__process__title__linux.h |  22 +
 chromium/patches/patch-content_gpu_BUILD.gn        |  12 +
 .../patch-content_gpu_gpu__child__thread.cc        |  20 +
 chromium/patches/patch-content_gpu_gpu__main.cc    |  45 ++
 .../patch-content_gpu_in__process__gpu__thread.cc  |  13 +
 ...ch-content_public_common_child__process__host.h |  22 +
 ...atch-content_public_common_content__switches.cc |  13 +
 ...patch-content_public_common_content__switches.h |  13 +
 ...h-content_public_common_renderer__preferences.h |  13 +
 ...atch-content_public_test_browser__test__base.cc |  15 +
 ...media_webrtc_processed__local__audio__source.cc |  15 +
 ...nderer_pepper_pepper__media__device__manager.cc |  18 +
 .../patch-content_renderer_render__thread__impl.cc |  36 ++
 ...ent_renderer_renderer__blink__platform__impl.cc |  58 +++
 ...tent_renderer_renderer__blink__platform__impl.h |  13 +
 ...er_renderer__main__platform__delegate__linux.cc |  21 +
 ...nt_renderer_webscrollbarbehavior__impl__aura.cc |  22 +
 chromium/patches/patch-content_shell_BUILD.gn      |  40 ++
 ...ontent_shell_browser_shell__browser__context.cc |  22 +
 ...nt_shell_browser_shell__browser__main__parts.cc |  22 +
 chromium/patches/patch-content_test_BUILD.gn       |  40 ++
 chromium/patches/patch-crypto_nss__util.cc         |  30 ++
 chromium/patches/patch-device_BUILD.gn             |  13 +
 chromium/patches/patch-device_battery_BUILD.gn     |  13 +
 chromium/patches/patch-device_bluetooth_BUILD.gn   |  13 +
 .../patch-device_gamepad_gamepad__provider.cc      |  13 +
 chromium/patches/patch-device_geolocation_BUILD.gn |  13 +
 ...atch-device_geolocation_location__arbitrator.cc |  13 +
 chromium/patches/patch-device_hid_BUILD.gn         |  18 +
 ...col_media__transfer__protocol__daemon__client.h |  13 +
 ...__protocol_media__transfer__protocol__manager.h |  13 +
 chromium/patches/patch-device_serial_BUILD.gn      |  26 +
 ...tch-device_serial_serial__io__handler__posix.cc |  13 +
 ...vice_time__zone__monitor_time__zone__monitor.cc |  13 +
 ...me__zone__monitor_time__zone__monitor__linux.cc |  24 +
 chromium/patches/patch-device_usb_usb__context.cc  |  28 ++
 .../patch-device_usb_usb__context__unittest.cc     |  16 +
 .../patch-device_usb_usb__device__handle__impl.cc  |  17 +
 .../patch-device_usb_usb__device__handle__impl.h   |  17 +
 .../patches/patch-device_usb_usb__device__impl.cc  |  16 +
 chromium/patches/patch-device_usb_usb__error.cc    |  16 +
 .../patches/patch-device_usb_usb__service__impl.cc |  61 +++
 .../patches/patch-device_usb_usb__service__impl.h  |  42 ++
 ...i_declarative__webrequest_webrequest__action.cc |  16 +
 ..._networking__private__event__router__factory.cc |  19 +
 ...ch-extensions_browser_api_serial_serial__api.cc |  19 +
 ..._browser_api_web__request_form__data__parser.cc |  16 +
 .../patches/patch-extensions_common_image__util.cc |  16 +
 .../patch-extensions_common_stack__frame.cc        |  16 +
 chromium/patches/patch-gpu_BUILD.gn                |  13 +
 ...gpu_command__buffer_service_program__manager.cc |  16 +
 chromium/patches/patch-gpu_config_BUILD.gn         |  29 ++
 .../patches/patch-gpu_config_gpu__control__list.cc |  34 ++
 ...atch-gpu_config_gpu__control__list__unittest.cc |  14 +
 .../patch-gpu_config_gpu__info__collector.cc       |  15 +
 .../patches/patch-gpu_config_gpu__test__config.cc  |  32 ++
 .../patch-gpu_gles2__conform__support_BUILD.gn     |  22 +
 ...tch-gpu_gles2__conform__support_native_BUILD.gn |  13 +
 chromium/patches/patch-gpu_ipc_client_BUILD.gn     |  12 +
 chromium/patches/patch-gpu_ipc_service_BUILD.gn    |  18 +
 .../patches/patch-gpu_ipc_service_gpu__init.cc     |  40 ++
 ...tch-gpu_tools_compositor__model__bench_BUILD.gn |  13 +
 chromium/patches/patch-gpu_vulkan_BUILD.gn         |  13 +
 chromium/patches/patch-ipc_ipc__channel.h          |  13 +
 chromium/patches/patch-ipc_ipc__channel__common.cc |  13 +
 chromium/patches/patch-ipc_ipc__message__utils.cc  |  13 +
 chromium/patches/patch-ipc_ipc__message__utils.h   |  13 +
 .../patch-ipc_unix__domain__socket__util.cc        |  13 +
 chromium/patches/patch-media_audio_BUILD.gn        |  27 ++
 .../patch-media_audio_alsa_audio__manager__alsa.cc |  56 +++
 .../patches/patch-media_audio_audio__manager.cc    |  31 ++
 .../patches/patch-media_audio_audio__manager.h     |  13 +
 chromium/patches/patch-media_base_BUILD.gn         |  22 +
 chromium/patches/patch-media_capture_BUILD.gn      |  21 +
 ..._video_fake__video__capture__device__factory.cc |  13 +
 ..._video_file__video__capture__device__factory.cc |  13 +
 ..._capture_video_linux_v4l2__capture__delegate.cc |  27 ++
 ...re_video_linux_video__capture__device__linux.cc |  64 +++
 ...capture_video_video__capture__device__client.cc |  13 +
 ...apture_video_video__capture__device__factory.cc |  32 ++
 chromium/patches/patch-media_cast_BUILD.gn         |  31 ++
 .../patch-media_cdm_ppapi_ppapi__cdm__adapter.gni  |  22 +
 .../patches/patch-media_ffmpeg_ffmpeg__common.h    |  21 +
 .../patches/patch-media_filters_ffmpeg__demuxer.cc |  29 ++
 chromium/patches/patch-media_filters_vp9__parser.h |  12 +
 ...tch-media_formats_common_offset__byte__queue.cc |  22 +
 ...atch-media_formats_common_offset__byte__queue.h |  24 +
 .../patch-media_formats_mp2t_es__parser__adts.cc   |  28 ++
 ...ch-media_formats_mp2t_es__parser__mpeg1audio.cc |  28 ++
 chromium/patches/patch-mojo_BUILD.gn               |  13 +
 ...edk_embedder_platform__channel__utils__posix.cc |  13 +
 chromium/patches/patch-mojo_edk_test_BUILD.gn      |  22 +
 .../patches/patch-native__client__sdk_src_BUILD.gn |  22 +
 chromium/patches/patch-net_BUILD.gn                |  88 ++++
 .../patch-net_base_address__tracker__linux.h       |  30 ++
 ...h-net_base_address__tracker__linux__unittest.cc |  16 +
 .../patches/patch-net_base_mime__util__unittest.cc |  13 +
 .../patch-net_base_network__change__notifier.cc    |  30 ++
 .../patch-net_base_network__change__notifier.h     |  31 ++
 .../patch-net_base_network__interfaces__linux.cc   | 107 +++++
 .../patch-net_base_network__interfaces__posix.cc   |  20 +
 .../patch-net_dns_address__sorter__posix.cc        |  14 +
 ...et_dns_dns__config__service__posix__unittest.cc |  13 +
 chromium/patches/patch-net_dns_dns__reloader.cc    |  51 ++
 .../patch-net_http_http__auth__gssapi__posix.cc    |  15 +
 .../patch-net_http_http__network__session.cc       |  14 +
 ...atch-net_proxy_proxy__config__service__linux.cc | 147 ++++++
 chromium/patches/patch-net_proxy_proxy__service.cc |  22 +
 .../patch-net_socket_socks5__client__socket.cc     |  15 +
 .../patches/patch-net_socket_udp__socket__posix.cc |  31 ++
 ...et_tools_get__server__time_get__server__time.cc |  22 +
 ..._url__request_url__request__context__builder.cc |  13 +
 .../patches/patch-pdf_pdfium_pdfium__engine.cc     |  67 +++
 .../patch-ppapi_proxy_file__io__resource.cc        |  50 ++
 ...ed__impl_private_net__address__private__impl.cc |  18 +
 .../patches/patch-ppapi_tests_extensions_BUILD.gn  |  13 +
 chromium/patches/patch-printing_BUILD.gn           |  22 +
 .../patches/patch-printing_cups__config__helper.py |  13 +
 chromium/patches/patch-remoting_host_BUILD.gn      |  49 ++
 chromium/patches/patch-sdch_BUILD.gn               |  22 +
 ...-services_service__manager_runner_host_BUILD.gn |  13 +
 ...services_service__manager_standalone_context.cc |  13 +
 chromium/patches/patch-services_ui_BUILD.gn        |  20 +
 chromium/patches/patch-services_ui_ime_BUILD.gn    |  12 +
 .../patch-services_ui_public_cpp_gles2__context.cc |  13 +
 ...ices_ui_surfaces_surfaces__context__provider.cc |  13 +
 chromium/patches/patch-skia_BUILD.gn               |  48 ++
 .../patch-skia_ext_SkMemory__new__handler.cpp      |  22 +
 chromium/patches/patch-skia_ext_platform__canvas.h |  13 +
 chromium/patches/patch-testing_gtest_src_gtest.cc  |  24 +
 ...bKit_Source_bindings_core_v8_V8ScriptRunner.cpp |  13 +
 ...third__party_WebKit_Source_core_layout_BUILD.gn |  13 +
 ...arty_WebKit_Source_platform_fonts_FontCache.cpp |  16 +
 ..._party_WebKit_Source_platform_fonts_FontCache.h |  22 +
 ...bKit_Source_platform_fonts_FontPlatformData.cpp |  49 ++
 ...WebKit_Source_platform_fonts_FontPlatformData.h |  34 ++
 ...WebKit_Source_platform_fonts_SimpleFontData.cpp |  31 ++
 ...it_Source_platform_fonts_skia_FontCacheSkia.cpp |  22 +
 ...d__party_WebKit_Source_platform_heap_GCInfo.cpp |  13 +
 ...WebKit_Source_platform_heap_StackFrameDepth.cpp |  51 ++
 ...hird__party_WebKit_Source_web_PopupMenuImpl.cpp |  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_BUILD.gn  |  15 +
 ...patch-third__party_WebKit_Source_wtf_ByteSwap.h |  26 +
 ..._party_WebKit_Source_wtf_ContainerAnnotations.h |  13 +
 ...__party_WebKit_Source_wtf_ThreadingPthreads.cpp |  31 ++
 chromium/patches/patch-third__party_angle_BUILD.gn |  39 ++
 .../patches/patch-third__party_angle_gni_angle.gni |  13 +
 .../patch-third__party_angle_src_tests_BUILD.gn    |  67 +++
 .../patches/patch-third__party_boringssl_BUILD.gn  |  31 ++
 ...ch-third__party_boringssl_src_crypto_ex__data.c |  15 +
 ...d__party_boringssl_src_include_openssl_thread.h |  14 +
 ...on_src_google_cacheinvalidation_include_types.h |  13 +
 chromium/patches/patch-third__party_expat_BUILD.gn |  13 +
 .../patches/patch-third__party_ffmpeg_BUILD.gn     |  20 +
 ...mpeg_chromium_config_Chrome_netbsd_x64_config.h |  13 +
 ...patch-third__party_ffmpeg_ffmpeg__generated.gni | 287 +++++++++++
 .../patch-third__party_ffmpeg_libavutil_cpu.c      |  20 +
 .../patch-third__party_ffmpeg_libavutil_mem.c      |  14 +
 .../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 +
 ...tch-third__party_leveldatabase_env__chromium.cc |  16 +
 ...st_cpp_src_phonenumbers_base_memory_singleton.h |  13 +
 ...pp_src_phonenumbers_base_synchronization_lock.h |  13 +
 ...ist_cpp_src_phonenumbers_base_thread__checker.h |  21 +
 .../patches/patch-third__party_libusb_BUILD.gn     | 263 ++++++++++
 .../patches/patch-third__party_libxml_BUILD.gn     |  13 +
 .../patches/patch-third__party_libxslt_BUILD.gn    |  13 +
 .../patch-third__party_libyuv_include_libyuv_row.h |  39 ++
 ...ch-third__party_libyuv_source_mjpeg__decoder.cc |  12 +
 chromium/patches/patch-third__party_mesa_BUILD.gn  |  25 +
 .../patches/patch-third__party_minigbm_BUILD.gn    |  13 +
 chromium/patches/patch-third__party_opus_BUILD.gn  |  13 +
 ...h-third__party_ots_include_opentype-sanitiser.h |  12 +
 .../patches/patch-third__party_pdfium_BUILD.gn     |  13 +
 ...tch-third__party_pdfium_core_fxcrt_fx__system.h |  13 +
 ...__party_pdfium_fpdfsdk_javascript_JS__Value.cpp |  30 ++
 ...rty_pdfium_fpdfsdk_javascript_PublicMethods.cpp | 108 +++++
 .../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 +
 ...-third__party_skia_src_gpu_GrAutoLocaleSetter.h |  13 +
 .../patches/patch-third__party_sqlite_BUILD.gn     |  40 ++
 .../patches/patch-third__party_usrsctp_BUILD.gn    |  17 +
 .../patches/patch-third__party_webrtc_BUILD.gn     |  14 +
 .../patch-third__party_webrtc_base_BUILD.gn        |  12 +
 .../patch-third__party_webrtc_base_httpcommon.cc   |  13 +
 ...h-third__party_webrtc_base_ifaddrs__converter.h |  13 +
 .../patch-third__party_webrtc_base_ipaddress.h     |  15 +
 .../patch-third__party_webrtc_base_linux.cc        |  19 +
 .../patches/patch-third__party_webrtc_base_linux.h |  20 +
 .../patch-third__party_webrtc_base_network.cc      |  31 ++
 .../patch-third__party_webrtc_base_network.h       |  15 +
 ...hird__party_webrtc_base_physicalsocketserver.cc |  47 ++
 ...ch-third__party_webrtc_base_platform__thread.cc |  50 ++
 .../patch-third__party_webrtc_base_stringutils.h   |  19 +
 .../patch-third__party_webrtc_base_systeminfo.cc   |  42 ++
 ...rd__party_webrtc_modules_audio__device_BUILD.gn |  22 +
 ..._rtp__rtcp_source_forward__error__correction.cc |  12 +
 ...rd__party_webrtc_modules_video__coding_BUILD.gn |  26 +
 ...h-third__party_webrtc_system__wrappers_BUILD.gn |  22 +
 ..._wrappers_source_atomic32__non__darwin__unix.cc |  13 +
 ...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 ++
 chromium/patches/patch-third__party_yasm_BUILD.gn  |  18 +
 chromium/patches/patch-third__party_zlib_BUILD.gn  |  13 +
 .../patches/patch-tools_battor__agent_BUILD.gn     |  13 +
 chromium/patches/patch-tools_gn_args.cc            |  17 +
 .../patches/patch-tools_gn_bootstrap_bootstrap.py  |  65 +++
 ...atch-tools_variations_fieldtrial__to__struct.py |  13 +
 ...-ui_accessibility_platform_ax__platform__node.h |  13 +
 .../patch-ui_app__list_app__list__constants.cc     |  13 +
 .../patch-ui_app__list_app__list__constants.h      |  15 +
 ...tch-ui_app__list_views_app__list__item__view.cc |  13 +
 .../patch-ui_app__list_views_app__list__view.cc    |  22 +
 chromium/patches/patch-ui_aura_BUILD.gn            |  13 +
 chromium/patches/patch-ui_base_BUILD.gn            |  63 +++
 chromium/patches/patch-ui_base_ime_BUILD.gn        |  22 +
 ...h-ui_base_ime_ime__engine__handler__interface.h |  13 +
 .../patch-ui_base_ime_input__method__factory.cc    |  24 +
 ...patch-ui_base_ime_input__method__initializer.cc |  39 ++
 .../patch-ui_base_resource_resource__bundle.cc     |  22 +
 chromium/patches/patch-ui_base_ui__features.gni    |  10 +
 .../patches/patch-ui_base_webui_web__ui__util.cc   |  13 +
 chromium/patches/patch-ui_compositor_BUILD.gn      |  13 +
 .../patches/patch-ui_events_event__switches.cc     |  13 +
 chromium/patches/patch-ui_events_event__switches.h |  13 +
 ...ch-ui_events_keycodes_dom_keycode__converter.cc |  13 +
 chromium/patches/patch-ui_gfx_BUILD.gn             |  22 +
 chromium/patches/patch-ui_gfx_canvas__skia.cc      |  13 +
 .../patches/patch-ui_gfx_font__fallback__linux.cc  |  15 +
 .../patches/patch-ui_gfx_font__render__params.h    |  20 +
 chromium/patches/patch-ui_gfx_render__text.cc      |  48 ++
 chromium/patches/patch-ui_gl_BUILD.gn              |  22 +
 .../patch-ui_gl_sync__control__vsync__provider.cc  |  65 +++
 .../patch-ui_gl_sync__control__vsync__provider.h   |  22 +
 ...tch-ui_message__center_message__center__style.h |  13 +
 ...e__center_views_message__center__button__bar.cc |  49 ++
 ...ge__center_views_message__center__button__bar.h |  13 +
 ...message__center_views_message__view__factory.cc |  13 +
 .../patches/patch-ui_resources_ui__resources.grd   |  13 +
 chromium/patches/patch-ui_views_BUILD.gn           |  22 +
 ...ews_accessibility_native__view__accessibility.h |  13 +
 ...tch-ui_views_bubble_bubble__dialog__delegate.cc |  13 +
 chromium/patches/patch-ui_views_controls_label.cc  |  22 +
 .../patch-ui_views_controls_textfield_textfield.cc |  75 +++
 .../patch-ui_views_controls_webview_BUILD.gn       |  13 +
 .../patches/patch-ui_views_corewm_tooltip__aura.cc |  13 +
 .../patch-ui_views_examples_widget__example.cc     |  13 +
 .../patch-ui_views_selection__controller.cc        |  13 +
 .../patch-ui_views_style_platform__style.cc        |  13 +
 chromium/patches/patch-ui_views_views__delegate.cc |  13 +
 chromium/patches/patch-ui_views_views__delegate.h  |  13 +
 chromium/patches/patch-ui_views_views__switches.cc |  13 +
 .../patch-ui_views_window_custom__frame__view.cc   |  13 +
 .../patch-ui_views_window_dialog__delegate.cc      |  13 +
 chromium/patches/patch-ui_webui_resources_js_cr.js |  16 +
 .../patches/patch-ui_webui_resources_js_icon.js    |  13 +
 chromium/patches/patch-v8_BUILD.gn                 |  41 ++
 .../patch-v8_src_base_platform_platform-netbsd.cc  | 301 ++++++++++++
 .../patch-v8_src_base_platform_platform-posix.cc   |  51 ++
 .../patches/patch-v8_src_base_platform_platform.h  |  12 +
 chromium/patches/patch-v8_src_globals.h            |  16 +
 chromium/patches/patch-v8_tools_run-llprof.sh      |  13 +
 1070 files changed, 15971 insertions(+), 15971 deletions(-)

diffs:
diff --git a/chromium-new/DESCR b/chromium-new/DESCR
deleted file mode 100644
index 2a86084420..0000000000
--- a/chromium-new/DESCR
+++ /dev/null
@@ -1,3 +0,0 @@
-Chromium is an open-source browser project that aims to build a
-safer, faster, and more stable way for all Internet users to
-experience the web.
diff --git a/chromium-new/Makefile b/chromium-new/Makefile
deleted file mode 100644
index 446033fdd7..0000000000
--- a/chromium-new/Makefile
+++ /dev/null
@@ -1,372 +0,0 @@
-# $NetBSD: Makefile,v 1.14 2012/09/24 18:26:53 asau Exp $
-
-DISTNAME=	chromium-56.0.2924.87
-CATEGORIES=	www
-MASTER_SITES=	http://commondatastorage.googleapis.com/chromium-browser-official/
-EXTRACT_SUFX=	.tar.xz
-
-MAINTAINER=	ryoon%NetBSD.org@localhost
-HOMEPAGE=	http://www.chromium.org/Home
-COMMENT=	Chromium web browser
-LICENSE=	modified-bsd AND gnu-lgpl-v3 AND mpl-2.0
-
-USE_TOOLS+=	bash bison flex:pkgsrc gmake pax perl pkg-config
-TOOLS_PLATFORM.flex=   # override the platform definition to use pkgsrc's flex.
-USE_LANGUAGES=	c c++
-
-BUILD_DEPENDS+=	gperf>=3.0.1:../../devel/gperf
-BUILD_DEPENDS+=	yasm-[0-9]*:../../devel/yasm
-BUILD_DEPENDS+=	ninja-build-[0-9]*:../../devel/ninja-build
-BUILD_DEPENDS+=	${PYPKGPREFIX}-html5lib-[0-9]*:../../textproc/py-html5lib
-BUILD_DEPENDS+=	${PYPKGPREFIX}-beautifulsoup4-[0-9]*:../../www/py-beautifulsoup4
-BUILD_DEPENDS+=	${PYPKGPREFIX}-ply-[0-9]*:../../devel/py-ply
-
-DEPENDS+=	xdg-utils-[0-9]*:../../misc/xdg-utils
-
-.include "../../mk/bsd.prefs.mk"
-.include "../../mk/compiler.mk"
-
-#ONLY_FOR_PLATFORM+=	*-*-arm # not tested yet
-ONLY_FOR_PLATFORM+=	*-*-x86_64
-
-# Workaround
-BUILDLINK_TRANSFORM.NetBSD+=	rm:-ldl
-
-REPLACE_BASH=		chrome/tools/build/linux/chrome-wrapper
-SUBST_CLASSES+=		path
-SUBST_STAGE.path=	post-patch
-SUBST_MESSAGE.path=	Fixing pkg path
-SUBST_FILES.path+=	chrome/common/chrome_paths.cc
-SUBST_SED.path+=	-e 's:/usr/local/:${PREFIX}/:'
-
-CFLAGS+=		-fno-stack-protector
-
-.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/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/inspector_protocol \
-		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 \
-		v8/third_party/inspector_protocol \
-		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.
-GN_ARGS+=	proprietary_codecs=true \
-		ffmpeg_branding="Chrome"
-
-GN_ARGS+=	use_gconf=false \
-		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 \
-		is_clang=false \
-		enable_webrtc=false \
-		use_gnome_keyring=true
-GN_ARGS+=	extra_cxxflags="-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
-
-GN_BOOTSTRAP_FLAGS+=	--no-clean --no-rebuild
-
-# API key and OAuth credential for Google.
-# This is pkgsrc use only.
-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
-
-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/remove_bundled_libraries.py \
-		${KEEPLIBS} --do-remove \
-			|| ${FALSE}
-
-	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
-
-# 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:
-	cd ${WRKSRC} && \
-	${SETENV} ${MAKE_ENV} \
-		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
-.for i in ${ICON_SIZES}
-ICONS_DIR${i}+=		share/icons/hicolor/${i}x${i}/apps
-INSTALLATION_DIRS+=	${ICONS_DIR${i}}
-.endfor
-
-CHROMIUM_PROGS+=	chrome
-CHROMIUM_SCRIPTS+=	chrome-wrapper
-
-CHROMIUM_FILES+=	chrome.1
-CHROMIUM_FILES+=	chrome_100_percent.pak
-CHROMIUM_FILES+=	chrome_200_percent.pak
-CHROMIUM_FILES+=	icudtl.dat
-CHROMIUM_FILES+=	keyboard_resources.pak
-CHROMIUM_FILES+=	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
-.for i in ${CHROMIUM_FILES}
-	${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${i} \
-		${DESTDIR}${PREFIX}/${CHROMIUM_DIR}
-.endfor
-	cd ${DESTDIR}${PREFIX}/bin && \
-		${LN} -sf ../${CHROMIUM_DIR}/chrome .
-	${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/chrome.1 \
-		${DESTDIR}/${PREFIX}/${PKGMANDIR}/man1
-.for i in ${ICON_SIZES}
-	${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${i}.png \
-		${DESTDIR}${PREFIX}/${ICONS_DIR${i}}/chrome.png
-.endfor
-.for i in locales resources
-	cd ${WRKSRC}/out/${BUILDTYPE} && \
-		${FIND} ${i} -type f -print | \
-		pax -rw -pmp ${DESTDIR}${PREFIX}/${CHROMIUM_DIR}
-.endfor
-
-.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
-.include "../../audio/speech-dispatcher/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"
-.include "../../x11/libdrm/buildlink3.mk"
-.include "../../textproc/expat/buildlink3.mk"
-.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 "../../graphics/libexif/buildlink3.mk"
-.include "../../fonts/fontconfig/buildlink3.mk"
-.include "../../security/libgcrypt/buildlink3.mk"
-.include "../../textproc/jsoncpp/buildlink3.mk"
-.include "../../devel/nspr/buildlink3.mk"
-.include "../../devel/nss/buildlink3.mk"
-.include "../../sysutils/pciutils/buildlink3.mk"
-# Use -lpciutils instead of -lpci under NetBSD.
-BUILDLINK_TRANSFORM.NetBSD+=	opt:-lpci:-lpciutils
-.include "../../graphics/png/buildlink3.mk"
-.include "../../devel/re2/buildlink3.mk"
-.include "../../devel/snappy/buildlink3.mk"
-.include "../../audio/speex/buildlink3.mk"
-.include "../../graphics/libwebp/buildlink3.mk"
-.include "../../textproc/libxml2/buildlink3.mk"
-.include "../../textproc/libxslt/buildlink3.mk"
-.include "../../devel/dconf/buildlink3.mk"
-.include "../../x11/gtk2/buildlink3.mk"
-.include "../../x11/gtk3/buildlink3.mk"
-.include "../../x11/scrnsaverproto/buildlink3.mk"
-.include "../../x11/libX11/buildlink3.mk"
-.include "../../x11/libXcomposite/buildlink3.mk"
-.include "../../x11/xcursor/buildlink3.mk"
-.include "../../x11/libXext/buildlink3.mk"
-.include "../../x11/libXdamage/buildlink3.mk"
-.include "../../x11/libXfixes/buildlink3.mk"
-.include "../../x11/libXi/buildlink3.mk"
-.include "../../x11/xproto/buildlink3.mk"
-.include "../../x11/libXrandr/buildlink3.mk"
-.include "../../x11/libXrender/buildlink3.mk"
-.include "../../x11/libXScrnSaver/buildlink3.mk"
-.include "../../x11/libXtst/buildlink3.mk"
-.include "../../archivers/bzip2/buildlink3.mk"
-.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
deleted file mode 100644
index 3c89ac297c..0000000000
--- a/chromium-new/PLIST
+++ /dev/null
@@ -1,216 +0,0 @@
-@comment $NetBSD$
-bin/chrome
-chrome/chrome
-chrome/chrome-wrapper
-chrome/chrome.1
-chrome/chrome_100_percent.pak
-chrome/chrome_200_percent.pak
-chrome/icudtl.dat
-chrome/keyboard_resources.pak
-chrome/locales/am.pak
-chrome/locales/ar.pak
-chrome/locales/bg.pak
-chrome/locales/bn.pak
-chrome/locales/ca.pak
-chrome/locales/cs.pak
-chrome/locales/da.pak
-chrome/locales/de.pak
-chrome/locales/el.pak
-chrome/locales/en-GB.pak
-chrome/locales/en-US.pak
-chrome/locales/es-419.pak
-chrome/locales/es.pak
-chrome/locales/et.pak
-chrome/locales/fa.pak
-chrome/locales/fi.pak
-chrome/locales/fil.pak
-chrome/locales/fr.pak
-chrome/locales/gu.pak
-chrome/locales/he.pak
-chrome/locales/hi.pak
-chrome/locales/hr.pak
-chrome/locales/hu.pak
-chrome/locales/id.pak
-chrome/locales/it.pak
-chrome/locales/ja.pak
-chrome/locales/kn.pak
-chrome/locales/ko.pak
-chrome/locales/lt.pak
-chrome/locales/lv.pak
-chrome/locales/ml.pak
-chrome/locales/mr.pak
-chrome/locales/ms.pak
-chrome/locales/nb.pak
-chrome/locales/nl.pak
-chrome/locales/pl.pak
-chrome/locales/pt-BR.pak
-chrome/locales/pt-PT.pak
-chrome/locales/ro.pak
-chrome/locales/ru.pak
-chrome/locales/sk.pak
-chrome/locales/sl.pak
-chrome/locales/sr.pak
-chrome/locales/sv.pak
-chrome/locales/sw.pak
-chrome/locales/ta.pak
-chrome/locales/te.pak
-chrome/locales/th.pak
-chrome/locales/tr.pak
-chrome/locales/uk.pak
-chrome/locales/vi.pak
-chrome/locales/zh-CN.pak
-chrome/locales/zh-TW.pak
-chrome/resources.pak
-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
-chrome/resources/inspector/Images/breakpointConditional_2x.png
-chrome/resources/inspector/Images/breakpoint_2x.png
-chrome/resources/inspector/Images/checker.png
-chrome/resources/inspector/Images/chromeDisabledSelect.png
-chrome/resources/inspector/Images/chromeDisabledSelect_2x.png
-chrome/resources/inspector/Images/chromeLeft.png
-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/deleteIcon.png
-chrome/resources/inspector/Images/domain.png
-chrome/resources/inspector/Images/errorWave.png
-chrome/resources/inspector/Images/errorWave_2x.png
-chrome/resources/inspector/Images/fileSystem.png
-chrome/resources/inspector/Images/forward.png
-chrome/resources/inspector/Images/frame.png
-chrome/resources/inspector/Images/ic_info_black_18dp.svg
-chrome/resources/inspector/Images/ic_warning_black_18dp.svg
-chrome/resources/inspector/Images/navigationControls.png
-chrome/resources/inspector/Images/navigationControls_2x.png
-chrome/resources/inspector/Images/paneAddButtons.png
-chrome/resources/inspector/Images/paneFilterButtons.png
-chrome/resources/inspector/Images/paneRefreshButtons.png
-chrome/resources/inspector/Images/popoverArrows.png
-chrome/resources/inspector/Images/profileGroupIcon.png
-chrome/resources/inspector/Images/profileIcon.png
-chrome/resources/inspector/Images/profileSmallIcon.png
-chrome/resources/inspector/Images/radioDot.png
-chrome/resources/inspector/Images/resizeDiagonal.png
-chrome/resources/inspector/Images/resizeDiagonal_2x.png
-chrome/resources/inspector/Images/resizeHorizontal.png
-chrome/resources/inspector/Images/resizeHorizontal_2x.png
-chrome/resources/inspector/Images/resizeVertical.png
-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/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
-chrome/resources/inspector/Images/toolbarItemSelected.png
-chrome/resources/inspector/Images/toolbarResizerHorizontal.png
-chrome/resources/inspector/Images/toolbarResizerVertical.png
-chrome/resources/inspector/Images/touchCursor.png
-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/accessibility_module.js
-chrome/resources/inspector/animation/animation_module.js
-chrome/resources/inspector/audits/audits_module.js
-chrome/resources/inspector/audits2/audits2_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_compatibility.js
-chrome/resources/inspector/devtools_extension_api.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
-chrome/resources/inspector/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5-horizontal-navigation-1x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5-horizontal-navigation-2x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-default-1x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-default-2x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-keyboard-1x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-keyboard-2x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-navigation-1x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-navigation-2x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-default-1x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-default-2x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-default-1x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-default-2x.png
-chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png
-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/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/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/layer_viewer/layer_viewer_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/terminal/terminal_module.js
-chrome/resources/inspector/text_editor/text_editor_module.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/ui_lazy_module.js
-chrome/resources/inspector/utility_shared_worker.js
-man/man1/chrome.1
-share/icons/hicolor/128x128/apps/chrome.png
-share/icons/hicolor/22x22/apps/chrome.png
-share/icons/hicolor/24x24/apps/chrome.png
-share/icons/hicolor/256x256/apps/chrome.png
-share/icons/hicolor/48x48/apps/chrome.png
-share/icons/hicolor/64x64/apps/chrome.png
diff --git a/chromium-new/TODO b/chromium-new/TODO
deleted file mode 100644
index a9e2ec6b03..0000000000
--- a/chromium-new/TODO
+++ /dev/null
@@ -1,5 +0,0 @@
-To Do:
-
-* No html5 audio (video has no problem)
-* 'Passwords cryptographer error was encountered:' and
-  'Failed to receive encryption key from server.' errors
diff --git a/chromium-new/distinfo b/chromium-new/distinfo
deleted file mode 100644
index 2e6af83759..0000000000
--- a/chromium-new/distinfo
+++ /dev/null
@@ -1,535 +0,0 @@
-$NetBSD$
-
-SHA1 (chromium-56.0.2924.87.tar.xz) = e61013b257e0818be5d347cbb94070ddfb25cbe9
-RMD160 (chromium-56.0.2924.87.tar.xz) = 87ba33280652e0fa165d4ffb63c430e2a0f87bfc
-SHA512 (chromium-56.0.2924.87.tar.xz) = 1c154004a9bca73e2491c73520a5f7d5c50c5b9d66e8e2660bf46585dd9b6ad3db706a9d824356f319794fa790bc3918ae6199843bcba717b9e74efbf26882c9
-Size (chromium-56.0.2924.87.tar.xz) = 514429808 bytes
-SHA1 (patch-BUILD.gn) = 6048c60cbea6db3da66111983b287aa13c13b864
-SHA1 (patch-apps_ui_views_app__window__frame__view.cc) = 76d3579b2f0724da307e72abd745d0a2d06a1b2a
-SHA1 (patch-ash_display_mirror__window__controller.cc) = 7141713c7cd313283e93b1fcd2914d15053016d2
-SHA1 (patch-ash_shell.cc) = 815ff1639fc925cb18df91e15f17f3ea94295b72
-SHA1 (patch-base_BUILD.gn) = c0ae3f59abff661fea1720b1aa1c634eb863f72b
-SHA1 (patch-base_allocator_BUILD.gn) = 0f4e5fec23135798fd64cadd208958e9c2eb104a
-SHA1 (patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc) = 9c1fbbbd31d6ce2e2de3f1d242c2a0381182665c
-SHA1 (patch-base_allocator_allocator__shim__override__libc__symbols.h) = 36ae829fc99c7b21a52ef2f6fe6ac4f99c033caa
-SHA1 (patch-base_allocator_allocator__shim__unittest.cc) = 53c3dfd0a383f1e87e0595975ca48d4c784eb08b
-SHA1 (patch-base_base__paths__posix.cc) = e8fd62904c1d335829d24b6b7af6452111ed3e1e
-SHA1 (patch-base_debug_debugger__posix.cc) = 30f2f2f1050a43242b51003c02a9501faaa5de4f
-SHA1 (patch-base_debug_proc__maps__linux.cc) = 4802235584a8c50cd8fa8d3286c15dafd5921857
-SHA1 (patch-base_debug_stack__trace__posix.cc) = d0be4c5de5acec8a7f3bbc47f269001b839bb490
-SHA1 (patch-base_debug_thread__heap__usage__tracker.cc) = c0257b07c6b48bb8f81337a6331c171f5c446b16
-SHA1 (patch-base_files_file__path__unittest.cc) = 32d3ae1807ce7e6c7149db00206f3f7990792e23
-SHA1 (patch-base_files_file__path__watcher__kqueue.h) = d42bdcc35a81c0efc96960bb4876a4e463234a21
-SHA1 (patch-base_files_file__util.h) = 98b14b7428de66649a49009663a3088342ad8b62
-SHA1 (patch-base_linux__util.cc) = 55a969aaf3805f645bc9bf84ae7e338e51f69b8f
-SHA1 (patch-base_native__library__posix.cc) = dffa3c8e8350da3d27d59c403668b684d8bb09d5
-SHA1 (patch-base_posix_unix__domain__socket__linux.cc) = 664400c5d4dfb9c4508ea0c5d066daa38fca89cc
-SHA1 (patch-base_posix_unix__domain__socket__linux__unittest.cc) = 8ca74cf09df07f9d9181aa2d62b63f2f1c59cdce
-SHA1 (patch-base_process_internal__linux.h) = c2162d1c8b674a1f31e3c82466cde5a13fded50c
-SHA1 (patch-base_process_launch.cc) = 455fbcedb84e60beb40172a7f075b88e28791d9f
-SHA1 (patch-base_process_launch.h) = 3906250654b2a869ef13a5ff9f89ea9a78b6051f
-SHA1 (patch-base_process_launch__posix.cc) = 2827562545db2b3b7a41915756f95eff8b6c66c9
-SHA1 (patch-base_process_memory.h) = ba6ba94147feb6b831515b0a6d60d780db4d1880
-SHA1 (patch-base_process_memory__stubs.cc) = 9074b49015593afbb454730a76074aabd7a6b4cf
-SHA1 (patch-base_process_memory__unittest.cc) = ea90b76941baf283be5ecaac15e3de193e2504f6
-SHA1 (patch-base_process_process__handle__freebsd.cc) = 99ea09ebc94e273854a054c56d602b15a50a7fd2
-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) = bb5ef10a2e23ab1939e34ff71722036afa9efd38
-SHA1 (patch-base_process_process__iterator__netbsd.cc) = 54f8209180488a726127d75587295d6372fdf608
-SHA1 (patch-base_process_process__metrics.h) = ff68258a6b6811b63765c3ae955b8080420abb9a
-SHA1 (patch-base_process_process__metrics__freebsd.cc) = 3ae26aa1ba2f109f272d3fbeeb58609ccbace48e
-SHA1 (patch-base_process_process__metrics__netbsd.cc) = 488acce8faaf88f2295b57999f8ce5d106c65213
-SHA1 (patch-base_process_process__posix.cc) = adba10a7257113840403d9c672d5d849f483288d
-SHA1 (patch-base_profiler_stack__sampling__profiler__unittest.cc) = 3817093473a23924c01b3d2b38c809ae83d14df2
-SHA1 (patch-base_security__unittest.cc) = a698ce71858c0937598e73e3ced3ddc51aab465f
-SHA1 (patch-base_sys__info__freebsd.cc) = 51061da3c7f2d5f3e92e5f9d3b2a129a8a1d3335
-SHA1 (patch-base_sys__info__netbsd.cc) = 448098a286bf4c20402af9740b457e405dd351f3
-SHA1 (patch-base_sys__info__posix.cc) = d4eed955f2d6cf18fb9d40e28493d4507b8e91a2
-SHA1 (patch-base_test_BUILD.gn) = 12c2c621632c4d86d8a90d67e891a05f25116e94
-SHA1 (patch-base_test_launcher_test__launcher.cc) = 631d1d63d4ecf6e0c7af9369ce7471760819b13c
-SHA1 (patch-base_test_test__file__util__posix.cc) = 737464deacae03303871c09d3925c2ffd4f4ff37
-SHA1 (patch-base_third__party_libevent_BUILD.gn) = 111e8801e7045554f05484414e0a0a5c6c528972
-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.h) = 92c741da852ef6829aff32ba9d85771d70b7a13c
-SHA1 (patch-base_threading_platform__thread__linux.cc) = 9a352369d04ca37eb49fa483c4a2401649371b87
-SHA1 (patch-base_threading_platform__thread__netbsd.cc) = f6c99ab4d517bf45a56f71b7e03b64f4c2a7b91b
-SHA1 (patch-base_threading_platform__thread__posix.cc) = 36243fea738ee1754002fda9de3c1ee26298a36d
-SHA1 (patch-base_trace__event_malloc__dump__provider.cc) = b048f40e508b905e4356c990f405d3eeb7dd23f8
-SHA1 (patch-base_trace__event_process__memory__dump.cc) = 209b645e6523d9589bc843e660ee583937e31cb9
-SHA1 (patch-base_trace__event_process__memory__dump.h) = b60638b9cc5148b22c99e2e7c32711b8a6d93cbe
-SHA1 (patch-breakpad_BUILD.gn) = 64c1f4aa0e32381125e3c91794417c70f0ef522c
-SHA1 (patch-build_config_BUILD.gn) = 7daeac790c6fb9236e7a33106100154bef9c1d32
-SHA1 (patch-build_config_BUILDCONFIG.gn) = 87b601fb278e7fdd8bb3e31a7f587bc5148f305b
-SHA1 (patch-build_config_allocator.gni) = 283f97567088a3ee4157d71df4742e73826523d1
-SHA1 (patch-build_config_clang_BUILD.gn) = d07f0efc3be516fe30d6bb42862be8f47c6b7517
-SHA1 (patch-build_config_compiler_BUILD.gn) = e671a2b0015d1abfe619643e12ffcf2e5c0278c2
-SHA1 (patch-build_config_crypto.gni) = a59011431c313ee572496eb385de50cadfebf729
-SHA1 (patch-build_config_features.gni) = 46c95ef1ccb7b347df04b90d7e9037cfba77b4b4
-SHA1 (patch-build_config_linux_gtk2_BUILD.gn) = a3c70c55d87dd240238fe193e7c336684bb71dea
-SHA1 (patch-build_config_linux_gtk3_BUILD.gn) = f2203c0b39c528e2a08beb9efc5d74ee11e06be2
-SHA1 (patch-build_config_linux_pkg-config.py) = 3856027edc929121a0acc21fd7cfe1c8ba431a70
-SHA1 (patch-build_config_sanitizers_BUILD.gn) = 2b8baf65102d78505c033ae9f38a151ed37695a7
-SHA1 (patch-build_config_sanitizers_sanitizers.gni) = 7d9cff7979c927eb6149b93871b8e18a42805bea
-SHA1 (patch-build_config_ui.gni) = 144b705d185e77b975681fb5b78be429ab2d75be
-SHA1 (patch-build_linux_libpci_BUILD.gn) = 37d53722dd1fdd8e2a51848197c91fa7d6676315
-SHA1 (patch-build_secondary_third__party_nss_BUILD.gn) = 826532cdd5c045b8d19f733db156fe4649997b39
-SHA1 (patch-build_toolchain_gcc__toolchain.gni) = 01d1054a64792ed1a98394d695d614f84f523be2
-SHA1 (patch-build_toolchain_get__concurrent__links.py) = 86e1889df43be2722b60d1b26783db7248890964
-SHA1 (patch-cc_layers_scrollbar__layer__impl__base.cc) = 49edea56caa1d4c78cc0edd274ea0e8ac4b2e54a
-SHA1 (patch-cc_trees_property__tree.cc) = 9393e1f8027990957b6757776f793cc3509bb6fa
-SHA1 (patch-chrome_BUILD.gn) = 02f9dc0c174a739e7c1281e3c361aa7afacd51db
-SHA1 (patch-chrome_app_chrome__command__ids.h) = 7b2ed24ca1577423ba82eaff8213967520322ae4
-SHA1 (patch-chrome_app_chrome__main__delegate.cc) = 6142c823e9ee7e850e717ddd15de233f4f69217c
-SHA1 (patch-chrome_app_chrome__main__delegate.h) = a4649ca8fe030669dc2605d352e4ab5ff8297bbd
-SHA1 (patch-chrome_app_chromium__strings.grd) = f650e2dafad1a1266fc9cfacaf09c8ae7ea19e2d
-SHA1 (patch-chrome_app_generated__resources.grd) = 7d670ee5479b1f51225aca15de11f90f57ccdc43
-SHA1 (patch-chrome_app_resources_locale__settings.grd) = 7e7fc563a6c0d6a722e480afcc1654f5c893ffe3
-SHA1 (patch-chrome_browser_BUILD.gn) = ab9e6a27cd9b980591facc3f09406ab7d23c2964
-SHA1 (patch-chrome_browser_about__flags.cc) = 81bd82c14804ff4a5591b8298b6e56ef383a765d
-SHA1 (patch-chrome_browser_browser__process__impl.cc) = 0185bbc785142d5979e056c0b38320d4fc22c27f
-SHA1 (patch-chrome_browser_browser__process__impl.h) = ddb9153d789977daa8ab41e3e40b8dfc3d821b4d
-SHA1 (patch-chrome_browser_browser__resources.grd) = b8daeccd22c9ca276ee63284225433e24dd57ee6
-SHA1 (patch-chrome_browser_chrome__browser__main.cc) = 8339e9a23fc5ad838a1026e2b7782ed3a4c38cd0
-SHA1 (patch-chrome_browser_chrome__browser__main__linux.cc) = 5d5c6e0ff8c085a0f104b54950db6e305c3daae5
-SHA1 (patch-chrome_browser_chrome__browser__main__posix.cc) = 34d77c519c75ca27ae54a346a4d5ccbc251f320e
-SHA1 (patch-chrome_browser_chrome__content__browser__client.cc) = 050aac3666c7893ba3c0fe635793caea4563145d
-SHA1 (patch-chrome_browser_chrome__content__browser__client.h) = 79e8340b8001e8d0377fa9657582ab8e4abf144e
-SHA1 (patch-chrome_browser_defaults.cc) = 2e72fa88deac85509144dd1e7f071eb07d5c46ee
-SHA1 (patch-chrome_browser_diagnostics_diagnostics__writer.cc) = 98af97d2c9c3dfd1dc042175e83159d8ad075550
-SHA1 (patch-chrome_browser_diagnostics_diagnostics__writer.h) = 8015a6b250fb754d1c2b77c7c769d31e773bf499
-SHA1 (patch-chrome_browser_download_chrome__download__manager__delegate.cc) = b7caae84f3c31e16c7ee87cad668bf50c828962d
-SHA1 (patch-chrome_browser_download_download__commands.cc) = a6090d16a689e71f7052fbcfe3acd5c94a8ce8fc
-SHA1 (patch-chrome_browser_download_download__commands.h) = 3d9c10c5918207500b650bf9496a548eadcec175
-SHA1 (patch-chrome_browser_download_download__prefs.cc) = 0038d04198dc493f165756d981e55dd07299949a
-SHA1 (patch-chrome_browser_download_download__prefs.h) = 157dd4d34dbcabb62c46a4a5488dc8545f901680
-SHA1 (patch-chrome_browser_download_download__query.cc) = 95b6f39cd5e157c00bb1e1991cbd885f9cbe8cb3
-SHA1 (patch-chrome_browser_download_download__shelf__context__menu.cc) = efe1dbde0e4a4371e920c3a5f8f7825ac94804cf
-SHA1 (patch-chrome_browser_extensions_BUILD.gn) = 8dd2413364b90dce048de381ad5f5160b42a6cb9
-SHA1 (patch-chrome_browser_extensions_activity__log_activity__log.cc) = ef50853e6823a10f6fa5789d42d00dddda7fe16f
-SHA1 (patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc) = 4f3e04b4c407a8af8ed136507384100b3acd2da6
-SHA1 (patch-chrome_browser_extensions_api_input__ime_input__ime__api.h) = 114d2c6b9a6285ea8993d7ee65160fc3b65e8bdd
-SHA1 (patch-chrome_browser_extensions_api_messaging_message__service.cc) = 3d7c829d9c53e3ff50ea5a43962c5bc0b139ef75
-SHA1 (patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc) = 3c4f3bf57adb21a6c49a94e8a464fd0168fbf6ab
-SHA1 (patch-chrome_browser_extensions_api_omnibox_omnibox__api.cc) = 038e251f01e1f1fc0ed51b4ba8048922388f6c33
-SHA1 (patch-chrome_browser_extensions_bookmark__app__helper.cc) = b181086905a69b7fbde4e3d1d81ec894c737030c
-SHA1 (patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc) = 2a7f0f4e7b3bd6e26f0997d0d0f8a47a8066c80b
-SHA1 (patch-chrome_browser_extensions_external__provider__impl.cc) = f9821c7000bd24eb68bc13693c2313fa6fd08e03
-SHA1 (patch-chrome_browser_gpu_gl__string__manager.cc) = 7c103a3228cb7592af6c0cd2d5a5deaf31497c4b
-SHA1 (patch-chrome_browser_gpu_gpu__feature__checker.cc) = 065079005d4385525ece3059750d52d62f72fe74
-SHA1 (patch-chrome_browser_interstitials_chrome__controller__client.cc) = e035e6cce4b858f0389a52857905e3fa93ca4dd9
-SHA1 (patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc) = 8af06656ac60a4e7276aa003ae34c599a06b2559
-SHA1 (patch-chrome_browser_media__galleries_media__file__system__registry.cc) = 73a8a83f0606ce8d72e5d5257e632e22f7e5b0bc
-SHA1 (patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc) = cf5abc7ab023af031e4907a988b60d3599cd57c7
-SHA1 (patch-chrome_browser_memory__details.cc) = 53c7aaf8f168fdaca7809c5a2dabdf8429c80538
-SHA1 (patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc) = 1958dbf3e6a86446634a28c64fb3050c299e3c09
-SHA1 (patch-chrome_browser_net_async__dns__field__trial.cc) = 76d325d9e7dc62915b9b0163cf569840f44a2291
-SHA1 (patch-chrome_browser_notifications_message__center__notification__manager.cc) = ef2bd49bc9a369ea7656301bdc0e25b0de5b8b4a
-SHA1 (patch-chrome_browser_password__manager_chrome__password__manager__client.cc) = dc1e714c8c7d84c6e7943b032987815d8ac0c57f
-SHA1 (patch-chrome_browser_platform__util.h) = 02961d907d6dc9ff2b7de32ecf4a816d30306acd
-SHA1 (patch-chrome_browser_plugins_plugins__resource__service.cc) = a598526f4f3409cddf25b70c92d580b6690f07e7
-SHA1 (patch-chrome_browser_policy_policy__prefs__browsertest.cc) = 0f8e7eb949a841a5c0351a3d11531e0c47b3082e
-SHA1 (patch-chrome_browser_process__singleton__posix.cc) = 44a6848e9ac1a8fbafcbe781ad5dc382933fd37d
-SHA1 (patch-chrome_browser_profiles_profile__impl__io__data.cc) = 543fda0451574ebec094a52bb9d0c7511be71f78
-SHA1 (patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc) = e44138efd5ca8226bcdcc9948dfc430a0b7b133d
-SHA1 (patch-chrome_browser_renderer__preferences__util.cc) = cdc68c0bc56e8a3ec233beda627db8cb610193eb
-SHA1 (patch-chrome_browser_resources_safe__browsing_BUILD.gn) = 021d7277b75289c10e21d9c38b7889cfbd92fcde
-SHA1 (patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py) = 3cbc7d3fd66beb36a8cd15c3aaa5ef1df8b38cae
-SHA1 (patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc) = 56e41a0159bef13be9b8419b21a49013d3ef10a0
-SHA1 (patch-chrome_browser_safe__browsing_permission__reporter.cc) = f2ea8baba1f9cbb83e36aad209c03fb3fa10f0dc
-SHA1 (patch-chrome_browser_search_local__files__ntp__source.cc) = a04837a51941731d1967c318b2c05cfa24b83ff5
-SHA1 (patch-chrome_browser_speech_tts__controller__impl.cc) = 3a55fc9ca8d5da84894543477bf7a3fa456b33c5
-SHA1 (patch-chrome_browser_sync_chrome__sync__client.cc) = 5b8798b3179d20b9f5e2029d34356ca8d9418d52
-SHA1 (patch-chrome_browser_tracing_crash__service__uploader.cc) = 45ba210a84e11435d6fa31911dffa878093c5791
-SHA1 (patch-chrome_browser_ui_BUILD.gn) = c2dbe5d13ea4623941516e8d4a3e4403e5935e5f
-SHA1 (patch-chrome_browser_ui_browser__command__controller.cc) = d7d14479ce929c87f07679984457ef65c7226abc
-SHA1 (patch-chrome_browser_ui_browser__view__prefs.cc) = f618b9e9693f8430bebd64f5052dbc04893ddbe2
-SHA1 (patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc) = d01c2578f5411d1b418749af64e830d375396de0
-SHA1 (patch-chrome_browser_ui_input__method_input__method__engine__base.cc) = ac8af05e91fd4b33a674919256c702762c370d89
-SHA1 (patch-chrome_browser_ui_libgtkui_BUILD.gn) = eedad9ee346ea44c753d0206dc6587765b200c34
-SHA1 (patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc) = a8707e2d092c935789247560d0cf16c2aa6c9f73
-SHA1 (patch-chrome_browser_ui_startup_bad__flags__prompt.cc) = f9770251e55413dda294a664609f8e186b774a86
-SHA1 (patch-chrome_browser_ui_startup_startup__browser__creator.cc) = 965cdbb563e64fee00085a6aa98fa20f602bd3a0
-SHA1 (patch-chrome_browser_ui_toolbar_app__menu__model.cc) = 48a8ee0711c57816e21ab113b1c11e32611ae322
-SHA1 (patch-chrome_browser_ui_views_accelerator__table.cc) = 819da9d3708d047f3e513201e3346bfd565f085c
-SHA1 (patch-chrome_browser_ui_views_app__list_linux_app__list__linux.cc) = 7859cf07fc98d53d5b0142e5c6e8ef53bf53f7d2
-SHA1 (patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc) = c6c07d270e74c1a6d414957cace59ec3f9ab4dba
-SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate.cc) = fef0851b52dbea59e40a61376d6e87c71128c1e7
-SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate.h) = d7310defa00496896aa955f39e913af2f28232af
-SHA1 (patch-chrome_browser_ui_views_first__run__dialog.cc) = 78a209320e84fa425599d17379eea14f87c3cb40
-SHA1 (patch-chrome_browser_ui_views_frame_browser__frame.cc) = e5fea87674a86f2b1796dec132f441b844677e96
-SHA1 (patch-chrome_browser_ui_views_frame_browser__view.cc) = 4a4fc1d6f17038a47301fe4c35bd9b60d149807c
-SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc) = 6f489c9c61b7a30b4fde02d507becf0e08a43c53
-SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc) = 589b83adde98f7cffe95d6e95ead97bf95a07e26
-SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc) = 62b38d89d596792e6ff421ec380c2b3d0215be89
-SHA1 (patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc) = 442b0ee850ac14c63ccad7295401fc7805934c3b
-SHA1 (patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc) = c8600c8db1aec759d65fc9a461c54ef5e7c72f46
-SHA1 (patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc) = e3555377623180fe8df59e1689f97fdce952edd1
-SHA1 (patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc) = 4a79877c4be2aebe2e07943f45b844b786fef7a8
-SHA1 (patch-chrome_browser_ui_views_tabs_tab__strip.cc) = e2ea9c649d517cbc2888f17f790093ffede41ea6
-SHA1 (patch-chrome_browser_ui_webui_about__ui.cc) = ce1a516bc0b6881145e6498e44559cc4ee29bdb0
-SHA1 (patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc) = e8bc888b2eadc969275ec9ff6ecac2480140346a
-SHA1 (patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc) = 8143a8a455277f057062a14541c0fc308ba3a35d
-SHA1 (patch-chrome_browser_ui_webui_options_browser__options__handler.cc) = c5764424d21a3022f33c1a3e87de8a86fbb3f67e
-SHA1 (patch-chrome_browser_ui_webui_options_browser__options__handler.h) = 62ffd0d9310a086d2c6db116e0055662c73068e0
-SHA1 (patch-chrome_browser_web__applications_web__app.cc) = c2a5af55ff27df7ba5d701d16c4bb8b94320b23e
-SHA1 (patch-chrome_browser_web__applications_web__app.h) = d362a9860a4f590139c95ed18beca53209b309dc
-SHA1 (patch-chrome_common_BUILD.gn) = 6d49f47c8220bc2d1ec8b4c1b4713579bfcf8dc2
-SHA1 (patch-chrome_common_chrome__paths.cc) = 24b9d60d7c9d74f0ffbbf632b7e29214a02c7e87
-SHA1 (patch-chrome_common_chrome__paths.h) = 313aecbf902f290511d8b4b5cd60e6131d60ddbf
-SHA1 (patch-chrome_common_chrome__paths__internal.h) = c594933e121aef567704ff8b320e74d5607180cb
-SHA1 (patch-chrome_common_chrome__switches.cc) = 7db509b709f09a297f6ae38102b2be92aa8136e8
-SHA1 (patch-chrome_common_chrome__switches.h) = 4571795580c3f5b728e507ba438d11b3ac76cab7
-SHA1 (patch-chrome_common_extensions_chrome__extensions__client.cc) = f83638a591859ab3553d03056ae55c684205c13f
-SHA1 (patch-chrome_common_extensions_command.cc) = b3e885e06a733c5a6b983725bde9ad6a5b10034c
-SHA1 (patch-chrome_common_features.gni) = a9129b9da584eef5212dde89ba3e5ad5b1cc5883
-SHA1 (patch-chrome_common_pref__names.cc) = 67ca61bc30e064beaaf529143e1956d2862afbae
-SHA1 (patch-chrome_common_pref__names.h) = 7efbd95d4d27a3deaca66118d22265a50d83f064
-SHA1 (patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc) = 2dd7048006e7b92a3ff5ef90e0bdfe6ebec712e5
-SHA1 (patch-chrome_renderer_pepper_pepper__flash__font__file__host.h) = 02485704079526c439c6b50b49cbeec5ff9d8934
-SHA1 (patch-chrome_test_BUILD.gn) = d418acd6a1148942f8dff3b819fb1d93d7a31026
-SHA1 (patch-chrome_test_base_in__process__browser__test.cc) = 19e68dbb99cdcc97d7cc1008cb7b7ed6644a3b77
-SHA1 (patch-chrome_test_base_testing__browser__process.h) = 298b75baaea7b62a41e6df1ef59beda2e1c07afa
-SHA1 (patch-chrome_test_chromedriver_chrome_chrome__finder.cc) = 172d429f3f7f1cd3235849ada09cd96241914769
-SHA1 (patch-chromecast_BUILD.gn) = 79d9f7fdc95095f5dc8ed374bb81f9003094ff84
-SHA1 (patch-chromecast_browser_BUILD.gn) = d97d74bf663c154bc0627017922f5958d2579b71
-SHA1 (patch-chromecast_browser_metrics_BUILD.gn) = 2c85d6da0dccc443f46a4adb7af6101029aa5fc1
-SHA1 (patch-chromecast_crash_BUILD.gn) = 7a0cd494b0fb342734454bccf322bc808eddeae5
-SHA1 (patch-components_BUILD.gn) = 00a0c4a5b98dc071f82724955c553b4266859f83
-SHA1 (patch-components_autofill_content_renderer_password__form__conversion__utils.cc) = 70b5313c7b25ec8462b207c1ada10d92f0fa535e
-SHA1 (patch-components_content__settings_core_browser_website__settings__registry.cc) = dec58b392c59da35f5331f3f54f942d388670154
-SHA1 (patch-components_content__settings_core_browser_website__settings__registry.h) = fab24d4f0f6cf957dc08fc4e48af2071188d6082
-SHA1 (patch-components_cookie__config_cookie__store__util.cc) = d73103abf8961044fedbe9bb5112f284653e9242
-SHA1 (patch-components_crash_content_app_BUILD.gn) = d8a45e9fe48f59e495751094ed58a5999a12ca8a
-SHA1 (patch-components_crash_content_browser_BUILD.gn) = ef7fd3ac6e2a84f46af8b254a107c68145513e4a
-SHA1 (patch-components_drive_drive__api__util.cc) = 230f11239d7bcb97b5611471928048f5aca24779
-SHA1 (patch-components_feedback_anonymizer__tool.cc) = 6250a9a5ecbec5b2605aa17544d8188f075b1013
-SHA1 (patch-components_flags__ui_flags__state.cc) = b44a39227aed271e30818cf18c011ed1d70b3ecf
-SHA1 (patch-components_gcm__driver_gcm__client.h) = 139bc9ff8098f0300aa979924dfc2c14c72aa6d3
-SHA1 (patch-components_gcm__driver_gcm__client__impl.cc) = 82462f82152e5f9f336046e0e1a3e5f79573827b
-SHA1 (patch-components_json__schema_json__schema__validator.cc) = 7a4841ec66ce0f418898bbc93862ddeedc3bda5b
-SHA1 (patch-components_keyed__service_core_dependency__graph__unittest.cc) = 6d470f79f381f91eedc96fe2863d89d9043620df
-SHA1 (patch-components_metrics_BUILD.gn) = 07e315597bab3823d479d066801fd0a4d6b2efe1
-SHA1 (patch-components_metrics_drive__metrics__provider__linux.cc) = cb3159f933daeebca8e44f950c2bdf02bd2bd6c2
-SHA1 (patch-components_metrics_system__memory__stats__recorder__linux.cc) = 57c6fb34359ffd26290fc2ed617504f175336654
-SHA1 (patch-components_neterror_resources_neterror.js) = 0bdd9d42e0d8c39db8be1189f81576e841018bd8
-SHA1 (patch-components_os__crypt_os__crypt.h) = 869ab4055b52e4368325de11ba68415f1e6d8a66
-SHA1 (patch-components_password__manager_core_browser_import_csv__reader.cc) = 24a50fe54bd53ad92e67f25bda1ead0f5accfc08
-SHA1 (patch-components_plugins_renderer_BUILD.gn) = 336c33401570155cdb81c5f2a5beb2974540d1ad
-SHA1 (patch-components_plugins_renderer_plugin__placeholder.cc) = f238b6fe143364e005883655d107ede068c61737
-SHA1 (patch-components_policy_BUILD.gn) = 2cb937986acc3556611a72e0216828e93d871694
-SHA1 (patch-components_policy_core_common_schema.cc) = 48392fb5005843a23353d178769372031faa8655
-SHA1 (patch-components_policy_resources_policy__templates.json) = 422c5d2fafddf21bde7e1f8d7e2768d3753dc775
-SHA1 (patch-components_policy_tools_generate__policy__source.py) = 37f6235ed99ae1ee87b7874773e4b575ed09bd7b
-SHA1 (patch-components_storage__monitor_BUILD.gn) = cbd07b6cb950b5af8eb0e3ddf6ea2ee9b39342a5
-SHA1 (patch-components_storage__monitor_storage__monitor.cc) = b7261eb26826a96fcd025894eb3d81259ebb32fb
-SHA1 (patch-components_storage__monitor_storage__monitor__freebsd.cc) = deeab8c51dc1bd368187ff6e4f9f6460aecead48
-SHA1 (patch-components_storage__monitor_storage__monitor__freebsd.h) = 87a16600e113b8bb9f72c6f0961058639e6ff608
-SHA1 (patch-components_storage__monitor_storage__monitor__netbsd.cc) = 944b7b24b3ecfccf7dba2d6bacab354539283ba4
-SHA1 (patch-components_storage__monitor_storage__monitor__netbsd.h) = 97ca19c232db4ad7c101c8a93db9fe43c7e0e2b7
-SHA1 (patch-components_sync_base_get__session__name__linux.cc) = 4370a8bdcb86674079e7159dcb18a37d57eaa257
-SHA1 (patch-components_update__client_update__query__params.cc) = 681dbd9725ed133a176d6641c48f6d6da035b393
-SHA1 (patch-components_url__matcher_regex__set__matcher.cc) = 329ba2c60bf889ced828c7020ac2ff19c2d764d3
-SHA1 (patch-components_url__matcher_url__matcher__factory.cc) = 5694c8f4ccdf9892a34ec071bf3658aa2b2e5a51
-SHA1 (patch-components_variations_proto_study.proto) = e5a28deb1ffd89fae109487689d9b01ceb3c6eb5
-SHA1 (patch-components_webcrypto_algorithms_test__helpers.cc) = a8d7105dd6009c225f5f3f967ab5f032473c476e
-SHA1 (patch-content_app_BUILD.gn) = 46e17d36d0b197b60de540732802c01c6ceee5c6
-SHA1 (patch-content_app_content__main__runner.cc) = f036e7d51143f12ef72afbfce5bc490d5be0b2b9
-SHA1 (patch-content_browser_BUILD.gn) = da63237339853693332ad0bce86ca0d6d8d011dd
-SHA1 (patch-content_browser_accessibility_browser__accessibility.h) = 8c6025bd481cdf35f1f1092dcb69a1d2379c13b6
-SHA1 (patch-content_browser_accessibility_browser__accessibility__manager.h) = 437098b5cb500ae0a699dc4b225e0bc7ddd2c372
-SHA1 (patch-content_browser_browser__main__loop.cc) = 45d6a690e931897bbbfcebda8b1cede4883805e8
-SHA1 (patch-content_browser_child__process__launcher.cc) = d566caca1f3a9aa2158f42f767fa78d59392f2af
-SHA1 (patch-content_browser_device__sensors_data__fetcher__shared__memory.h) = 1a8722be4984b40f67ec77d113abbb7b811f553c
-SHA1 (patch-content_browser_devtools_protocol_color__picker.cc) = 4e072b93d55ea86551c447d76340b2da289dc768
-SHA1 (patch-content_browser_download_base__file.cc) = 0db5df05ffa32649e1a7bcff411be372c5b8b7a9
-SHA1 (patch-content_browser_gpu_gpu__data__manager__impl__private.cc) = 982aef11bbd264113c5ab921d680ff9d4284feb9
-SHA1 (patch-content_browser_gpu_gpu__data__manager__impl__private.h) = 85b0b23e5fa89667cbab645a98c19852a61de530
-SHA1 (patch-content_browser_gpu_gpu__internals__ui.cc) = a54f02ffcc526b00f2b4557f275d7cb274f42da2
-SHA1 (patch-content_browser_gpu_gpu__process__host.cc) = 3245bc1d9983dd086d4dac521874bc4cc9aa7c7b
-SHA1 (patch-content_browser_media_media__internals.cc) = 310e14611666e0b971ec3ff4eeb7a5eff9d79f39
-SHA1 (patch-content_browser_memory_memory__coordinator__impl.cc) = c3da87398cc5b3d492088f6d5af2e2cf56b17566
-SHA1 (patch-content_browser_memory_memory__monitor.cc) = 228b077d9f703e5614ebf0091c035d8ad3637bbd
-SHA1 (patch-content_browser_ppapi__plugin__process__host.cc) = 3b182b3fcdd9ab7e7128ca91c5ccd2ef04dc9f5d
-SHA1 (patch-content_browser_renderer__host_render__process__host__impl.cc) = ce2cfb9cf824d62b955b0e4b6bfbad761da19a80
-SHA1 (patch-content_browser_renderer__host_render__widget__host__view__aura.cc) = e252d59fc80c49bfdb916704c20f36f80c3ea654
-SHA1 (patch-content_browser_tracing_tracing__controller__impl.cc) = 734833d85396d4af405ad2f5029ac4b6127485f5
-SHA1 (patch-content_browser_utility__process__host__impl.cc) = 367321c2a190e1172e0f7631b78e38f9171d4a27
-SHA1 (patch-content_common_BUILD.gn) = 26dd181503a45142b322c01a56443c8268cdcf03
-SHA1 (patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc) = f7dadebec82f13e0928ba9090293ee8db6573fce
-SHA1 (patch-content_common_set__process__title__linux.cc) = ef1083ed9f7f00a68e51d4bc29431f83a2889dd2
-SHA1 (patch-content_common_set__process__title__linux.h) = ee6ac0cf6e0d2bbb1429c72a2974c856ae7a1929
-SHA1 (patch-content_gpu_BUILD.gn) = db740dd9cb33b7d679bfb313ba44e3a9cc05bcd2
-SHA1 (patch-content_gpu_gpu__child__thread.cc) = d22cf6945091ec01fa559a8fa32d80c577b9bfcc
-SHA1 (patch-content_gpu_gpu__main.cc) = 338036c7de84dfa7bf2c76ed9d677ca22925bbd9
-SHA1 (patch-content_gpu_in__process__gpu__thread.cc) = 83b35a41dfa51c580325dfa608364da2c35ac121
-SHA1 (patch-content_public_common_child__process__host.h) = 110be83ed9fea9ad2700b7e5789d7e6db64020b7
-SHA1 (patch-content_public_common_content__switches.cc) = 54d854eb1c019ca2eaaeb357f07cd77e983f4e0f
-SHA1 (patch-content_public_common_content__switches.h) = 12fb8bdde5ec4159ecbd973b9405303813f0eafc
-SHA1 (patch-content_public_common_renderer__preferences.h) = abfe3248aced229cad2612832725897008f187a5
-SHA1 (patch-content_public_test_browser__test__base.cc) = 7a10a81aab19423b14cde8853ba01c0128d5e0dd
-SHA1 (patch-content_renderer_media_webrtc_processed__local__audio__source.cc) = c79d59f40576170f18e9cff36a55d3c2e0ba368b
-SHA1 (patch-content_renderer_pepper_pepper__media__device__manager.cc) = 871f67bb6a6d6dc65a1525024b3d6335fa7f4261
-SHA1 (patch-content_renderer_render__thread__impl.cc) = 9a8f3e3f562adbbcb7e4307f5185b23734a1bc02
-SHA1 (patch-content_renderer_renderer__blink__platform__impl.cc) = 81d74af26792b4d99f3529646f7bca87c00d2571
-SHA1 (patch-content_renderer_renderer__blink__platform__impl.h) = 0ea2370c65cee518a0e021d34d692d065d3930e1
-SHA1 (patch-content_renderer_renderer__main__platform__delegate__linux.cc) = 2cf9aa7a8722716d96f08d9cbd1c6f06d662bd10
-SHA1 (patch-content_renderer_webscrollbarbehavior__impl__aura.cc) = 556de6307607c96bf362bbc84b78fddf7e42fc75
-SHA1 (patch-content_shell_BUILD.gn) = b98b7e59d141e423398c536feaceed3275ab725b
-SHA1 (patch-content_shell_browser_shell__browser__context.cc) = fb6683ca2bf93da4e44d5bed33bfb0ab6441011f
-SHA1 (patch-content_shell_browser_shell__browser__main__parts.cc) = 9f720d613467abc14a2be6039407bcf47000004b
-SHA1 (patch-content_test_BUILD.gn) = 0ec5d1c68442eacfbd110c413f51e822e77c8d58
-SHA1 (patch-crypto_nss__util.cc) = de53a4d9d05a2d30ef52c8008fed40074782be69
-SHA1 (patch-device_BUILD.gn) = 674c723c84fc0dcd1942d8418db425347626be28
-SHA1 (patch-device_battery_BUILD.gn) = 50d8602ad02060157f2ea3735922716482100312
-SHA1 (patch-device_bluetooth_BUILD.gn) = c989943d15f1d52e7ae6e039f89caa52e103c9b5
-SHA1 (patch-device_gamepad_gamepad__provider.cc) = d9836f91f3d1913da2e59cd9285c339f41b70782
-SHA1 (patch-device_geolocation_BUILD.gn) = db2022714e053ff292452b00d2b089fdd82d6e29
-SHA1 (patch-device_geolocation_location__arbitrator.cc) = 3340531161ae9227ff2d901cc6717aa1be11fd71
-SHA1 (patch-device_hid_BUILD.gn) = f648f53cb8b65f74e2e9119b476a23a4617f4cd5
-SHA1 (patch-device_media__transfer__protocol_media__transfer__protocol__daemon__client.h) = 03956ffc581b44b3c60ab614b037a6d9eec3525d
-SHA1 (patch-device_media__transfer__protocol_media__transfer__protocol__manager.h) = efdc5e5982e22cdd8025dd976d2e059ff3590688
-SHA1 (patch-device_serial_BUILD.gn) = cad00a3b27fd9e29939a0a4503b272f721eac287
-SHA1 (patch-device_serial_serial__io__handler__posix.cc) = 35a3afea930d3e03b94c4b4be60642dc60a1d949
-SHA1 (patch-device_time__zone__monitor_time__zone__monitor.cc) = 97988feea8ad325be97443550fd484440f67e24e
-SHA1 (patch-device_time__zone__monitor_time__zone__monitor__linux.cc) = b792dd93060cf3ee35bf72ac5ac54fc242c36a9b
-SHA1 (patch-device_usb_usb__context.cc) = 0bccabf89881221b24dd7c143d2cb44157f8efbb
-SHA1 (patch-device_usb_usb__context__unittest.cc) = 65cc905bb4d41a7905e1aea2ff5584b2d0f06c0d
-SHA1 (patch-device_usb_usb__device__handle__impl.cc) = 5f85432154ca3a242996c870cd484c18deef83ed
-SHA1 (patch-device_usb_usb__device__handle__impl.h) = 9d4d4890c79d377093ee9b5bf9c3eb9414fff147
-SHA1 (patch-device_usb_usb__device__impl.cc) = 6e0f96d876f4af35fae503c0b260b096989da9d7
-SHA1 (patch-device_usb_usb__error.cc) = 5380f13996ee7508333b5f928f5b2e695172b1f1
-SHA1 (patch-device_usb_usb__service__impl.cc) = eed62c4bbfb537220e18d92d26174a6d51fef6b4
-SHA1 (patch-device_usb_usb__service__impl.h) = 38def3a5b1d47f1fe279868a6b08e7529a7d8df0
-SHA1 (patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc) = b98cc93451581faf86b4a6da26ee86bdf1f59471
-SHA1 (patch-extensions_browser_api_networking__private_networking__private__event__router__factory.cc) = 50e6a1948205dc042fe0a77fc6b240b92a40c2a6
-SHA1 (patch-extensions_browser_api_serial_serial__api.cc) = e0882a3d9228edb6c8dfc5e94899d0556ba28393
-SHA1 (patch-extensions_browser_api_web__request_form__data__parser.cc) = 84777878d372ef57ad2d76c5d95defda82f88389
-SHA1 (patch-extensions_common_image__util.cc) = 6cd63b2aff2546bb63de26f365deae5cc1a0eb1d
-SHA1 (patch-extensions_common_stack__frame.cc) = 49f82d266232e781fc5c89d7cc04d6dfcc660411
-SHA1 (patch-gpu_BUILD.gn) = 0f5867a4a651312174e62783a345706a279647d8
-SHA1 (patch-gpu_command__buffer_service_program__manager.cc) = d99618837690477ed7622ee4a21472ecdbe5331b
-SHA1 (patch-gpu_config_BUILD.gn) = e1ae3c7fa6962dcfb83eb2bb867dcc17f1b9b160
-SHA1 (patch-gpu_config_gpu__control__list.cc) = 3a44d7d8a489a8f97ca25b1958e2e986a58e08d4
-SHA1 (patch-gpu_config_gpu__control__list__unittest.cc) = edad53d855b06e08d5ae705aa0313991079a9d2a
-SHA1 (patch-gpu_config_gpu__info__collector.cc) = 9177b10305f7e8a84401d05fa877a1a10e84b731
-SHA1 (patch-gpu_config_gpu__test__config.cc) = 042666cac4079e3b648397ed2160da2ba55b3bb5
-SHA1 (patch-gpu_gles2__conform__support_BUILD.gn) = 4bdb2b0e4060d8f6e47b054ed64140b550777868
-SHA1 (patch-gpu_gles2__conform__support_native_BUILD.gn) = aab7d756de35dcf659468f647eb78587def2a2f9
-SHA1 (patch-gpu_ipc_client_BUILD.gn) = 6c37a9507105ad979b9f499dbaf6fc461f75fb0a
-SHA1 (patch-gpu_ipc_service_BUILD.gn) = a974363cbd13020c2c7500142288d9f7d57c42c5
-SHA1 (patch-gpu_ipc_service_gpu__init.cc) = 9dc0c963517618cd2984d836f6d95d32ff956fd6
-SHA1 (patch-gpu_tools_compositor__model__bench_BUILD.gn) = ac36f9523e5d2f65ac57d6cea54a96a842923545
-SHA1 (patch-gpu_vulkan_BUILD.gn) = 4f748065943acce2cdd449c6878e5acc034a3672
-SHA1 (patch-ipc_ipc__channel.h) = 5cbed9774cf8d6c81581517777f854a07459a483
-SHA1 (patch-ipc_ipc__channel__common.cc) = 57f677ac3abcf07baf54987cdaaa883a3da6ed5a
-SHA1 (patch-ipc_ipc__message__utils.cc) = 0e04c6b9fc4bf42279ffc6823d2cde9afc4163cb
-SHA1 (patch-ipc_ipc__message__utils.h) = 93e490d5810cdcc849e0b838d3a1930f9a1da2c2
-SHA1 (patch-ipc_unix__domain__socket__util.cc) = a0966196252e790aa9ae0c2f405bbf0dcbc21805
-SHA1 (patch-media_audio_BUILD.gn) = 4905d0dcf85b70383a7d0a2b4926fc513a95e3fe
-SHA1 (patch-media_audio_alsa_audio__manager__alsa.cc) = c0134672183060dcf1b380d45c0f677ce2591942
-SHA1 (patch-media_audio_audio__manager.cc) = 03a71977d7b35eb8a7a5fa6c6a7e0766d21638e1
-SHA1 (patch-media_audio_audio__manager.h) = e3a981f47b8e0852d665cb6dd98a99165c3032fe
-SHA1 (patch-media_base_BUILD.gn) = 69e28bef774270d89cc3bb80b662d523abfc2f01
-SHA1 (patch-media_capture_BUILD.gn) = acd8aeec3c6ebfcb0044e0dd461e049f1ec8bd53
-SHA1 (patch-media_capture_video_fake__video__capture__device__factory.cc) = 96e2d4fcf6da24083955062c4d3988d7cda0be39
-SHA1 (patch-media_capture_video_file__video__capture__device__factory.cc) = c283bc903dcd10e6fc41c61b9555c6e4e0b18bd5
-SHA1 (patch-media_capture_video_linux_v4l2__capture__delegate.cc) = 8b57056e5506d372eced80e29980ecf621c94800
-SHA1 (patch-media_capture_video_linux_video__capture__device__linux.cc) = e3bbb90e96fad902732a611d0e885af566168ef4
-SHA1 (patch-media_capture_video_video__capture__device__client.cc) = 7c3bf9cfb8a7885d4f088717476fc72e40c1656c
-SHA1 (patch-media_capture_video_video__capture__device__factory.cc) = 79e1368c6db9e02dfbbc86df9d12d9bc85d42c6f
-SHA1 (patch-media_cast_BUILD.gn) = a14df4231ec783b330ca39fb5202cd22ef138f76
-SHA1 (patch-media_cdm_ppapi_ppapi__cdm__adapter.gni) = 5d6ce505692589ee435b424d0b245edbcca32c52
-SHA1 (patch-media_ffmpeg_ffmpeg__common.h) = 85815384a2d984fcafc6c1bc30ac2039a3a08788
-SHA1 (patch-media_filters_ffmpeg__demuxer.cc) = 6f68bdca76622fdf9b4e2f42fb20720681f3efa2
-SHA1 (patch-media_filters_vp9__parser.h) = 001fa5210619ce648b964bcd85e2271349cec801
-SHA1 (patch-media_formats_common_offset__byte__queue.cc) = 471a8bcc41ba987b7ce4e3b225e7b8cdbe24ce8c
-SHA1 (patch-media_formats_common_offset__byte__queue.h) = 107df0836552ed0e77aa90c179154c5649fa14d5
-SHA1 (patch-media_formats_mp2t_es__parser__adts.cc) = c81bf6dab0a63d23b1cde122dc83600c30d294fa
-SHA1 (patch-media_formats_mp2t_es__parser__mpeg1audio.cc) = dfb24fad09189d289be151687cf628d7ad24616a
-SHA1 (patch-mojo_BUILD.gn) = 2e99f7edd51c4e0efc6f41b7a9976d9814cbf012
-SHA1 (patch-mojo_edk_embedder_platform__channel__utils__posix.cc) = 36389262cf1eac651a905494ac1bdf38a01d9329
-SHA1 (patch-mojo_edk_test_BUILD.gn) = 0fc97c48f9f23f310dd418acd1a6aa2da2a59a63
-SHA1 (patch-native__client__sdk_src_BUILD.gn) = e8a37ddf451ba6fc6cb3db7633d1503f2e1cd1f6
-SHA1 (patch-net_BUILD.gn) = 17fc59175acf03069c45d19c6b387f506dcb0d1d
-SHA1 (patch-net_base_address__tracker__linux.h) = df9305d3b8141a14f16b26569ffc4de7a020a96b
-SHA1 (patch-net_base_address__tracker__linux__unittest.cc) = 7080984a9db5d15229a70d37b341ea41ba601e51
-SHA1 (patch-net_base_mime__util__unittest.cc) = e67d8cb72cc00ddaeebcefa74b8af97bc4870e8c
-SHA1 (patch-net_base_network__change__notifier.cc) = 391c7f37698576ae8dc48498b3b88b34f2458f67
-SHA1 (patch-net_base_network__change__notifier.h) = 6cd5d206ed6a3e7bfb5070353a22f634a23c9d35
-SHA1 (patch-net_base_network__interfaces__linux.cc) = 7332f3591990abedd4e5563613bc922d03954945
-SHA1 (patch-net_base_network__interfaces__posix.cc) = 6da9061248ddbe608ba8be547b4911043cfeb0e0
-SHA1 (patch-net_dns_address__sorter__posix.cc) = 679058dc7875f34c3f74daa1cda09fc8ea035487
-SHA1 (patch-net_dns_dns__config__service__posix__unittest.cc) = df29c135544e7cd301ee4197e04979c2bf6fe5e8
-SHA1 (patch-net_dns_dns__reloader.cc) = 2d75fe56bb2689ff48c87329fd024921956d2f0e
-SHA1 (patch-net_http_http__auth__gssapi__posix.cc) = d42587565874d3406d4f25f2cc37af0efdc2aca4
-SHA1 (patch-net_http_http__network__session.cc) = 04ceeffade2c51363091e55ab494f3e2b7cbc379
-SHA1 (patch-net_proxy_proxy__config__service__linux.cc) = 3d225a1bc77461a4761755c128e032baca88e744
-SHA1 (patch-net_proxy_proxy__service.cc) = fd1c9d6a0697e1a5b629a6179c6c7d3aeadac414
-SHA1 (patch-net_socket_socks5__client__socket.cc) = cff5de418e216bd7592b974d9a6578a5ada7b1b8
-SHA1 (patch-net_socket_udp__socket__posix.cc) = b423629217c4be0325dbc0e5bd92419f14570f67
-SHA1 (patch-net_tools_get__server__time_get__server__time.cc) = bc6c0d55509e4b0717767cdf997b74f9b9b3a57c
-SHA1 (patch-net_url__request_url__request__context__builder.cc) = 0093afaa5b69a13e5bc1a0a56979cf4a7bebf133
-SHA1 (patch-pdf_pdfium_pdfium__engine.cc) = a3bd19411f579ffe91179d974797d0cd9aa79e4b
-SHA1 (patch-ppapi_proxy_file__io__resource.cc) = 5a43e34966caf0f8d7ce508dcfdfcac7a14f5387
-SHA1 (patch-ppapi_shared__impl_private_net__address__private__impl.cc) = 24ac448a7b8998f414d2201930f4858db06210a1
-SHA1 (patch-ppapi_tests_extensions_BUILD.gn) = 1f9e1f53489c1ac809e204298f473a01a4925e09
-SHA1 (patch-printing_BUILD.gn) = e46cd955134557ac930a43ad5f4a47182e0aa65e
-SHA1 (patch-printing_cups__config__helper.py) = c41a817c19e591fcdaeffcde97ca8d9b2057985e
-SHA1 (patch-remoting_host_BUILD.gn) = d89373b1380b2131aab65f2a0b2d4d7749b0f7be
-SHA1 (patch-sdch_BUILD.gn) = 9012f34a75bc389edb2ab64278a9ddd8da5b6e38
-SHA1 (patch-services_service__manager_runner_host_BUILD.gn) = 9408524b8b83ddd644107be0e5a325c9f761e305
-SHA1 (patch-services_service__manager_standalone_context.cc) = f3fcf0b1e4204a861539815c7a39c03780326edf
-SHA1 (patch-services_ui_BUILD.gn) = 7fbb89b6148d8cc907a0a4963ff9b5015938cd35
-SHA1 (patch-services_ui_ime_BUILD.gn) = 04a054eb7f6b25135dbedb9694e73a820cac7c77
-SHA1 (patch-services_ui_public_cpp_gles2__context.cc) = 58dbe9659ff6ca57a7248f332f48fcfdf3eb1ca3
-SHA1 (patch-services_ui_surfaces_surfaces__context__provider.cc) = 180049bbb77671c932b48f0da0f0c2d00e30a8ad
-SHA1 (patch-skia_BUILD.gn) = 3642c648af4dfd8eaf25c864601a159c31a7e70f
-SHA1 (patch-skia_ext_SkMemory__new__handler.cpp) = 62584ebda841bb01c05533a0e230e6cde553fce2
-SHA1 (patch-skia_ext_platform__canvas.h) = 8eb10136504a0efe934b1e1934984afc87cecacb
-SHA1 (patch-testing_gtest_src_gtest.cc) = 577f7350d29cd62a49a76196fae3c145f7c6903b
-SHA1 (patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp) = 4937bd271affcb227b728b9e51290211ec4b0b25
-SHA1 (patch-third__party_WebKit_Source_core_layout_BUILD.gn) = f02e88e4a77682143db9de1e92378eda1cd33317
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp) = 16b6d30681f92cf79229d4ed74dd3aa80cadea9c
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontCache.h) = 554e83347b0d75c2cc680b9a29f418eedab47c0d
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp) = 522362d6e99854eb5a91abc52b05e5781dbb493e
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h) = d2470af7d372bc04265673b0415a25efcda90264
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp) = 19e398c11fcb11f563110e8a3bb66434083fe4d6
-SHA1 (patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp) = cdf58980bff0336419965ae11f4dfd8b69295004
-SHA1 (patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp) = db921e977ea616cd679c6dff4dc00a3cffb89f37
-SHA1 (patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp) = 549d92bcd8b0b6e4d3d6fc0a6197600c382d16bb
-SHA1 (patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp) = f5514582e03da6d54ffcca07c93b88d1e4897875
-SHA1 (patch-third__party_WebKit_Source_wtf_Assertions.cpp) = 0844a90d48c25740d1033fdee552b74cc7d951b3
-SHA1 (patch-third__party_WebKit_Source_wtf_Atomics.h) = cb9503c7075b61f0bda183599fdec00853fae841
-SHA1 (patch-third__party_WebKit_Source_wtf_BUILD.gn) = 9b240c0db36f8fa5aca5e20377167273781c8b6f
-SHA1 (patch-third__party_WebKit_Source_wtf_ByteSwap.h) = 275f99b44f3128ba35773a172eb38c838c1f2de5
-SHA1 (patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h) = 46bab5203cdb0007f9a66e42838e8b63dcb8a847
-SHA1 (patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp) = 17ea97254e979651da0cc64e0fff585bdc160ba0
-SHA1 (patch-third__party_angle_BUILD.gn) = 534258a067143d8bcc1d1c62a3097ba842b6d4fc
-SHA1 (patch-third__party_angle_gni_angle.gni) = e96e2a5c84849c52edebe303504e0831db2ed695
-SHA1 (patch-third__party_angle_src_tests_BUILD.gn) = 646346543a6f498fce880eb4e036e82681b43404
-SHA1 (patch-third__party_boringssl_BUILD.gn) = 190542f4ffc7c287071012ef807058549f30235c
-SHA1 (patch-third__party_boringssl_src_crypto_ex__data.c) = dc21e89e2bbb15b94c438e2cbdf890cbe43465ff
-SHA1 (patch-third__party_boringssl_src_include_openssl_thread.h) = d197f660e6b8db4600f1ced9b50d80ad3bdf5267
-SHA1 (patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h) = b089af9cc12a0d044a35b30cec141cb298853609
-SHA1 (patch-third__party_expat_BUILD.gn) = 2115268685d71662a940a342198afb3fe95c349f
-SHA1 (patch-third__party_ffmpeg_BUILD.gn) = 13ffdc9a27902d71f413123e1a4cb085e3c82e57
-SHA1 (patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h) = 79214c51ac671d30038eb76e40c4fa1c227e7282
-SHA1 (patch-third__party_ffmpeg_ffmpeg__generated.gni) = 249f0453af30284f7afb757506c416875c4e276d
-SHA1 (patch-third__party_ffmpeg_libavutil_cpu.c) = 8a201020a008d0357a2760fdaf38ec6b36d05150
-SHA1 (patch-third__party_ffmpeg_libavutil_mem.c) = 5baa7e792afcc6f68c28944737f5c8aa46dd190b
-SHA1 (patch-third__party_fontconfig_BUILD.gn) = a4f73bbcd1186c26339f8fecbf0a10eb3badebe8
-SHA1 (patch-third__party_freetype2_BUILD.gn) = 00f40983b1e8b4c6be8532a0ada80d57a1660d39
-SHA1 (patch-third__party_glslang_BUILD.gn) = 257a796a30e4d94210f69280c6fd30d2a40c4a5f
-SHA1 (patch-third__party_harfbuzz-ng_BUILD.gn) = e04a3693cdbd3895781d9dc1bcac34f02f8c3ecf
-SHA1 (patch-third__party_icu_android_patch__locale.sh) = ca42a74c99df8e742e34fd3b865f5778bf60f479
-SHA1 (patch-third__party_icu_source_configure) = bf10fc8043534abf2c232cde966d83d6b5cc62e3
-SHA1 (patch-third__party_leveldatabase_env__chromium.cc) = 194edde951d753dbb6cb7a9eb0c76eefd4dd87ec
-SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h) = f5593ac3a4bfe86345876c97f5ad7221967b7728
-SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h) = ec75e9cba326cc46ab2816879e7827d17bec8a1b
-SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h) = 87fe2a7b4abd82bd2a558f3f0113ad726b3f5499
-SHA1 (patch-third__party_libusb_BUILD.gn) = e74c193fa0657602d28e2fe715bb4850ec4aaa96
-SHA1 (patch-third__party_libxml_BUILD.gn) = 40d404a8136fdb10272a5dc9ee61d8e03fe75ac5
-SHA1 (patch-third__party_libxslt_BUILD.gn) = 987a523f323069432bbde49ceb9bc05489f97be9
-SHA1 (patch-third__party_libyuv_include_libyuv_row.h) = 63aa2ac04d19ef82e62eabf3290cf0c6b72f6e33
-SHA1 (patch-third__party_libyuv_source_mjpeg__decoder.cc) = 04cd4b7cf41db3b697808c9d07d8c4a704a79d74
-SHA1 (patch-third__party_mesa_BUILD.gn) = e244363bee13cb3901356c205c417edde11826ae
-SHA1 (patch-third__party_minigbm_BUILD.gn) = 650d7f135b1e4ddbd61d86e62d05d365bee43576
-SHA1 (patch-third__party_opus_BUILD.gn) = d456791b41a876fd9ef332ebca98b74371af428a
-SHA1 (patch-third__party_ots_include_opentype-sanitiser.h) = 4b570c282b22f0b8dfacf7c4a9d8f8eb9f67f70c
-SHA1 (patch-third__party_pdfium_BUILD.gn) = 64ede6590d00ea974ab18a734597e2d5ff8fd12b
-SHA1 (patch-third__party_pdfium_core_fxcrt_fx__system.h) = 7337c0b1cb2807562945736f54f8b483cd35a38e
-SHA1 (patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp) = a0cefb180749d6cc5afd7b0c6d1649f034d9fdf3
-SHA1 (patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp) = 45d768605285b57f8ea5908012034f7702bbf702
-SHA1 (patch-third__party_pdfium_skia_BUILD.gn) = 0fdbb8b65b98d47f63480319318fed6a3d97d7be
-SHA1 (patch-third__party_pdfium_third__party_base_logging.h) = d5092d47a8539674b83f32054669791e2d62021e
-SHA1 (patch-third__party_protobuf_post__process__dist.sh) = 6460ef38c68c759df48ff57d3990c9f19ca8af51
-SHA1 (patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h) = 01988c17b537528f01efcc121c82accebc746a40
-SHA1 (patch-third__party_sqlite_BUILD.gn) = d85d4ddebed998aea6b1fd1f8b8bdb20114da3a3
-SHA1 (patch-third__party_usrsctp_BUILD.gn) = 4773526e4855e65ee0744e93faf9d3e5a37e1b93
-SHA1 (patch-third__party_webrtc_BUILD.gn) = c018bbc5cf3df0513f700e68394cc34e3db451bb
-SHA1 (patch-third__party_webrtc_base_BUILD.gn) = 59b25ddbe259699cb2bdc7b49a3da242299a97f5
-SHA1 (patch-third__party_webrtc_base_httpcommon.cc) = 4a01adfc44abce61eb71f174ea703efd496bdd43
-SHA1 (patch-third__party_webrtc_base_ifaddrs__converter.h) = 19ecf16087925d2def4fa55fb751baa6a656aa7a
-SHA1 (patch-third__party_webrtc_base_ipaddress.h) = 76a57a5d2e0f4ee518c6fa450a633adb706effcc
-SHA1 (patch-third__party_webrtc_base_linux.cc) = 2a5b245beb058e5a0b14e99c25c33685bd177b18
-SHA1 (patch-third__party_webrtc_base_linux.h) = 729352c50fdbe0b4a3b2d826541e3d78246fa12a
-SHA1 (patch-third__party_webrtc_base_network.cc) = 0f1607410a4cb1469822ccc5b62611b474d89dea
-SHA1 (patch-third__party_webrtc_base_network.h) = 90859faa79df2a55fb5294a75b2424a85d81c860
-SHA1 (patch-third__party_webrtc_base_physicalsocketserver.cc) = c25c236eef8d19ce8b97c1031b41ed8e3ecabecd
-SHA1 (patch-third__party_webrtc_base_platform__thread.cc) = 4da2c60ab7fa3184e692252c35cc09366cb7a454
-SHA1 (patch-third__party_webrtc_base_stringutils.h) = 747d89b0ae7c7b6d8e1275ae8e6ce20a8383adb8
-SHA1 (patch-third__party_webrtc_base_systeminfo.cc) = 272969d804f9758335326324ce543408b2a100cf
-SHA1 (patch-third__party_webrtc_modules_audio__device_BUILD.gn) = ff870a88d61069fe1524f250831a0bf2ca1097da
-SHA1 (patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc) = 891616bc18e26774ecddcaf1176747cb6c68612b
-SHA1 (patch-third__party_webrtc_modules_video__coding_BUILD.gn) = 2242bd1a75453c276e7cd05fd65ecf69d4f17577
-SHA1 (patch-third__party_webrtc_system__wrappers_BUILD.gn) = 969875cf7296857925619eac51ecef704647e8b9
-SHA1 (patch-third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc) = 7d77928fa9833417a1c5211ca174e06486cfd7f0
-SHA1 (patch-third__party_webrtc_voice__engine_voice__engine__defines.h) = a744478ee19844c7cfe0c72772d04963ce33faa6
-SHA1 (patch-third__party_widevine_cdm_BUILD.gn) = f299fcf9651b0761334a74415d4855d4559d395d
-SHA1 (patch-third__party_widevine_cdm_stub_widevine__cdm__version.h) = e88d8c99493d0829691ab53160166882682559b9
-SHA1 (patch-third__party_xdg-utils_scripts_xdg-terminal) = 24dee02aef958c4db0896bb1791b72f3c3325f31
-SHA1 (patch-third__party_xdg-utils_scripts_xdg-terminal.in) = 400440a080cbf0b588bfcb1de1e9fc10e6819697
-SHA1 (patch-third__party_yasm_BUILD.gn) = d98aaf9c4e51be8c1cd49f7642d8a9cda745b945
-SHA1 (patch-third__party_zlib_BUILD.gn) = f66e24321f1dd4f19af1365490ecc5f37aff0232
-SHA1 (patch-tools_battor__agent_BUILD.gn) = 007eb425b2bb6d30b789012792bf8a92483e90a0
-SHA1 (patch-tools_gn_args.cc) = 7891b7c0b998a7fe96b0b7bdfc8e4096ded98ebc
-SHA1 (patch-tools_gn_bootstrap_bootstrap.py) = a5e2a4d9dbf97e063e6615de3a7a2fa33172ab4c
-SHA1 (patch-tools_variations_fieldtrial__to__struct.py) = 49aa9e64e944bb25ffbda95250f23006124b8bd7
-SHA1 (patch-ui_accessibility_platform_ax__platform__node.h) = 16be3fb13c6500e74f3067702db95de0bd936024
-SHA1 (patch-ui_app__list_app__list__constants.cc) = 7963f801324f32086880fd9217537790950c9630
-SHA1 (patch-ui_app__list_app__list__constants.h) = 97245a5cdda933d34be1279710a6ca011f4d540c
-SHA1 (patch-ui_app__list_views_app__list__item__view.cc) = 8ea86a0cd0f56df16567ffbd54ccdbdef36dddad
-SHA1 (patch-ui_app__list_views_app__list__view.cc) = b62a156d362733c8ba81da448ab1248abc9de2bb
-SHA1 (patch-ui_aura_BUILD.gn) = 50abd0a701e26bec0812c2875b5ed06fcdb41d0e
-SHA1 (patch-ui_base_BUILD.gn) = 7467bf159b5f66f872d6a143e75c7c2721f49cc7
-SHA1 (patch-ui_base_ime_BUILD.gn) = bae1bec0160524ac0b1e8f70797f97bdfa1310db
-SHA1 (patch-ui_base_ime_ime__engine__handler__interface.h) = 43d94d3c0067596be9ce0f391843ba3fca54e422
-SHA1 (patch-ui_base_ime_input__method__factory.cc) = 97a6bd278a1b91c0db6bd22cb6f5be2acabd57d0
-SHA1 (patch-ui_base_ime_input__method__initializer.cc) = d14351f1a802c5bdaecf08056c156539e7bbd59d
-SHA1 (patch-ui_base_resource_resource__bundle.cc) = 95a08a028f452127603685386e9e6318abf8133c
-SHA1 (patch-ui_base_ui__features.gni) = 5c39f04748dab1877eaeb2f08bdd83e6c35d6498
-SHA1 (patch-ui_base_webui_web__ui__util.cc) = 9fdf09ed67f0a68f8273a63faef97c7ed145e258
-SHA1 (patch-ui_compositor_BUILD.gn) = 996b39b53bed16e910ed8be5c5f78762f1aacd1b
-SHA1 (patch-ui_events_event__switches.cc) = b4c73c980296cade3ff628393f0441db88c253c9
-SHA1 (patch-ui_events_event__switches.h) = d2f1a602721e1aead468cd3830396a26f1f9a7c7
-SHA1 (patch-ui_events_keycodes_dom_keycode__converter.cc) = 962bb47674721ac1afa4ce27b249b8c6a84ccc8b
-SHA1 (patch-ui_gfx_BUILD.gn) = d606b07e78351f55cce7ae7db1f22759b8566cbd
-SHA1 (patch-ui_gfx_canvas__skia.cc) = 3495e7225f3e6ac81544213098e225e2889f0f96
-SHA1 (patch-ui_gfx_font__fallback__linux.cc) = f57bd6693eee09dbb3e89f3d1b3571b7cde7089d
-SHA1 (patch-ui_gfx_font__render__params.h) = e4330a45aaa39a779268c725d7f26b9895ecb36e
-SHA1 (patch-ui_gfx_render__text.cc) = 43bcd4641fc57baa4d399ac147c9ad34c6cb5cc6
-SHA1 (patch-ui_gl_BUILD.gn) = 875a3d5ba23474c510699031cad27877c0290362
-SHA1 (patch-ui_gl_sync__control__vsync__provider.cc) = ef529650064c381c6c5c290cfea2fa7800bfc480
-SHA1 (patch-ui_gl_sync__control__vsync__provider.h) = af385e4f047b2776d4c90ec293f11c7fe02304a7
-SHA1 (patch-ui_message__center_message__center__style.h) = ba9ddfb8db9ad3f729ee84959379875d37b3e85b
-SHA1 (patch-ui_message__center_views_message__center__button__bar.cc) = 42bcee9775e57cd4782be78a419971cbfa5fd1cb
-SHA1 (patch-ui_message__center_views_message__center__button__bar.h) = 20fc04baa12a0d969e4126658c05336def04431b
-SHA1 (patch-ui_message__center_views_message__view__factory.cc) = 46d44eb2e86e8d33d50bc04b47b9f199f896382e
-SHA1 (patch-ui_resources_ui__resources.grd) = ff7b61eced0a3a92bacee5f9ce36363a45403e28
-SHA1 (patch-ui_views_BUILD.gn) = 2ce6a3ec95f9f06ed5c5570abf9851261ea1f93e
-SHA1 (patch-ui_views_accessibility_native__view__accessibility.h) = 12cc092f73e88a0dff8dd3d09de6ca1095dc36c9
-SHA1 (patch-ui_views_bubble_bubble__dialog__delegate.cc) = a807cbf78e5f7d437286c95efa814cdb7e32d9e4
-SHA1 (patch-ui_views_controls_label.cc) = c8fd0f239fd5e5349415b152183f44b71bd5829d
-SHA1 (patch-ui_views_controls_textfield_textfield.cc) = b1b529ba246c0126c61186ef3fb0420860cf5069
-SHA1 (patch-ui_views_controls_webview_BUILD.gn) = 4f7d2136638ba0511f39926529981b92a6dd04ff
-SHA1 (patch-ui_views_corewm_tooltip__aura.cc) = 9424e3c0634c6191004f4017b14c78daefdf6edc
-SHA1 (patch-ui_views_examples_widget__example.cc) = 0073c00059535f3f66fd6ff67601e881a5cef168
-SHA1 (patch-ui_views_selection__controller.cc) = 03128af849ddbb35b4931e8a98bdd6ed243f35e7
-SHA1 (patch-ui_views_style_platform__style.cc) = a124a78d2e95e5756ff5dd3272ba0aca16cd488a
-SHA1 (patch-ui_views_views__delegate.cc) = 24b78221d0eb252e15a60fde9e0ddc97f15c8449
-SHA1 (patch-ui_views_views__delegate.h) = 169791c216cdae532c1cceeb264ccf29c8637015
-SHA1 (patch-ui_views_views__switches.cc) = e924b4d1533578ccf487116defb58e0d92fec14e
-SHA1 (patch-ui_views_window_custom__frame__view.cc) = 0fa0aecb3f5cd2e3aab2a361bc43df62c6459891
-SHA1 (patch-ui_views_window_dialog__delegate.cc) = aeecc76ebf71125df51a4ea77253e734ceec00c8
-SHA1 (patch-ui_webui_resources_js_cr.js) = e0813d3bc36615f63c4a1b744d4ad372bc2500ef
-SHA1 (patch-ui_webui_resources_js_icon.js) = 5c474b3a46c1ee752a15cb3e5336ace5f4e4620b
-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) = a754cf1d4c048eed3f6d8629ba99f2b56f1b6bbd
-SHA1 (patch-v8_src_base_platform_platform.h) = b550c96973cf6b0fed9dcbde7b71301afa3585c1
-SHA1 (patch-v8_src_globals.h) = d88afa5a8b913431d509bf25ee5ad9975fb5200a
-SHA1 (patch-v8_tools_run-llprof.sh) = 84a3f81f71a49e63ea1d3a079e8ebafa5595fde4
diff --git a/chromium-new/options.mk b/chromium-new/options.mk
deleted file mode 100644
index ef4929e54c..0000000000
--- a/chromium-new/options.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-# $NetBSD: options.mk,v 1.32 2016/08/20 11:17:32 ryoon Exp $
-
-PKG_OPTIONS_VAR=		PKG_OPTIONS.chromium
-PKG_OPTIONS_REQUIRED_GROUPS=	audio
-PKG_OPTIONS_GROUP.audio=	alsa pulseaudio
-PKG_SUPPORTED_OPTIONS+=		debug
-PKG_SUGGESTED_OPTIONS=		pulseaudio
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Malsa)
-GN_ARGS+=	use_alsa=true
-GN_ARGS+=	use_pulseaudio=false
-.include "../../audio/alsa-lib/buildlink3.mk"
-.elif !empty(PKG_OPTIONS:Mpulseaudio)
-GN_ARGS+=	use_alsa=false
-GN_ARGS+=	use_pulseaudio=true
-.include "../../audio/pulseaudio/buildlink3.mk"
-.endif
-
-.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
deleted file mode 100644
index 3621f56fca..0000000000
--- a/chromium-new/patches/patch-BUILD.gn
+++ /dev/null
@@ -1,175 +0,0 @@
-$NetBSD$
-
---- BUILD.gn.orig	2017-02-02 02:02:46.000000000 +0000
-+++ BUILD.gn
-@@ -217,7 +217,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",
-@@ -277,7 +277,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 += [
-@@ -320,7 +320,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" ]
-   }
- 
-@@ -488,7 +488,7 @@ group("both_gn_and_gyp") {
-     ]
-   }
- 
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     # The following are definitely linux-only.
-     deps += [
-       "//chrome:manpage",
-@@ -515,9 +515,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",
-@@ -588,7 +595,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" ]
- 
-@@ -698,7 +705,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)" ]
-   }
- 
-@@ -743,7 +750,7 @@ group("gn_only") {
-     deps += [ "//components/proximity_auth:proximity_auth_unittests" ]
-   }
- 
--  if (is_win || is_linux) {
-+  if (is_win || is_linux || is_bsd) {
-     deps += [
-       "//mash:all",
-       "//media/mojo/services:media_mojo_shell_unittests",
-@@ -763,7 +770,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 += [
-@@ -816,7 +823,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 += [
-@@ -824,7 +831,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" ]
-     }
-   }
-@@ -834,7 +841,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",
-@@ -877,7 +884,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 = [
-@@ -903,7 +910,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") {
-@@ -949,7 +956,7 @@ if (!is_ios) {
-       data_deps += [ "//content/shell:content_shell_crash_service" ]
-     }
- 
--    if (!is_win && !is_android) {
-+    if (!is_win && !is_android && !is_bsd) {
-       data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
-     }
- 
-@@ -957,7 +964,7 @@ if (!is_ios) {
-       data_deps += [ "//breakpad:dump_syms($host_toolchain)" ]
-     }
- 
--    if (is_linux) {
-+    if (is_linux && !is_bsd) {
-       data_deps += [ "//breakpad:dump_syms($host_toolchain)" ]
-     }
- 
-@@ -979,7 +986,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) {
-     data_deps = [
-       "//cc:cc_perftests",
-       "//chrome/test:load_library_perf_tests",
-@@ -1009,7 +1016,7 @@ group("chromium_builder_perf") {
-         "//chrome/installer/mini_installer:mini_installer",
-         "//chrome/test:angle_perftests",
-       ]
--    } else {
-+    } else if (!is_bsd) {
-       data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
-     }
-   }
diff --git a/chromium-new/patches/patch-apps_ui_views_app__window__frame__view.cc b/chromium-new/patches/patch-apps_ui_views_app__window__frame__view.cc
deleted file mode 100644
index edee21b489..0000000000
--- a/chromium-new/patches/patch-apps_ui_views_app__window__frame__view.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- apps/ui/views/app_window_frame_view.cc.orig	2017-02-02 02:02:46.000000000 +0000
-+++ apps/ui/views/app_window_frame_view.cc
-@@ -132,7 +132,7 @@ gfx::Rect AppWindowFrameView::GetBoundsF
- gfx::Rect AppWindowFrameView::GetWindowBoundsForClientBounds(
-     const gfx::Rect& client_bounds) const {
-   gfx::Rect window_bounds = client_bounds;
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   // Get the difference between the widget's client area bounds and window
-   // bounds, and grow |window_bounds| by that amount.
-   gfx::Insets native_frame_insets =
diff --git a/chromium-new/patches/patch-ash_display_mirror__window__controller.cc b/chromium-new/patches/patch-ash_display_mirror__window__controller.cc
deleted file mode 100644
index 0fbb47d140..0000000000
--- a/chromium-new/patches/patch-ash_display_mirror__window__controller.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- ash/display/mirror_window_controller.cc.orig	2017-02-02 02:02:46.000000000 +0000
-+++ ash/display/mirror_window_controller.cc
-@@ -250,7 +250,11 @@ void MirrorWindowController::UpdateWindo
-                          return info.id() == iter->first;
-                        }) == display_info_list.end()) {
-         CloseAndDeleteHost(iter->second, true);
-+#if defined(__llvm__)
-+        mirroring_host_info_map_.erase(iter++);
-+#else
-         iter = mirroring_host_info_map_.erase(iter);
-+#endif
-       } else {
-         ++iter;
-       }
diff --git a/chromium-new/patches/patch-ash_shell.cc b/chromium-new/patches/patch-ash_shell.cc
deleted file mode 100644
index e6f263d8d2..0000000000
--- a/chromium-new/patches/patch-ash_shell.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ash/shell.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ ash/shell.cc
-@@ -579,7 +579,7 @@ void Shell::Init(const ShellInitParams& 
- 
-   immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryAsh>();
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   NOTREACHED() << "linux desktop does not support ash.";
- #endif
- 
diff --git a/chromium-new/patches/patch-base_BUILD.gn b/chromium-new/patches/patch-base_BUILD.gn
deleted file mode 100644
index c56537e644..0000000000
--- a/chromium-new/patches/patch-base_BUILD.gn
+++ /dev/null
@@ -1,103 +0,0 @@
-$NetBSD$
-
---- base/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/BUILD.gn
-@@ -1076,6 +1076,46 @@ 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",
-+    ]
-+    if (is_freebsd) {
-+      sources += [
-+        "files/file_path_watcher_stub.cc",
-+        "process/process_handle_freebsd.cc",
-+        "process/process_iterator_freebsd.cc",
-+        "process/process_metrics_freebsd.cc",
-+        "sys_info_freebsd.cc",
-+      ]
-+    }
-+    if (is_netbsd) {
-+      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) {
-@@ -1347,7 +1387,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" ]
-@@ -1372,7 +1412,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",
-@@ -1388,6 +1428,20 @@ component("base") {
-     }
-   }
- 
-+  if (is_freebsd) {
-+    sources -= [
-+      "threading/platform_thread_linux.cc",
-+    ]
-+    sources += [ "threading/platform_thread_freebsd.cc" ]
-+  }
-+
-+  if (is_netbsd) {
-+    sources -= [
-+      "threading/platform_thread_linux.cc",
-+    ]
-+    sources += [ "threading/platform_thread_netbsd.cc" ]
-+  }
-+
-   # iOS
-   if (is_ios) {
-     set_sources_assignment_filter([])
-@@ -2154,6 +2208,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
deleted file mode 100644
index bf705a3ca5..0000000000
--- a/chromium-new/patches/patch-base_allocator_BUILD.gn
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- base/allocator/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/allocator/BUILD.gn
-@@ -338,6 +338,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
deleted file mode 100644
index 8cee8ea514..0000000000
--- a/chromium-new/patches/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-$NetBSD$
-
---- base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/allocator/allocator_shim_default_dispatch_to_glibc.cc
-@@ -3,19 +3,46 @@
- // found in the LICENSE file.
- 
- #include "base/allocator/allocator_shim.h"
--
--#include <malloc.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 {
-@@ -23,23 +50,23 @@ 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);
- }
- 
- void GlibcFree(const AllocatorDispatch*, void* address) {
--  __libc_free(address);
-+  __free(address);
- }
- 
- size_t GlibcGetSizeEstimate(const AllocatorDispatch*, void* address) {
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
deleted file mode 100644
index 3d25ada194..0000000000
--- a/chromium-new/patches/patch-base_allocator_allocator__shim__override__libc__symbols.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/allocator/allocator_shim_override_libc_symbols.h.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index 1ff9951ac2..0000000000
--- a/chromium-new/patches/patch-base_allocator_allocator__shim__unittest.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-$NetBSD$
-
---- base/allocator/allocator_shim_unittest.cc.orig	2017-02-02 02:02:47.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__paths__posix.cc b/chromium-new/patches/patch-base_base__paths__posix.cc
deleted file mode 100644
index 224ab5238b..0000000000
--- a/chromium-new/patches/patch-base_base__paths__posix.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD$
-
---- 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"
- #include "build/build_config.h"
- 
--#if defined(OS_FREEBSD)
-+#if defined(OS_BSD)
- #include <sys/param.h>
- #include <sys/sysctl.h>
-+#include <unistd.h>
- #elif defined(OS_SOLARIS)
- #include <stdlib.h>
- #endif
-@@ -59,6 +60,30 @@ bool PathProviderPosix(int key, FilePath
-       }
-       *result = FilePath(FilePath::StringType(bin_dir, length - 1));
-       return true;
-+#elif defined(OS_NETBSD)
-+      char pathname[MAXPATHLEN];
-+      int mib[4];
-+      int ret;
-+      size_t size;
-+
-+      mib[0] = CTL_KERN;
-+      mib[1] = KERN_PROC_ARGS;
-+      mib[2] = getpid();
-+      mib[3] = KERN_PROC_PATHNAME;
-+
-+      size = sizeof(pathname);
-+      ret = sysctl(mib, 4, NULL, &size, NULL, 0);
-+      if (ret == -1) {
-+        return false;
-+      }
-+
-+      ret = sysctl(mib, 4, pathname, &size, NULL, 0);
-+      if (ret == -1 || strlen(pathname) == 0) {
-+        return false;
-+      }
-+
-+      *result = FilePath(FilePath::StringType(pathname, size - 1));
-+      return true;
- #elif defined(OS_SOLARIS)
-       char bin_dir[PATH_MAX + 1];
-       if (realpath(getexecname(), bin_dir) == NULL) {
diff --git a/chromium-new/patches/patch-base_debug_debugger__posix.cc b/chromium-new/patches/patch-base_debug_debugger__posix.cc
deleted file mode 100644
index 44d088c97f..0000000000
--- a/chromium-new/patches/patch-base_debug_debugger__posix.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-$NetBSD$
-
---- 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 {
- namespace debug {
- 
--#if defined(OS_MACOSX) || defined(OS_BSD)
-+#if defined(OS_NETBSD)
-+bool BeingDebugged() {
-+  static bool is_set = false;
-+  static bool being_debugged = false;
-+  int ret;
-+
-+  if (is_set)
-+    return being_debugged;
-+
-+  int mib[6];
-+  size_t size;
-+  struct kinfo_proc2 kproc;
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_PROC2;
-+  mib[2] = KERN_PROC_PID;
-+  mib[3] = getpid();
-+  mib[4] = sizeof(kinfo_proc2);
-+  mib[5] = 1;
-+
-+  ret = sysctl((int *)mib, 6, NULL, &size, NULL, 0);
-+  if (ret == -1) {
-+    return -1;
-+  }
-+
-+  mib[5] = (size / sizeof(kinfo_proc2));
- 
-+  ret = sysctl((int *)mib, 6, &kproc, &size, NULL, 0);
-+  if (ret == -1) {
-+    return -1;
-+    is_set = true;
-+    being_debugged = false;
-+    return being_debugged;
-+  }
-+  
-+  is_set = true;
-+  being_debugged = (kproc.p_flag & P_TRACED) != 0;
-+  return being_debugged;
-+
-+}
-+#else
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- // Based on Apple's recommended method as described in
- // http://developer.apple.com/qa/qa2004/qa1361.html
- bool BeingDebugged() {
-@@ -167,6 +207,7 @@ bool BeingDebugged() {
- }
- 
- #endif
-+#endif
- 
- // We want to break into the debugger in Debug mode, and cause a crash dump in
- // Release mode. Breakpad behaves as follows:
diff --git a/chromium-new/patches/patch-base_debug_proc__maps__linux.cc b/chromium-new/patches/patch-base_debug_proc__maps__linux.cc
deleted file mode 100644
index 02fc4d39c0..0000000000
--- a/chromium-new/patches/patch-base_debug_proc__maps__linux.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/debug/proc_maps_linux.cc.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index d9ff487d23..0000000000
--- a/chromium-new/patches/patch-base_debug_stack__trace__posix.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
---- base/debug/stack_trace_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/debug/stack_trace_posix.cc
-@@ -571,6 +571,10 @@ class SandboxSymbolizeHelper {
-   // for the modules that are loaded in the current process.
-   // Returns true on success.
-   bool CacheMemoryRegions() {
-+#if defined(OS_FREEBSD) || defined(OS_NETBSD)
-+    // TODO (rene) avoid link error, implement something?
-+    return false;
-+#else
-     // Reads /proc/self/maps.
-     std::string contents;
-     if (!ReadProcMaps(&contents)) {
-@@ -586,6 +590,7 @@ class SandboxSymbolizeHelper {
- 
-     is_initialized_ = true;
-     return true;
-+#endif
-   }
- 
-   // Opens all object files and caches their file descriptors.
diff --git a/chromium-new/patches/patch-base_debug_thread__heap__usage__tracker.cc b/chromium-new/patches/patch-base_debug_thread__heap__usage__tracker.cc
deleted file mode 100644
index 8bf244053e..0000000000
--- a/chromium-new/patches/patch-base_debug_thread__heap__usage__tracker.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- base/debug/thread_heap_usage_tracker.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/debug/thread_heap_usage_tracker.cc
-@@ -14,11 +14,13 @@
- #include "base/threading/thread_local_storage.h"
- #include "build/build_config.h"
- 
-+#if !defined(OS_BSD)
- #if defined(OS_MACOSX) || defined(OS_IOS)
- #include <malloc/malloc.h>
- #else
- #include <malloc.h>
- #endif
-+#endif
- 
- namespace base {
- namespace debug {
diff --git a/chromium-new/patches/patch-base_files_file__path__unittest.cc b/chromium-new/patches/patch-base_files_file__path__unittest.cc
deleted file mode 100644
index 8b7b61c55f..0000000000
--- a/chromium-new/patches/patch-base_files_file__path__unittest.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/files/file_path_unittest.cc.orig	2017-02-02 02:02:47.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.h b/chromium-new/patches/patch-base_files_file__path__watcher__kqueue.h
deleted file mode 100644
index de2451c2be..0000000000
--- a/chromium-new/patches/patch-base_files_file__path__watcher__kqueue.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- base/files/file_path_watcher_kqueue.h.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/files/file_path_watcher_kqueue.h
-@@ -5,6 +5,10 @@
- #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
- #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
- 
-+#ifdef __FreeBSD__
-+#include <sys/stdint.h>
-+#include <sys/types.h>
-+#endif
- #include <sys/event.h>
- 
- #include <memory>
diff --git a/chromium-new/patches/patch-base_files_file__util.h b/chromium-new/patches/patch-base_files_file__util.h
deleted file mode 100644
index 6adc59f702..0000000000
--- a/chromium-new/patches/patch-base_files_file__util.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/files/file_util.h.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/files/file_util.h
-@@ -404,7 +404,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_linux__util.cc b/chromium-new/patches/patch-base_linux__util.cc
deleted file mode 100644
index fedfdad949..0000000000
--- a/chromium-new/patches/patch-base_linux__util.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- base/linux_util.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/linux_util.cc
-@@ -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_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
deleted file mode 100644
index a787417f72..0000000000
--- a/chromium-new/patches/patch-base_native__library__posix.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/native_library_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/native_library_posix.cc
-@@ -35,7 +35,7 @@ NativeLibrary LoadNativeLibraryWithOptio
-   // further investigation, as it might vary across 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
deleted file mode 100644
index 1395578e8c..0000000000
--- a/chromium-new/patches/patch-base_posix_unix__domain__socket__linux.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD$
-
---- base/posix/unix_domain_socket_linux.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/posix/unix_domain_socket_linux.cc
-@@ -23,6 +23,15 @@
- 
- namespace base {
- 
-+#if defined(OS_BSD)
-+// Port over Linux ucred structure
-+struct ucred {
-+  pid_t pid; // process ID of the sending process
-+  uid_t uid; // user ID of the sending process
-+  gid_t gid; // group ID of the sending process
-+};
-+#endif
-+
- const size_t UnixDomainSocket::kMaxFileDescriptors = 16;
- 
- #if !defined(OS_NACL_NONSFI)
-@@ -40,8 +49,14 @@ static bool CreateSocketPair(ScopedFD* o
- 
- // static
- bool UnixDomainSocket::EnableReceiveProcessId(int fd) {
-+#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
- }
- #endif  // !defined(OS_NACL_NONSFI)
- 
-@@ -147,7 +162,11 @@ ssize_t UnixDomainSocket::RecvMsgWithFla
-       // The PNaCl toolchain for Non-SFI binary build does not support
-       // SCM_CREDENTIALS.
-       if (cmsg->cmsg_level == SOL_SOCKET &&
-+#if defined(OS_BSD)
-+        1) { // XXX(rene) carpet getting full ...
-+#else
-           cmsg->cmsg_type == SCM_CREDENTIALS) {
-+#endif
-         DCHECK_EQ(payload_len, sizeof(struct ucred));
-         DCHECK_EQ(pid, -1);
-         pid = reinterpret_cast<struct ucred*>(CMSG_DATA(cmsg))->pid;
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
deleted file mode 100644
index 5307336f30..0000000000
--- a/chromium-new/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- base/posix/unix_domain_socket_linux_unittest.cc.orig	2017-02-02 02:02:47.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
- // found in the LICENSE file.
- 
-+#include "build/build_config.h"
-+
- #include <stddef.h>
- #include <stdint.h>
- #include <sys/socket.h>
- #include <sys/types.h>
-+#if defined(OS_BSD)
-+#include <signal.h>
-+#endif
- #include <unistd.h>
- 
- #include "base/bind.h"
diff --git a/chromium-new/patches/patch-base_process_internal__linux.h b/chromium-new/patches/patch-base_process_internal__linux.h
deleted file mode 100644
index 726368b225..0000000000
--- a/chromium-new/patches/patch-base_process_internal__linux.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/process/internal_linux.h.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/process/internal_linux.h
-@@ -14,6 +14,8 @@
- 
- #include "base/files/file_path.h"
- 
-+#include <unistd.h> /* pid_t */
-+
- namespace base {
- 
- class Time;
diff --git a/chromium-new/patches/patch-base_process_launch.cc b/chromium-new/patches/patch-base_process_launch.cc
deleted file mode 100644
index 58d2e42ffd..0000000000
--- a/chromium-new/patches/patch-base_process_launch.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/process/launch.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/process/launch.cc
-@@ -15,7 +15,7 @@ LaunchOptions::~LaunchOptions() = defaul
- 
- LaunchOptions LaunchOptionsForTest() {
-   LaunchOptions options;
--#if defined(OS_LINUX)
-+#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
deleted file mode 100644
index 758ce9c67a..0000000000
--- a/chromium-new/patches/patch-base_process_launch.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- base/process/launch.h.orig	2017-02-02 02:02:47.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 = false;
- 
--#if defined(OS_LINUX)
-+#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 = false;
--#endif  // defined(OS_LINUX)
-+#endif  // defined(OS_LINUX) || defined(OS_BSD)
- 
- #if defined(OS_POSIX)
-   // If not empty, launch the specified executable instead of
diff --git a/chromium-new/patches/patch-base_process_launch__posix.cc b/chromium-new/patches/patch-base_process_launch__posix.cc
deleted file mode 100644
index 8bac342272..0000000000
--- a/chromium-new/patches/patch-base_process_launch__posix.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- base/process/launch_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/process/launch_posix.cc
-@@ -64,6 +64,7 @@
- #include "base/feature_list.h"
- #else
- extern char** environ;
-+#pragma weak environ
- #endif
- 
- namespace base {
-@@ -219,6 +220,8 @@ static const char kFDDir[] = "/dev/fd";
- static const char kFDDir[] = "/dev/fd";
- #elif defined(OS_FREEBSD)
- static const char kFDDir[] = "/dev/fd";
-+#elif defined(OS_NETBSD)
-+static const char kFDDir[] = "/dev/fd";
- #elif defined(OS_OPENBSD)
- static const char kFDDir[] = "/dev/fd";
- #elif defined(OS_ANDROID)
diff --git a/chromium-new/patches/patch-base_process_memory.h b/chromium-new/patches/patch-base_process_memory.h
deleted file mode 100644
index c835e6d423..0000000000
--- a/chromium-new/patches/patch-base_process_memory.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/process/memory.h.orig	2017-02-02 02:02:47.000000000 +0000
-+++ 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);
- 
--#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;
- 
- // 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
deleted file mode 100644
index d37b9a0b61..0000000000
--- a/chromium-new/patches/patch-base_process_memory__stubs.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- base/process/memory_stubs.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/process/memory_stubs.cc
-@@ -31,6 +31,8 @@ void TerminateBecauseOutOfMemory(size_t 
- // their respective stdlib function since those functions will return null on a
- // failure to allocate.
- 
-+#if !defined(OS_FREEBSD)
-+// FreeBSD brings it's own implementation in memory.cc -- cmt
- bool UncheckedMalloc(size_t size, void** result) {
-   *result = malloc(size);
-   return *result != nullptr;
-@@ -40,5 +42,6 @@ bool UncheckedCalloc(size_t num_items, s
-   *result = calloc(num_items, size);
-   return *result != nullptr;
- }
-+#endif
- 
- }  // namespace base
diff --git a/chromium-new/patches/patch-base_process_memory__unittest.cc b/chromium-new/patches/patch-base_process_memory__unittest.cc
deleted file mode 100644
index e8bd922e6c..0000000000
--- a/chromium-new/patches/patch-base_process_memory__unittest.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- base/process/memory_unittest.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/process/memory_unittest.cc
-@@ -82,10 +82,10 @@ TEST(MemoryTest, AllocatorShimWorking) {
-   ASSERT_TRUE(base::allocator::IsAllocatorInitialized());
- }
- 
--// 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_OPENBSD) && \
-+#if !defined(OS_BSD) && \
-     BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && \
-     !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
- 
-@@ -439,5 +439,5 @@ TEST_F(OutOfMemoryHandledTest, Unchecked
-   EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_));
-   EXPECT_TRUE(value_ == NULL);
- }
--#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
deleted file mode 100644
index 80ed602a2e..0000000000
--- a/chromium-new/patches/patch-base_process_process__handle__freebsd.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/process/process_handle_freebsd.cc.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index 9c4aee894e..0000000000
--- a/chromium-new/patches/patch-base_process_process__handle__netbsd.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-$NetBSD$
-
---- base/process/process_handle_netbsd.cc.orig	2016-11-16 08:03:06.205887318 +0000
-+++ base/process/process_handle_netbsd.cc
-@@ -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.
-+
-+#include "base/macros.h"
-+#include "base/process/process_handle.h"
-+
-+#include <stddef.h>
-+#include <sys/sysctl.h>
-+#include <sys/types.h>
-+#include <unistd.h>
-+
-+namespace base {
-+
-+ProcessId GetParentProcessId(ProcessHandle process) {
-+  struct kinfo_proc2 info;
-+  size_t info_size = sizeof(struct kinfo_proc2);
-+  int mib[6];
-+  int ret;
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_PROC2;
-+  mib[2] = KERN_PROC_PID;
-+  mib[3] = process;
-+  mib[4] = info_size;
-+  mib[5] = 1;
-+
-+  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
-+  if (ret == -1) {
-+    return -1;
-+  }
-+  if (info_size == 0) {
-+    return -1;
-+  }
-+
-+  return info.p_ppid;
-+}
-+
-+FilePath GetProcessExecutablePath(ProcessHandle process) {
-+  size_t size = sizeof(struct kinfo_proc2);
-+  int mib[4];
-+  int ret;
-+  char pathname[MAXPATHLEN];
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_PROC_ARGS;
-+  mib[2] = process;
-+  mib[3] = KERN_PROC_PATHNAME;
-+
-+  ret = sysctl(mib, 4, NULL, &size, NULL, 0);
-+  if (ret == -1) {
-+    return FilePath();
-+  }
-+
-+  ret = sysctl(mib, 4, pathname, &size, NULL, 0);
-+  if (ret == -1) {
-+    return FilePath();
-+  }
-+  if (size == 0 || strlen(pathname) == 0) {
-+    return FilePath();
-+  }
-+
-+  return FilePath(pathname);
-+}
-+
-+}  // namespace base
diff --git a/chromium-new/patches/patch-base_process_process__info__linux.cc b/chromium-new/patches/patch-base_process_process__info__linux.cc
deleted file mode 100644
index ad55c1a0b2..0000000000
--- a/chromium-new/patches/patch-base_process_process__info__linux.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-$NetBSD$
-
---- 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"
- #include "base/time/time.h"
- 
-+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#include <sys/user.h>
-+#endif
-+
- namespace base {
- 
- // static
- const Time CurrentProcessInfo::CreationTime() {
-+#if defined(__FreeBSD__) || defined(__DragonFly__)
-+  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
-+  struct kinfo_proc proc;
-+  size_t len = sizeof(struct kinfo_proc);
-+  if (sysctl(mib, arraysize(mib), &proc, &len, NULL, 0) < 0)
-+    return Time();
-+#if defined(__DragonFly__)
-+  return Time::FromTimeVal(proc.kp_start);
-+#else
-+  return Time::FromTimeVal(proc.ki_start);
-+#endif
-+#elif defined(__NetBSD__)
-+  struct kinfo_proc2 kproc;
-+  size_t esize = sizeof(kinfo_proc2);
-+  size_t size;
-+  int st;
-+  int mib[6];
-+  struct timeval tv;
-+
-+  tv.tv_sec = 0;
-+  tv.tv_usec = 0;
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_PROC2;
-+  mib[2] = KERN_PROC_PID;
-+  mib[3] = getpid();
-+  mib[4] = esize;
-+  mib[5] = 0;
-+
-+  st = sysctl(mib, 6, NULL, &size, NULL, (size_t)0);
-+  if (st == -1) {
-+      return Time::FromTimeVal(tv);
-+  }
-+
-+  mib[5] = (int)(size / esize);
-+  st = sysctl(mib, 6, &kproc, &size, NULL, (size_t)0);
-+  if (st == -1) {
-+      return Time::FromTimeVal(tv);
-+  }
-+
-+  tv.tv_sec = kproc.p_ustart_sec;
-+  tv.tv_usec = kproc.p_ustart_usec;
-+
-+  return Time::FromTimeVal(tv);
-+#else
-   ProcessHandle pid = GetCurrentProcessHandle();
-   int64_t start_ticks =
-       internal::ReadProcStatsAndGetFieldAsInt64(pid, internal::VM_STARTTIME);
-@@ -23,6 +74,7 @@ const Time CurrentProcessInfo::CreationT
-   Time boot_time = internal::GetBootTime();
-   DCHECK(!boot_time.is_null());
-   return Time(boot_time + start_offset);
-+#endif
- }
- 
- }  // namespace base
diff --git a/chromium-new/patches/patch-base_process_process__iterator.h b/chromium-new/patches/patch-base_process_process__iterator.h
deleted file mode 100644
index c0c34ff00c..0000000000
--- a/chromium-new/patches/patch-base_process_process__iterator.h
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
---- 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)
- #include <windows.h>
- #include <tlhelp32.h>
--#elif defined(OS_MACOSX) || defined(OS_OPENBSD)
-+#elif defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_NETBSD)
- #include <sys/sysctl.h>
- #elif defined(OS_FREEBSD)
- #include <sys/user.h>
-@@ -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_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
deleted file mode 100644
index d0a01fcde8..0000000000
--- a/chromium-new/patches/patch-base_process_process__iterator__freebsd.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-$NetBSD$
-
---- base/process/process_iterator_freebsd.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/process/process_iterator_freebsd.cc
-@@ -10,6 +10,10 @@
- #include <sys/sysctl.h>
- #include <unistd.h>
- 
-+/* getuid() */
-+#include <unistd.h>
-+#include <sys/types.h>
-+
- #include "base/logging.h"
- #include "base/macros.h"
- #include "base/strings/string_split.h"
-@@ -72,19 +76,13 @@ bool ProcessIterator::CheckForNextProces
-   for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
-     size_t length;
-     struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_];
--    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid };
-+    int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, kinfo.ki_pid };
- 
-     if ((kinfo.ki_pid > 0) && (kinfo.ki_stat == SZOMB))
-       continue;
- 
--    length = 0;
--    if (sysctl(mib, arraysize(mib), NULL, &length, NULL, 0) < 0) {
--      LOG(ERROR) << "failed to figure out the buffer size for a command line";
--      continue;
--    }
--
--    data.resize(length);
--
-+    data.resize(ARG_MAX);
-+    length = ARG_MAX;
-     if (sysctl(mib, arraysize(mib), &data[0], &length, NULL, 0) < 0) {
-       LOG(ERROR) << "failed to fetch a commandline";
-       continue;
diff --git a/chromium-new/patches/patch-base_process_process__iterator__netbsd.cc b/chromium-new/patches/patch-base_process_process__iterator__netbsd.cc
deleted file mode 100644
index 92c19eb86c..0000000000
--- a/chromium-new/patches/patch-base_process_process__iterator__netbsd.cc
+++ /dev/null
@@ -1,151 +0,0 @@
-$NetBSD$
-
---- 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.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+#include "base/process/process_iterator.h"
-+
-+#include <errno.h>
-+#include <sys/types.h>
-+#include <stddef.h>
-+#include <sys/sysctl.h>
-+#include <unistd.h>
-+
-+/* getuid() */
-+#include <unistd.h>
-+#include <sys/types.h>
-+
-+#include "base/logging.h"
-+#include "base/macros.h"
-+#include "base/strings/string_split.h"
-+#include "base/strings/string_util.h"
-+
-+namespace base {
-+
-+ProcessIterator::ProcessIterator(const ProcessFilter* filter)
-+  : index_of_kinfo_proc_(),
-+  filter_(filter) {
-+
-+  int mib[6];
-+
-+  printf("%s\n", __PRETTY_FUNCTION__);
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_PROC2;
-+  mib[2] = KERN_PROC_UID;
-+  mib[3] = getuid();
-+  mib[4] = sizeof(struct kinfo_proc2);
-+  mib[5] = 0;
-+
-+  bool done = false;
-+  int try_num = 1;
-+  const int max_tries = 10;
-+
-+  do {
-+    size_t len = 0;
-+    if (sysctl(mib, 6, NULL, &len, NULL, 0) <0 ){
-+      LOG(ERROR) << "failed to get the size needed for the process list";
-+      kinfo_procs_.resize(0);
-+      done = true;
-+    } else {
-+      size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);
-+      // Leave some spare room for process table growth (more could show up
-+      // between when we check and now)
-+      num_of_kinfo_proc += 16;
-+      kinfo_procs_.resize(num_of_kinfo_proc);
-+      len = num_of_kinfo_proc * sizeof(struct kinfo_proc2);
-+      if (sysctl(mib, 6, &kinfo_procs_[0], &len, NULL, 0) <0) {
-+        // If we get a mem error, it just means we need a bigger buffer, so
-+        // loop around again.  Anything else is a real error and give up.
-+        if (errno != ENOMEM) {
-+          LOG(ERROR) << "failed to get the process list";
-+          kinfo_procs_.resize(0);
-+          done = true;
-+        }
-+      } else {
-+        // Got the list, just make sure we're sized exactly right
-+        size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);
-+        kinfo_procs_.resize(num_of_kinfo_proc);
-+        done = true;
-+      }
-+    }
-+  } while (!done && (try_num++ < max_tries));
-+
-+  if (!done) {
-+    LOG(ERROR) << "failed to collect the process list in a few tries";
-+    kinfo_procs_.resize(0);
-+  }
-+}
-+
-+ProcessIterator::~ProcessIterator() {
-+}
-+
-+bool ProcessIterator::CheckForNextProcess() {
-+  std::string data;
-+  for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
-+    kinfo_proc2& kinfo = kinfo_procs_[index_of_kinfo_proc_];
-+
-+    // Skip processes just awaiting collection
-+    if ((kinfo.p_pid > 0) && (kinfo.p_stat == SZOMB))
-+      continue;
-+
-+    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.p_pid };
-+
-+    // Find out what size buffer we need.
-+    size_t data_len = 0;
-+    if (sysctl(mib, arraysize(mib), NULL, &data_len, NULL, 0) < 0) {
-+      DVPLOG(1) << "failed to figure out the buffer size for a commandline";
-+      continue;
-+    }
-+
-+    data.resize(data_len);
-+    if (sysctl(mib, arraysize(mib), &data[0], &data_len, NULL, 0) < 0) {
-+      DVPLOG(1) << "failed to fetch a commandline";
-+      continue;
-+    }
-+
-+    // |data| contains all the command line parameters of the process, separated
-+    // by blocks of one or more null characters. We tokenize |data| into a
-+    // vector of strings using '\0' as a delimiter and populate
-+    // |entry_.cmd_line_args_|.
-+    std::string delimiters;
-+    delimiters.push_back('\0');
-+    entry_.cmd_line_args_ = SplitString(data, delimiters, KEEP_WHITESPACE,
-+                                        SPLIT_WANT_NONEMPTY);
-+
-+    // |data| starts with the full executable path followed by a null character.
-+    // We search for the first instance of '\0' and extract everything before it
-+    // to populate |entry_.exe_file_|.
-+    size_t exec_name_end = data.find('\0');
-+    if (exec_name_end == std::string::npos) {
-+      DLOG(ERROR) << "command line data didn't match expected format";
-+      continue;
-+    }
-+
-+    entry_.pid_ = kinfo.p_pid;
-+    entry_.ppid_ = kinfo.p_ppid;
-+    entry_.gid_ = kinfo.p__pgid;
-+    size_t last_slash = data.rfind('/', exec_name_end);
-+    if (last_slash == std::string::npos)
-+      entry_.exe_file_.assign(data, 0, exec_name_end);
-+    else
-+      entry_.exe_file_.assign(data, last_slash + 1,
-+                              exec_name_end - last_slash - 1);
-+    // Start w/ the next entry next time through
-+    ++index_of_kinfo_proc_;
-+    // Done
-+    return true;
-+  }
-+  return false;
-+}
-+
-+bool NamedProcessIterator::IncludeEntry() {
-+  return (executable_name_ == entry().exe_file() &&
-+                            ProcessIterator::IncludeEntry());
-+}
-+
-+}  // namespace base
diff --git a/chromium-new/patches/patch-base_process_process__metrics.h b/chromium-new/patches/patch-base_process_process__metrics.h
deleted file mode 100644
index e6404b3051..0000000000
--- a/chromium-new/patches/patch-base_process_process__metrics.h
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD$
-
---- base/process/process_metrics.h.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/process/process_metrics.h
-@@ -22,6 +22,12 @@
- #include "base/values.h"
- #include "build/build_config.h"
- 
-+#if defined(OS_BSD)
-+#include <kvm.h>
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#endif
-+
- #if defined(OS_MACOSX)
- #include <mach/mach.h>
- #include "base/process/port_provider_mac.h"
-@@ -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_BSD)
- // 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.
- // Returns 0 on failure.
- BASE_EXPORT int GetNumberOfThreads(ProcessHandle process);
-+#endif
- 
-+#if defined(OS_LINUX) || defined(OS_ANDROID)
- // /proc/self/exe refers to the current executable.
- BASE_EXPORT extern const char kProcSelfExe[];
- 
diff --git a/chromium-new/patches/patch-base_process_process__metrics__freebsd.cc b/chromium-new/patches/patch-base_process_process__metrics__freebsd.cc
deleted file mode 100644
index 982d01b66f..0000000000
--- a/chromium-new/patches/patch-base_process_process__metrics__freebsd.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-$NetBSD$
-
---- base/process/process_metrics_freebsd.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/process/process_metrics_freebsd.cc
-@@ -13,6 +13,9 @@
- #include "base/memory/ptr_util.h"
- #include "base/sys_info.h"
- 
-+#include <unistd.h> /* getpagesize() */
-+#include <fcntl.h>  /* O_RDONLY */
-+
- namespace base {
- 
- ProcessMetrics::ProcessMetrics(ProcessHandle process)
-@@ -122,4 +125,23 @@ size_t GetSystemCommitCharge() {
-   return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
- }
- 
-+int GetNumberOfThreads(ProcessHandle process) {
-+  // Taken from FreeBSD top (usr.bin/top/machine.c)
-+
-+  kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open");
-+  if (kd == NULL)
-+    return 0;
-+
-+  struct kinfo_proc* pbase;
-+  int nproc;
-+  pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc);
-+  if (pbase == NULL)
-+    return 0;
-+
-+  if (kvm_close(kd) == -1)
-+    return 0;
-+
-+  return nproc;
-+}
-+
- }  // namespace base
diff --git a/chromium-new/patches/patch-base_process_process__metrics__netbsd.cc b/chromium-new/patches/patch-base_process_process__metrics__netbsd.cc
deleted file mode 100644
index b56177f955..0000000000
--- a/chromium-new/patches/patch-base_process_process__metrics__netbsd.cc
+++ /dev/null
@@ -1,208 +0,0 @@
-$NetBSD$
-
---- base/process/process_metrics_netbsd.cc.orig	2016-11-12 06:32:44.816301555 +0000
-+++ base/process/process_metrics_netbsd.cc
-@@ -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.
-+
-+#include "base/process/process_metrics.h"
-+
-+#include <stddef.h>
-+#include <sys/sysctl.h>
-+#include <sys/user.h>
-+#include <unistd.h>
-+
-+#include "base/macros.h"
-+#include "base/memory/ptr_util.h"
-+#include "base/sys_info.h"
-+
-+#include <unistd.h> /* getpagesize() */
-+#include <fcntl.h>  /* O_RDONLY */
-+
-+#include <uvm/uvm_extern.h> /* struct vmtotal */
-+
-+namespace base {
-+
-+ProcessMetrics::ProcessMetrics(ProcessHandle process)
-+    : process_(process),
-+      last_system_time_(0),
-+      last_cpu_(0) {
-+  processor_count_ = base::SysInfo::NumberOfProcessors();
-+}
-+
-+// static
-+std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
-+    ProcessHandle process) {
-+  return WrapUnique(new ProcessMetrics(process));
-+}
-+
-+size_t ProcessMetrics::GetPagefileUsage() const {
-+  struct kinfo_proc2 info;
-+  int mib[6];
-+  size_t info_size = sizeof(info);
-+  int ret;
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_PROC2;
-+  mib[2] = KERN_PROC_PID;
-+  mib[3] = process_;
-+  mib[4] = info_size;
-+  mib[5] = 1;
-+
-+  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
-+  if (ret == -1) {
-+    return 0;
-+  }
-+
-+  if (info_size == 0) {
-+    return 0;
-+  }
-+
-+  return (info.p_vm_tsize + info.p_vm_dsize + info.p_vm_ssize);
-+}
-+
-+size_t ProcessMetrics::GetPeakPagefileUsage() const {
-+  printf("%s\n", __PRETTY_FUNCTION__);
-+  return 0;
-+}
-+
-+size_t ProcessMetrics::GetWorkingSetSize() const {
-+  struct kinfo_proc2 info;
-+  int mib[6];
-+  size_t info_size = sizeof(info);
-+  int ret;
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_PROC2;
-+  mib[2] = KERN_PROC_PID;
-+  mib[3] = process_;
-+  mib[4] = info_size;
-+  mib[5] = 1;
-+
-+  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
-+  if (ret == -1) {
-+    return 0;
-+  }
-+
-+  if (info_size == 0) {
-+    return 0;
-+  }
-+
-+  return info.p_vm_rssize * getpagesize();
-+}
-+
-+size_t ProcessMetrics::GetPeakWorkingSetSize() const {
-+  return 0;
-+}
-+
-+bool ProcessMetrics::GetMemoryBytes(size_t* private_bytes,
-+                                    size_t* shared_bytes) {
-+  WorkingSetKBytes ws_usage;
-+  if (!GetWorkingSetKBytes(&ws_usage))
-+    return false;
-+
-+  if (private_bytes)
-+    *private_bytes = ws_usage.priv << 10;
-+
-+  if (shared_bytes)
-+    *shared_bytes = ws_usage.shared * 1024;
-+
-+  return true;
-+}
-+
-+bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {
-+// TODO(bapt) be sure we can't be precise
-+  size_t priv = GetWorkingSetSize();
-+  if (!priv)
-+    return false;
-+  ws_usage->priv = priv / 1024;
-+  ws_usage->shareable = 0;
-+  ws_usage->shared = 0;
-+
-+  return true;
-+}
-+
-+double ProcessMetrics::GetCPUUsage() {
-+  struct kinfo_proc2 info;
-+  int mib[6];
-+  size_t info_size = sizeof(info);
-+  int ret;
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_PROC2;
-+  mib[2] = KERN_PROC_PID;
-+  mib[3] = process_;
-+  mib[4] = info_size;
-+  mib[5] = 1;
-+
-+  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
-+  if (ret == -1) {
-+    return 0;
-+  }
-+
-+  if (info_size == 0) {
-+    return 0;
-+  }
-+
-+  return (info.p_pctcpu / FSCALE) * 100.0;
-+}
-+
-+bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
-+/* ryoon: should be written */
-+  return false;
-+}
-+
-+size_t GetSystemCommitCharge() {
-+  int mib[2], pagesize;
-+  struct vmtotal vmtotal;
-+  unsigned long mem_total, mem_free, mem_inactive;
-+  size_t len = sizeof(vmtotal);
-+  int ret;
-+
-+  printf("%s\n", __PRETTY_FUNCTION__);
-+
-+  mib[0] = CTL_VM;
-+  mib[1] = VM_METER;
-+
-+  ret = sysctl(mib, 2, &vmtotal, &len, NULL, 0);
-+  if (ret == -1) {
-+    return 0;
-+  }
-+
-+  mem_total = vmtotal.t_vm;
-+  mem_free = vmtotal.t_free;
-+  mem_inactive = vmtotal.t_vm - vmtotal.t_avm;
-+
-+  pagesize = getpagesize();
-+
-+  return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
-+}
-+
-+int GetNumberOfThreads(ProcessHandle process) {
-+  int ret;
-+  int mib[6];
-+  struct kinfo_proc2 info;
-+  size_t info_size = sizeof(info);
-+
-+  mib[0] = CTL_KERN;
-+  mib[1] = KERN_PROC2;
-+  mib[2] = KERN_PROC_PID;
-+  mib[3] = process;
-+  mib[4] = info_size;
-+  mib[5] = 1;
-+
-+  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
-+  if (ret == -1) {
-+    return 0;
-+  }
-+
-+  if (info_size == 0) {
-+    return 0;
-+  }
-+
-+  return info.p_nlwps;
-+}
-+
-+}  // namespace base
diff --git a/chromium-new/patches/patch-base_process_process__posix.cc b/chromium-new/patches/patch-base_process_process__posix.cc
deleted file mode 100644
index 4df01352bd..0000000000
--- a/chromium-new/patches/patch-base_process_process__posix.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-$NetBSD$
-
---- base/process/process_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/process/process_posix.cc
-@@ -21,8 +21,18 @@
- #include <sys/event.h>
- #endif
- 
-+#if defined(OS_BSD)
-+#include <signal.h>
-+#include <sys/types.h>
-+#include <sys/event.h>
-+#include <sys/time.h>
-+#endif
-+
- namespace {
- 
-+const int kBackgroundPriority = 5;
-+const int kForegroundPriority = 0;
-+
- #if !defined(OS_NACL_NONSFI)
- 
- bool WaitpidWithTimeout(base::ProcessHandle handle,
-@@ -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_FREEBSD)
-     // On Mac we can wait on non child processes.
--    return WaitForSingleNonChildProcess(handle, timeout);
-+    /* return WaitForSingleNonChildProcess(handle, timeout); */
- #else
-     // Currently on Linux we can't handle non child processes.
-     NOTIMPLEMENTED();
--#endif  // OS_MACOSX
-+#endif  // OS_MACOSX || OS_FREEBSD
-   }
- 
-   int status;
-@@ -257,12 +267,16 @@ Process Process::DeprecatedGetProcessFro
-   return Process(handle);
- }
- 
--#if !defined(OS_LINUX) && !defined(OS_MACOSX)
-+#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD)
- // static
- bool Process::CanBackgroundProcesses() {
-   return false;
- }
--#endif  // !defined(OS_LINUX) && !defined(OS_MACOSX)
-+#elif defined(OS_FREEBSD)
-+bool Process::CanBackgroundProcesses() {
-+  return true;
-+}
-+#endif  // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD)
- 
- bool Process::IsValid() const {
-   return process_ != kNullProcessHandle;
-@@ -365,15 +379,32 @@ bool Process::WaitForExitWithTimeout(Tim
- bool Process::IsProcessBackgrounded() const {
-   // See SetProcessBackgrounded().
-   DCHECK(IsValid());
-+#if defined(OS_FREEBSD)
-+  return true;
-+#else
-   return false;
-+#endif
- }
- 
- bool Process::SetProcessBackgrounded(bool value) {
-+#if !defined(OS_FREEBSD)
-   // Not implemented for POSIX systems other than Linux and Mac. With POSIX, if
-   // we were to lower the process priority we wouldn't be able to raise it back
-   // to its initial priority.
-   NOTIMPLEMENTED();
-   return false;
-+#else
-+  DCHECK(IsValid());
-+
-+  if (!CanBackgroundProcesses())
-+    return false;
-+
-+  int priority = value ? kBackgroundPriority : kForegroundPriority;
-+  int result   = setpriority(PRIO_PROCESS, process_, priority);
-+
-+  DPCHECK(result == 0);
-+  return result == 0;
-+#endif // !defined(OS_FREEBSD)
- }
- #endif  // !defined(OS_LINUX) && !defined(OS_MACOSX)
- 
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
deleted file mode 100644
index c927332ebf..0000000000
--- a/chromium-new/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/profiler/stack_sampling_profiler_unittest.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/profiler/stack_sampling_profiler_unittest.cc
-@@ -31,7 +31,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
deleted file mode 100644
index dc620b46aa..0000000000
--- a/chromium-new/patches/patch-base_security__unittest.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/security_unittest.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/security_unittest.cc
-@@ -74,7 +74,7 @@ bool IsTcMallocBypassed() {
- // FAILS_ is too clunky.
- void OverflowTestsSoftExpectTrue(bool overflow_detected) {
-   if (!overflow_detected) {
--#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_NACL)
-     // Sadly, on Linux, Android, and OSX we don't have a good story yet. Don't
-     // fail the test, but report.
-     printf("Platform has overflow: %s\n",
diff --git a/chromium-new/patches/patch-base_sys__info__freebsd.cc b/chromium-new/patches/patch-base_sys__info__freebsd.cc
deleted file mode 100644
index dbb9c8fc7b..0000000000
--- a/chromium-new/patches/patch-base_sys__info__freebsd.cc
+++ /dev/null
@@ -1,74 +0,0 @@
-$NetBSD$
-
---- base/sys_info_freebsd.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/sys_info_freebsd.cc
-@@ -12,12 +12,34 @@
- 
- namespace base {
- 
-+int64_t SysInfo::AmountOfAvailablePhysicalMemory() {
-+  int page_size, r = 0;
-+  unsigned pgfree, pginact, pgcache;
-+  size_t size = sizeof(page_size);
-+  size_t szpg = sizeof(pgfree);
-+  if(r == 0)
-+    r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
-+  if(r == 0)
-+    r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0);
-+  if(r == 0)
-+    r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0);
-+  if(r == 0)
-+    r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0);
-+  if (r == -1) {
-+    NOTREACHED();
-+    return 0;
-+  }
-+  return static_cast<int64_t>((pgfree + pginact + pgcache) * page_size);
-+}
-+
- int64_t SysInfo::AmountOfPhysicalMemory() {
--  int pages, page_size;
-+  int pages, page_size, r = 0;
-   size_t size = sizeof(pages);
--  sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);
--  sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
--  if (pages == -1 || page_size == -1) {
-+  if(r == 0)
-+    r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);
-+  if(r == 0)
-+    r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
-+  if (r == -1) {
-     NOTREACHED();
-     return 0;
-   }
-@@ -25,14 +47,24 @@ int64_t SysInfo::AmountOfPhysicalMemory(
- }
- 
- // 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];
-+  size_t size = arraysize(name);
-+  if (sysctl(mib, arraysize(mib), &name, &size, NULL, 0) == 0)
-+    return name;
-+  return std::string();
-+}
-+
-+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) == -1) {
-     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
deleted file mode 100644
index 4d30cd6993..0000000000
--- a/chromium-new/patches/patch-base_sys__info__netbsd.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-$NetBSD$
-
---- base/sys_info_netbsd.cc.orig	2016-11-12 07:18:17.632595486 +0000
-+++ base/sys_info_netbsd.cc
-@@ -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.
-+
-+#include "base/sys_info.h"
-+
-+#include <stddef.h>
-+#include <stdint.h>
-+#include <sys/param.h>
-+#include <sys/shm.h>
-+#include <sys/sysctl.h>
-+
-+#include "base/logging.h"
-+#include "base/macros.h"
-+
-+namespace {
-+
-+int64_t AmountOfMemory(int pages_name) {
-+  long pages = sysconf(pages_name);
-+  long page_size = sysconf(_SC_PAGESIZE);
-+  if (pages == -1 || page_size == -1) {
-+    NOTREACHED();
-+    return 0;
-+  }
-+  return static_cast<int64_t>(pages) * page_size;
-+}
-+
-+}  // namespace
-+
-+namespace base {
-+
-+int64_t SysInfo::AmountOfPhysicalMemory() {
-+  return AmountOfMemory(_SC_PHYS_PAGES);
-+}
-+
-+// static
-+int64_t SysInfo::AmountOfAvailablePhysicalMemory() {
-+  int ret;
-+  int mib[2];
-+  int64_t memsize;
-+  unsigned long size = sizeof(memsize);
-+
-+  mib[0] = CTL_HW;
-+  mib[1] = HW_PHYSMEM64;
-+
-+  ret = sysctl(mib, 2, &memsize, &size, NULL, 0);
-+  if (ret == -1) {
-+    return 0;
-+  }
-+
-+  return memsize;
-+}
-+
-+// static
-+std::string SysInfo::CPUModelName() {
-+  int mib[] = { CTL_HW, HW_MODEL };
-+  char name[256];
-+  size_t len = arraysize(name);
-+  if (sysctl(mib, arraysize(mib), name, &len, NULL, 0) < 0) {
-+    NOTREACHED();
-+    return std::string();
-+  }
-+  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
deleted file mode 100644
index 08b7902bad..0000000000
--- a/chromium-new/patches/patch-base_sys__info__posix.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- base/sys_info_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/sys_info_posix.cc
-@@ -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_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
deleted file mode 100644
index a66376d19b..0000000000
--- a/chromium-new/patches/patch-base_test_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/test/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/test/BUILD.gn
-@@ -303,7 +303,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
deleted file mode 100644
index 1f4993adc8..0000000000
--- a/chromium-new/patches/patch-base_test_launcher_test__launcher.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- base/test/launcher/test_launcher.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/test/launcher/test_launcher.cc
-@@ -59,6 +59,10 @@
- #include "base/win/windows_version.h"
- #endif
- 
-+#if defined(OS_FREEBSD)
-+#include <signal.h>
-+#endif
-+
- namespace base {
- 
- // See https://groups.google.com/a/chromium.org/d/msg/chromium-dev/nkdTP7sstSc/uT3FaE_sgkAJ .
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
deleted file mode 100644
index 3bc8f71820..0000000000
--- a/chromium-new/patches/patch-base_test_test__file__util__posix.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/test/test_file_util_posix.cc.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index 68cd0d1fbe..0000000000
--- a/chromium-new/patches/patch-base_third__party_libevent_BUILD.gn
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- base/third_party/libevent/BUILD.gn.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index e2dccf0835..0000000000
--- a/chromium-new/patches/patch-base_third__party_libevent_event-config.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$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
deleted file mode 100644
index 26de331d39..0000000000
--- a/chromium-new/patches/patch-base_third__party_libevent_netbsd_config.h
+++ /dev/null
@@ -1,271 +0,0 @@
-$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
deleted file mode 100644
index d0882dbcf6..0000000000
--- a/chromium-new/patches/patch-base_third__party_libevent_netbsd_event-config.h
+++ /dev/null
@@ -1,289 +0,0 @@
-$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.h b/chromium-new/patches/patch-base_threading_platform__thread.h
deleted file mode 100644
index 02180f7b48..0000000000
--- a/chromium-new/patches/patch-base_threading_platform__thread.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/threading/platform_thread.h.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/threading/platform_thread.h
-@@ -205,7 +205,7 @@ class BASE_EXPORT PlatformThread {
- 
-   static ThreadPriority GetCurrentThreadPriority();
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   // Toggles a specific thread's priority at runtime. This can be used to
-   // change the priority of a thread in a different process and will fail
-   // if the calling process does not have proper permissions. The
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 a3756c880e..0000000000
--- a/chromium-new/patches/patch-base_threading_platform__thread__linux.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD$
-
---- base/threading/platform_thread_linux.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/threading/platform_thread_linux.cc
-@@ -19,7 +19,9 @@
- 
- #if !defined(OS_NACL)
- #include <pthread.h>
-+#if !defined(OS_BSD)
- #include <sys/prctl.h>
-+#endif
- #include <sys/resource.h>
- #include <sys/time.h>
- #include <sys/types.h>
-@@ -130,7 +132,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
-@@ -150,7 +152,7 @@ void PlatformThread::SetName(const std::
- #endif  //  !defined(OS_NACL)
- }
- 
--#if !defined(OS_NACL)
-+#if !defined(OS_NACL) && !defined(OS_BSD)
- // static
- void PlatformThread::SetThreadPriority(PlatformThreadId thread_id,
-                                        ThreadPriority priority) {
diff --git a/chromium-new/patches/patch-base_threading_platform__thread__netbsd.cc b/chromium-new/patches/patch-base_threading_platform__thread__netbsd.cc
deleted file mode 100644
index 0e5cb111a4..0000000000
--- a/chromium-new/patches/patch-base_threading_platform__thread__netbsd.cc
+++ /dev/null
@@ -1,102 +0,0 @@
-$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
deleted file mode 100644
index 61c65bbe19..0000000000
--- a/chromium-new/patches/patch-base_threading_platform__thread__posix.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/threading/platform_thread_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/threading/platform_thread_posix.cc
-@@ -56,7 +56,7 @@ void* ThreadFunc(void* params) {
-     if (!thread_params->joinable)
-       base::ThreadRestrictions::SetSingletonAllowed(false);
- 
--#if !defined(OS_NACL)
-+#if !defined(OS_NACL) && !defined(OS_BSD)
-     // Threads on linux/android may inherit their priority from the thread
-     // where they were created. This explicitly sets the priority of all new
-     // threads.
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
deleted file mode 100644
index 7c6e062a4d..0000000000
--- a/chromium-new/patches/patch-base_trace__event_malloc__dump__provider.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/trace_event/malloc_dump_provider.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/trace_event/malloc_dump_provider.cc
-@@ -21,7 +21,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
deleted file mode 100644
index ffaa0feb1f..0000000000
--- a/chromium-new/patches/patch-base_trace__event_process__memory__dump.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/trace_event/process_memory_dump.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/trace_event/process_memory_dump.cc
-@@ -83,7 +83,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);
--#if defined(OS_MACOSX) || defined(OS_IOS)
-+#if defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_BSD)
-   std::unique_ptr<char[]> vec(new char[max_vec_size]);
- #elif defined(OS_WIN)
-   std::unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
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
deleted file mode 100644
index fbeb7af248..0000000000
--- a/chromium-new/patches/patch-base_trace__event_process__memory__dump.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- base/trace_event/process_memory_dump.h.orig	2017-02-02 02:02:47.000000000 +0000
-+++ base/trace_event/process_memory_dump.h
-@@ -24,7 +24,7 @@
- 
- // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the
- // resident memory.
--#if (defined(OS_POSIX) && !defined(OS_NACL)) || defined(OS_WIN)
-+#if (defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_BSD)) || defined(OS_WIN)
- #define COUNT_RESIDENT_BYTES_SUPPORTED
- #endif
- 
diff --git a/chromium-new/patches/patch-breakpad_BUILD.gn b/chromium-new/patches/patch-breakpad_BUILD.gn
deleted file mode 100644
index ff2c8d6086..0000000000
--- a/chromium-new/patches/patch-breakpad_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- breakpad/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
-+++ breakpad/BUILD.gn
-@@ -468,7 +468,7 @@ if (is_mac) {
-   }
- }
- 
--if (is_linux || is_android) {
-+if (is_linux || is_bsd || is_android) {
-   if (current_toolchain == host_toolchain) {
-     executable("symupload") {
-       sources = [
diff --git a/chromium-new/patches/patch-build_config_BUILD.gn b/chromium-new/patches/patch-build_config_BUILD.gn
deleted file mode 100644
index 7560cac93c..0000000000
--- a/chromium-new/patches/patch-build_config_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- build/config/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
-+++ build/config/BUILD.gn
-@@ -224,7 +224,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?
-@@ -338,7 +338,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
deleted file mode 100644
index 5477c57ca1..0000000000
--- a/chromium-new/patches/patch-build_config_BUILDCONFIG.gn
+++ /dev/null
@@ -1,146 +0,0 @@
-$NetBSD$
-
---- build/config/BUILDCONFIG.gn.orig	2017-02-02 02:02:47.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: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
deleted file mode 100644
index 2669e67f80..0000000000
--- a/chromium-new/patches/patch-build_config_allocator.gni
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- build/config/allocator.gni.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index d7056a4c4b..0000000000
--- a/chromium-new/patches/patch-build_config_clang_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- build/config/clang/BUILD.gn.orig	2017-02-02 02:02:47.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",
-@@ -37,7 +37,7 @@ config("find_bad_constructs") {
-       "find-bad-constructs",
-     ]
- 
--    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
deleted file mode 100644
index 6230206a05..0000000000
--- a/chromium-new/patches/patch-build_config_compiler_BUILD.gn
+++ /dev/null
@@ -1,102 +0,0 @@
-$NetBSD$
-
---- build/config/compiler/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
-+++ build/config/compiler/BUILD.gn
-@@ -150,7 +150,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" ]
-@@ -277,7 +277,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.
-@@ -401,14 +401,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,
-@@ -458,7 +458,7 @@ config("compiler") {
-       ]
- 
-       # 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 {
-@@ -478,7 +478,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" ]
-     }
-   }
-@@ -742,7 +742,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",
-@@ -788,7 +788,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" ]
-@@ -1038,7 +1038,7 @@ config("default_warnings") {
-         "-Wno-nonportable-include-path",
- 
-         # TODO(hans): https://crbug.com/637306
--        "-Wno-address-of-packed-member",
-+        # "-Wno-address-of-packed-member",
-       ]
-     }
-   }
-@@ -1070,7 +1070,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
-@@ -1128,7 +1128,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
deleted file mode 100644
index c48b169e59..0000000000
--- a/chromium-new/patches/patch-build_config_crypto.gni
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD$
-
---- build/config/crypto.gni.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index c5859dc72d..0000000000
--- a/chromium-new/patches/patch-build_config_features.gni
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- build/config/features.gni.orig	2017-02-02 02:02:47.000000000 +0000
-+++ build/config/features.gni
-@@ -67,13 +67,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
- 
-   # Whether or not to use external popup menu.
-   use_external_popup_menu = is_android || is_mac
diff --git a/chromium-new/patches/patch-build_config_linux_gtk2_BUILD.gn b/chromium-new/patches/patch-build_config_linux_gtk2_BUILD.gn
deleted file mode 100644
index 4b61c919f9..0000000000
--- a/chromium-new/patches/patch-build_config_linux_gtk2_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- build/config/linux/gtk2/BUILD.gn.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index a7f4642a2c..0000000000
--- a/chromium-new/patches/patch-build_config_linux_gtk3_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- build/config/linux/gtk3/BUILD.gn.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index 5ccb1ec358..0000000000
--- a/chromium-new/patches/patch-build_config_linux_pkg-config.py
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
---- build/config/linux/pkg-config.py.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index 4aa5553118..0000000000
--- a/chromium-new/patches/patch-build_config_sanitizers_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- build/config/sanitizers/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
-+++ build/config/sanitizers/BUILD.gn
-@@ -405,7 +405,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 = [
-@@ -418,7 +418,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
deleted file mode 100644
index d28410f5eb..0000000000
--- a/chromium-new/patches/patch-build_config_sanitizers_sanitizers.gni
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- build/config/sanitizers/sanitizers.gni.orig	2017-02-02 02:02:47.000000000 +0000
-+++ build/config/sanitizers/sanitizers.gni
-@@ -54,8 +54,9 @@ 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 && allow_posix_link_time_opt
-+  is_cfi = (target_os == "linux" || target_os == "bsd") && !is_chromeos &&
-+           target_cpu == "x64" && is_chrome_branded && is_official_build &&
-+           allow_posix_link_time_opt
- 
-   # 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
deleted file mode 100644
index 3bfc0b95f9..0000000000
--- a/chromium-new/patches/patch-build_config_ui.gni
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD$
-
---- build/config/ui.gni.orig	2017-02-02 02:02:47.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
-@@ -62,17 +62,17 @@ 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)
- 
- # 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_linux_libpci_BUILD.gn b/chromium-new/patches/patch-build_linux_libpci_BUILD.gn
deleted file mode 100644
index 9fa53da64b..0000000000
--- a/chromium-new/patches/patch-build_linux_libpci_BUILD.gn
+++ /dev/null
@@ -1,56 +0,0 @@
-$NetBSD$
-
---- build/linux/libpci/BUILD.gn.orig	2017-02-02 02:02:47.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_secondary_third__party_nss_BUILD.gn b/chromium-new/patches/patch-build_secondary_third__party_nss_BUILD.gn
deleted file mode 100644
index 89f1d15a7d..0000000000
--- a/chromium-new/patches/patch-build_secondary_third__party_nss_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- build/secondary/third_party/nss/BUILD.gn.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index 89a67cfdd3..0000000000
--- a/chromium-new/patches/patch-build_toolchain_gcc__toolchain.gni
+++ /dev/null
@@ -1,48 +0,0 @@
-$NetBSD$
-
---- build/toolchain/gcc_toolchain.gni.orig	2017-02-02 02:02:47.000000000 +0000
-+++ build/toolchain/gcc_toolchain.gni
-@@ -11,6 +11,11 @@ import("//build/toolchain/cc_wrapper.gni
- import("//build/toolchain/goma.gni")
- import("//build/toolchain/toolchain.gni")
- 
-+declare_args() {
-+  extra_cxxflags = ""
-+  extra_ldflags = ""
-+}
-+
- # This template defines a toolchain for something that works like gcc
- # (including clang).
- #
-@@ -482,14 +487,23 @@ 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 = "${toolprefix}clang39"
-+      cxx = "${toolprefix}clang++39"
-+      ld = cxx
-+      readelf = "readelf"
-+      ar = "${toolprefix}llvm-ar39"
-+      nm = "${toolprefix}llvm-nm39"
-+    } 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
deleted file mode 100644
index 43587c5016..0000000000
--- a/chromium-new/patches/patch-build_toolchain_get__concurrent__links.py
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- build/toolchain/get_concurrent_links.py.orig	2017-02-02 02:02:47.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
deleted file mode 100644
index 618b97d09e..0000000000
--- a/chromium-new/patches/patch-cc_layers_scrollbar__layer__impl__base.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- cc/layers/scrollbar_layer_impl_base.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ cc/layers/scrollbar_layer_impl_base.cc
-@@ -174,8 +174,8 @@ gfx::Rect ScrollbarLayerImplBase::Comput
-   int thumb_offset = TrackStart();
-   if (maximum > 0) {
-     float ratio = clamped_current_pos / maximum;
--    float max_offset = track_length - thumb_length;
--    thumb_offset += static_cast<int>(ratio * max_offset);
-+    float _max_offset = track_length - thumb_length;
-+    thumb_offset += static_cast<int>(ratio * _max_offset);
-   }
- 
-   float thumb_thickness_adjustment =
diff --git a/chromium-new/patches/patch-cc_trees_property__tree.cc b/chromium-new/patches/patch-cc_trees_property__tree.cc
deleted file mode 100644
index 804bfb1486..0000000000
--- a/chromium-new/patches/patch-cc_trees_property__tree.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- cc/trees/property_tree.cc.orig	2017-02-02 02:02:47.000000000 +0000
-+++ cc/trees/property_tree.cc
-@@ -1113,13 +1113,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollO
- 
-   gfx::Size clip_layer_bounds = scroll_clip_layer_bounds(scroll_node->id);
- 
--  gfx::ScrollOffset max_offset(
-+  gfx::ScrollOffset _max_offset(
-       scaled_scroll_bounds.width() - clip_layer_bounds.width(),
-       scaled_scroll_bounds.height() - clip_layer_bounds.height());
- 
--  max_offset.Scale(1 / scale_factor);
--  max_offset.SetToMax(gfx::ScrollOffset());
--  return max_offset;
-+  _max_offset.Scale(1 / scale_factor);
-+  _max_offset.SetToMax(gfx::ScrollOffset());
-+  return _max_offset;
- }
- 
- void ScrollTree::OnScrollOffsetAnimated(int layer_id,
diff --git a/chromium-new/patches/patch-chrome_BUILD.gn b/chromium-new/patches/patch-chrome_BUILD.gn
deleted file mode 100644
index 5a85782baa..0000000000
--- a/chromium-new/patches/patch-chrome_BUILD.gn
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- chrome/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
-+++ chrome/BUILD.gn
-@@ -132,7 +132,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",
-@@ -212,7 +212,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",
-@@ -1539,7 +1539,7 @@ if (enable_resource_whitelist_generation
-   }
- }
- 
--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
deleted file mode 100644
index 0484b364c4..0000000000
--- a/chromium-new/patches/patch-chrome_app_chrome__command__ids.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/app/chrome_command_ids.h.orig	2017-02-02 02:02:48.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
deleted file mode 100644
index 32fdce159b..0000000000
--- a/chromium-new/patches/patch-chrome_app_chrome__main__delegate.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-$NetBSD$
-
---- chrome/app/chrome_main_delegate.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/app/chrome_main_delegate.cc
-@@ -117,7 +117,7 @@
- #include "ui/base/x/x11_util.h"  // nogncheck
- #endif
- 
--#if defined(OS_POSIX) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
- #include "components/crash/content/app/breakpad_linux.h"
- #endif
- 
-@@ -560,7 +560,7 @@ bool ChromeMainDelegate::BasicStartupCom
-       std::string format_str =
-           command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
-       if (format_str == "machine") {
--        format = diagnostics::DiagnosticsWriter::MACHINE;
-+        format = diagnostics::DiagnosticsWriter::THEMACHINE;
-       } else if (format_str == "log") {
-         format = diagnostics::DiagnosticsWriter::LOG;
-       } else {
-@@ -610,7 +610,7 @@ bool ChromeMainDelegate::BasicStartupCom
-       std::string format_str =
-           command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
-       if (format_str == "machine") {
--        format = diagnostics::DiagnosticsWriter::MACHINE;
-+        format = diagnostics::DiagnosticsWriter::THEMACHINE;
-       } else if (format_str == "human") {
-         format = diagnostics::DiagnosticsWriter::HUMAN;
-       } else {
-@@ -722,7 +722,7 @@ void ChromeMainDelegate::PreSandboxStart
-   std::string process_type =
-       command_line.GetSwitchValueASCII(switches::kProcessType);
- 
--#if defined(OS_POSIX)
-+#if defined(OS_POSIX) && !defined(OS_BSD)
-   crash_reporter::SetCrashReporterClient(g_chrome_crash_client.Pointer());
- #endif
- 
-@@ -852,7 +852,7 @@ void ChromeMainDelegate::PreSandboxStart
-   chrome::InitializePDF();
- #endif
- 
--#if defined(OS_POSIX) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
-   // Zygote needs to call InitCrashReporter() in RunZygote().
-   if (process_type != switches::kZygoteProcess) {
- #if defined(OS_ANDROID)
-@@ -870,7 +870,7 @@ void ChromeMainDelegate::PreSandboxStart
-     breakpad::InitCrashReporter(process_type);
- #endif  // defined(OS_ANDROID)
-   }
--#endif  // defined(OS_POSIX) && !defined(OS_MACOSX)
-+#endif  // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
- 
-   // After all the platform Breakpads have been initialized, store the command
-   // line for crash reporting.
-@@ -980,7 +980,7 @@ bool ChromeMainDelegate::DelaySandboxIni
- #endif
-   return process_type == switches::kRelauncherProcess;
- }
--#elif defined(OS_POSIX) && !defined(OS_ANDROID)
-+#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- void ChromeMainDelegate::ZygoteStarting(
-     ScopedVector<content::ZygoteForkDelegate>* delegates) {
- #if defined(OS_CHROMEOS)
diff --git a/chromium-new/patches/patch-chrome_app_chrome__main__delegate.h b/chromium-new/patches/patch-chrome_app_chrome__main__delegate.h
deleted file mode 100644
index 51ed81d31f..0000000000
--- a/chromium-new/patches/patch-chrome_app_chrome__main__delegate.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/app/chrome_main_delegate.h.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/app/chrome_main_delegate.h
-@@ -44,7 +44,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;
--#elif defined(OS_POSIX) && !defined(OS_ANDROID)
-+#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-   void ZygoteStarting(
-       ScopedVector<content::ZygoteForkDelegate>* delegates) override;
-   void ZygoteForked() override;
diff --git a/chromium-new/patches/patch-chrome_app_chromium__strings.grd b/chromium-new/patches/patch-chrome_app_chromium__strings.grd
deleted file mode 100644
index 697e86691c..0000000000
--- a/chromium-new/patches/patch-chrome_app_chromium__strings.grd
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/app/chromium_strings.grd.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/app/chromium_strings.grd
-@@ -939,7 +939,7 @@ Signing in anyway will merge Chromium in
-       </message>
- 
-       <!-- ProcessSingleton -->
--      <if expr="is_linux or is_macosx">
-+      <if expr="is_linux or is_macosx or is_bsd">
-         <message name="IDS_PROFILE_IN_USE_POSIX" desc="Message shown when the browser cannot start because the profile is in use on a different host.">
-           The profile appears to be in use by another Chromium process (<ph name="PROCESS_ID">$1<ex>12345</ex></ph>) on another computer (<ph name="HOST_NAME">$2<ex>example.com</ex></ph>). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium.
-         </message>
diff --git a/chromium-new/patches/patch-chrome_app_generated__resources.grd b/chromium-new/patches/patch-chrome_app_generated__resources.grd
deleted file mode 100644
index a3dc21393d..0000000000
--- a/chromium-new/patches/patch-chrome_app_generated__resources.grd
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- chrome/app/generated_resources.grd.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/app/generated_resources.grd
-@@ -6939,7 +6939,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_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>
-@@ -10334,7 +10334,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>
--      <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>
-@@ -10342,7 +10342,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>
-@@ -11663,7 +11663,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>
diff --git a/chromium-new/patches/patch-chrome_app_resources_locale__settings.grd b/chromium-new/patches/patch-chrome_app_resources_locale__settings.grd
deleted file mode 100644
index 9979592daa..0000000000
--- a/chromium-new/patches/patch-chrome_app_resources_locale__settings.grd
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/app/resources/locale_settings.grd.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/app/resources/locale_settings.grd
-@@ -151,7 +151,7 @@
-         55
-       </message>
- 
--      <if expr="is_win or is_linux or chromeos">
-+      <if expr="is_win or is_linux or chromeos or is_bsd">
-         <!-- The width of the ash/ChromeOS system tray menu in pixels. -->
-         <message name="IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS" use_name_for_id="true">
-           300
diff --git a/chromium-new/patches/patch-chrome_browser_BUILD.gn b/chromium-new/patches/patch-chrome_browser_BUILD.gn
deleted file mode 100644
index 0b5157ef2a..0000000000
--- a/chromium-new/patches/patch-chrome_browser_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/BUILD.gn.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/BUILD.gn
-@@ -2142,7 +2142,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" ]
-   }
- 
-@@ -3507,7 +3507,7 @@ split_static_library("browser") {
-     }
-   }
- 
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     if (use_aura) {
-       deps += [ "//build/linux:fontconfig" ]
-       if (use_dbus) {
diff --git a/chromium-new/patches/patch-chrome_browser_about__flags.cc b/chromium-new/patches/patch-chrome_browser_about__flags.cc
deleted file mode 100644
index 75c63d8844..0000000000
--- a/chromium-new/patches/patch-chrome_browser_about__flags.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/about_flags.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/about_flags.cc
-@@ -776,7 +776,7 @@ const FeatureEntry kFeatureEntries[] = {
-      kOsLinux | kOsCrOS | kOsWin | kOsAndroid,
-      ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSmoothScrolling,
-                                switches::kDisableSmoothScrolling)},
--#if defined(USE_AURA) || defined(OS_LINUX)
-+#if defined(USE_AURA) || defined(OS_LINUX) || defined(OS_BSD)
-     {"overlay-scrollbars", IDS_FLAGS_OVERLAY_SCROLLBARS_NAME,
-      IDS_FLAGS_OVERLAY_SCROLLBARS_DESCRIPTION,
-      // Uses the system preference on Mac (a different implementation).
-@@ -1769,7 +1769,7 @@ const FeatureEntry kFeatureEntries[] = {
-      IDS_FLAGS_ENABLE_MATERIAL_DESIGN_EXTENSIONS_DESCRIPTION, kOsDesktop,
-      FEATURE_VALUE_TYPE(features::kMaterialDesignExtensions)},
- #endif  // ENABLE_EXTENSIONS
--#if defined(OS_WIN) || defined(OS_LINUX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
-     {"enable-input-ime-api", IDS_FLAGS_ENABLE_INPUT_IME_API_NAME,
-      IDS_FLAGS_ENABLE_INPUT_IME_API_DESCRIPTION, kOsWin | kOsLinux,
-      ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInputImeAPI,
diff --git a/chromium-new/patches/patch-chrome_browser_browser__process__impl.cc b/chromium-new/patches/patch-chrome_browser_browser__process__impl.cc
deleted file mode 100644
index 6a134fee4a..0000000000
--- a/chromium-new/patches/patch-chrome_browser_browser__process__impl.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/browser_process_impl.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/browser_process_impl.cc
-@@ -165,7 +165,7 @@
- #include "chrome/browser/media/webrtc/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
- 
-@@ -771,7 +771,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
deleted file mode 100644
index 8fc499900f..0000000000
--- a/chromium-new/patches/patch-chrome_browser_browser__process__impl.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/browser_process_impl.h.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/browser_process_impl.h
-@@ -340,7 +340,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
deleted file mode 100644
index 6a269a67a7..0000000000
--- a/chromium-new/patches/patch-chrome_browser_browser__resources.grd
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/browser_resources.grd.orig	2016-11-10 20:02:10.000000000 +0000
-+++ chrome/browser/browser_resources.grd
-@@ -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>
--      <if expr="desktop_linux or (is_android and enable_plugins)">
-+      <if expr="desktop_linux or (is_android and enable_plugins) or is_posix">
-         <include name="IDR_PLUGIN_DB_JSON" file="resources\plugin_metadata\plugins_linux.json" type="BINDATA" />
-       </if>
-       <if expr="is_android">
diff --git a/chromium-new/patches/patch-chrome_browser_chrome__browser__main.cc b/chromium-new/patches/patch-chrome_browser_chrome__browser__main.cc
deleted file mode 100644
index 747b1b7ce8..0000000000
--- a/chromium-new/patches/patch-chrome_browser_chrome__browser__main.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
---- chrome/browser/chrome_browser_main.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/chrome_browser_main.cc
-@@ -181,7 +181,7 @@
- #include "chrome/browser/feedback/feedback_profile_observer.h"
- #endif  // defined(OS_ANDROID)
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
- #include "chrome/browser/first_run/upgrade_util_linux.h"
- #endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
- 
-@@ -1194,11 +1194,11 @@ int ChromeBrowserMainParts::PreCreateThr
-   }
- #endif  // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
- 
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   // Set the product channel for crash reports.
-   base::debug::SetCrashKeyValue(crash_keys::kChannel,
-                                 chrome::GetChannelString());
--#endif  // defined(OS_LINUX) || defined(OS_OPENBSD)
-+#endif  // defined(OS_LINUX) || defined(OS_BSD)
- 
-   // Initialize tracking synchronizer system.
-   tracking_synchronizer_ = new metrics::TrackingSynchronizer(
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
deleted file mode 100644
index f6691fdf05..0000000000
--- a/chromium-new/patches/patch-chrome_browser_chrome__browser__main__linux.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD$
-
---- chrome/browser/chrome_browser_main_linux.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/chrome_browser_main_linux.cc
-@@ -75,12 +75,14 @@ void ChromeBrowserMainPartsLinux::PrePro
- void ChromeBrowserMainPartsLinux::PostProfileInit() {
-   ChromeBrowserMainPartsPosix::PostProfileInit();
- 
-+#if !defined(OS_BSD)
-   g_browser_process->metrics_service()->RecordBreakpadRegistration(
-       breakpad::IsCrashReporterEnabled());
-+#endif
- }
- 
- void ChromeBrowserMainPartsLinux::PostMainMessageLoopStart() {
--#if !defined(OS_CHROMEOS)
-+#if !defined(OS_CHROMEOS) && !defined(OS_BSD)
-   bluez::DBusThreadManagerLinux::Initialize();
-   bluez::BluezDBusManager::Initialize(
-       bluez::DBusThreadManagerLinux::Get()->GetSystemBus(), false);
-@@ -90,7 +92,7 @@ void ChromeBrowserMainPartsLinux::PostMa
- }
- 
- void ChromeBrowserMainPartsLinux::PostDestroyThreads() {
--#if !defined(OS_CHROMEOS)
-+#if !defined(OS_CHROMEOS) && !defined(OS_BSD)
-   bluez::BluezDBusManager::Shutdown();
-   bluez::DBusThreadManagerLinux::Shutdown();
- #endif
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
deleted file mode 100644
index 806847e62c..0000000000
--- a/chromium-new/patches/patch-chrome_browser_chrome__browser__main__posix.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- chrome/browser/chrome_browser_main_posix.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/chrome_browser_main_posix.cc
-@@ -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_BSD)
-+    // 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;
-+#else
- #if !defined(ADDRESS_SANITIZER) && !defined(KEEP_SHADOW_STACKS)
-     const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
- #else
-@@ -283,6 +288,7 @@ void ChromeBrowserMainPartsPosix::PostMa
-     // size to avoid hitting the guard page.
-     const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
- #endif
-+#endif // OS_FREEBSD
-     // TODO(viettrungluu,willchan): crbug.com/29675 - This currently leaks, so
-     // if you change this, you'll probably need to change the suppression.
-     if (!base::PlatformThread::CreateNonJoinable(
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
deleted file mode 100644
index b04903b472..0000000000
--- a/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-$NetBSD$
-
---- chrome/browser/chrome_content_browser_client.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/chrome_content_browser_client.cc
-@@ -224,7 +224,7 @@
- #include "chrome/browser/ui/browser_dialogs.h"
- #include "chromeos/chromeos_switches.h"
- #include "components/user_manager/user_manager.h"
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- #include "chrome/browser/chrome_browser_main_linux.h"
- #elif defined(OS_ANDROID)
- #include "chrome/browser/chrome_browser_main_android.h"
-@@ -236,7 +236,7 @@
- #include "chrome/browser/chrome_browser_main_posix.h"
- #endif
- 
--#if defined(OS_POSIX) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
- #include "base/debug/leak_annotations.h"
- #include "components/crash/content/app/breakpad_linux.h"
- #include "components/crash/content/browser/crash_handler_host_linux.h"
-@@ -261,7 +261,7 @@
- #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
- #endif
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
- #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
- #endif
- 
-@@ -555,7 +555,7 @@ bool CertMatchesFilter(const net::X509Ce
-   return false;
- }
- 
--#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost(
-     const std::string& process_type) {
-   base::FilePath dumps_path;
-@@ -883,7 +883,7 @@ content::BrowserMainParts* ChromeContent
-   main_parts = new ChromeBrowserMainPartsMac(parameters);
- #elif defined(OS_CHROMEOS)
-   main_parts = new chromeos::ChromeBrowserMainPartsChromeos(parameters);
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-   main_parts = new ChromeBrowserMainPartsLinux(parameters);
- #elif defined(OS_ANDROID)
-   main_parts = new ChromeBrowserMainPartsAndroid(parameters);
-@@ -899,7 +899,7 @@ content::BrowserMainParts* ChromeContent
-   // Construct additional browser parts. Stages are called in the order in
-   // which they are added.
- #if defined(TOOLKIT_VIEWS)
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
-+#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
-   main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux());
- #else
-   main_parts->AddParts(new ChromeBrowserMainExtraPartsViews());
-@@ -1531,7 +1531,7 @@ void ChromeContentBrowserClient::AppendE
-     command_line->AppendSwitchASCII(switches::kMetricsClientID,
-                                     client_info->client_id);
-   }
--#elif defined(OS_POSIX)
-+#elif defined(OS_POSIX) && !defined(OS_BSD)
-   if (breakpad::IsCrashReporterEnabled()) {
-     std::string switch_value;
-     std::unique_ptr<metrics::ClientInfo> client_info =
-@@ -2834,7 +2834,7 @@ void ChromeContentBrowserClient::GetAddi
-   PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path);
-   DCHECK(!app_data_path.empty());
- }
--#elif defined(OS_POSIX) && !defined(OS_MACOSX)
-+#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
- void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
-     const base::CommandLine& command_line,
-     int child_process_id,
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
deleted file mode 100644
index b45836dc13..0000000000
--- a/chromium-new/patches/patch-chrome_browser_chrome__content__browser__client.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/chrome_content_browser_client.h.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/chrome_content_browser_client.h
-@@ -271,7 +271,7 @@ class ChromeContentBrowserClient : publi
-       int child_process_id,
-       content::FileDescriptorInfo* mappings,
-       std::map<int, base::MemoryMappedFile::Region>* regions) override;
--#elif defined(OS_POSIX) && !defined(OS_MACOSX)
-+#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
-   void GetAdditionalMappedFilesForChildProcess(
-       const base::CommandLine& command_line,
-       int child_process_id,
diff --git a/chromium-new/patches/patch-chrome_browser_defaults.cc b/chromium-new/patches/patch-chrome_browser_defaults.cc
deleted file mode 100644
index 11c74d67c2..0000000000
--- a/chromium-new/patches/patch-chrome_browser_defaults.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/defaults.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/defaults.cc
-@@ -44,7 +44,7 @@ const bool kSyncAutoStarts = true;
- const bool kSyncAutoStarts = false;
- #endif
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- const bool kScrollEventChangesTab = true;
- #else
- const bool kScrollEventChangesTab = 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
deleted file mode 100644
index 30c765890d..0000000000
--- a/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/diagnostics/diagnostics_writer.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/diagnostics/diagnostics_writer.cc
-@@ -263,7 +263,7 @@ bool DiagnosticsWriter::WriteResult(bool
-       console_->SetColor(color);
-       console_->Write(base::ASCIIToUTF16(result));
-     }
--    if (format_ == MACHINE) {
-+    if (format_ == THEMACHINE) {
-       return WriteInfoLine(base::StringPrintf(
-           "%03d %s (%s)", outcome_code, id.c_str(), extra.c_str()));
-     } else {
diff --git a/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h b/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
deleted file mode 100644
index 88e47ea4d8..0000000000
--- a/chromium-new/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/diagnostics/diagnostics_writer.h.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/diagnostics/diagnostics_writer.h
-@@ -19,7 +19,7 @@ class DiagnosticsWriter : public Diagnos
-  public:
-   // The type of formatting done by this writer.
-   enum FormatType {
--    MACHINE,
-+    THEMACHINE,
-     LOG,
-     HUMAN
-   };
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
deleted file mode 100644
index 3ae0a0d004..0000000000
--- a/chromium-new/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/download/chrome_download_manager_delegate.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/download/chrome_download_manager_delegate.cc
-@@ -778,7 +778,7 @@ void ChromeDownloadManagerDelegate::OnDo
-         target_info->is_filetype_handled_safely)
-       DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
- 
--#if defined(OS_LINUX) || defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
-     if (item->GetOriginalMimeType() == "application/x-x509-user-cert")
-       DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
- #endif
-@@ -793,7 +793,7 @@ void ChromeDownloadManagerDelegate::OnDo
- 
- bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile(
-     const base::FilePath& path) {
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-   if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) {
-     return !download_prefs_->ShouldOpenPdfInSystemReader();
-   }
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__commands.cc b/chromium-new/patches/patch-chrome_browser_download_download__commands.cc
deleted file mode 100644
index 2c38357b14..0000000000
--- a/chromium-new/patches/patch-chrome_browser_download_download__commands.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- chrome/browser/download/download_commands.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/download/download_commands.cc
-@@ -217,7 +217,7 @@ bool DownloadCommands::IsCommandChecked(
-       return download_item_->GetOpenWhenComplete() ||
-              download_crx_util::IsExtensionDownload(*download_item_);
-     case ALWAYS_OPEN_TYPE:
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-       if (CanOpenPdfInSystemViewer()) {
-         DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(
-             download_item_->GetBrowserContext());
-@@ -261,7 +261,7 @@ void DownloadCommands::ExecuteCommand(Co
-       bool is_checked = IsCommandChecked(ALWAYS_OPEN_TYPE);
-       DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(
-           download_item_->GetBrowserContext());
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-       if (CanOpenPdfInSystemViewer()) {
-         prefs->SetShouldOpenPdfInSystemReader(!is_checked);
-         DownloadItemModel(download_item_)
-@@ -374,7 +374,7 @@ Browser* DownloadCommands::GetBrowser() 
-   return browser_displayer.browser();
- }
- 
--#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
- bool DownloadCommands::IsDownloadPdf() const {
-   base::FilePath path = download_item_->GetTargetFilePath();
-   return path.MatchesExtension(FILE_PATH_LITERAL(".pdf"));
-@@ -391,7 +391,7 @@ bool DownloadCommands::CanOpenPdfInSyste
-   return IsDownloadPdf() &&
-          (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date
-                                           : true);
--#elif defined(OS_MACOSX) || defined(OS_LINUX)
-+#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
-   return IsDownloadPdf();
- #endif
- }
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__commands.h b/chromium-new/patches/patch-chrome_browser_download_download__commands.h
deleted file mode 100644
index 7c4995d086..0000000000
--- a/chromium-new/patches/patch-chrome_browser_download_download__commands.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- chrome/browser/download/download_commands.h.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/download/download_commands.h
-@@ -43,7 +43,8 @@ class DownloadCommands {
-   void ExecuteCommand(Command command);
- 
- #if defined(OS_WIN) || defined(OS_LINUX) || \
--    (defined(OS_MACOSX) && !defined(OS_IOS))
-+    defined(OS_BSD) || (defined(OS_MACOSX) && \
-+    !defined(OS_IOS))
-   bool IsDownloadPdf() const;
-   bool CanOpenPdfInSystemViewer() const;
- #endif
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__prefs.cc b/chromium-new/patches/patch-chrome_browser_download_download__prefs.cc
deleted file mode 100644
index 4ae983f30f..0000000000
--- a/chromium-new/patches/patch-chrome_browser_download_download__prefs.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-$NetBSD$
-
---- chrome/browser/download/download_prefs.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/download/download_prefs.cc
-@@ -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) {
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   base::FilePath home_dir = base::GetHomeDir();
-   if (download_path == home_dir) {
-     return true;
-@@ -136,7 +136,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr
-                  GetDefaultDownloadDirectoryForProfile()));
- #endif  // defined(OS_CHROMEOS)
- 
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-   should_open_pdf_in_system_reader_ =
-       prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader) ||
-       prefs->GetBoolean(prefs::kPluginsAlwaysOpenPdfExternally);
-@@ -215,7 +215,7 @@ void DownloadPrefs::RegisterProfilePrefs
-                                  default_download_path);
-   registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory,
-                                  default_download_path);
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-   registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false);
- #endif
- }
-@@ -292,7 +292,7 @@ bool DownloadPrefs::IsDownloadPathManage
- }
- 
- bool DownloadPrefs::IsAutoOpenUsed() const {
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-   if (ShouldOpenPdfInSystemReader())
-     return true;
- #endif
-@@ -306,7 +306,7 @@ bool DownloadPrefs::IsAutoOpenEnabledBas
-     return false;
-   DCHECK(extension[0] == base::FilePath::kExtensionSeparator);
-   extension.erase(0, 1);
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-   if (extension == FILE_PATH_LITERAL("pdf") && ShouldOpenPdfInSystemReader())
-     return true;
- #endif
-@@ -340,7 +340,7 @@ void DownloadPrefs::DisableAutoOpenBased
-   SaveAutoOpenState();
- }
- 
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
- void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) {
-   should_open_pdf_in_system_reader_ = should_open ||
-      profile_->GetPrefs()->GetBoolean(prefs::kPluginsAlwaysOpenPdfExternally);
-@@ -365,7 +365,7 @@ void DownloadPrefs::DisableAdobeVersionC
- #endif
- 
- void DownloadPrefs::ResetAutoOpen() {
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-   SetShouldOpenPdfInSystemReader(false);
- #endif
-   auto_open_.clear();
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__prefs.h b/chromium-new/patches/patch-chrome_browser_download_download__prefs.h
deleted file mode 100644
index d1b0a293c9..0000000000
--- a/chromium-new/patches/patch-chrome_browser_download_download__prefs.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/download/download_prefs.h.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/download/download_prefs.h
-@@ -80,7 +80,7 @@ class DownloadPrefs {
-   // Disables auto-open based on file extension.
-   void DisableAutoOpenBasedOnExtension(const base::FilePath& file_name);
- 
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-   // Store the user preference to disk. If |should_open| is true, also disable
-   // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin.
-   void SetShouldOpenPdfInSystemReader(bool should_open);
-@@ -115,7 +115,7 @@ class DownloadPrefs {
-                    AutoOpenCompareFunctor> AutoOpenSet;
-   AutoOpenSet auto_open_;
- 
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-   bool should_open_pdf_in_system_reader_;
-   bool disable_adobe_version_check_for_tests_;
- #endif
diff --git a/chromium-new/patches/patch-chrome_browser_download_download__query.cc b/chromium-new/patches/patch-chrome_browser_download_download__query.cc
deleted file mode 100644
index f64e3f7503..0000000000
--- a/chromium-new/patches/patch-chrome_browser_download_download__query.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- chrome/browser/download/download_query.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/download/download_query.cc
-@@ -27,7 +27,11 @@
- #include "components/url_formatter/url_formatter.h"
- #include "content/public/browser/content_browser_client.h"
- #include "content/public/browser/download_item.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- #include "url/gurl.h"
- 
- using content::DownloadDangerType;
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
deleted file mode 100644
index 62fd098755..0000000000
--- a/chromium-new/patches/patch-chrome_browser_download_download__shelf__context__menu.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/download/download_shelf_context_menu.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/download/download_shelf_context_menu.cc
-@@ -127,7 +127,7 @@ base::string16 DownloadShelfContextMenu:
-                    : IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS;
-           break;
-         }
--#elif defined(OS_MACOSX) || defined(OS_LINUX)
-+#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
-         if (can_open_pdf_in_system_viewer) {
-           id = 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
deleted file mode 100644
index fb1999c8d7..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_BUILD.gn
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/BUILD.gn.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/extensions/BUILD.gn
-@@ -1024,7 +1024,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) {
-@@ -1115,6 +1115,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 += [
-       "api/gcd_private/gcd_private_api.cc",
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
deleted file mode 100644
index 50911cfa0b..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/activity_log/activity_log.cc.orig	2017-02-02 02:02:48.000000000 +0000
-+++ chrome/browser/extensions/activity_log/activity_log.cc
-@@ -48,7 +48,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>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- #include "url/gurl.h"
- 
- namespace constants = activity_log_constants;
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
deleted file mode 100644
index de5b30d21a..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc.orig	2017-02-02 02:02:49.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_BSD)
-   RemovableStorageProvider::GetAllDevices(
-     base::Bind(
-       &ImageWriterPrivateListRemovableStorageDevicesFunction::OnDeviceListReady,
-       this));
-+#endif
-   return true;
- }
- 
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
deleted file mode 100644
index c9ec8edba9..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/api/input_ime/input_ime_api.h.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/extensions/api/input_ime/input_ime_api.h
-@@ -28,7 +28,7 @@
- 
- #if defined(OS_CHROMEOS)
- #include "chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h"
--#elif defined(OS_LINUX) || defined(OS_WIN)
-+#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
- #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h"
- #endif  // defined(OS_CHROMEOS)
- 
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
deleted file mode 100644
index 652a2c75cc..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/api/messaging/message_service.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/extensions/api/messaging/message_service.cc
-@@ -119,7 +119,7 @@ MessageService::PolicyPermission Message
- 
- const char kReceivingEndDoesntExistError[] =
-     "Could not establish connection. Receiving end does not exist.";
--#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
- const char kMissingPermissionError[] =
-     "Access to native messaging requires nativeMessaging permission.";
- const char kProhibitedByPoliciesError[] =
-@@ -414,7 +414,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)
-   content::WebContents* web_contents =
-       content::WebContents::FromRenderFrameHost(source);
-   ExtensionWebContentsObserver* extension_web_contents_observer =
-@@ -477,12 +477,12 @@ void MessageService::OpenChannelToNative
-   channel->opener->IncrementLazyKeepaliveCount();
- 
-   AddChannel(std::move(channel), receiver_port_id);
--#else  // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX))
-+#else  // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD))
-   const char kNativeMessagingNotSupportedError[] =
-       "Native Messaging is not supported on this platform.";
-   DispatchOnDisconnect(
-       source, receiver_port_id, kNativeMessagingNotSupportedError);
--#endif  // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX))
-+#endif  // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD))
- }
- 
- void MessageService::OpenChannelToTab(int source_process_id,
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
deleted file mode 100644
index 04c08b05ff..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/api/music_manager_private/device_id_linux.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/extensions/api/music_manager_private/device_id_linux.cc
-@@ -4,6 +4,10 @@
- 
- #include "chrome/browser/extensions/api/music_manager_private/device_id.h"
- 
-+#if defined(OS_BSD)
-+#include <sys/types.h>
-+#include <net/if_dl.h>
-+#endif
- #include <ifaddrs.h>
- #include <net/if.h>
- #include <stddef.h>
-@@ -105,11 +109,33 @@ class MacAddressProcessor {
-                         const char* const prefixes[],
-                         size_t prefixes_count) {
-     const int MAC_LENGTH = 6;
-+#if defined(OS_BSD)
-+    struct ifaddrs *ifap, *ifinfo;
-+#else
-     struct ifreq ifinfo;
-+#endif
- 
-     memset(&ifinfo, 0, sizeof(ifinfo));
--    strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1);
- 
-+#if defined(OS_BSD)
-+    int result = getifaddrs(&ifap);
-+    if (result != 0)
-+      return true;
-+    result = 1; // no MAC found yet
-+    for (ifinfo = ifap; ifinfo != NULL; ifinfo = ifinfo->ifa_next) {
-+      struct sockaddr* sa = ifinfo->ifa_addr;
-+      if (sa->sa_family == AF_LINK &&
-+        !strncmp(ifinfo->ifa_name, ifaddr->ifa_name,
-+        sizeof(ifinfo->ifa_name) - 1)) { 
-+          result = 0;
-+	  break;
-+      }
-+    }
-+
-+    char mac_address[6];
-+    strncpy(mac_address, (const char*)LLADDR((struct sockaddr_dl*)ifinfo->ifa_addr), sizeof(mac_address));
-+#else
-+    strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1);
-     int sd = socket(AF_INET, SOCK_DGRAM, 0);
-     int result = ioctl(sd, SIOCGIFHWADDR, &ifinfo);
-     close(sd);
-@@ -119,11 +145,17 @@ class MacAddressProcessor {
- 
-     const char* mac_address =
-         static_cast<const char*>(ifinfo.ifr_hwaddr.sa_data);
-+#endif
-     if (!is_valid_mac_address_.Run(mac_address, MAC_LENGTH))
-       return true;
- 
-+#if defined(OS_BSD)
-+    if (!IsValidPrefix(ifinfo->ifa_name, prefixes, prefixes_count))
-+      return true;
-+#else
-     if (!IsValidPrefix(ifinfo.ifr_name, prefixes, prefixes_count))
-       return true;
-+#endif
- 
-     // Got one!
-     found_mac_address_ =
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_api_omnibox_omnibox__api.cc b/chromium-new/patches/patch-chrome_browser_extensions_api_omnibox_omnibox__api.cc
deleted file mode 100644
index e03dae7902..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_api_omnibox_omnibox__api.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/api/omnibox/omnibox_api.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/extensions/api/omnibox/omnibox_api.cc
-@@ -45,7 +45,7 @@ const char kBackgroundTabDisposition[] =
- // Pref key for omnibox.setDefaultSuggestion.
- const char kOmniboxDefaultSuggestion[] = "omnibox_default_suggestion";
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- static const int kOmniboxIconPaddingLeft = 2;
- static const int kOmniboxIconPaddingRight = 2;
- #elif defined(OS_MACOSX)
diff --git a/chromium-new/patches/patch-chrome_browser_extensions_bookmark__app__helper.cc b/chromium-new/patches/patch-chrome_browser_extensions_bookmark__app__helper.cc
deleted file mode 100644
index 9a814463ee..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_bookmark__app__helper.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/bookmark_app_helper.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/extensions/bookmark_app_helper.cc
-@@ -707,7 +707,7 @@ void BookmarkAppHelper::FinishInstallati
- #if !defined(OS_MACOSX)
- #if !defined(USE_ASH)
-   web_app::ShortcutLocations creation_locations;
--#if defined(OS_LINUX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
-   creation_locations.on_desktop = true;
- #else
-   creation_locations.on_desktop = false;
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
deleted file mode 100644
index 59acfb29a2..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/extensions/browser_context_keyed_service_factories.cc
-@@ -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"
--#elif defined(OS_LINUX) || defined(OS_WIN)
-+#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
- #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
- #endif
- 
-@@ -110,7 +110,7 @@ void EnsureBrowserContextKeyedServiceFac
- #if defined(OS_CHROMEOS)
-   extensions::InputImeAPI::GetFactoryInstance();
-   extensions::InputMethodAPI::GetFactoryInstance();
--#elif defined(OS_LINUX) || defined(OS_WIN)
-+#elif defined(OS_LINUX) || defined(OS_WIN) && !defined(OS_BSD)
-   extensions::InputImeAPI::GetFactoryInstance();
- #endif
-   extensions::LanguageSettingsPrivateDelegateFactory::GetInstance();
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
deleted file mode 100644
index fac92a1ee2..0000000000
--- a/chromium-new/patches/patch-chrome_browser_extensions_external__provider__impl.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/extensions/external_provider_impl.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/extensions/external_provider_impl.cc
-@@ -638,7 +638,7 @@ void ExternalProviderImpl::CreateExterna
-         Manifest::EXTERNAL_PREF, Manifest::EXTERNAL_PREF_DOWNLOAD,
-         oem_extension_creation_flags));
-   }
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-   if (!profile->IsLegacySupervised()) {
-     provider_list->push_back(base::MakeUnique<ExternalProviderImpl>(
-         service,
-@@ -664,7 +664,7 @@ void ExternalProviderImpl::CreateExterna
-         bundled_extension_creation_flags));
- 
-     // Define a per-user source of external extensions.
--#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(CHROMIUM_BUILD))
-+#if defined(OS_MACOSX) || ((defined(OS_LINUX) || defined(OS_BSD)) && defined(CHROMIUM_BUILD))
-     provider_list->push_back(base::MakeUnique<ExternalProviderImpl>(
-         service, new ExternalPrefLoader(chrome::DIR_USER_EXTERNAL_EXTENSIONS,
-                                         ExternalPrefLoader::NONE, nullptr),
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
deleted file mode 100644
index 8edd8e923b..0000000000
--- a/chromium-new/patches/patch-chrome_browser_gpu_gl__string__manager.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/gpu/gl_string_manager.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/gpu/gl_string_manager.cc
-@@ -33,7 +33,7 @@ GLStringManager::~GLStringManager() {
- 
- void GLStringManager::Initialize() {
-   // On MacOSX or Windows, preliminary GPUInfo is enough.
--#if defined(OS_LINUX)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-   // We never remove this observer from GpuDataManager.
-   content::GpuDataManager::GetInstance()->AddObserver(this);
- 
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
deleted file mode 100644
index e874d97b41..0000000000
--- a/chromium-new/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/gpu/gpu_feature_checker.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/gpu/gpu_feature_checker.cc
-@@ -34,7 +34,7 @@ void GPUFeatureChecker::CheckGPUFeatureA
-   CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- 
-   bool finalized = true;
--#if defined(OS_LINUX)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-   // On Windows and Mac, so far we can always make the final WebGL blacklisting
-   // decision based on partial GPU info; on Linux, we need to launch the GPU
-   // process to collect full GPU info and make the final decision.
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
deleted file mode 100644
index bd2ae27f18..0000000000
--- a/chromium-new/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/interstitials/chrome_controller_client.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/interstitials/chrome_controller_client.cc
-@@ -49,7 +49,7 @@ void LaunchDateAndTimeSettingsOnFileThre
- #if defined(OS_ANDROID)
-   chrome::android::OpenDateAndTimeSettings();
- 
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-   struct ClockCommand {
-     const char* const pathname;
-     const char* const argument;
-@@ -136,7 +136,7 @@ void ChromeControllerClient::set_interst
- 
- bool ChromeControllerClient::CanLaunchDateAndTimeSettings() {
- #if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX) || \
--    defined(OS_MACOSX) || defined(OS_WIN)
-+    defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
-   return true;
- #else
-   return false;
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
deleted file mode 100644
index b60b055bf4..0000000000
--- a/chromium-new/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig	2017-02-02 02:02:49.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)
-     CreateMTPDeviceAsyncDelegate(
-         device_location, read_only,
-         base::Bind(&MTPDeviceMapService::AddAsyncDelegate,
-                    base::Unretained(this), device_location, read_only));
-+#endif
-     mtp_device_usage_map_[key] = 0;
-   }
- 
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
deleted file mode 100644
index b694e9d151..0000000000
--- a/chromium-new/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- chrome/browser/media_galleries/media_file_system_registry.cc.orig	2017-02-02 02:02:49.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.
- MediaFileSystemRegistry::MediaFileSystemRegistry()
-     : file_system_context_(new MediaFileSystemContextImpl) {
--  StorageMonitor::GetInstance()->AddObserver(this);
-+  // This conditional is needed for shutdown.  Destructors
-+  // try to get the media file system registry.
-+  if (StorageMonitor::GetInstance())
-+    StorageMonitor::GetInstance()->AddObserver(this);
- }
- 
- MediaFileSystemRegistry::~MediaFileSystemRegistry() {
diff --git a/chromium-new/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/chromium-new/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
deleted file mode 100644
index b94539fa5f..0000000000
--- a/chromium-new/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/media/webrtc/webrtc_log_uploader.cc
-@@ -344,6 +344,10 @@ void WebRtcLogUploader::SetupMultipart(
-   const char product[] = "Chrome_Android";
- #elif defined(OS_CHROMEOS)
-   const char product[] = "Chrome_ChromeOS";
-+#elif defined(OS_FREEBSD)
-+  const char product[] = "Chrome_FreeBSD";
-+#elif defined(OS_NETBSD)
-+  const char product[] = "Chrome_NetBSD";
- #else
- #error Platform not supported.
- #endif
diff --git a/chromium-new/patches/patch-chrome_browser_memory__details.cc b/chromium-new/patches/patch-chrome_browser_memory__details.cc
deleted file mode 100644
index f53453c25b..0000000000
--- a/chromium-new/patches/patch-chrome_browser_memory__details.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/memory_details.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/memory_details.cc
-@@ -33,7 +33,7 @@
- #include "extensions/features/features.h"
- #include "ui/base/l10n/l10n_util.h"
- 
--#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- #include "content/public/browser/zygote_host_linux.h"
- #endif
- 
-@@ -335,7 +335,7 @@ void MemoryDetails::CollectChildInfoOnUI
-       process.titles.push_back(title);
-     }
- 
--#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-     if (content::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) {
-       process.process_type = content::PROCESS_TYPE_ZYGOTE;
-     }
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
deleted file mode 100644
index e80a966769..0000000000
--- a/chromium-new/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
-@@ -42,12 +42,14 @@
- 
- #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- #include <gnu/libc-version.h>
-+#endif
- 
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
- #include "base/version.h"
- #if defined(USE_X11)
- #include "ui/base/x/x11_util.h"
- #endif
--#endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#endif
- 
- #if defined(USE_OZONE) || defined(USE_X11)
- #include "ui/events/devices/input_device_event_observer.h"
diff --git a/chromium-new/patches/patch-chrome_browser_net_async__dns__field__trial.cc b/chromium-new/patches/patch-chrome_browser_net_async__dns__field__trial.cc
deleted file mode 100644
index 42d0dcd46d..0000000000
--- a/chromium-new/patches/patch-chrome_browser_net_async__dns__field__trial.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/net/async_dns_field_trial.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/net/async_dns_field_trial.cc
-@@ -61,7 +61,7 @@ void HistogramPrefSource(PrefSource sour
- }  // namespace
- 
- bool ConfigureAsyncDnsFieldTrial() {
--#if defined(OS_CHROMEOS) || defined(OS_MACOSX)
-+#if defined(OS_CHROMEOS) || defined(OS_MACOSX) || defined(OS_BSD)
-   const bool kDefault = true;
- #else
-   const bool kDefault = false;
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
deleted file mode 100644
index f40b4b7458..0000000000
--- a/chromium-new/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/notifications/message_center_notification_manager.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/notifications/message_center_notification_manager.cc
-@@ -67,7 +67,7 @@ MessageCenterNotificationManager::Messag
-       base::MakeUnique<FullscreenNotificationBlocker>(message_center));
- 
- #if defined(OS_WIN) || defined(OS_MACOSX) \
--  || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
-+  || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
-   // On Windows, Linux and Mac, the notification manager owns the tray icon and
-   // views.Other platforms have global ownership and Create will return NULL.
-   tray_.reset(message_center::CreateMessageCenterTray());
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
deleted file mode 100644
index 761b8f2ebc..0000000000
--- a/chromium-new/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- chrome/browser/password_manager/chrome_password_manager_client.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/password_manager/chrome_password_manager_client.cc
-@@ -57,7 +57,11 @@
- #include "content/public/browser/web_contents.h"
- #include "google_apis/gaia/gaia_urls.h"
- #include "net/base/url_util.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- #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
deleted file mode 100644
index 84875942b8..0000000000
--- a/chromium-new/patches/patch-chrome_browser_platform__util.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/platform_util.h.orig	2017-02-02 02:02:49.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
deleted file mode 100644
index 5468ac0e67..0000000000
--- a/chromium-new/patches/patch-chrome_browser_plugins_plugins__resource__service.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/plugins/plugins_resource_service.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/plugins/plugins_resource_service.cc
-@@ -31,7 +31,7 @@ GURL GetPluginsServerURL() {
-   std::string filename;
- #if defined(OS_WIN)
-   filename = "plugins_win.json";
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-   filename = "plugins_linux.json";
- #elif defined(OS_MACOSX)
-   filename = "plugins_mac.json";
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
deleted file mode 100644
index 7c8137aaf9..0000000000
--- a/chromium-new/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/policy/policy_prefs_browsertest.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/policy/policy_prefs_browsertest.cc
-@@ -175,6 +175,8 @@ class PolicyTestCase {
-     const std::string os("chromeos");
- #elif defined(OS_LINUX)
-     const std::string os("linux");
-+#elif defined(OS_FREEBSD)
-+    const std::string os("freebsd");
- #else
- #error "Unknown platform"
- #endif
diff --git a/chromium-new/patches/patch-chrome_browser_process__singleton__posix.cc b/chromium-new/patches/patch-chrome_browser_process__singleton__posix.cc
deleted file mode 100644
index 484357656b..0000000000
--- a/chromium-new/patches/patch-chrome_browser_process__singleton__posix.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD$
-
---- chrome/browser/process_singleton_posix.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/process_singleton_posix.cc
-@@ -93,11 +93,11 @@
- #include "net/base/network_interfaces.h"
- #include "ui/base/l10n/l10n_util.h"
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #include "chrome/browser/ui/process_singleton_dialog_linux.h"
- #endif
- 
--#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- #include "ui/views/linux_ui/linux_ui.h"
- #endif
- 
-@@ -321,7 +321,7 @@ bool DisplayProfileInUseError(const base
-   if (g_disable_prompt)
-     return false;
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   base::string16 relaunch_button_text = l10n_util::GetStringUTF16(
-       IDS_PROFILE_IN_USE_LINUX_RELAUNCH);
-   return ShowProcessSingletonDialog(error, relaunch_button_text);
-@@ -855,7 +855,7 @@ ProcessSingleton::NotifyResult ProcessSi
-     // The other process is shutting down, it's safe to start a new process.
-     return PROCESS_NONE;
-   } else if (strncmp(buf, kACKToken, arraysize(kACKToken) - 1) == 0) {
--#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-     // Likely NULL in unit tests.
-     views::LinuxUI* linux_ui = views::LinuxUI::instance();
-     if (linux_ui)
diff --git a/chromium-new/patches/patch-chrome_browser_profiles_profile__impl__io__data.cc b/chromium-new/patches/patch-chrome_browser_profiles_profile__impl__io__data.cc
deleted file mode 100644
index e692e148dd..0000000000
--- a/chromium-new/patches/patch-chrome_browser_profiles_profile__impl__io__data.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/profiles/profile_impl_io_data.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/profiles/profile_impl_io_data.cc
-@@ -104,7 +104,7 @@ net::BackendType ChooseCacheBackendType(
-   }
- #endif  // #if !defined(OS_ANDROID)
- 
--#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS)
-+#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
-   return net::CACHE_BACKEND_SIMPLE;
- #else
-   return net::CACHE_BACKEND_BLOCKFILE;
diff --git a/chromium-new/patches/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc b/chromium-new/patches/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc
deleted file mode 100644
index 073a43f334..0000000000
--- a/chromium-new/patches/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
-@@ -1367,7 +1367,7 @@ void RenderViewContextMenu::AppendEditab
- // 'Undo' and 'Redo' for text input with no suggestions and no text selected.
- // We make an exception for OS X as context clicking will select the closest
- // word. In this case both items are always shown.
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
-   menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_UNDO,
-                                   IDS_CONTENT_CONTEXT_UNDO);
-   menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_REDO,
-@@ -1403,7 +1403,7 @@ void RenderViewContextMenu::AppendLangua
-   if (!use_spelling)
-     return;
- 
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
-   menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS,
-                                   IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS);
- #else
-@@ -1645,7 +1645,7 @@ bool RenderViewContextMenu::IsCommandIdE
-     case IDC_CHECK_SPELLING_WHILE_TYPING:
-       return prefs->GetBoolean(spellcheck::prefs::kEnableSpellcheck);
- 
--#if !defined(OS_MACOSX) && defined(OS_POSIX)
-+#if !defined(OS_MACOSX) && !defined(OS_BSD) && defined(OS_POSIX)
-     // TODO(suzhe): this should not be enabled for password fields.
-     case IDC_INPUT_METHODS_MENU:
-       return true;
diff --git a/chromium-new/patches/patch-chrome_browser_renderer__preferences__util.cc b/chromium-new/patches/patch-chrome_browser_renderer__preferences__util.cc
deleted file mode 100644
index da10a40c89..0000000000
--- a/chromium-new/patches/patch-chrome_browser_renderer__preferences__util.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- chrome/browser/renderer_preferences_util.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/renderer_preferences_util.cc
-@@ -19,7 +19,7 @@
- #include "third_party/WebKit/public/public_features.h"
- #include "third_party/skia/include/core/SkColor.h"
- 
--#if defined(OS_LINUX) || defined(OS_ANDROID)
-+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
- #include "ui/gfx/font_render_params.h"
- #endif
- 
-@@ -31,7 +31,7 @@
- #include "ui/base/cocoa/defaults_utils.h"
- #endif
- 
--#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
- #include "chrome/browser/themes/theme_service.h"
- #include "chrome/browser/themes/theme_service_factory.h"
- #include "ui/views/linux_ui/linux_ui.h"
-@@ -133,7 +133,7 @@ void UpdateFromSystemSettings(content::R
-     prefs->caret_blink_interval = interval.InSecondsF();
- #endif
- 
--#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
-   views::LinuxUI* linux_ui = views::LinuxUI::instance();
-   if (linux_ui) {
-     if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) {
-@@ -155,7 +155,7 @@ void UpdateFromSystemSettings(content::R
-   }
- #endif
- 
--#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_BSD)
-   CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params,
-       (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), NULL)));
-   prefs->should_antialias_text = params.antialiasing;
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
deleted file mode 100644
index 4e2b6f1555..0000000000
--- a/chromium-new/patches/patch-chrome_browser_resources_safe__browsing_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/resources/safe_browsing/BUILD.gn.orig	2017-02-02 02:02:49.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
deleted file mode 100644
index 67ef8fbf1e..0000000000
--- a/chromium-new/patches/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- chrome/browser/resources/safe_browsing/gen_file_type_proto.py.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/resources/safe_browsing/gen_file_type_proto.py
-@@ -50,6 +50,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,
-   }
-@@ -201,7 +202,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
deleted file mode 100644
index c6061a7521..0000000000
--- a/chromium-new/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- chrome/browser/safe_browsing/incident_reporting/incident_handler_util.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/safe_browsing/incident_reporting/incident_handler_util.cc
-@@ -8,7 +8,12 @@
- 
- #include "base/hash.h"
- #include "base/logging.h"
-+//XXX(rene) needs shim headers?
-+#if defined(USE_SYSTEM_PROTOBUF)
-+#include <google/protobuf/message_lite.h>
-+#else
- #include "third_party/protobuf/src/google/protobuf/message_lite.h"
-+#endif
- 
- namespace safe_browsing {
- 
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
deleted file mode 100644
index 8865922e5b..0000000000
--- a/chromium-new/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/safe_browsing/permission_reporter.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/safe_browsing/permission_reporter.cc
-@@ -193,7 +193,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
deleted file mode 100644
index a7c1bf8af7..0000000000
--- a/chromium-new/patches/patch-chrome_browser_search_local__files__ntp__source.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- chrome/browser/search/local_files_ntp_source.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/search/local_files_ntp_source.cc
-@@ -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"
-+#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 {
- 
diff --git a/chromium-new/patches/patch-chrome_browser_speech_tts__controller__impl.cc b/chromium-new/patches/patch-chrome_browser_speech_tts__controller__impl.cc
deleted file mode 100644
index a04e6d50be..0000000000
--- a/chromium-new/patches/patch-chrome_browser_speech_tts__controller__impl.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- chrome/browser/speech/tts_controller_impl.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/speech/tts_controller_impl.cc
-@@ -347,9 +347,13 @@ int TtsControllerImpl::QueueSize() {
- }
- 
- TtsPlatformImpl* TtsControllerImpl::GetPlatformImpl() {
-+#if defined(OS_BSD)
-+  return NULL;
-+#else
-   if (!platform_impl_)
-     platform_impl_ = TtsPlatformImpl::GetInstance();
-   return platform_impl_;
-+#endif
- }
- 
- int TtsControllerImpl::GetMatchingVoice(
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
deleted file mode 100644
index 73c24af789..0000000000
--- a/chromium-new/patches/patch-chrome_browser_sync_chrome__sync__client.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/sync/chrome_sync_client.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/sync/chrome_sync_client.cc
-@@ -578,7 +578,7 @@ void ChromeSyncClient::RegisterDesktopDa
-   }
- #endif
- 
--#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_BSD)
-   // Dictionary sync is enabled by default.
-   if (!disabled_types.Has(syncer::DICTIONARY)) {
-     sync_service->RegisterDataTypeController(
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
deleted file mode 100644
index 8aa451d5db..0000000000
--- a/chromium-new/patches/patch-chrome_browser_tracing_crash__service__uploader.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- chrome/browser/tracing/crash_service_uploader.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/tracing/crash_service_uploader.cc
-@@ -156,6 +156,10 @@ void TraceCrashServiceUploader::DoUpload
-   const char product[] = "Chrome_Android";
- #elif defined(OS_CHROMEOS)
-   const char product[] = "Chrome_ChromeOS";
-+#elif defined(OS_FREEBSD)
-+  const char product[] = "Chrome_FreeBSD";
-+#elif defined(OS_NETBSD)
-+  const char product[] = "Chrome_NetBSD";
- #else
- #error Platform not supported.
- #endif
diff --git a/chromium-new/patches/patch-chrome_browser_ui_BUILD.gn b/chromium-new/patches/patch-chrome_browser_ui_BUILD.gn
deleted file mode 100644
index 9dfce87658..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/BUILD.gn.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/ui/BUILD.gn
-@@ -3090,7 +3090,7 @@ split_static_library("ui") {
-       ]
-     }
-   }
--  if (is_linux) {  # Both desktop Linux and ChromeOS.
-+  if (is_linux || is_bsd) {  # Both desktop Linux and ChromeOS.
-     sources += [
-       "certificate_dialogs.cc",
-       "certificate_dialogs.h",
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
deleted file mode 100644
index c7e9701b96..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_browser__command__controller.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/browser_command_controller.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/ui/browser_command_controller.cc
-@@ -81,7 +81,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/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
- #endif
- 
-@@ -203,7 +203,7 @@ bool BrowserCommandController::IsReserve
-   if (window()->IsFullscreen() && command_id == IDC_FULLSCREEN)
-     return true;
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   // If this key was registered by the user as a content editing hotkey, then
-   // it is not reserved.
-   ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
-@@ -406,7 +406,7 @@ void BrowserCommandController::ExecuteCo
-       break;
- #endif
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-     case IDC_USE_SYSTEM_TITLE_BAR: {
-       PrefService* prefs = browser_->profile()->GetPrefs();
-       prefs->SetBoolean(prefs::kUseCustomChromeFrame,
-@@ -766,7 +766,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
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   command_updater_.UpdateCommandEnabled(IDC_USE_SYSTEM_TITLE_BAR, 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
deleted file mode 100644
index 23d1c54b6b..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_browser__view__prefs.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/browser_view_prefs.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/ui/browser_view_prefs.cc
-@@ -10,7 +10,7 @@
- #include "components/prefs/pref_registry_simple.h"
- #include "components/prefs/pref_service.h"
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
- #include "ui/base/x/x11_util.h"  // nogncheck
- #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
deleted file mode 100644
index 7cad53daf7..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
-@@ -16,7 +16,7 @@
- 
- // NOTE(koz): Linux doesn't use the thick shadowed border, so we add padding
- // here.
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- const int ExclusiveAccessBubble::kPaddingPx = 8;
- #else
- const int ExclusiveAccessBubble::kPaddingPx = 15;
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
deleted file mode 100644
index 91d49b9ea0..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/input_method/input_method_engine_base.cc.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/ui/input_method/input_method_engine_base.cc
-@@ -37,7 +37,7 @@
- #elif defined(OS_WIN)
- #include "ui/events/keycodes/dom/keycode_converter.h"
- #include "ui/events/keycodes/keyboard_codes_win.h"
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- #include "ui/events/keycodes/dom/keycode_converter.h"
- #include "ui/events/keycodes/keyboard_codes_posix.h"
- #endif
diff --git a/chromium-new/patches/patch-chrome_browser_ui_libgtkui_BUILD.gn b/chromium-new/patches/patch-chrome_browser_ui_libgtkui_BUILD.gn
deleted file mode 100644
index 84edc42745..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_libgtkui_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/libgtkui/BUILD.gn.orig	2017-02-02 02:02:49.000000000 +0000
-+++ chrome/browser/ui/libgtkui/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_libgtkui_print__dialog__gtk.cc b/chromium-new/patches/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc
deleted file mode 100644
index af6cb4da34..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/libgtkui/print_dialog_gtk.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/libgtkui/print_dialog_gtk.cc
-@@ -348,6 +348,7 @@ void PrintDialogGtk2::ShowDialog(
-   // Since we only generate PDF, only show printers that support PDF.
-   // TODO(thestig) Add more capabilities to support?
-   GtkPrintCapabilities cap = static_cast<GtkPrintCapabilities>(
-+      GTK_PRINT_CAPABILITY_GENERATE_PS |
-       GTK_PRINT_CAPABILITY_GENERATE_PDF |
-       GTK_PRINT_CAPABILITY_PAGE_SET |
-       GTK_PRINT_CAPABILITY_COPIES |
diff --git a/chromium-new/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc b/chromium-new/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
deleted file mode 100644
index 6723b91cc3..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/startup/bad_flags_prompt.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/startup/bad_flags_prompt.cc
-@@ -71,7 +71,7 @@ void ShowBadFlagsPrompt(Browser* browser
-     // This flag gives extensions more powers.
-     extensions::switches::kExtensionsOnChromeURLs,
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
-     // Speech dispatcher is buggy, it can crash and it can make Chrome freeze.
-     // http://crbug.com/327295
-     switches::kEnableSpeechDispatcher,
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
deleted file mode 100644
index 407fc92192..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/startup/startup_browser_creator.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/startup/startup_browser_creator.cc
-@@ -95,7 +95,7 @@
- #include "components/user_manager/user_manager.h"
- #endif
- 
--#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
-+#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD))
- #include "ui/events/devices/x11/touch_factory_x11.h"  // nogncheck
- #endif
- 
-@@ -651,9 +651,11 @@ bool StartupBrowserCreator::ProcessCmdLi
-   }
- #endif  // OS_CHROMEOS
- 
-+#if 0 /* XXX */
- #if defined(TOOLKIT_VIEWS) && defined(USE_X11)
-   ui::TouchFactory::SetTouchDeviceListFromCommandLine();
- #endif
-+#endif
- 
- #if defined(OS_MACOSX)
-   if (web_app::MaybeRebuildShortcut(command_line))
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
deleted file mode 100644
index f9d6d47828..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/toolbar/app_menu_model.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/toolbar/app_menu_model.cc
-@@ -632,7 +632,7 @@ bool AppMenuModel::IsCommandIdVisible(in
-     case IDC_UPGRADE_DIALOG:
-       return browser_defaults::kShowUpgradeMenuItem &&
-           UpgradeDetector::GetInstance()->notify_upgrade();
--#if !defined(OS_LINUX) || defined(USE_AURA)
-+#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(USE_AURA)
-     case IDC_BOOKMARK_PAGE:
-       return !chrome::ShouldRemoveBookmarkThisPageUI(browser_->profile());
-     case IDC_BOOKMARK_ALL_TABS:
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_accelerator__table.cc b/chromium-new/patches/patch-chrome_browser_ui_views_accelerator__table.cc
deleted file mode 100644
index b933c2ccb7..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_accelerator__table.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/accelerator_table.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/accelerator_table.cc
-@@ -72,7 +72,7 @@ const AcceleratorMapping kAcceleratorMap
-   { ui::VKEY_S, ui::EF_CONTROL_DOWN, IDC_SAVE_PAGE },
-   { ui::VKEY_9, kPlatformModifier, IDC_SELECT_LAST_TAB },
-   { ui::VKEY_NUMPAD9, kPlatformModifier, IDC_SELECT_LAST_TAB },
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   { ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB },
-   { ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB },
-   { ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT },
-@@ -100,7 +100,7 @@ const AcceleratorMapping kAcceleratorMap
-   { ui::VKEY_NUMPAD7, kPlatformModifier, IDC_SELECT_TAB_6 },
-   { ui::VKEY_8, kPlatformModifier, IDC_SELECT_TAB_7 },
-   { ui::VKEY_NUMPAD8, kPlatformModifier, IDC_SELECT_TAB_7 },
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   { ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0 },
-   { ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0 },
-   { ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1 },
-@@ -149,7 +149,7 @@ const AcceleratorMapping kAcceleratorMap
-   { ui::VKEY_F11, ui::EF_NONE, IDC_FULLSCREEN },
- 
-   // Platform-specific key maps.
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   { ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK },
-   { ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD },
-   { ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME },
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_app__list_linux_app__list__linux.cc b/chromium-new/patches/patch-chrome_browser_ui_views_app__list_linux_app__list__linux.cc
deleted file mode 100644
index b7604fd833..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_app__list_linux_app__list__linux.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/app_list/linux/app_list_linux.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/app_list/linux/app_list_linux.cc
-@@ -91,7 +91,7 @@ void AppListLinux::MoveNearCursor(app_li
-   view->SetBubbleArrow(views::BubbleBorder::FLOAT);
- 
-   AppListPositioner::ScreenEdge edge;
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   // In the Unity desktop environment, special case SCREEN_EDGE_LEFT. It is
-   // always on the left side in Unity, but ShelfLocationInDisplay will not
-   // detect this if the shelf is hidden.
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
deleted file mode 100644
index 29be2aaabd..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc.orig	2017-02-02 02:02:50.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"
- #include "ui/views/widget/widget.h"
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #include "chrome/browser/shell_integration_linux.h"
- #endif
- 
-@@ -57,7 +57,7 @@ void ChromeNativeAppWindowViewsAura::OnB
-     const AppWindow::CreateParams& create_params,
-     views::Widget::InitParams* init_params,
-     views::Widget* widget) {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
-   std::string app_name = web_app::GenerateApplicationNameFromExtensionId(
-       app_window()->extension_id());
-   // Set up a custom WM_CLASS for app windows. This allows task switchers in
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
deleted file mode 100644
index eb45aefad9..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/chrome_views_delegate.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/chrome_views_delegate.cc
-@@ -57,7 +57,7 @@
- #include "ui/views/widget/native_widget_aura.h"
- #endif
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
- #include "ui/views/linux_ui/linux_ui.h"
- #endif
- 
-@@ -308,7 +308,7 @@ HICON ChromeViewsDelegate::GetSmallWindo
-   return GetSmallAppIcon();
- }
- 
--#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
- gfx::ImageSkia* ChromeViewsDelegate::GetDefaultWindowIcon() const {
-   ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
-   return rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_64);
-@@ -447,7 +447,7 @@ void ChromeViewsDelegate::OnBeforeWidget
- #endif
- }
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)  || defined(OS_BSD)
- bool ChromeViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
-   // On Ubuntu Unity, the system always provides a title bar for maximized
-   // windows.
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
deleted file mode 100644
index 01438ad0d9..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/chrome_views_delegate.h.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/chrome_views_delegate.h
-@@ -37,7 +37,7 @@ class ChromeViewsDelegate : public views
- #if defined(OS_WIN)
-   HICON GetDefaultWindowIcon() const override;
-   HICON GetSmallWindowIcon() const override;
--#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
-   gfx::ImageSkia* GetDefaultWindowIcon() const override;
- #endif
- 
-@@ -50,7 +50,7 @@ class ChromeViewsDelegate : public views
-   void OnBeforeWidgetInit(
-       views::Widget::InitParams* params,
-       views::internal::NativeWidgetDelegate* delegate) override;
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
-   bool WindowManagerProvidesTitleBar(bool maximized) override;
- #endif
-   ui::ContextFactory* GetContextFactory() override;
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
deleted file mode 100644
index 25a483d8da..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_first__run__dialog.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/first_run_dialog.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/first_run_dialog.cc
-@@ -40,8 +40,10 @@ using views::GridLayout;
- namespace {
- 
- void InitCrashReporterIfEnabled(bool enabled) {
-+#ifndef OS_BSD
-   if (enabled)
-     breakpad::InitCrashReporter(std::string());
-+#endif
- }
- 
- }  // 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
deleted file mode 100644
index 4835233dd7..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/frame/browser_frame.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/frame/browser_frame.cc
-@@ -37,11 +37,11 @@
- #include "ash/common/wm_shell.h"  // nogncheck
- #endif
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #include "chrome/browser/ui/views/frame/browser_command_handler_linux.h"
- #endif
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- #include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
- #endif
- 
-@@ -98,7 +98,7 @@ void BrowserFrame::InitBrowserFrame() {
-     non_client_view()->set_context_menu_controller(this);
-   }
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   browser_command_handler_.reset(new BrowserCommandHandlerLinux(browser_view_));
- #endif
- }
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
deleted file mode 100644
index 3a8ce49750..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/frame/browser_view.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/frame/browser_view.cc
-@@ -1913,7 +1913,7 @@ void BrowserView::OnThemeChanged() {
- #endif
- #if defined(OS_WIN)
-     ui::NativeThemeWin::instance()->NotifyObservers();
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-     ui::NativeThemeAura::instance()->NotifyObservers();
- #endif
-   }
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
deleted file mode 100644
index dea047e625..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
-@@ -38,7 +38,7 @@
- #include "ui/views/window/frame_background.h"
- #include "ui/views/window/window_shape.h"
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #include "ui/views/controls/menu/menu_runner.h"
- #endif
- 
-@@ -292,7 +292,7 @@ void OpaqueBrowserFrameView::ButtonPress
- void OpaqueBrowserFrameView::OnMenuButtonClicked(views::MenuButton* source,
-                                                  const gfx::Point& point,
-                                                  const ui::Event* event) {
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   views::MenuRunner menu_runner(frame()->GetSystemMenuModel(),
-                                 views::MenuRunner::HAS_MNEMONICS);
-   ignore_result(menu_runner.RunMenuAt(browser_view()->GetWidget(),
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
deleted file mode 100644
index 7d5de6f1b4..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
-@@ -20,7 +20,7 @@ namespace {
- 
- const int kCaptionButtonHeight = 18;
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
- // Default extra space between the top of the frame and the top of the window
- // caption buttons.
- const int kExtraCaption = 2;
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
deleted file mode 100644
index cf59fa438e..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_specific.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_specific.cc
-@@ -10,7 +10,7 @@ bool OpaqueBrowserFrameViewPlatformSpeci
-   return false;
- }
- 
--#if !defined(OS_LINUX)
-+#if !defined(OS_LINUX) && !defined(OS_BSD)
- 
- // static
- OpaqueBrowserFrameViewPlatformSpecific*
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
deleted file mode 100644
index 51010c842c..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/frame/system_menu_model_builder.cc
-@@ -85,7 +85,7 @@ void SystemMenuModelBuilder::BuildSystem
-     model->AddSeparator(ui::NORMAL_SEPARATOR);
-     model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
-   }
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   model->AddSeparator(ui::NORMAL_SEPARATOR);
-   model->AddCheckItemWithStringId(IDC_USE_SYSTEM_TITLE_BAR,
-                                   IDS_SHOW_WINDOW_DECORATIONS_MENU);
-@@ -119,7 +119,7 @@ void SystemMenuModelBuilder::BuildSystem
-     model->AddSeparator(ui::NORMAL_SEPARATOR);
-     model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
-   }
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   model->AddSeparator(ui::NORMAL_SEPARATOR);
-   model->AddItemWithStringId(IDC_CLOSE_WINDOW, IDS_CLOSE);
- #endif
diff --git a/chromium-new/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc b/chromium-new/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
deleted file mode 100644
index d0699aa7bc..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/frame/system_menu_model_delegate.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/frame/system_menu_model_delegate.cc
-@@ -13,7 +13,7 @@
- #include "components/sessions/core/tab_restore_service.h"
- #include "ui/base/l10n/l10n_util.h"
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- #include "chrome/common/pref_names.h"
- #include "components/prefs/pref_service.h"
- #endif
-@@ -29,7 +29,7 @@ SystemMenuModelDelegate::~SystemMenuMode
- }
- 
- bool SystemMenuModelDelegate::IsCommandIdChecked(int command_id) const {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   if (command_id == IDC_USE_SYSTEM_TITLE_BAR) {
-     PrefService* prefs = browser_->profile()->GetPrefs();
-     return !prefs->GetBoolean(prefs::kUseCustomChromeFrame);
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
deleted file mode 100644
index 261017133b..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/message_center/message_center_frame_view.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/message_center/message_center_frame_view.cc
-@@ -15,7 +15,7 @@
- namespace message_center {
- 
- MessageCenterFrameView::MessageCenterFrameView() {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   const int kBorderWidth = 1;
-   SetBorder(views::CreateSolidBorder(
-       kBorderWidth, message_center::kMessageCenterBorderColor));
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
deleted file mode 100644
index 2d0a9c7f19..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/tabs/tab_drag_controller.cc
-@@ -270,7 +270,7 @@ void TabDragController::Init(
-   //     synchronous on desktop Linux, so use that.
-   // - Ash
-   //     Releasing capture on Ash cancels gestures so avoid it.
--#if defined(OS_LINUX) || defined(USE_ASH)
-+#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_ASH)
-   can_release_capture_ = false;
- #endif
-   start_point_in_screen_ = gfx::Point(source_tab_offset, mouse_offset.y());
-@@ -620,7 +620,7 @@ TabDragController::DragBrowserToNewTabSt
-     // that to effect the position of any windows.
-     SetWindowPositionManaged(browser_widget->GetNativeWindow(), false);
- 
--#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
-+#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(OS_CHROMEOS)
-     // 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.
-@@ -1819,7 +1819,7 @@ TabDragController::Liveness TabDragContr
-     if (dragged_window)
-       exclude.insert(dragged_window);
-   }
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
-   // Exclude windows which are pending deletion via Browser::TabStripEmpty().
-   // These windows can be returned in the Linux Aura port because the browser
-   // window which was used for dragging is not hidden once all of its tabs are
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
deleted file mode 100644
index c5a8cb802f..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/views/tabs/tab_strip.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/views/tabs/tab_strip.cc
-@@ -323,7 +323,7 @@ NewTabButton::NewTabButton(TabStrip* tab
-       tab_strip_(tab_strip),
-       destroyed_(NULL) {
-   set_animate_on_state_change(true);
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
-   set_triggerable_event_flags(triggerable_event_flags() |
-                               ui::EF_MIDDLE_MOUSE_BUTTON);
- #endif
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
deleted file mode 100644
index f71e4ef9d8..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_about__ui.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/webui/about_ui.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/webui/about_ui.cc
-@@ -75,7 +75,7 @@
- #include "chrome/browser/ui/webui/theme_source.h"
- #endif
- 
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #include "content/public/browser/zygote_host_linux.h"
- #include "content/public/common/sandbox_linux.h"
- #endif
-@@ -644,7 +644,7 @@ class AboutDnsHandler : public base::Ref
-   DISALLOW_COPY_AND_ASSIGN(AboutDnsHandler);
- };
- 
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- std::string AboutLinuxProxyConfig() {
-   std::string data;
-   AppendHeader(&data, 0,
-@@ -660,6 +660,7 @@ std::string AboutLinuxProxyConfig() {
-   return data;
- }
- 
-+#if !defined(OS_BSD)
- void AboutSandboxRow(std::string* data, int name_id, bool good) {
-   data->append("<tr><td>");
-   data->append(l10n_util::GetStringUTF8(name_id));
-@@ -674,6 +675,7 @@ void AboutSandboxRow(std::string* data, 
-   }
-   data->append("</td></tr>");
- }
-+#endif
- 
- 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;
-@@ -794,7 +798,7 @@ void AboutUIHTMLSource::StartDataRequest
-   } else if (source_name_ == chrome::kChromeUIDNSHost) {
-     AboutDnsHandler::Start(profile(), callback);
-     return;
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) {
-     response = AboutLinuxProxyConfig();
- #endif
-@@ -803,7 +807,7 @@ void AboutUIHTMLSource::StartDataRequest
-     ChromeOSCreditsHandler::Start(path, callback);
-     return;
- #endif
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#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
deleted file mode 100644
index 25b3db563c..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
-@@ -286,7 +286,7 @@ bool IsAboutUI(const GURL& url) {
- #if !defined(OS_ANDROID)
-           || url.host_piece() == chrome::kChromeUITermsHost
- #endif
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-           || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost ||
-           url.host_piece() == chrome::kChromeUISandboxHost
- #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
deleted file mode 100644
index 066bedf672..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/webui/extensions/extension_loader_handler.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/webui/extensions/extension_loader_handler.cc
-@@ -27,7 +27,11 @@
- #include "extensions/common/constants.h"
- #include "extensions/common/extension.h"
- #include "extensions/common/manifest_constants.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- #include "ui/base/l10n/l10n_util.h"
- 
- namespace extensions {
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
deleted file mode 100644
index eec487ed31..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/webui/options/browser_options_handler.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/webui/options/browser_options_handler.cc
-@@ -564,13 +564,13 @@ void BrowserOptionsHandler::GetLocalized
-     { "syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL },
- #endif  // defined(OS_CHROMEOS)
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
-     { "showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS },
-     { "themesNativeButton", IDS_THEMES_GTK_BUTTON },
-     { "themesSetClassic", IDS_THEMES_SET_CLASSIC },
- #else
-     { "themes", IDS_THEMES_GROUP_NAME },
--#endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#endif  // defined(OS_POSIX) && !defined(OS_CHROMEOS)
- 
- #if defined(OS_CHROMEOS) && defined(USE_ASH)
-     { "setWallpaper", IDS_SET_WALLPAPER_BUTTON },
-@@ -813,7 +813,7 @@ void BrowserOptionsHandler::RegisterMess
-       "requestProfilesInfo",
-       base::Bind(&BrowserOptionsHandler::HandleRequestProfilesInfo,
-                  base::Unretained(this)));
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
-   web_ui()->RegisterMessageCallback(
-       "themesSetNative",
-       base::Bind(&BrowserOptionsHandler::ThemesSetNative,
-@@ -1476,7 +1476,7 @@ void BrowserOptionsHandler::ObserveTheme
-   ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile);
-   bool is_system_theme = false;
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
-   bool profile_is_supervised = profile->IsSupervised();
-   is_system_theme = theme_service->UsingSystemTheme();
-   base::FundamentalValue native_theme_enabled(!is_system_theme &&
-@@ -1498,7 +1498,7 @@ void BrowserOptionsHandler::ThemesReset(
-   ThemeServiceFactory::GetForProfile(profile)->UseDefaultTheme();
- }
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
- void BrowserOptionsHandler::ThemesSetNative(const base::ListValue* args) {
-   content::RecordAction(UserMetricsAction("Options_GtkThemeSet"));
-   Profile* profile = Profile::FromWebUI(web_ui());
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
deleted file mode 100644
index 906819efe6..0000000000
--- a/chromium-new/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/ui/webui/options/browser_options_handler.h.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/ui/webui/options/browser_options_handler.h
-@@ -208,7 +208,7 @@ class BrowserOptionsHandler
- 
-   void ObserveThemeChanged();
-   void ThemesReset(const base::ListValue* args);
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
-   void ThemesSetNative(const base::ListValue* args);
- #endif
- 
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
deleted file mode 100644
index fe5c7e2387..0000000000
--- a/chromium-new/patches/patch-chrome_browser_web__applications_web__app.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/web_applications/web_app.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/web_applications/web_app.cc
-@@ -507,7 +507,7 @@ void GetIconsInfo(const WebApplicationIn
- }
- #endif
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- std::string GetWMClassFromAppName(std::string app_name) {
-   base::i18n::ReplaceIllegalCharactersInPath(&app_name, '_');
-   base::TrimString(app_name, "_", &app_name);
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
deleted file mode 100644
index af0d1ffb49..0000000000
--- a/chromium-new/patches/patch-chrome_browser_web__applications_web__app.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/browser/web_applications/web_app.h.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/browser/web_applications/web_app.h
-@@ -224,7 +224,7 @@ typedef std::vector<WebApplicationInfo::
- void GetIconsInfo(const WebApplicationInfo& app_info, IconInfoList* icons);
- #endif
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- // Windows that correspond to web apps need to have a deterministic (and
- // different) WMClass than normal chrome windows so the window manager groups
- // them as a separate application.
diff --git a/chromium-new/patches/patch-chrome_common_BUILD.gn b/chromium-new/patches/patch-chrome_common_BUILD.gn
deleted file mode 100644
index d9b04ff3b1..0000000000
--- a/chromium-new/patches/patch-chrome_common_BUILD.gn
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- chrome/common/BUILD.gn.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/BUILD.gn
-@@ -243,6 +243,13 @@ static_library("common") {
-     public_deps += [ "//ppapi/shared_impl" ]
-   }
- 
-+  if (is_bsd) {
-+    sources -= [
-+      "component_flash_hint_file_linux.cc",
-+      "component_flash_hint_file_linux.h",
-+    ]
-+  }
-+
-   if (enable_extensions) {
-     sources += [
-       "cast_messages.cc",
diff --git a/chromium-new/patches/patch-chrome_common_chrome__paths.cc b/chromium-new/patches/patch-chrome_common_chrome__paths.cc
deleted file mode 100644
index f81a9f6326..0000000000
--- a/chromium-new/patches/patch-chrome_common_chrome__paths.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-$NetBSD$
-
---- chrome/common/chrome_paths.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/chrome_paths.cc
-@@ -197,7 +197,7 @@ bool PathProvider(int key, base::FilePat
-         return false;
-       break;
-     case chrome::DIR_DEFAULT_DOWNLOADS_SAFE:
--#if defined(OS_WIN) || defined(OS_LINUX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
-       if (!GetUserDownloadsDirectorySafe(&cur))
-         return false;
-       break;
-@@ -480,10 +480,12 @@ bool PathProvider(int key, base::FilePat
-       if (!base::PathExists(cur))  // We don't want to create this
-         return false;
-       break;
--#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX)
-     case chrome::DIR_POLICY_FILES: {
- #if defined(GOOGLE_CHROME_BUILD)
-       cur = base::FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies"));
-+#elif defined(OS_BSD)
-+      cur = base::FilePath(FILE_PATH_LITERAL("/usr/pkg/etc/chrome/policies"));
- #else
-       cur = base::FilePath(FILE_PATH_LITERAL("/etc/chromium/policies"));
- #endif
-@@ -534,7 +536,7 @@ bool PathProvider(int key, base::FilePat
- #endif
-       break;
- 
--#if defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-     case chrome::DIR_NATIVE_MESSAGING:
- #if defined(OS_MACOSX)
- #if defined(GOOGLE_CHROME_BUILD)
-@@ -548,6 +550,9 @@ bool PathProvider(int key, base::FilePat
- #if defined(GOOGLE_CHROME_BUILD)
-       cur = base::FilePath(FILE_PATH_LITERAL(
-           "/etc/opt/chrome/native-messaging-hosts"));
-+#elif defined(OS_BSD)
-+      cur = base::FilePath(FILE_PATH_LITERAL(
-+          "/usr/pkg/etc/chrome/native-messaging-hosts"));
- #else
-       cur = base::FilePath(FILE_PATH_LITERAL(
-           "/etc/chromium/native-messaging-hosts"));
-@@ -560,7 +565,7 @@ bool PathProvider(int key, base::FilePat
-         return false;
-       cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts"));
-       break;
--#endif  // defined(OS_LINUX) || defined(OS_MACOSX)
-+#endif  // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
- #if !defined(OS_ANDROID)
-     case chrome::DIR_GLOBAL_GCM_STORE:
-       if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
diff --git a/chromium-new/patches/patch-chrome_common_chrome__paths.h b/chromium-new/patches/patch-chrome_common_chrome__paths.h
deleted file mode 100644
index a029bfeb83..0000000000
--- a/chromium-new/patches/patch-chrome_common_chrome__paths.h
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- chrome/common/chrome_paths.h.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/chrome_paths.h
-@@ -49,7 +49,7 @@ enum {
-                                 // to set policies for chrome. This directory
-                                 // contains subdirectories.
- #endif
--#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && defined(CHROMIUM_BUILD)) || \
-+#if defined(OS_CHROMEOS) || ((defined(OS_LINUX) || defined(OS_BSD)) && defined(CHROMIUM_BUILD)) || \
-     defined(OS_MACOSX)
-   DIR_USER_EXTERNAL_EXTENSIONS,  // Directory for per-user external extensions
-                                  // on Chrome Mac and Chromium Linux.
-@@ -58,7 +58,7 @@ enum {
-                                  // create it.
- #endif
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   DIR_STANDALONE_EXTERNAL_EXTENSIONS,  // Directory for 'per-extension'
-                                        // definition manifest files that
-                                        // describe extensions which are to be
-@@ -112,7 +112,7 @@ enum {
-   DIR_SUPERVISED_USER_INSTALLED_WHITELISTS,  // Directory where sanitized
-                                              // supervised user whitelists are
-                                              // installed.
--#if defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_MACOSX)
-   DIR_NATIVE_MESSAGING,         // System directory where native messaging host
-                                 // manifest files are stored.
-   DIR_USER_NATIVE_MESSAGING,    // Directory with Native Messaging Hosts
diff --git a/chromium-new/patches/patch-chrome_common_chrome__paths__internal.h b/chromium-new/patches/patch-chrome_common_chrome__paths__internal.h
deleted file mode 100644
index ca44ff1e45..0000000000
--- a/chromium-new/patches/patch-chrome_common_chrome__paths__internal.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/common/chrome_paths_internal.h.orig	2017-02-02 02:02:50.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.
- bool GetUserDocumentsDirectory(base::FilePath* result);
- 
--#if defined(OS_WIN) || defined(OS_LINUX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
- // Gets the path to a safe default download directory for a user.
- bool GetUserDownloadsDirectorySafe(base::FilePath* result);
- #endif
diff --git a/chromium-new/patches/patch-chrome_common_chrome__switches.cc b/chromium-new/patches/patch-chrome_common_chrome__switches.cc
deleted file mode 100644
index 994aa137ee..0000000000
--- a/chromium-new/patches/patch-chrome_common_chrome__switches.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/common/chrome_switches.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/chrome_switches.cc
-@@ -1263,7 +1263,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 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
deleted file mode 100644
index 97e18e4cdb..0000000000
--- a/chromium-new/patches/patch-chrome_common_chrome__switches.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/common/chrome_switches.h.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/chrome_switches.h
-@@ -385,7 +385,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 kDisableInputImeAPI[];
- extern const char kEnableInputImeAPI[];
- #endif
diff --git a/chromium-new/patches/patch-chrome_common_extensions_chrome__extensions__client.cc b/chromium-new/patches/patch-chrome_common_extensions_chrome__extensions__client.cc
deleted file mode 100644
index 716e2b9804..0000000000
--- a/chromium-new/patches/patch-chrome_common_extensions_chrome__extensions__client.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- chrome/common/extensions/chrome_extensions_client.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/extensions/chrome_extensions_client.cc
-@@ -105,7 +105,10 @@ ChromeChannelForHistogram GetChromeChann
- static base::LazyInstance<ChromeExtensionsClient> g_client =
-     LAZY_INSTANCE_INITIALIZER;
- 
--ChromeExtensionsClient::ChromeExtensionsClient() {}
-+ChromeExtensionsClient::ChromeExtensionsClient()
-+    : chrome_api_permissions_(ChromeAPIPermissions()),
-+      extensions_api_permissions_(ExtensionsAPIPermissions()) {
-+}
- 
- ChromeExtensionsClient::~ChromeExtensionsClient() {
- }
diff --git a/chromium-new/patches/patch-chrome_common_extensions_command.cc b/chromium-new/patches/patch-chrome_common_extensions_command.cc
deleted file mode 100644
index 982bf08dbd..0000000000
--- a/chromium-new/patches/patch-chrome_common_extensions_command.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/common/extensions/command.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/extensions/command.cc
-@@ -302,7 +302,7 @@ std::string Command::CommandPlatform() {
-   return values::kKeybindingPlatformMac;
- #elif defined(OS_CHROMEOS)
-   return values::kKeybindingPlatformChromeOs;
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-   return values::kKeybindingPlatformLinux;
- #else
-   return "";
diff --git a/chromium-new/patches/patch-chrome_common_features.gni b/chromium-new/patches/patch-chrome_common_features.gni
deleted file mode 100644
index 69c463f26f..0000000000
--- a/chromium-new/patches/patch-chrome_common_features.gni
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chrome/common/features.gni.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/features.gni
-@@ -43,7 +43,7 @@ declare_args() {
-   enable_hotwording = is_chrome_branded && is_chromeos
- 
-   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)
- 
-   # Set to true to bundle all the mash related mojo services into chrome.
-   # Specify --mash to chrome to have chrome start the mash environment.
diff --git a/chromium-new/patches/patch-chrome_common_pref__names.cc b/chromium-new/patches/patch-chrome_common_pref__names.cc
deleted file mode 100644
index 41dc584b87..0000000000
--- a/chromium-new/patches/patch-chrome_common_pref__names.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- chrome/common/pref_names.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/pref_names.cc
-@@ -964,7 +964,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_BSD)) && !defined(OS_CHROMEOS)
- // Linux specific preference on whether we should match the system theme.
- const char kUsesSystemTheme[] = "extensions.theme.use_system";
- #endif
-@@ -1051,7 +1051,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";
-@@ -1438,7 +1438,7 @@ const char kDownloadDefaultDirectory[] =
- // upgrade a unsafe location to a safe location.
- const char kDownloadDirUpgraded[] = "download.directory_upgrade";
- 
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
- const char kOpenPdfDownloadInSystemReader[] =
-     "download.open_pdf_in_system_reader";
- #endif
diff --git a/chromium-new/patches/patch-chrome_common_pref__names.h b/chromium-new/patches/patch-chrome_common_pref__names.h
deleted file mode 100644
index fba60c8c52..0000000000
--- a/chromium-new/patches/patch-chrome_common_pref__names.h
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- chrome/common/pref_names.h.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/common/pref_names.h
-@@ -322,7 +322,7 @@ extern const char kForceGoogleSafeSearch
- extern const char kForceYouTubeRestrict[];
- extern const char kForceSessionSync[];
- extern const char kAllowedDomainsForApps[];
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
- extern const char kUsesSystemTheme[];
- #endif
- extern const char kCurrentThemePackFilename[];
-@@ -355,7 +355,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[];
-@@ -510,7 +510,7 @@ extern const char kAppWindowPlacement[];
- extern const char kDownloadDefaultDirectory[];
- extern const char kDownloadExtensionsToOpen[];
- extern const char kDownloadDirUpgraded[];
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
- extern const char kOpenPdfDownloadInSystemReader[];
- #endif
- 
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
deleted file mode 100644
index 4b7fc59da8..0000000000
--- a/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- chrome/renderer/pepper/pepper_flash_font_file_host.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/renderer/pepper/pepper_flash_font_file_host.cc
-@@ -14,7 +14,7 @@
- #include "ppapi/proxy/ppapi_messages.h"
- #include "ppapi/proxy/serialized_structs.h"
- 
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #include "content/public/common/child_process_sandbox_support_linux.h"
- #elif defined(OS_WIN)
- #include "third_party/skia/include/ports/SkFontMgr.h"
-@@ -27,7 +27,7 @@ PepperFlashFontFileHost::PepperFlashFont
-     const ppapi::proxy::SerializedFontDescription& description,
-     PP_PrivateFontCharset charset)
-     : ResourceHost(host->GetPpapiHost(), instance, resource) {
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   fd_.reset(content::MatchFontWithFallback(
-       description.face,
-       description.weight >= PP_BROWSERFONT_TRUSTED_WEIGHT_BOLD,
-@@ -44,7 +44,7 @@ PepperFlashFontFileHost::PepperFlashFont
-   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)
- }
- 
- PepperFlashFontFileHost::~PepperFlashFontFileHost() {}
-@@ -63,7 +63,7 @@ bool PepperFlashFontFileHost::GetFontDat
-                                           void* buffer,
-                                           size_t* length) {
-   bool result = false;
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   int fd = fd_.get();
-   if (fd != -1)
-     result = content::GetFontTable(fd, table, 0 /* offset */,
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
deleted file mode 100644
index 929ef50e2c..0000000000
--- a/chromium-new/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/renderer/pepper/pepper_flash_font_file_host.h.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/renderer/pepper/pepper_flash_font_file_host.h
-@@ -14,7 +14,7 @@
- #include "ppapi/c/private/pp_private_font_charset.h"
- #include "ppapi/host/resource_host.h"
- 
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #include "base/files/scoped_file.h"
- #elif defined(OS_WIN)
- #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);
- 
--#if defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   base::ScopedFD fd_;
- #elif defined(OS_WIN)
-   sk_sp<SkTypeface> typeface_;
diff --git a/chromium-new/patches/patch-chrome_test_BUILD.gn b/chromium-new/patches/patch-chrome_test_BUILD.gn
deleted file mode 100644
index b8e38657cb..0000000000
--- a/chromium-new/patches/patch-chrome_test_BUILD.gn
+++ /dev/null
@@ -1,169 +0,0 @@
-$NetBSD$
-
---- chrome/test/BUILD.gn.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/test/BUILD.gn
-@@ -186,7 +186,7 @@ static_library("test_support") {
-     ]
-   }
- 
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     public_deps += [ "//crypto:platform" ]
-   }
-   if (is_mac) {
-@@ -461,7 +461,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",
-@@ -470,7 +470,7 @@ if (!is_android) {
-         "$root_out_dir/resources.pak",
-       ]
-     }
--    if (is_linux) {
-+    if (is_linux || is_bsd) {
-       data += [ "$root_out_dir/libppapi_tests.so" ]
-     }
- 
-@@ -577,7 +577,7 @@ if (!is_android) {
-           "base/interactive_test_utils_views.cc",
-         ]
-       }
--      if (is_linux) {
-+      if (is_linux || is_bsd) {
-         if (!is_chromeos) {
-           # Desktop linux.
-           sources -= [
-@@ -2010,14 +2010,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" ]
-       }
-@@ -2029,7 +2029,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) {
-@@ -2136,7 +2136,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" ]
-     }
-@@ -2363,7 +2363,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" ]
-       }
-@@ -2558,7 +2558,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 += [
-         # Tests for non mobile and non CrOS (includes Linux, Win, Mac).
-         "../browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc",
-@@ -2746,7 +2746,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",
-@@ -3411,7 +3411,7 @@ test("unit_tests") {
-       "$root_out_dir/resources.pak",
-     ]
-   }
--  if (is_linux || is_win) {
-+  if (is_linux || is_bsd || is_win) {
-     data += [ "$root_out_dir/chrome_200_percent.pak" ]
-   }
- 
-@@ -4111,7 +4111,7 @@ test("unit_tests") {
-       "//ui/wm",
-     ]
-   }
--  if (!is_chromeos && is_linux) {
-+  if (!is_chromeos && (is_linux || is_bsd)) {
-     sources += [
-       "../browser/password_manager/native_backend_kwallet_x_unittest.cc",
-       "../browser/shell_integration_linux_unittest.cc",
-@@ -4131,7 +4131,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)) {
-     if (use_gtk3) {
-       deps += [ "//chrome/browser/ui/libgtkui:libgtk3ui" ]
-     } else {
-@@ -4424,18 +4424,18 @@ test("unit_tests") {
-       "//components/os_crypt:gnome_keyring_direct",
-     ]
-   }
--  if (is_linux && !is_chromeos && !use_ozone) {
-+  if ((is_linux || is_bsd) && !is_chromeos && !use_ozone) {
-     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) {
-@@ -4941,7 +4941,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 = [
-@@ -4967,7 +4967,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 = [
-       "../app/chrome_version.rc.version",
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
deleted file mode 100644
index 7a35c5738b..0000000000
--- a/chromium-new/patches/patch-chrome_test_base_in__process__browser__test.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- chrome/test/base/in_process_browser_test.cc.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/test/base/in_process_browser_test.cc
-@@ -93,6 +93,10 @@
- 
- namespace {
- 
-+#if defined(OS_FREEBSD)
-+#include <signal.h>
-+#endif
-+
- // Passed as value of kTestType.
- const char kBrowserTestType[] = "browser";
- 
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
deleted file mode 100644
index 58fa557f12..0000000000
--- a/chromium-new/patches/patch-chrome_test_base_testing__browser__process.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- chrome/test/base/testing_browser_process.h.orig	2017-02-02 02:02:50.000000000 +0000
-+++ chrome/test/base/testing_browser_process.h
-@@ -107,8 +107,8 @@ class TestingBrowserProcess : public Bro
-   DownloadStatusUpdater* download_status_updater() override;
-   DownloadRequestLimiter* download_request_limiter() override;
- 
--#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
--  void StartAutoupdateTimer() override {}
-+#if (defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FREEBSD)) && !defined(OS_CHROMEOS)
-+  void StartAutoupdateTimer() /*override*/ {}
- #endif
- 
-   net_log::ChromeNetLog* net_log() 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
deleted file mode 100644
index 684e56d5a8..0000000000
--- a/chromium-new/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- chrome/test/chromedriver/chrome/chrome_finder.cc.orig	2017-02-02 02:02:50.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"));
-   }
- }
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- void GetApplicationDirs(std::vector<base::FilePath>* locations) {
-   locations->push_back(base::FilePath("/opt/google/chrome"));
-   locations->push_back(base::FilePath("/usr/local/bin"));
-@@ -95,7 +95,7 @@ bool FindChrome(base::FilePath* browser_
- #elif defined(OS_MACOSX)
-       base::FilePath("Google Chrome.app/Contents/MacOS/Google Chrome"),
-       base::FilePath("Chromium.app/Contents/MacOS/Chromium")
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-       base::FilePath("google-chrome"),
-       base::FilePath("chrome"),
-       base::FilePath("chromium"),
diff --git a/chromium-new/patches/patch-chromecast_BUILD.gn b/chromium-new/patches/patch-chromecast_BUILD.gn
deleted file mode 100644
index 9c351414d3..0000000000
--- a/chromium-new/patches/patch-chromecast_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chromecast/BUILD.gn.orig	2017-02-02 02:02:51.000000000 +0000
-+++ chromecast/BUILD.gn
-@@ -51,7 +51,7 @@ cast_test_group("cast_tests") {
-     tests += [ "//gpu:gpu_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
deleted file mode 100644
index f6980a79de..0000000000
--- a/chromium-new/patches/patch-chromecast_browser_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chromecast/browser/BUILD.gn.orig	2017-02-02 02:02:51.000000000 +0000
-+++ chromecast/browser/BUILD.gn
-@@ -120,7 +120,7 @@ source_set("browser") {
-     "//ui/gl",
-   ]
- 
--  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
deleted file mode 100644
index 6bd99ea220..0000000000
--- a/chromium-new/patches/patch-chromecast_browser_metrics_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chromecast/browser/metrics/BUILD.gn.orig	2017-02-02 02:02:51.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
deleted file mode 100644
index b99d7a19b3..0000000000
--- a/chromium-new/patches/patch-chromecast_crash_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- chromecast/crash/BUILD.gn.orig	2017-02-02 02:02:51.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
deleted file mode 100644
index 0f5b330a74..0000000000
--- a/chromium-new/patches/patch-components_BUILD.gn
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- components/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/BUILD.gn
-@@ -168,8 +168,8 @@ test("components_unittests") {
-       "//components/certificate_reporting:unit_tests",
-       "//components/certificate_transparency:unit_tests",
-       "//components/contextual_search: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_reduction_proxy/core/browser:unit_tests",
-       "//components/data_reduction_proxy/core/common:unit_tests",
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
deleted file mode 100644
index 4dedd782c2..0000000000
--- a/chromium-new/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/autofill/content/renderer/password_form_conversion_utils.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/autofill/content/renderer/password_form_conversion_utils.cc
-@@ -28,7 +28,11 @@
- #include "third_party/WebKit/public/web/WebFormControlElement.h"
- #include "third_party/WebKit/public/web/WebFrame.h"
- #include "third_party/WebKit/public/web/WebInputElement.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- using blink::WebDocument;
- using blink::WebFormControlElement;
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
deleted file mode 100644
index 493d9e04de..0000000000
--- a/chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- components/content_settings/core/browser/website_settings_registry.cc.orig	2017-02-02 02:02:52.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
deleted file mode 100644
index a403fd27f8..0000000000
--- a/chromium-new/patches/patch-components_content__settings_core_browser_website__settings__registry.h
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- components/content_settings/core/browser/website_settings_registry.h.orig	2017-02-02 02:02:52.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
deleted file mode 100644
index fa3fc7b5ff..0000000000
--- a/chromium-new/patches/patch-components_cookie__config_cookie__store__util.cc
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
---- components/cookie_config/cookie_store_util.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/cookie_config/cookie_store_util.cc
-@@ -11,7 +11,7 @@
- 
- namespace cookie_config {
- 
--#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
- namespace {
- 
- // Use the operating system's mechanisms to encrypt cookies before writing
-@@ -63,10 +63,10 @@ base::LazyInstance<CookieOSCryptoDelegat
- net::CookieCryptoDelegate* GetCookieCryptoDelegate() {
-   return g_cookie_crypto_delegate.Pointer();
- }
--#else   // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
-+#else   // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
- net::CookieCryptoDelegate* GetCookieCryptoDelegate() {
-   return NULL;
- }
--#endif  // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
-+#endif  // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
- 
- }  // namespace cookie_config
diff --git a/chromium-new/patches/patch-components_crash_content_app_BUILD.gn b/chromium-new/patches/patch-components_crash_content_app_BUILD.gn
deleted file mode 100644
index 2bc22ee6ec..0000000000
--- a/chromium-new/patches/patch-components_crash_content_app_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- components/crash/content/app/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/crash/content/app/BUILD.gn
-@@ -145,7 +145,7 @@ source_set("app_non_mac_win") {
-       "//breakpad:breakpad_handler",
-       "//sandbox",
-     ]
--  } 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
deleted file mode 100644
index 1b7636ac93..0000000000
--- a/chromium-new/patches/patch-components_crash_content_browser_BUILD.gn
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
---- components/crash/content/browser/BUILD.gn.orig	2017-02-02 02:02:52.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_drive_drive__api__util.cc b/chromium-new/patches/patch-components_drive_drive__api__util.cc
deleted file mode 100644
index 22d2f6dca4..0000000000
--- a/chromium-new/patches/patch-components_drive_drive__api__util.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/drive/drive_api_util.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/drive/drive_api_util.cc
-@@ -22,7 +22,11 @@
- #include "google_apis/drive/drive_api_parser.h"
- #include "net/base/escape.h"
- #include "net/base/net_errors.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- #include "url/gurl.h"
- 
- namespace drive {
diff --git a/chromium-new/patches/patch-components_feedback_anonymizer__tool.cc b/chromium-new/patches/patch-components_feedback_anonymizer__tool.cc
deleted file mode 100644
index 87fe9a46de..0000000000
--- a/chromium-new/patches/patch-components_feedback_anonymizer__tool.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/feedback/anonymizer_tool.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/feedback/anonymizer_tool.cc
-@@ -10,7 +10,11 @@
- #include "base/strings/string_number_conversions.h"
- #include "base/strings/string_util.h"
- #include "base/strings/stringprintf.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- using re2::RE2;
- 
diff --git a/chromium-new/patches/patch-components_flags__ui_flags__state.cc b/chromium-new/patches/patch-components_flags__ui_flags__state.cc
deleted file mode 100644
index eef5a54df5..0000000000
--- a/chromium-new/patches/patch-components_flags__ui_flags__state.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- components/flags_ui/flags_state.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/flags_ui/flags_state.cc
-@@ -544,7 +544,7 @@ int FlagsState::GetCurrentPlatform() {
-   return kOsWin;
- #elif defined(OS_CHROMEOS)  // Needs to be before the OS_LINUX check.
-   return kOsCrOS;
--#elif defined(OS_LINUX) || defined(OS_OPENBSD)
-+#elif defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_FREEBSD) || defined(OS_NETBSD)
-   return kOsLinux;
- #elif defined(OS_ANDROID)
-   return kOsAndroid;
diff --git a/chromium-new/patches/patch-components_gcm__driver_gcm__client.h b/chromium-new/patches/patch-components_gcm__driver_gcm__client.h
deleted file mode 100644
index 55c6365890..0000000000
--- a/chromium-new/patches/patch-components_gcm__driver_gcm__client.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- components/gcm_driver/gcm_client.h.orig	2017-02-02 02:02:52.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
deleted file mode 100644
index ba839c586a..0000000000
--- a/chromium-new/patches/patch-components_gcm__driver_gcm__client__impl.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- components/gcm_driver/gcm_client_impl.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/gcm_driver/gcm_client_impl.cc
-@@ -136,6 +136,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
deleted file mode 100644
index bb071285fa..0000000000
--- a/chromium-new/patches/patch-components_json__schema_json__schema__validator.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/json_schema/json_schema_validator.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/json_schema/json_schema_validator.cc
-@@ -21,7 +21,11 @@
- #include "base/strings/stringprintf.h"
- #include "base/values.h"
- #include "components/json_schema/json_schema_constants.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- namespace schema = json_schema_constants;
- 
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
deleted file mode 100644
index 5593fa3fe7..0000000000
--- a/chromium-new/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/keyed_service/core/dependency_graph_unittest.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/keyed_service/core/dependency_graph_unittest.cc
-@@ -9,7 +9,11 @@
- #include "components/keyed_service/core/dependency_graph.h"
- #include "components/keyed_service/core/dependency_node.h"
- #include "testing/gtest/include/gtest/gtest.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- namespace {
- 
diff --git a/chromium-new/patches/patch-components_metrics_BUILD.gn b/chromium-new/patches/patch-components_metrics_BUILD.gn
deleted file mode 100644
index f76883c395..0000000000
--- a/chromium-new/patches/patch-components_metrics_BUILD.gn
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD$
-
---- components/metrics/BUILD.gn.orig	2017-02-02 02:02:52.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) {
-@@ -282,7 +289,7 @@ static_library("test_support") {
-   ]
- }
- 
--if (is_linux) {
-+if (is_linux || is_bsd) {
-   static_library("serialization") {
-     sources = [
-       "serialization/metric_sample.cc",
-@@ -341,7 +348,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
deleted file mode 100644
index 2e6fd1058d..0000000000
--- a/chromium-new/patches/patch-components_metrics_drive__metrics__provider__linux.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- components/metrics/drive_metrics_provider_linux.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/metrics/drive_metrics_provider_linux.cc
-@@ -4,7 +4,13 @@
- 
- #include "components/metrics/drive_metrics_provider.h"
- 
-+#if defined(OS_BSD)
-+#include <sys/types.h>
-+#define MAJOR(dev) major(dev)
-+#define MINOR(dev) minor(dev)
-+#else
- #include <linux/kdev_t.h>  // For MAJOR()/MINOR().
-+#endif
- #include <sys/stat.h>
- #include <string>
- 
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
deleted file mode 100644
index 53434a937b..0000000000
--- a/chromium-new/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- components/metrics/system_memory_stats_recorder_linux.cc.orig	2017-02-02 02:02:52.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_BSD)
-   base::SystemMemoryInfoKB memory;
-   if (!base::GetSystemMemoryInfo(&memory))
-     return;
-@@ -93,6 +94,7 @@ void RecordMemoryStats(RecordMemoryStats
-       break;
-     }
-   }
-+#endif // !defined(OS_BSD)
- }
- 
- }  // namespace metrics
diff --git a/chromium-new/patches/patch-components_neterror_resources_neterror.js b/chromium-new/patches/patch-components_neterror_resources_neterror.js
deleted file mode 100644
index 2fb83ce046..0000000000
--- a/chromium-new/patches/patch-components_neterror_resources_neterror.js
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- components/neterror/resources/neterror.js.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/neterror/resources/neterror.js
-@@ -150,7 +150,7 @@ function setUpCachedButton(buttonStrings
- }
- 
- var primaryControlOnLeft = true;
--<if expr="is_macosx or is_ios or is_linux or is_android">
-+<if expr="is_macosx or is_ios or is_linux or is_android or is_bsd">
- primaryControlOnLeft = false;
- </if>
- 
diff --git a/chromium-new/patches/patch-components_os__crypt_os__crypt.h b/chromium-new/patches/patch-components_os__crypt_os__crypt.h
deleted file mode 100644
index 5546d28196..0000000000
--- a/chromium-new/patches/patch-components_os__crypt_os__crypt.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- components/os_crypt/os_crypt.h.orig	2017-02-02 02:02:52.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
deleted file mode 100644
index 757e113d97..0000000000
--- a/chromium-new/patches/patch-components_password__manager_core_browser_import_csv__reader.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/password_manager/core/browser/import/csv_reader.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/password_manager/core/browser/import/csv_reader.cc
-@@ -9,7 +9,11 @@
- #include "base/logging.h"
- #include "base/macros.h"
- #include "base/strings/string_util.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- namespace {
- 
diff --git a/chromium-new/patches/patch-components_plugins_renderer_BUILD.gn b/chromium-new/patches/patch-components_plugins_renderer_BUILD.gn
deleted file mode 100644
index 23fcb9cd7d..0000000000
--- a/chromium-new/patches/patch-components_plugins_renderer_BUILD.gn
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- components/plugins/renderer/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/plugins/renderer/BUILD.gn
-@@ -19,6 +19,7 @@ static_library("renderer") {
-   }
- 
-   deps = [
-+    "//v8",
-     "//content/public/child",
-     "//content/public/common",
-     "//content/public/renderer",
-@@ -27,6 +28,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
deleted file mode 100644
index a73c1a71e5..0000000000
--- a/chromium-new/patches/patch-components_plugins_renderer_plugin__placeholder.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/plugins/renderer/plugin_placeholder.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/plugins/renderer/plugin_placeholder.cc
-@@ -11,7 +11,11 @@
- #include "gin/object_template_builder.h"
- #include "third_party/WebKit/public/web/WebElement.h"
- #include "third_party/WebKit/public/web/WebPluginContainer.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- namespace plugins {
- 
diff --git a/chromium-new/patches/patch-components_policy_BUILD.gn b/chromium-new/patches/patch-components_policy_BUILD.gn
deleted file mode 100644
index 993cfb9acc..0000000000
--- a/chromium-new/patches/patch-components_policy_BUILD.gn
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- components/policy/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/policy/BUILD.gn
-@@ -14,6 +14,7 @@ import("//tools/grit/grit_rule.gni")
- gen_policy_templates_common = true
- gen_policy_templates_win = is_win
- gen_policy_templates_linux = is_linux
-+gen_policy_templates_bsd = is_bsd
- gen_policy_templates_android = is_android
- gen_policy_templates_mac = is_mac
- 
-@@ -126,7 +127,7 @@ if (enable_configuration_policy) {
-       outputs += policy_templates_android_outputs
-       defines += [ "gen_policy_templates_android" ]
-     }
--    if (gen_policy_templates_linux) {
-+    if (gen_policy_templates_linux || gen_policy_templates_bsd) {
-       outputs += policy_templates_linux_outputs
-       defines += [ "gen_policy_templates_linux" ]
-     }
diff --git a/chromium-new/patches/patch-components_policy_core_common_schema.cc b/chromium-new/patches/patch-components_policy_core_common_schema.cc
deleted file mode 100644
index 112ed53bd2..0000000000
--- a/chromium-new/patches/patch-components_policy_core_common_schema.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/policy/core/common/schema.cc.orig	2017-02-02 02:02:52.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)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- namespace schema = json_schema_constants;
- 
diff --git a/chromium-new/patches/patch-components_policy_resources_policy__templates.json b/chromium-new/patches/patch-components_policy_resources_policy__templates.json
deleted file mode 100644
index cb90fd92b9..0000000000
--- a/chromium-new/patches/patch-components_policy_resources_policy__templates.json
+++ /dev/null
@@ -1,49 +0,0 @@
-$NetBSD$
-
---- components/policy/resources/policy_templates.json.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/policy/resources/policy_templates.json
-@@ -932,7 +932,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,
-@@ -2065,7 +2065,7 @@
-           'name': 'GSSAPILibraryName',
-           'type': 'string',
-           'schema': { 'type': 'string' },
--          'supported_on': ['chrome.linux:9-'],
-+          'supported_on': ['chrome.linux:9-', 'chrome.freebsd:9-'],
-           'features': {
-             'dynamic_refresh': False,
-             'per_profile': False,
-@@ -4742,7 +4742,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-'],
-       'features': {
-         'dynamic_refresh': True,
-         'per_profile': False,
-@@ -5627,7 +5627,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-'],
-       'features': {
-         'can_be_recommended': True,
-         'dynamic_refresh': True,
-@@ -6156,7 +6156,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
deleted file mode 100644
index 4ee03a0ccb..0000000000
--- a/chromium-new/patches/patch-components_policy_tools_generate__policy__source.py
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- components/policy/tools/generate_policy_source.py.orig	2017-02-02 02:02:52.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', 'netbsd'])
-         else:
-           self.platforms.append(platform_sub)
-       else:
diff --git a/chromium-new/patches/patch-components_storage__monitor_BUILD.gn b/chromium-new/patches/patch-components_storage__monitor_BUILD.gn
deleted file mode 100644
index 8538ef1f20..0000000000
--- a/chromium-new/patches/patch-components_storage__monitor_BUILD.gn
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD$
-
---- components/storage_monitor/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/storage_monitor/BUILD.gn
-@@ -65,6 +65,29 @@ static_library("storage_monitor") {
-     ]
-   }
- 
-+  if (is_bsd) {
-+    sources -= [
-+      "mtab_watcher_linux.cc",
-+      "mtab_watcher_linux.h",
-+      "storage_monitor_linux.cc",
-+      "storage_monitor_linux.h",
-+      "udev_util_linux.cc",
-+      "udev_util_linux.h",
-+    ]
-+    if (is_freebsd) {
-+      sources += [
-+        "storage_monitor_freebsd.cc",
-+        "storage_monitor_freebsd.h",
-+      ]
-+    }
-+    if (is_netbsd) {
-+      sources += [
-+        "storage_monitor_netbsd.cc",
-+        "storage_monitor_netbsd.h",
-+      ]
-+    }
-+  }
-+
-   if (use_udev) {
-     deps += [ "//device/udev_linux" ]
-   } else if (is_linux) {
diff --git a/chromium-new/patches/patch-components_storage__monitor_storage__monitor.cc b/chromium-new/patches/patch-components_storage__monitor_storage__monitor.cc
deleted file mode 100644
index 0b7410219f..0000000000
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- components/storage_monitor/storage_monitor.cc.orig	2017-02-02 02:02:52.000000000 +0000
-+++ components/storage_monitor/storage_monitor.cc
-@@ -85,6 +85,7 @@ std::vector<StorageInfo> StorageMonitor:
- 
- void StorageMonitor::EnsureInitialized(base::Closure callback) {
-   DCHECK(thread_checker_.CalledOnValidThread());
-+//#if !defined(OS_BSD) //XXX(rene) why disabled?
-   if (initialized_) {
-     if (!callback.is_null())
-       callback.Run();
-@@ -100,6 +101,7 @@ void StorageMonitor::EnsureInitialized(b
- 
-   initializing_ = true;
-   Init();
-+//#endif
- }
- 
- bool StorageMonitor::IsInitialized() const {
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
deleted file mode 100644
index 3eb57f5065..0000000000
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc
+++ /dev/null
@@ -1,106 +0,0 @@
-$NetBSD$
-
---- components/storage_monitor/storage_monitor_freebsd.cc.orig	2017-02-14 09:15:22.293048520 +0000
-+++ components/storage_monitor/storage_monitor_freebsd.cc
-@@ -0,0 +1,101 @@
-+// 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.
-+
-+// StorageMonitorFreeBSD implementation.
-+
-+#include "components/storage_monitor/storage_monitor_freebsd.h"
-+
-+#include <stdio.h>
-+
-+#include <list>
-+
-+#include "base/bind.h"
-+#include "base/metrics/histogram.h"
-+#include "base/process/kill.h"
-+#include "base/process/launch.h"
-+#include "base/stl_util.h"
-+#include "base/strings/string_number_conversions.h"
-+#include "base/strings/string_util.h"
-+#include "base/strings/utf_string_conversions.h"
-+#include "components/storage_monitor/media_storage_util.h"
-+#include "components/storage_monitor/removable_device_constants.h"
-+#include "components/storage_monitor/storage_info.h"
-+
-+using content::BrowserThread;
-+
-+namespace storage_monitor {
-+
-+namespace {
-+
-+// udev device property constants.
-+const char kBlockSubsystemKey[] = "block";
-+const char kDiskDeviceTypeKey[] = "disk";
-+const char kFsUUID[] = "ID_FS_UUID";
-+const char kLabel[] = "ID_FS_LABEL";
-+const char kModel[] = "ID_MODEL";
-+const char kModelID[] = "ID_MODEL_ID";
-+const char kRemovableSysAttr[] = "removable";
-+const char kSerialShort[] = "ID_SERIAL_SHORT";
-+const char kSizeSysAttr[] = "size";
-+const char kVendor[] = "ID_VENDOR";
-+const char kVendorID[] = "ID_VENDOR_ID";
-+
-+StorageMonitor::EjectStatus EjectPathOnFileThread(
-+    const base::FilePath& path,
-+    const base::FilePath& device) {
-+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
-+
-+  static const char kUmountBinary[] = "/sbin/umount";
-+  std::vector<std::string> command;
-+  command.push_back(kUmountBinary);
-+  command.push_back(path.value());
-+
-+  base::LaunchOptions options;
-+  base::Process process = base::LaunchProcess(command, options);
-+  if (!process.IsValid())
-+    return StorageMonitor::EJECT_FAILURE;
-+
-+  int exit_code = -1;
-+  if (!process.WaitForExitWithTimeout(base::TimeDelta::FromMilliseconds(3000),
-+                                      &exit_code)) {
-+    process.Terminate(-1, false);
-+    base::EnsureProcessTerminated(std::move(process));
-+    return StorageMonitor::EJECT_FAILURE;
-+  }
-+
-+  // TODO(gbillock): Make sure this is found in documentation
-+  // somewhere. Experimentally it seems to hold that exit code
-+  // 1 means device is in use.
-+  if (exit_code == 1)
-+    return StorageMonitor::EJECT_IN_USE;
-+  if (exit_code != 0)
-+    return StorageMonitor::EJECT_FAILURE;
-+
-+  return StorageMonitor::EJECT_OK;
-+}
-+
-+}  // namespace
-+
-+StorageMonitorFreeBSD::StorageMonitorFreeBSD() {
-+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-+}
-+
-+StorageMonitorFreeBSD::~StorageMonitorFreeBSD() {
-+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-+}
-+
-+void StorageMonitorFreeBSD::Init() {
-+}
-+
-+bool StorageMonitorFreeBSD::GetStorageInfoForPath(
-+    const base::FilePath& path,
-+    StorageInfo* device_info) const {
-+  return false; // TODO
-+}
-+
-+StorageMonitor* StorageMonitor::CreateInternal() {
-+  return new StorageMonitorFreeBSD();
-+}
-+
-+} // namespace storage_monitor
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
deleted file mode 100644
index 63f5451196..0000000000
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__freebsd.h
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD$
-
---- components/storage_monitor/storage_monitor_freebsd.h.orig	2017-02-14 09:15:22.293265649 +0000
-+++ components/storage_monitor/storage_monitor_freebsd.h
-@@ -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.
-+
-+// StorageMonitorFreeBSD processes mount point change events, notifies listeners
-+// about the addition and deletion of media devices, and answers queries about
-+// mounted devices.
-+// StorageMonitorFreeBSD lives on the UI thread, and uses ???
-+// the FILE thread to get mount point change events.
-+
-+#ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_
-+#define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_
-+
-+#include <map>
-+#include <string>
-+
-+#include "base/compiler_specific.h"
-+#include "base/files/file_path.h"
-+#include "base/files/file_path_watcher.h"
-+#include "base/memory/weak_ptr.h"
-+#include "components/storage_monitor/storage_monitor.h"
-+#include "content/public/browser/browser_thread.h"
-+
-+namespace storage_monitor {
-+
-+class StorageMonitorFreeBSD : public StorageMonitor {
-+ public:
-+  // Should only be called by browser start up code.
-+  // Use StorageMonitor::GetInstance() instead.
-+  explicit StorageMonitorFreeBSD();
-+  virtual ~StorageMonitorFreeBSD();
-+
-+  // Must be called for StorageMonitorFreeBSD to work.
-+  virtual void Init() override;
-+ private:
-+  // StorageMonitor implementation.
-+  virtual bool GetStorageInfoForPath(const base::FilePath& path,
-+                                     StorageInfo* device_info) const override;
-+
-+  DISALLOW_COPY_AND_ASSIGN(StorageMonitorFreeBSD);
-+};
-+
-+} // namespace storage_monitor
-+
-+#endif  // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_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
deleted file mode 100644
index ea9e4ab41e..0000000000
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-$NetBSD$
-
---- 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.
-+// Use of this source code is governed by a BSD-style license that can be
-+// found in the LICENSE file.
-+
-+// StorageMonitorNetBSD implementation.
-+
-+#include "components/storage_monitor/storage_monitor_netbsd.h"
-+
-+#include <stdio.h>
-+
-+#include <list>
-+
-+#include "base/bind.h"
-+#include "base/metrics/histogram.h"
-+#include "base/process/kill.h"
-+#include "base/process/launch.h"
-+#include "base/stl_util.h"
-+#include "base/strings/string_number_conversions.h"
-+#include "base/strings/string_util.h"
-+#include "base/strings/utf_string_conversions.h"
-+#include "components/storage_monitor/media_storage_util.h"
-+#include "components/storage_monitor/removable_device_constants.h"
-+#include "components/storage_monitor/storage_info.h"
-+
-+using content::BrowserThread;
-+
-+namespace storage_monitor {
-+
-+namespace {
-+
-+}  // namespace
-+
-+StorageMonitorNetBSD::StorageMonitorNetBSD() {
-+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-+}
-+
-+StorageMonitorNetBSD::~StorageMonitorNetBSD() {
-+  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-+}
-+
-+void StorageMonitorNetBSD::Init() {
-+}
-+
-+bool StorageMonitorNetBSD::GetStorageInfoForPath(
-+    const base::FilePath& path,
-+    StorageInfo* device_info) const {
-+  return false; // TODO
-+}
-+
-+StorageMonitor* StorageMonitor::CreateInternal() {
-+  return new StorageMonitorNetBSD();
-+}
-+
-+} // namespace storage_monitor
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
deleted file mode 100644
index 95e737894a..0000000000
--- a/chromium-new/patches/patch-components_storage__monitor_storage__monitor__netbsd.h
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD$
-
---- components/storage_monitor/storage_monitor_netbsd.h.orig	2017-02-15 20:24:30.383612419 +0000
-+++ components/storage_monitor/storage_monitor_netbsd.h
-@@ -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.
-+
-+// StorageMonitorNetBSD processes mount point change events, notifies listeners
-+// about the addition and deletion of media devices, and answers queries about
-+// mounted devices.
-+// StorageMonitorFreeBSD lives on the UI thread, and uses ???
-+// the FILE thread to get mount point change events.
-+
-+#ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_NETBSD_H_
-+#define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_NETBSD_H_
-+
-+#include <map>
-+#include <string>
-+
-+#include "base/compiler_specific.h"
-+#include "base/files/file_path.h"
-+#include "base/files/file_path_watcher.h"
-+#include "base/memory/weak_ptr.h"
-+#include "components/storage_monitor/storage_monitor.h"
-+#include "content/public/browser/browser_thread.h"
-+
-+namespace storage_monitor {
-+
-+class StorageMonitorNetBSD : public StorageMonitor {
-+ public:
-+  // Should only be called by browser start up code.
-+  // Use StorageMonitor::GetInstance() instead.
-+  explicit StorageMonitorNetBSD();
-+  virtual ~StorageMonitorNetBSD();
-+
-+  // Must be called for StorageMonitorFreeBSD to work.
-+  virtual void Init() override;
-+ private:
-+  // StorageMonitor implementation.
-+  virtual bool GetStorageInfoForPath(const base::FilePath& path,
-+                                     StorageInfo* device_info) const override;
-+
-+  DISALLOW_COPY_AND_ASSIGN(StorageMonitorNetBSD);
-+};
-+
-+} // namespace storage_monitor
-+
-+#endif  // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_NETBSD_H_
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
deleted file mode 100644
index ddfbbc220f..0000000000
--- a/chromium-new/patches/patch-components_sync_base_get__session__name__linux.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- components/sync/base/get_session_name_linux.cc.orig	2017-02-02 02:02:53.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
deleted file mode 100644
index fe93d08d76..0000000000
--- a/chromium-new/patches/patch-components_update__client_update__query__params.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- components/update_client/update_query_params.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ components/update_client/update_query_params.cc
-@@ -31,6 +31,10 @@ const char kOs[] =
-     "linux";
- #elif defined(OS_OPENBSD)
-     "openbsd";
-+#elif defined(OS_FREEBSD)
-+    "freebsd";
-+#elif defined(OS_NETBSD)
-+    "netbsd";
- #else
- #error "unknown os"
- #endif
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
deleted file mode 100644
index d0c8af1c7e..0000000000
--- a/chromium-new/patches/patch-components_url__matcher_regex__set__matcher.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- components/url_matcher/regex_set_matcher.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ components/url_matcher/regex_set_matcher.cc
-@@ -10,8 +10,13 @@
- #include "base/memory/ptr_util.h"
- #include "base/strings/string_util.h"
- #include "components/url_matcher/substring_set_matcher.h"
-+#if defined(OS_BSD)
-+#include <re2/filtered_re2.h>
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/filtered_re2.h"
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- namespace url_matcher {
- 
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
deleted file mode 100644
index eddae65bc4..0000000000
--- a/chromium-new/patches/patch-components_url__matcher_url__matcher__factory.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/url_matcher/url_matcher_factory.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ components/url_matcher/url_matcher_factory.cc
-@@ -16,7 +16,11 @@
- #include "base/values.h"
- #include "components/url_matcher/url_matcher_constants.h"
- #include "components/url_matcher/url_matcher_helpers.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- namespace url_matcher {
- 
diff --git a/chromium-new/patches/patch-components_variations_proto_study.proto b/chromium-new/patches/patch-components_variations_proto_study.proto
deleted file mode 100644
index 0d27a2aba2..0000000000
--- a/chromium-new/patches/patch-components_variations_proto_study.proto
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- components/variations/proto/study.proto.orig	2017-02-02 02:02:53.000000000 +0000
-+++ components/variations/proto/study.proto
-@@ -186,6 +186,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
deleted file mode 100644
index feb9242ed1..0000000000
--- a/chromium-new/patches/patch-components_webcrypto_algorithms_test__helpers.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- components/webcrypto/algorithms/test_helpers.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ components/webcrypto/algorithms/test_helpers.cc
-@@ -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"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- namespace webcrypto {
- 
diff --git a/chromium-new/patches/patch-content_app_BUILD.gn b/chromium-new/patches/patch-content_app_BUILD.gn
deleted file mode 100644
index a9ad02d395..0000000000
--- a/chromium-new/patches/patch-content_app_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/app/BUILD.gn.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/app/BUILD.gn
-@@ -68,7 +68,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
deleted file mode 100644
index 5a7847ad6b..0000000000
--- a/chromium-new/patches/patch-content_app_content__main__runner.cc
+++ /dev/null
@@ -1,44 +0,0 @@
-$NetBSD$
-
---- content/app/content_main_runner.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/app/content_main_runner.cc
-@@ -97,10 +97,10 @@
- #include "base/posix/global_descriptors.h"
- #include "content/public/common/content_descriptors.h"
- 
--#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_BSD)
- #include "content/public/common/zygote_fork_delegate_linux.h"
- #endif
--#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- #include "content/zygote/zygote_main.h"
- #endif
- 
-@@ -290,7 +290,7 @@ struct MainFunction {
-   int (*function)(const MainFunctionParams&);
- };
- 
--#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- // 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().
-@@ -342,7 +342,7 @@ int RunZygote(const MainFunctionParams& 
-   NOTREACHED() << "Unknown zygote process type: " << process_type;
-   return 1;
- }
--#endif  // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#endif  // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- 
- static void RegisterMainThreadFactories() {
- #if !defined(CHROME_MULTIPLE_DLL_BROWSER) && !defined(CHROME_MULTIPLE_DLL_CHILD)
-@@ -409,7 +409,7 @@ int RunNamedProcessTypeMain(
-     }
-   }
- 
--#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-   // Zygote startup is special -- see RunZygote comments above
-   // for why we don't use ZygoteMain directly.
-   if (process_type == switches::kZygoteProcess)
diff --git a/chromium-new/patches/patch-content_browser_BUILD.gn b/chromium-new/patches/patch-content_browser_BUILD.gn
deleted file mode 100644
index f1419185b6..0000000000
--- a/chromium-new/patches/patch-content_browser_BUILD.gn
+++ /dev/null
@@ -1,70 +0,0 @@
-$NetBSD$
-
---- content/browser/BUILD.gn.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/BUILD.gn
-@@ -1421,10 +1421,11 @@ source_set("browser") {
-       "memory/memory_monitor_chromeos.cc",
-       "memory/memory_monitor_chromeos.h",
-     ]
--  } else {
--    sources += [
--      "memory/memory_monitor_linux.cc",
--      "memory/memory_monitor_linux.h",
-+  }
-+
-+  if (is_bsd) {
-+    sources -= [
-+      "download/quarantine_linux.cc",
-     ]
-   }
- 
-@@ -1490,7 +1491,7 @@ source_set("browser") {
-     if (!is_ios) {
-       defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
-     }
--    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",
-@@ -1657,7 +1658,7 @@ source_set("browser") {
-     }
-   }
- 
--  if (is_linux && use_aura) {
-+  if ((is_linux || is_bsd) && use_aura) {
-     deps += [ "//build/linux:fontconfig" ]
-   }
- 
-@@ -1807,6 +1808,17 @@ 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",
-+    ]
-   }
- 
-   if (enable_mojo_media) {
-@@ -1930,11 +1942,11 @@ source_set("browser") {
-     deps += [ "//third_party/flac" ]
-   }
- 
--  if (is_linux && use_dbus) {
-+  if ((is_linux || is_bsd) && use_dbus) {
-     deps += [ "//dbus" ]
-   }
- 
--  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
deleted file mode 100644
index 3ac5d5cf79..0000000000
--- a/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/accessibility/browser_accessibility.h.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/accessibility/browser_accessibility.h
-@@ -38,7 +38,7 @@
- #define PLATFORM_HAS_NATIVE_ACCESSIBILITY_IMPL 1
- #endif
- 
--#if defined(OS_LINUX) && defined(USE_X11) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && defined(USE_X11) && !defined(OS_CHROMEOS)
- #define PLATFORM_HAS_NATIVE_ACCESSIBILITY_IMPL 1
- #endif
- 
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
deleted file mode 100644
index 28997af2a9..0000000000
--- a/chromium-new/patches/patch-content_browser_accessibility_browser__accessibility__manager.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- content/browser/accessibility/browser_accessibility_manager.h.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/accessibility/browser_accessibility_manager.h
-@@ -34,7 +34,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;
- #elif defined(OS_MACOSX)
- class BrowserAccessibilityManagerMac;
-@@ -244,7 +244,7 @@ class CONTENT_EXPORT BrowserAccessibilit
-   BrowserAccessibilityManagerAndroid* ToBrowserAccessibilityManagerAndroid();
- #endif
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(USE_X11)
-   BrowserAccessibilityManagerAuraLinux*
-       ToBrowserAccessibilityManagerAuraLinux();
- #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
deleted file mode 100644
index 0ef0db0e96..0000000000
--- a/chromium-new/patches/patch-content_browser_browser__main__loop.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-$NetBSD$
-
---- content/browser/browser_main_loop.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/browser_main_loop.cc
-@@ -203,6 +203,10 @@
- #include "gpu/vulkan/vulkan_implementation.h"
- #endif
- 
-+#if defined(OS_BSD)
-+#include "content/common/child_process_sandbox_support_impl_linux.h"
-+#endif
-+
- // One of the linux specific headers defines this as a macro.
- #ifdef DestroyAll
- #undef DestroyAll
-@@ -211,7 +215,7 @@
- namespace content {
- namespace {
- 
--#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#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");
-   if (parsed_command_line.HasSwitch(switches::kNoZygote)) {
-@@ -482,10 +486,15 @@ void BrowserMainLoop::Init() {
- void BrowserMainLoop::EarlyInitialization() {
-   TRACE_EVENT0("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_);
-+#elif defined(OS_BSD)
-+  RenderSandboxHostLinux::GetInstance()->Init();
-+  base::FileHandleMappingVector fds_to_map;
-+  const int sfd = RenderSandboxHostLinux::GetInstance()->GetRendererSocket();
-+  fds_to_map.push_back(std::make_pair(sfd, GetSandboxFD()));
- #endif
- 
- #if defined(USE_X11)
diff --git a/chromium-new/patches/patch-content_browser_child__process__launcher.cc b/chromium-new/patches/patch-content_browser_child__process__launcher.cc
deleted file mode 100644
index b42518d8a7..0000000000
--- a/chromium-new/patches/patch-content_browser_child__process__launcher.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-$NetBSD$
-
---- content/browser/child_process_launcher.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/child_process_launcher.cc
-@@ -249,7 +249,7 @@ void LaunchOnLauncherThread(const Notify
-   // We need to close the client end of the IPC channel to reliably detect
-   // child termination.
- 
--#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_BSD)
-   ZygoteHandle* zygote_handle =
-       !base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote)
-           ? delegate->GetZygote()
-@@ -267,7 +267,7 @@ void LaunchOnLauncherThread(const Notify
-     process = base::Process(handle);
-   } else
-   // Fall through to the normal posix case below when we're not zygoting.
--#endif  // !defined(OS_MACOSX)
-+#endif  // !defined(OS_MACOSX) && !defined(OS_BSD)
-   {
-     // Convert FD mapping to FileHandleMappingVector
-     base::FileHandleMappingVector fds_to_map =
-@@ -358,7 +358,7 @@ void TerminateOnLauncherThread(ZygoteHan
-   process.Terminate(RESULT_CODE_NORMAL_EXIT, false);
-   // On POSIX, we must additionally reap the child.
- #if defined(OS_POSIX)
--#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_BSD)
-   if (zygote) {
-     // If the renderer was created via a zygote, we have to proxy the reaping
-     // through the zygote process.
-@@ -475,7 +475,7 @@ void ChildProcessLauncher::Launch(Sandbo
- 
- void ChildProcessLauncher::UpdateTerminationStatus(bool known_dead) {
-   DCHECK(CalledOnValidThread());
--#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-   if (zygote_) {
-     termination_status_ = zygote_->GetTerminationStatus(
-         process_.Handle(), known_dead, &exit_code_);
-@@ -549,7 +549,7 @@ void ChildProcessLauncher::Notify(Zygote
-                                     mojo_child_token_, process_error_callback_);
-   }
- 
--#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-   zygote_ = zygote;
- #endif
-   if (process_.IsValid()) {
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
deleted file mode 100644
index be4cd025f9..0000000000
--- a/chromium-new/patches/patch-content_browser_device__sensors_data__fetcher__shared__memory.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/device_sensors/data_fetcher_shared_memory.h.orig	2017-02-02 02:02:53.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
deleted file mode 100644
index 8a2ec8f966..0000000000
--- a/chromium-new/patches/patch-content_browser_devtools_protocol_color__picker.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/devtools/protocol/color_picker.cc.orig	2017-02-02 02:02:53.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
deleted file mode 100644
index 7765bda2e5..0000000000
--- a/chromium-new/patches/patch-content_browser_download_base__file.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- content/browser/download/base_file.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/download/base_file.cc
-@@ -373,7 +373,7 @@ DownloadInterruptReason BaseFile::LogInt
-   return reason;
- }
- 
--#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
- 
- namespace {
- 
-@@ -456,7 +456,7 @@ DownloadInterruptReason BaseFile::Annota
-   }
-   return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
- }
--#else  // !OS_WIN && !OS_MACOSX && !OS_LINUX
-+#else  // !OS_WIN && !OS_MACOSX && !OS_LINUX && !OS_BSD
- DownloadInterruptReason BaseFile::AnnotateWithSourceInformation(
-     const std::string& client_guid,
-     const GURL& source_url,
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
deleted file mode 100644
index 99b1e76b6b..0000000000
--- a/chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD$
-
---- content/browser/gpu/gpu_data_manager_impl_private.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/gpu/gpu_data_manager_impl_private.cc
-@@ -376,7 +376,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.";
-     }
-@@ -493,8 +493,10 @@ void GpuDataManagerImplPrivate::SetGLStr
-   gpu_info.gl_renderer = gl_renderer;
-   gpu_info.gl_version = gl_version;
- 
-+#if !defined(OS_BSD)
-   gpu::IdentifyActiveGPU(&gpu_info);
-   gpu::CollectDriverInfoGL(&gpu_info);
-+#endif
- 
-   UpdateGpuInfo(gpu_info);
-   UpdateGpuSwitchingManager(gpu_info);
-@@ -549,10 +551,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) &&
-@@ -664,7 +668,9 @@ void GpuDataManagerImplPrivate::UpdateGp
-     return;
- 
-   bool was_info_available = IsCompleteGpuInfoAvailable();
-+#ifndef OS_BSD
-   gpu::MergeGPUInfo(&gpu_info_, gpu_info);
-+#endif
-   if (IsCompleteGpuInfoAvailable()) {
-     complete_gpu_info_already_requested_ = true;
-   } else if (was_info_available) {
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
deleted file mode 100644
index 4fb64f42c5..0000000000
--- a/chromium-new/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/gpu/gpu_data_manager_impl_private.h.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/gpu/gpu_data_manager_impl_private.h
-@@ -154,7 +154,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
deleted file mode 100644
index 00f9193701..0000000000
--- a/chromium-new/patches/patch-content_browser_gpu_gpu__internals__ui.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- content/browser/gpu/gpu_internals_ui.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/gpu/gpu_internals_ui.cc
-@@ -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)
-+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(USE_X11)
- #include <X11/Xlib.h>
- #endif
- #if defined(OS_WIN)
-@@ -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"       // nogncheck
- #include "ui/gfx/x/x11_atom_cache.h"  // nogncheck
- #endif
-@@ -206,7 +206,7 @@ base::DictionaryValue* GpuInfoAsDictiona
-                                              gpu_info.gl_ws_version));
-   basic_info->Append(NewDescriptionValuePair("Window system binding extensions",
-                                              gpu_info.gl_ws_extensions));
--#if defined(OS_LINUX) && defined(USE_X11)
-+#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(USE_X11)
-   basic_info->Append(NewDescriptionValuePair("Window manager",
-                                              ui::GuessWindowManagerName()));
-   {
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
deleted file mode 100644
index cd932853de..0000000000
--- a/chromium-new/patches/patch-content_browser_gpu_gpu__process__host.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/gpu/gpu_process_host.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/gpu/gpu_process_host.cc
-@@ -984,7 +984,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_media_media__internals.cc b/chromium-new/patches/patch-content_browser_media_media__internals.cc
deleted file mode 100644
index 542e499e9f..0000000000
--- a/chromium-new/patches/patch-content_browser_media_media__internals.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/media/media_internals.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/media/media_internals.cc
-@@ -755,7 +755,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_memory_memory__coordinator__impl.cc b/chromium-new/patches/patch-content_browser_memory_memory__coordinator__impl.cc
deleted file mode 100644
index 6ad3a3d906..0000000000
--- a/chromium-new/patches/patch-content_browser_memory_memory__coordinator__impl.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- content/browser/memory/memory_coordinator_impl.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/memory/memory_coordinator_impl.cc
-@@ -116,8 +116,12 @@ void RecordMetricsOnStateChange(base::Me
- struct MemoryCoordinatorSingletonTraits
-     : public base::LeakySingletonTraits<MemoryCoordinator> {
-   static MemoryCoordinator* New() {
-+#if defined(OS_BSD)
-+    return nullptr;
-+#else
-     return new MemoryCoordinatorImpl(base::ThreadTaskRunnerHandle::Get(),
-                                      CreateMemoryMonitor());
-+#endif
-   }
- };
- 
diff --git a/chromium-new/patches/patch-content_browser_memory_memory__monitor.cc b/chromium-new/patches/patch-content_browser_memory_memory__monitor.cc
deleted file mode 100644
index 0363a8e5e0..0000000000
--- a/chromium-new/patches/patch-content_browser_memory_memory__monitor.cc
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
---- content/browser/memory/memory_monitor.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/memory/memory_monitor.cc
-@@ -8,6 +8,7 @@
- 
- namespace content {
- 
-+#if !defined(OS_BSD)
- // static
- MemoryMonitorDelegate* MemoryMonitorDelegate::GetInstance() {
-   return base::Singleton<
-@@ -21,8 +22,9 @@ void MemoryMonitorDelegate::GetSystemMem
-     base::SystemMemoryInfoKB* mem_info) {
-   base::GetSystemMemoryInfo(mem_info);
- }
-+#endif // !defined(OS_BSD)
- 
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) && !defined(OS_BSD)
- // TODO(bashi,bcwhite): Remove when memory monitor for mac is available.
- std::unique_ptr<MemoryMonitor> CreateMemoryMonitor() {
-   NOTREACHED();
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
deleted file mode 100644
index e41e141c47..0000000000
--- a/chromium-new/patches/patch-content_browser_ppapi__plugin__process__host.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD$
-
---- content/browser/ppapi_plugin_process_host.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/ppapi_plugin_process_host.cc
-@@ -53,9 +53,9 @@
- 
- namespace content {
- 
--#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- ZygoteHandle g_ppapi_zygote;
--#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- 
- // NOTE: changes to this class need to be reviewed by the security team.
- class PpapiPluginSandboxedProcessLauncherDelegate
-@@ -109,7 +109,7 @@ class PpapiPluginSandboxedProcessLaunche
-     return true;
-   }
- 
--#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-   ZygoteHandle* GetZygote() override {
-     const base::CommandLine& browser_command_line =
-         *base::CommandLine::ForCurrentProcess();
-@@ -203,13 +203,13 @@ PpapiPluginProcessHost* PpapiPluginProce
-   return NULL;
- }
- 
--#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- // static
- void PpapiPluginProcessHost::EarlyZygoteLaunch() {
-   DCHECK(!g_ppapi_zygote);
-   g_ppapi_zygote = CreateZygote();
- }
--#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- 
- // static
- void PpapiPluginProcessHost::DidCreateOutOfProcessInstance(
-@@ -361,7 +361,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_render__process__host__impl.cc b/chromium-new/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
deleted file mode 100644
index 3f743cae88..0000000000
--- a/chromium-new/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-$NetBSD$
-
---- content/browser/renderer_host/render_process_host_impl.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/renderer_host/render_process_host_impl.cc
-@@ -368,11 +368,11 @@ SiteProcessMap* GetSiteProcessMapForBrow
-   return map;
- }
- 
--#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- // This static member variable holds the zygote communication information for
- // the renderer.
- ZygoteHandle g_render_zygote;
--#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- 
- // NOTE: changes to this class need to be reviewed by the security team.
- class RendererSandboxedProcessLauncherDelegate
-@@ -395,7 +395,7 @@ class RendererSandboxedProcessLauncherDe
-     return GetContentClient()->browser()->PreSpawnRenderer(policy);
-   }
- 
--#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-   ZygoteHandle* GetZygote() override {
-     const base::CommandLine& browser_command_line =
-         *base::CommandLine::ForCurrentProcess();
-@@ -635,7 +635,7 @@ void RenderProcessHost::SetMaxRendererPr
-   g_max_renderer_count_override = count;
- }
- 
--#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- // static
- void RenderProcessHostImpl::EarlyZygoteLaunch() {
-   DCHECK(!g_render_zygote);
-@@ -645,7 +645,7 @@ void RenderProcessHostImpl::EarlyZygoteL
-   ZygoteHostImpl::GetInstance()->SetRendererSandboxStatus(
-       (*GetGenericZygote())->GetSandboxStatus());
- }
--#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- 
- RenderProcessHostImpl::RenderProcessHostImpl(
-     BrowserContext* browser_context,
-@@ -788,7 +788,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
deleted file mode 100644
index e2a9f598fb..0000000000
--- a/chromium-new/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- content/browser/renderer_host/render_widget_host_view_aura.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/renderer_host/render_widget_host_view_aura.cc
-@@ -107,7 +107,7 @@
- #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 "ui/base/ime/linux/text_edit_command_auralinux.h"
- #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
- #endif
-@@ -1961,7 +1961,7 @@ bool RenderWidgetHostViewAura::NeedsInpu
- }
- 
- bool RenderWidgetHostViewAura::NeedsMouseCapture() {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
-   return NeedsInputGrab();
- #endif
-   return false;
-@@ -2158,7 +2158,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)
-   ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate =
-       ui::GetTextEditKeyBindingsDelegate();
-   std::vector<ui::TextEditCommandAuraLinux> commands;
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
deleted file mode 100644
index b1abe73e93..0000000000
--- a/chromium-new/patches/patch-content_browser_tracing_tracing__controller__impl.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/browser/tracing/tracing_controller_impl.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/tracing/tracing_controller_impl.cc
-@@ -475,7 +475,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
deleted file mode 100644
index 9df05d5f6b..0000000000
--- a/chromium-new/patches/patch-content_browser_utility__process__host__impl.cc
+++ /dev/null
@@ -1,96 +0,0 @@
-$NetBSD$
-
---- content/browser/utility_process_host_impl.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/browser/utility_process_host_impl.cc
-@@ -43,9 +43,9 @@
- #include "services/service_manager/public/cpp/interface_provider.h"
- #include "ui/base/ui_base_switches.h"
- 
--#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- #include "content/public/browser/zygote_handle_linux.h"
--#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- 
- #if defined(OS_WIN)
- #include "sandbox/win/src/sandbox_policy.h"
-@@ -54,11 +54,11 @@
- 
- namespace content {
- 
--#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- namespace {
- ZygoteHandle g_utility_zygote;
- }  // namespace
--#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- 
- // NOTE: changes to this class need to be reviewed by the security team.
- class UtilitySandboxedProcessLauncherDelegate
-@@ -73,10 +73,10 @@ class UtilitySandboxedProcessLauncherDel
-         launch_elevated_(launch_elevated)
- #elif defined(OS_POSIX)
-         env_(env)
--#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-         ,
-         no_sandbox_(no_sandbox)
--#endif  // !defined(OS_MACOSX)  && !defined(OS_ANDROID)
-+#endif  // !defined(OS_MACOSX)  && !defined(OS_ANDROID) && !defined(OS_BSD)
- #endif  // OS_WIN
-   {}
- 
-@@ -105,13 +105,13 @@ class UtilitySandboxedProcessLauncherDel
- 
- #elif defined(OS_POSIX)
- 
--#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-   ZygoteHandle* GetZygote() override {
-     if (no_sandbox_ || !exposed_dir_.empty())
-       return nullptr;
-     return GetGenericZygote();
-   }
--#endif  // !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#endif  // !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-   base::EnvironmentMap GetEnvironment() override { return env_; }
- #endif  // OS_WIN
- 
-@@ -126,9 +126,9 @@ class UtilitySandboxedProcessLauncherDel
-   bool launch_elevated_;
- #elif defined(OS_POSIX)
-   base::EnvironmentMap env_;
--#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-   bool no_sandbox_;
--#endif  // !defined(OS_MACOSX) && !defined(OS_ANDROID)
-+#endif  // !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
- #endif  // OS_WIN
- };
- 
-@@ -153,7 +153,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),
-@@ -235,13 +235,13 @@ void UtilityProcessHostImpl::SetName(con
-   name_ = name;
- }
- 
--#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- // static
- void UtilityProcessHostImpl::EarlyZygoteLaunch() {
-   DCHECK(!g_utility_zygote);
-   g_utility_zygote = CreateZygote();
- }
--#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
-+#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
- 
- bool UtilityProcessHostImpl::StartProcess() {
-   if (started_)
diff --git a/chromium-new/patches/patch-content_common_BUILD.gn b/chromium-new/patches/patch-content_common_BUILD.gn
deleted file mode 100644
index 090a98a664..0000000000
--- a/chromium-new/patches/patch-content_common_BUILD.gn
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD$
-
---- content/common/BUILD.gn.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/common/BUILD.gn
-@@ -500,7 +500,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",
-@@ -514,6 +514,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
deleted file mode 100644
index 186bf4a005..0000000000
--- a/chromium-new/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- content/common/sandbox_linux/sandbox_debug_handling_linux.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/common/sandbox_linux/sandbox_debug_handling_linux.cc
-@@ -7,7 +7,9 @@
- #include <errno.h>
- #include <signal.h>
- #include <stddef.h>
-+#if 0 // no OS_FREEBSD here?
- #include <sys/prctl.h>
-+#endif
- #include <unistd.h>
- 
- #include "base/command_line.h"
-@@ -69,12 +71,16 @@ bool SandboxDebugHandling::SetDumpableSt
-     return true;
-   }
- 
-+#if 0 // no OS_FREEBSD here?
-   if (prctl(PR_SET_DUMPABLE, 0) != 0) {
-     PLOG(ERROR) << "Failed to set non-dumpable flag";
-     return false;
-   }
- 
-   return prctl(PR_GET_DUMPABLE) == 0;
-+#else
-+  return false;
-+#endif
- }
- 
- }  // namespace content
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
deleted file mode 100644
index efa1fef560..0000000000
--- a/chromium-new/patches/patch-content_common_set__process__title__linux.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- content/common/set_process_title_linux.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/common/set_process_title_linux.cc
-@@ -49,6 +49,8 @@
- extern char** environ;
- 
- static char** g_main_argv = NULL;
-+
-+#if !defined(OS_BSD)
- static char* g_orig_argv0 = NULL;
- 
- void setproctitle(const char* fmt, ...) {
-@@ -101,6 +103,7 @@ void setproctitle(const char* fmt, ...) 
-   va_end(ap);
-   g_main_argv[1] = NULL;
- }
-+#endif
- 
- // A version of this built into glibc would not need this function, since
- // it could stash the argv pointer in __libc_start_main(). But we need it.
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
deleted file mode 100644
index 329c281812..0000000000
--- a/chromium-new/patches/patch-content_common_set__process__title__linux.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- content/common/set_process_title_linux.h.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/common/set_process_title_linux.h
-@@ -5,6 +5,9 @@
- #ifndef CONTENT_COMMON_SET_PROCESS_TITLE_LINUX_H_
- #define CONTENT_COMMON_SET_PROCESS_TITLE_LINUX_H_
- 
-+#include "build/build_config.h"
-+
-+#if !defined(OS_BSD)
- // Set the process title that will show in "ps" and similar tools. Takes
- // printf-style format string and arguments. After calling setproctitle()
- // the original main() argv[] array should not be used. By default, the
-@@ -14,6 +17,7 @@
- // This signature and naming is to be compatible with most other Unix
- // implementations of setproctitle().
- void setproctitle(const char* fmt, ...);
-+#endif
- 
- // Initialize state needed for setproctitle() on Linux. Pass the argv pointer
- // from main() to setproctitle_init() before calling setproctitle().
diff --git a/chromium-new/patches/patch-content_gpu_BUILD.gn b/chromium-new/patches/patch-content_gpu_BUILD.gn
deleted file mode 100644
index d409cccca1..0000000000
--- a/chromium-new/patches/patch-content_gpu_BUILD.gn
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- content/gpu/BUILD.gn.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/gpu/BUILD.gn
-@@ -96,6 +96,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
deleted file mode 100644
index 05d50a9340..0000000000
--- a/chromium-new/patches/patch-content_gpu_gpu__child__thread.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- content/gpu/gpu_child_thread.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/gpu/gpu_child_thread.cc
-@@ -383,6 +383,7 @@ void GpuChildThread::OnCollectGraphicsIn
-   if (dead_on_arrival_)
-     return;
- 
-+#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.
-@@ -434,6 +435,7 @@ void GpuChildThread::OnCollectGraphicsIn
-     base::MessageLoop::current()->QuitWhenIdle();
-   }
- #endif  // OS_WIN
-+#endif  // XXX(rene) !FreeBSD
- }
- 
- void GpuChildThread::OnGetVideoMemoryUsageStats() {
diff --git a/chromium-new/patches/patch-content_gpu_gpu__main.cc b/chromium-new/patches/patch-content_gpu_gpu__main.cc
deleted file mode 100644
index 4d3f28171a..0000000000
--- a/chromium-new/patches/patch-content_gpu_gpu__main.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-$NetBSD$
-
---- content/gpu/gpu_main.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/gpu/gpu_main.cc
-@@ -92,7 +92,7 @@ namespace content {
- 
- namespace {
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- bool StartSandboxLinux(gpu::GpuWatchdogThread*);
- #elif defined(OS_WIN)
- bool StartSandboxWindows(const sandbox::SandboxInterfaceInfo*);
-@@ -145,7 +145,7 @@ class ContentSandboxHelper : public gpu:
- 
-   bool EnsureSandboxInitialized(
-       gpu::GpuWatchdogThread* watchdog_thread) override {
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     return StartSandboxLinux(watchdog_thread);
- #elif defined(OS_WIN)
-     return StartSandboxWindows(sandbox_info_);
-@@ -292,12 +292,13 @@ int GpuMain(const MainFunctionParams& pa
- 
- namespace {
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread) {
-   TRACE_EVENT0("gpu,startup", "Initialize sandbox");
- 
-   bool res = false;
- 
-+#if !defined(OS_BSD)
-   if (watchdog_thread) {
-     // LinuxSandbox needs to be able to ensure that the thread
-     // has really been stopped.
-@@ -322,6 +323,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogT
-     options.timer_slack = base::TIMER_SLACK_MAXIMUM;
-     watchdog_thread->StartWithOptions(options);
-   }
-+#endif
- 
-   return res;
- }
diff --git a/chromium-new/patches/patch-content_gpu_in__process__gpu__thread.cc b/chromium-new/patches/patch-content_gpu_in__process__gpu__thread.cc
deleted file mode 100644
index dfb6ab56c0..0000000000
--- a/chromium-new/patches/patch-content_gpu_in__process__gpu__thread.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/gpu/in_process_gpu_thread.cc.orig	2017-02-02 02:02:53.000000000 +0000
-+++ content/gpu/in_process_gpu_thread.cc
-@@ -53,8 +53,6 @@ void InProcessGpuThread::Init() {
-   gpu::GPUInfo gpu_info;
-   if (!gl::init::InitializeGLOneOff())
-     VLOG(1) << "gl::init::InitializeGLOneOff failed";
--  else
--    gpu::CollectContextGraphicsInfo(&gpu_info);
- 
-   // The process object takes ownership of the thread object, so do not
-   // save and delete the pointer.
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
deleted file mode 100644
index c4820007cd..0000000000
--- a/chromium-new/patches/patch-content_public_common_child__process__host.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- content/public/common/child_process_host.h.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/public/common/child_process_host.h
-@@ -53,7 +53,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.
-@@ -62,7 +62,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_content__switches.cc b/chromium-new/patches/patch-content_public_common_content__switches.cc
deleted file mode 100644
index dea65a44dd..0000000000
--- a/chromium-new/patches/patch-content_public_common_content__switches.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/public/common/content_switches.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/public/common/content_switches.cc
-@@ -992,7 +992,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_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
deleted file mode 100644
index 48c5a9fe03..0000000000
--- a/chromium-new/patches/patch-content_public_common_content__switches.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/public/common/content_switches.h.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/public/common/content_switches.h
-@@ -293,7 +293,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_BSD)
- CONTENT_EXPORT extern const char kEnableSpeechDispatcher[];
- #endif
- 
diff --git a/chromium-new/patches/patch-content_public_common_renderer__preferences.h b/chromium-new/patches/patch-content_public_common_renderer__preferences.h
deleted file mode 100644
index 4f4dc486d4..0000000000
--- a/chromium-new/patches/patch-content_public_common_renderer__preferences.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/public/common/renderer_preferences.h.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/public/common/renderer_preferences.h
-@@ -139,7 +139,7 @@ struct CONTENT_EXPORT RendererPreference
-   // Country iso of the mobile network for content detection purpose.
-   std::string network_contry_iso;
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   std::string system_font_family_name;
- #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
deleted file mode 100644
index 647287628b..0000000000
--- a/chromium-new/patches/patch-content_public_test_browser__test__base.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- content/public/test/browser_test_base.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/public/test/browser_test_base.cc
-@@ -6,6 +6,10 @@
- 
- #include <stddef.h>
- 
-+#if defined(OS_FREEBSD)
-+#include <sys/signal.h>
-+#endif
-+
- #include "base/bind.h"
- #include "base/command_line.h"
- #include "base/debug/stack_trace.h"
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
deleted file mode 100644
index dde425fb9c..0000000000
--- a/chromium-new/patches/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- content/renderer/media/webrtc/processed_local_audio_source.cc.orig	2017-02-02 02:02:54.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_pepper_pepper__media__device__manager.cc b/chromium-new/patches/patch-content_renderer_pepper_pepper__media__device__manager.cc
deleted file mode 100644
index f857902ba0..0000000000
--- a/chromium-new/patches/patch-content_renderer_pepper_pepper__media__device__manager.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- content/renderer/pepper/pepper_media_device_manager.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/renderer/pepper/pepper_media_device_manager.cc
-@@ -89,9 +89,10 @@ void PepperMediaDeviceManager::Enumerate
-                  callback, ToMediaDeviceType(type)));
- #else
-   base::ThreadTaskRunnerHandle::Get()->PostTask(
--      FROM_HERE,
--      base::Bind(&PepperMediaDeviceManager::DevicesEnumerated, AsWeakPtr(),
--                 callback, ToMediaDeviceType(type), MediaDeviceInfoArray()));
-+      FROM_HERE, base::Bind(&PepperMediaDeviceManager::DevicesEnumerated,
-+                            AsWeakPtr(), callback, ToMediaDeviceType(type),
-+                            std::vector<MediaDeviceInfoArray>()));
-+
- #endif
- }
- 
diff --git a/chromium-new/patches/patch-content_renderer_render__thread__impl.cc b/chromium-new/patches/patch-content_renderer_render__thread__impl.cc
deleted file mode 100644
index 49de67415a..0000000000
--- a/chromium-new/patches/patch-content_renderer_render__thread__impl.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD$
-
---- content/renderer/render_thread_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/renderer/render_thread_impl.cc
-@@ -206,11 +206,13 @@
- #include "content/common/external_ipc_dumper.h"
- #endif
- 
-+#if !defined(OS_BSD)
- #if defined(OS_MACOSX)
- #include <malloc/malloc.h>
- #else
- #include <malloc.h>
- #endif
-+#endif
- 
- using base::ThreadRestrictions;
- using blink::WebDocument;
-@@ -1488,7 +1490,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;
-@@ -1846,6 +1848,8 @@ void RenderThreadImpl::RecordPurgeAndSus
- #else
-   size_t malloc_usage = minfo.hblkhd + minfo.arena;
- #endif
-+#elif defined(OS_BSD)
-+  size_t malloc_usage = 0;
- #else
-   size_t malloc_usage = GetMallocUsage();
- #endif
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
deleted file mode 100644
index cb91e58fc4..0000000000
--- a/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-$NetBSD$
-
---- content/renderer/renderer_blink_platform_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/renderer/renderer_blink_platform_impl.cc
-@@ -111,7 +111,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_BSD)
- #include <map>
- #include <string>
- 
-@@ -201,7 +201,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_BSD)
- class RendererBlinkPlatformImpl::SandboxSupport
-     : public blink::WebSandboxSupport {
-  public:
-@@ -247,7 +247,7 @@ RendererBlinkPlatformImpl::RendererBlink
-       renderer_scheduler_(renderer_scheduler),
-       blink_interface_provider_(
-           new BlinkInterfaceProviderImpl(remote_interfaces)) {
--#if !defined(OS_ANDROID) && !defined(OS_WIN)
-+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD)
-   if (g_sandbox_enabled && sandboxEnabled()) {
-     sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport);
-   } else {
-@@ -283,7 +283,7 @@ RendererBlinkPlatformImpl::~RendererBlin
- }
- 
- void RendererBlinkPlatformImpl::Shutdown() {
--#if !defined(OS_ANDROID) && !defined(OS_WIN)
-+#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.
-@@ -331,7 +331,7 @@ blink::WebFileUtilities* RendererBlinkPl
- }
- 
- blink::WebSandboxSupport* RendererBlinkPlatformImpl::sandboxSupport() {
--#if defined(OS_ANDROID) || defined(OS_WIN)
-+#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_BSD)
-   // These platforms do not require sandbox support.
-   return NULL;
- #else
-@@ -539,7 +539,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_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
deleted file mode 100644
index d9d3cd3623..0000000000
--- a/chromium-new/patches/patch-content_renderer_renderer__blink__platform__impl.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- content/renderer/renderer_blink_platform_impl.h.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/renderer/renderer_blink_platform_impl.h
-@@ -256,7 +256,7 @@ class CONTENT_EXPORT RendererBlinkPlatfo
-   class FileUtilities;
-   std::unique_ptr<FileUtilities> file_utilities_;
- 
--#if !defined(OS_ANDROID) && !defined(OS_WIN)
-+#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD)
-   class SandboxSupport;
-   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
deleted file mode 100644
index 2604fd4bc1..0000000000
--- a/chromium-new/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- content/renderer/renderer_main_platform_delegate_linux.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/renderer/renderer_main_platform_delegate_linux.cc
-@@ -29,6 +29,7 @@ void RendererMainPlatformDelegate::Platf
- }
- 
- bool RendererMainPlatformDelegate::EnableSandbox() {
-+#if !defined(OS_BSD)
-   // The setuid sandbox is started in the zygote process: zygote_main_linux.cc
-   // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox.md
-   //
-@@ -59,7 +60,7 @@ bool RendererMainPlatformDelegate::Enabl
-     CHECK_EQ(errno, EPERM);
-   }
- #endif  // __x86_64__
--
-+#endif  // ! OS_BSD
-   return true;
- }
- 
diff --git a/chromium-new/patches/patch-content_renderer_webscrollbarbehavior__impl__aura.cc b/chromium-new/patches/patch-content_renderer_webscrollbarbehavior__impl__aura.cc
deleted file mode 100644
index cde1a9d2f9..0000000000
--- a/chromium-new/patches/patch-content_renderer_webscrollbarbehavior__impl__aura.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- content/renderer/webscrollbarbehavior_impl_aura.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/renderer/webscrollbarbehavior_impl_aura.cc
-@@ -14,7 +14,7 @@ bool WebScrollbarBehaviorImpl::shouldCen
-       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::WebPointerProperties::Button::Middle)
-     return true;
- #endif
-@@ -29,7 +29,7 @@ bool WebScrollbarBehaviorImpl::shouldSna
- // Disable snapback on desktop Linux to better integrate with the desktop
- // behavior.  Typically, Linux apps do not implement scrollbar snapback (this is
- // true for at least GTK and QT apps).
--#if (defined(OS_LINUX) && !defined(OS_CHROMEOS))
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   return false;
- #endif
- 
diff --git a/chromium-new/patches/patch-content_shell_BUILD.gn b/chromium-new/patches/patch-content_shell_BUILD.gn
deleted file mode 100644
index 6dd4f15c92..0000000000
--- a/chromium-new/patches/patch-content_shell_BUILD.gn
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- content/shell/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/shell/BUILD.gn
-@@ -296,7 +296,7 @@ static_library("content_shell_lib") {
-     ]
-   }
- 
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     deps += [
-       "//build/linux:fontconfig",
-       "//ui/gfx:test_support",
-@@ -317,7 +317,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",
-@@ -366,7 +366,7 @@ static_library("content_shell_lib") {
-     ]
-   }
- 
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     deps += [ "//third_party/freetype2" ]
-   }
- 
-@@ -532,7 +532,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
deleted file mode 100644
index fe787d27e0..0000000000
--- a/chromium-new/patches/patch-content_shell_browser_shell__browser__context.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- content/shell/browser/shell_browser_context.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/shell/browser/shell_browser_context.cc
-@@ -25,7 +25,7 @@
- 
- #if defined(OS_WIN)
- #include "base/base_paths_win.h"
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- #include "base/nix/xdg_util.h"
- #elif defined(OS_MACOSX)
- #include "base/base_paths_mac.h"
-@@ -97,7 +97,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)
-   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
deleted file mode 100644
index bcccbbbcf1..0000000000
--- a/chromium-new/patches/patch-content_shell_browser_shell__browser__main__parts.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- content/shell/browser/shell_browser_main_parts.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/shell/browser/shell_browser_main_parts.cc
-@@ -44,7 +44,7 @@
- #if defined(USE_AURA) && defined(USE_X11)
- #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)
-@@ -140,7 +140,7 @@ void ShellBrowserMainParts::PostMainMess
- }
- 
- void ShellBrowserMainParts::PreEarlyInitialization() {
--#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
-+#if !defined(OS_CHROMEOS) && defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX))
-   ui::InitializeInputMethodForTesting();
- #endif
- #if defined(OS_ANDROID)
diff --git a/chromium-new/patches/patch-content_test_BUILD.gn b/chromium-new/patches/patch-content_test_BUILD.gn
deleted file mode 100644
index 62e06e04b3..0000000000
--- a/chromium-new/patches/patch-content_test_BUILD.gn
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- content/test/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
-+++ content/test/BUILD.gn
-@@ -748,7 +748,7 @@ test("content_browsertests") {
-     }
-   }
- 
--  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/",
-@@ -1350,7 +1350,7 @@ test("content_unittests") {
-     sources += [ "../browser/memory/memory_monitor_linux_unittest.cc" ]
-   }
- 
--  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/",
-@@ -1540,7 +1540,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" ]
-@@ -1576,7 +1576,7 @@ test("content_unittests") {
-     ]
-   }
- 
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     if (use_dbus) {
-       deps += [ "//dbus:test_support" ]
-     }
diff --git a/chromium-new/patches/patch-crypto_nss__util.cc b/chromium-new/patches/patch-crypto_nss__util.cc
deleted file mode 100644
index 65c59b597d..0000000000
--- a/chromium-new/patches/patch-crypto_nss__util.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD$
-
---- crypto/nss_util.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ crypto/nss_util.cc
-@@ -20,7 +20,7 @@
- #include "base/threading/thread_task_runner_handle.h"
- #include "crypto/nss_util_internal.h"
- 
--#if defined(OS_OPENBSD)
-+#if defined(OS_BSD)
- #include <sys/mount.h>
- #include <sys/param.h>
- #endif
-@@ -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);
--#elif defined(OS_OPENBSD)
-+#elif defined(OS_NETBSD)
-+  struct statvfs buf;
-+  if (statvfs(database_dir.value().c_str(), &buf) == 0)
-+    db_on_nfs = (strcmp(buf.f_fstypename, "nfs") == 0);
-+#elif defined(OS_BSD)
-   struct statfs buf;
-   if (statfs(database_dir.value().c_str(), &buf) == 0)
--    db_on_nfs = (strcmp(buf.f_fstypename, MOUNT_NFS) == 0);
-+    db_on_nfs = (strcmp(buf.f_fstypename, "nfs") == 0);
- #else
-   NOTIMPLEMENTED();
- #endif
diff --git a/chromium-new/patches/patch-device_BUILD.gn b/chromium-new/patches/patch-device_BUILD.gn
deleted file mode 100644
index 016c885025..0000000000
--- a/chromium-new/patches/patch-device_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/BUILD.gn
-@@ -184,7 +184,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
deleted file mode 100644
index 760254dd56..0000000000
--- a/chromium-new/patches/patch-device_battery_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/battery/BUILD.gn.orig	2017-02-02 02:02:54.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_bluetooth_BUILD.gn b/chromium-new/patches/patch-device_bluetooth_BUILD.gn
deleted file mode 100644
index d7fb05ec8c..0000000000
--- a/chromium-new/patches/patch-device_bluetooth_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/bluetooth/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/bluetooth/BUILD.gn
-@@ -193,7 +193,7 @@ component("bluetooth") {
-     ]
-   }
- 
--  if (is_chromeos || is_linux) {
-+  if (is_chromeos || (is_linux && !is_bsd)) {
-     if (use_dbus) {
-       sources += [
-         "bluez/bluetooth_adapter_bluez.cc",
diff --git a/chromium-new/patches/patch-device_gamepad_gamepad__provider.cc b/chromium-new/patches/patch-device_gamepad_gamepad__provider.cc
deleted file mode 100644
index daaed81e52..0000000000
--- a/chromium-new/patches/patch-device_gamepad_gamepad__provider.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/gamepad/gamepad_provider.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/gamepad/gamepad_provider.cc
-@@ -145,7 +145,7 @@ void GamepadProvider::Initialize(std::un
-     monitor->AddDevicesChangedObserver(this);
- 
-   polling_thread_.reset(new base::Thread("Gamepad polling thread"));
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   // On Linux, the data fetcher needs to watch file descriptors, so the message
-   // loop needs to be a libevent loop.
-   const base::MessageLoop::Type kMessageLoopType = base::MessageLoop::TYPE_IO;
diff --git a/chromium-new/patches/patch-device_geolocation_BUILD.gn b/chromium-new/patches/patch-device_geolocation_BUILD.gn
deleted file mode 100644
index 88184c4d72..0000000000
--- a/chromium-new/patches/patch-device_geolocation_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/geolocation/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/geolocation/BUILD.gn
-@@ -89,7 +89,7 @@ component("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.cc b/chromium-new/patches/patch-device_geolocation_location__arbitrator.cc
deleted file mode 100644
index 6965052941..0000000000
--- a/chromium-new/patches/patch-device_geolocation_location__arbitrator.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/geolocation/location_arbitrator.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/geolocation/location_arbitrator.cc
-@@ -182,7 +182,7 @@ LocationArbitrator::NewNetworkLocationPr
- 
- std::unique_ptr<LocationProvider>
- LocationArbitrator::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
deleted file mode 100644
index f248371f47..0000000000
--- a/chromium-new/patches/patch-device_hid_BUILD.gn
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- device/hid/BUILD.gn.orig	2017-02-02 02:02:54.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_media__transfer__protocol_media__transfer__protocol__daemon__client.h b/chromium-new/patches/patch-device_media__transfer__protocol_media__transfer__protocol__daemon__client.h
deleted file mode 100644
index 37a6c8f208..0000000000
--- a/chromium-new/patches/patch-device_media__transfer__protocol_media__transfer__protocol__daemon__client.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/media_transfer_protocol/media_transfer_protocol_daemon_client.h.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
-@@ -19,7 +19,7 @@
- #include "base/macros.h"
- #include "build/build_config.h"
- 
--#if !defined(OS_LINUX)
-+#if !defined(OS_LINUX) && !defined(OS_BSD)
- #error "Only used on Linux and ChromeOS"
- #endif
- 
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
deleted file mode 100644
index 38707a7eb8..0000000000
--- a/chromium-new/patches/patch-device_media__transfer__protocol_media__transfer__protocol__manager.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/media_transfer_protocol/media_transfer_protocol_manager.h.orig	2017-02-02 02:02:54.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_BSD)
- #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
deleted file mode 100644
index 983efbf357..0000000000
--- a/chromium-new/patches/patch-device_serial_BUILD.gn
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
---- device/serial/BUILD.gn.orig	2017-02-02 02:02:54.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" ]
-@@ -55,6 +55,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__io__handler__posix.cc b/chromium-new/patches/patch-device_serial_serial__io__handler__posix.cc
deleted file mode 100644
index d9c4488395..0000000000
--- a/chromium-new/patches/patch-device_serial_serial__io__handler__posix.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/serial/serial_io_handler_posix.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/serial/serial_io_handler_posix.cc
-@@ -61,7 +61,7 @@ bool BitrateToSpeedConstant(int bitrate,
-     BITRATE_TO_SPEED_CASE(9600)
-     BITRATE_TO_SPEED_CASE(19200)
-     BITRATE_TO_SPEED_CASE(38400)
--#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_BSD)
-     BITRATE_TO_SPEED_CASE(57600)
-     BITRATE_TO_SPEED_CASE(115200)
-     BITRATE_TO_SPEED_CASE(230400)
diff --git a/chromium-new/patches/patch-device_time__zone__monitor_time__zone__monitor.cc b/chromium-new/patches/patch-device_time__zone__monitor_time__zone__monitor.cc
deleted file mode 100644
index 533d0fd6f6..0000000000
--- a/chromium-new/patches/patch-device_time__zone__monitor_time__zone__monitor.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- device/time_zone_monitor/time_zone_monitor.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/time_zone_monitor/time_zone_monitor.cc
-@@ -31,7 +31,7 @@ void TimeZoneMonitor::NotifyClients() {
-   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.
-   std::unique_ptr<icu::TimeZone> current_zone(icu::TimeZone::createDefault());
diff --git a/chromium-new/patches/patch-device_time__zone__monitor_time__zone__monitor__linux.cc b/chromium-new/patches/patch-device_time__zone__monitor_time__zone__monitor__linux.cc
deleted file mode 100644
index f721489942..0000000000
--- a/chromium-new/patches/patch-device_time__zone__monitor_time__zone__monitor__linux.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- device/time_zone_monitor/time_zone_monitor_linux.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/time_zone_monitor/time_zone_monitor_linux.cc
-@@ -59,6 +59,9 @@ class TimeZoneMonitorLinuxImpl
-         main_task_runner_(base::ThreadTaskRunnerHandle::Get()),
-         file_task_runner_(file_task_runner),
-         owner_(owner) {
-+ }
-+
-+ void StartWatching() {
-     DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
-     file_task_runner_->PostTask(
-         FROM_HERE,
-@@ -152,6 +155,9 @@ TimeZoneMonitorLinux::TimeZoneMonitorLin
-   // changed.
-   if (!getenv("TZ")) {
-     impl_ = new TimeZoneMonitorLinuxImpl(this, file_task_runner);
-+    if (impl_.get()) {
-+      impl_->StartWatching();
-+    }
-   }
- }
- 
diff --git a/chromium-new/patches/patch-device_usb_usb__context.cc b/chromium-new/patches/patch-device_usb_usb__context.cc
deleted file mode 100644
index b9ec7b7aee..0000000000
--- a/chromium-new/patches/patch-device_usb_usb__context.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
---- device/usb/usb_context.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/usb/usb_context.cc
-@@ -9,8 +9,13 @@
- #include "base/macros.h"
- #include "base/threading/simple_thread.h"
- #include "device/usb/usb_error.h"
-+#if defined(OS_FREEBSD)
-+#include "libusb.h"
-+#define LIBUSB_CALL
-+#else
- #include "third_party/libusb/src/libusb/interrupt.h"
- #include "third_party/libusb/src/libusb/libusb.h"
-+#endif
- 
- namespace device {
- 
-@@ -58,7 +63,9 @@ void UsbContext::UsbEventHandler::Run() 
- 
- void UsbContext::UsbEventHandler::Stop() {
-   base::subtle::Release_Store(&running_, 0);
-+#if !defined(OS_FREEBSD) // XXX(rene) not available in base version
-   libusb_interrupt_handle_event(context_);
-+#endif
- }
- 
- UsbContext::UsbContext(PlatformUsbContext context) : context_(context) {
diff --git a/chromium-new/patches/patch-device_usb_usb__context__unittest.cc b/chromium-new/patches/patch-device_usb_usb__context__unittest.cc
deleted file mode 100644
index e7d5b3f827..0000000000
--- a/chromium-new/patches/patch-device_usb_usb__context__unittest.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- device/usb/usb_context_unittest.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/usb/usb_context_unittest.cc
-@@ -7,7 +7,11 @@
- #include "build/build_config.h"
- #include "device/usb/usb_context.h"
- #include "testing/gtest/include/gtest/gtest.h"
-+#if defined(OS_FREEBSD)
-+#include "libusb.h"
-+#else
- #include "third_party/libusb/src/libusb/libusb.h"
-+#endif
- 
- namespace device {
- 
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
deleted file mode 100644
index 240997b459..0000000000
--- a/chromium-new/patches/patch-device_usb_usb__device__handle__impl.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- device/usb/usb_device_handle_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/usb/usb_device_handle_impl.cc
-@@ -25,7 +25,11 @@
- #include "device/usb/usb_error.h"
- #include "device/usb/usb_service.h"
- #include "net/base/io_buffer.h"
--#include "third_party/libusb/src/libusb/libusb.h"
-+#if defined(OS_FREEBSD)
-+#  include "libusb.h"
-+#else
-+#  include "third_party/libusb/src/libusb/libusb.h"
-+#endif
- 
- namespace device {
- 
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
deleted file mode 100644
index cbceca4934..0000000000
--- a/chromium-new/patches/patch-device_usb_usb__device__handle__impl.h
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- device/usb/usb_device_handle_impl.h.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/usb/usb_device_handle_impl.h
-@@ -18,7 +18,12 @@
- #include "base/memory/ref_counted.h"
- #include "base/threading/thread_checker.h"
- #include "device/usb/usb_device_handle.h"
-+#if defined(OS_FREEBSD)
-+#include "libusb.h"
-+#define LIBUSB_CALL
-+#else
- #include "third_party/libusb/src/libusb/libusb.h"
-+#endif
- 
- namespace base {
- class SequencedTaskRunner;
diff --git a/chromium-new/patches/patch-device_usb_usb__device__impl.cc b/chromium-new/patches/patch-device_usb_usb__device__impl.cc
deleted file mode 100644
index 145b9f6ca2..0000000000
--- a/chromium-new/patches/patch-device_usb_usb__device__impl.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- device/usb/usb_device_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/usb/usb_device_impl.cc
-@@ -22,7 +22,11 @@
- #include "device/usb/usb_descriptors.h"
- #include "device/usb/usb_device_handle_impl.h"
- #include "device/usb/usb_error.h"
-+#if defined(OS_FREEBSD)
-+#include "libusb.h"
-+#else
- #include "third_party/libusb/src/libusb/libusb.h"
-+#endif
- 
- namespace device {
- 
diff --git a/chromium-new/patches/patch-device_usb_usb__error.cc b/chromium-new/patches/patch-device_usb_usb__error.cc
deleted file mode 100644
index 60919bb226..0000000000
--- a/chromium-new/patches/patch-device_usb_usb__error.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- device/usb/usb_error.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/usb/usb_error.cc
-@@ -4,7 +4,11 @@
- 
- #include "device/usb/usb_error.h"
- 
-+#if defined(__FreeBSD__)
-+#include "libusb.h"
-+#else
- #include "third_party/libusb/src/libusb/libusb.h"
-+#endif
- 
- namespace device {
- 
diff --git a/chromium-new/patches/patch-device_usb_usb__service__impl.cc b/chromium-new/patches/patch-device_usb_usb__service__impl.cc
deleted file mode 100644
index c469270186..0000000000
--- a/chromium-new/patches/patch-device_usb_usb__service__impl.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-$NetBSD$
-
---- device/usb/usb_service_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/usb/usb_service_impl.cc
-@@ -26,7 +26,11 @@
- #include "device/usb/usb_error.h"
- #include "device/usb/webusb_descriptors.h"
- #include "net/base/io_buffer.h"
--#include "third_party/libusb/src/libusb/libusb.h"
-+#if defined(OS_FREEBSD)
-+#  include <libusb.h>
-+#else
-+#  include "third_party/libusb/src/libusb/libusb.h"
-+#endif
- 
- #if defined(OS_WIN)
- #include <setupapi.h>
-@@ -213,6 +217,7 @@ UsbServiceImpl::UsbServiceImpl(
-   }
-   context_ = new UsbContext(platform_context);
- 
-+#if !defined(OS_FREEBSD)
-   rv = libusb_hotplug_register_callback(
-       context_->context(),
-       static_cast<libusb_hotplug_event>(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED |
-@@ -225,6 +230,8 @@ UsbServiceImpl::UsbServiceImpl(
-   }
- 
-   RefreshDevices();
-+#endif // !defined(OS_FREEBSD)
-+
- #if defined(OS_WIN)
-   DeviceMonitorWin* device_monitor = DeviceMonitorWin::GetForAllInterfaces();
-   if (device_monitor) {
-@@ -234,8 +241,10 @@ UsbServiceImpl::UsbServiceImpl(
- }
- 
- UsbServiceImpl::~UsbServiceImpl() {
-+#if !defined(OS_FREEBSD)
-   if (hotplug_enabled_)
-     libusb_hotplug_deregister_callback(context_->context(), hotplug_handle_);
-+#endif // !defined(OS_FREEBSD)
-   for (auto* platform_device : ignored_devices_)
-     libusb_unref_device(platform_device);
- }
-@@ -477,6 +486,7 @@ void UsbServiceImpl::RemoveDevice(scoped
-   device->OnDisconnect();
- }
- 
-+#if !defined(OS_FREEBSD)
- // static
- int LIBUSB_CALL UsbServiceImpl::HotplugCallback(libusb_context* context,
-                                                 PlatformUsbDevice device,
-@@ -514,6 +524,7 @@ int LIBUSB_CALL UsbServiceImpl::HotplugC
- 
-   return 0;
- }
-+#endif // !defined(OS_FREEBSD)
- 
- void UsbServiceImpl::OnPlatformDeviceAdded(PlatformUsbDevice platform_device) {
-   DCHECK(CalledOnValidThread());
diff --git a/chromium-new/patches/patch-device_usb_usb__service__impl.h b/chromium-new/patches/patch-device_usb_usb__service__impl.h
deleted file mode 100644
index 20511883bf..0000000000
--- a/chromium-new/patches/patch-device_usb_usb__service__impl.h
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD$
-
---- device/usb/usb_service_impl.h.orig	2017-02-02 02:02:54.000000000 +0000
-+++ device/usb/usb_service_impl.h
-@@ -15,7 +15,13 @@
- #include "build/build_config.h"
- #include "device/usb/usb_context.h"
- #include "device/usb/usb_device_impl.h"
-+#if defined(OS_FREEBSD)
-+#include "libusb.h"
-+#define LIBUSB_CALL
-+#else
- #include "third_party/libusb/src/libusb/libusb.h"
-+#endif
-+
- 
- #if defined(OS_WIN)
- #include "base/scoped_observer.h"
-@@ -70,11 +76,13 @@ class UsbServiceImpl :
-                  scoped_refptr<UsbDeviceImpl> device);
-   void RemoveDevice(scoped_refptr<UsbDeviceImpl> device);
- 
-+#if !defined(OS_FREEBSD)
-   // Handle hotplug events from libusb.
-   static int LIBUSB_CALL HotplugCallback(libusb_context* context,
-                                          PlatformUsbDevice device,
-                                          libusb_hotplug_event event,
-                                          void* user_data);
-+#endif
-   // These functions release a reference to the provided platform device.
-   void OnPlatformDeviceAdded(PlatformUsbDevice platform_device);
-   void OnPlatformDeviceRemoved(PlatformUsbDevice platform_device);
-@@ -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;
-+#if !defined(OS_FREEBSD)
-   libusb_hotplug_callback_handle hotplug_handle_;
-+#endif
- 
-   // Enumeration callbacks are queued until an enumeration completes.
-   bool enumeration_ready_ = false;
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
deleted file mode 100644
index 19aa4789bd..0000000000
--- a/chromium-new/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- extensions/browser/api/declarative_webrequest/webrequest_action.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ extensions/browser/api/declarative_webrequest/webrequest_action.cc
-@@ -29,7 +29,11 @@
- #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
- #include "net/http/http_util.h"
- #include "net/url_request/url_request.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- using content::ResourceRequestInfo;
- 
diff --git a/chromium-new/patches/patch-extensions_browser_api_networking__private_networking__private__event__router__factory.cc b/chromium-new/patches/patch-extensions_browser_api_networking__private_networking__private__event__router__factory.cc
deleted file mode 100644
index 1f9d331bf2..0000000000
--- a/chromium-new/patches/patch-extensions_browser_api_networking__private_networking__private__event__router__factory.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- extensions/browser/api/networking_private/networking_private_event_router_factory.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ extensions/browser/api/networking_private/networking_private_event_router_factory.cc
-@@ -13,6 +13,7 @@
- 
- namespace extensions {
- 
-+#if !defined(OS_BSD)
- // static
- NetworkingPrivateEventRouter*
- NetworkingPrivateEventRouterFactory::GetForProfile(
-@@ -57,5 +58,6 @@ bool NetworkingPrivateEventRouterFactory
- bool NetworkingPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const {
-   return true;
- }
-+#endif
- 
- }  // namespace extensions
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
deleted file mode 100644
index 855928dd60..0000000000
--- a/chromium-new/patches/patch-extensions_browser_api_serial_serial__api.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- extensions/browser/api/serial/serial_api.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ extensions/browser/api/serial/serial_api.cc
-@@ -85,12 +85,13 @@ bool SerialGetDevicesFunction::Prepare()
- 
- void SerialGetDevicesFunction::Work() {
-   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
--
-+#if !defined(OS_BSD)
-   std::unique_ptr<device::SerialDeviceEnumerator> enumerator =
-       device::SerialDeviceEnumerator::Create();
-   mojo::Array<device::serial::DeviceInfoPtr> devices = enumerator->GetDevices();
-   results_ = serial::GetDevices::Results::Create(
-       devices.To<std::vector<serial::DeviceInfo>>());
-+#endif
- }
- 
- SerialConnectFunction::SerialConnectFunction() {
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
deleted file mode 100644
index 1a9f2183b8..0000000000
--- a/chromium-new/patches/patch-extensions_browser_api_web__request_form__data__parser.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- extensions/browser/api/web_request/form_data_parser.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ extensions/browser/api/web_request/form_data_parser.cc
-@@ -15,7 +15,11 @@
- #include "base/values.h"
- #include "net/base/escape.h"
- #include "net/url_request/url_request.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- using base::DictionaryValue;
- using base::ListValue;
diff --git a/chromium-new/patches/patch-extensions_common_image__util.cc b/chromium-new/patches/patch-extensions_common_image__util.cc
deleted file mode 100644
index 1026a11083..0000000000
--- a/chromium-new/patches/patch-extensions_common_image__util.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- extensions/common/image_util.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ extensions/common/image_util.cc
-@@ -11,7 +11,11 @@
- #include "base/strings/string_number_conversions.h"
- #include "base/strings/string_util.h"
- #include "base/strings/stringprintf.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- #include "third_party/skia/include/core/SkColor.h"
- #include "third_party/skia/include/utils/SkParse.h"
- #include "ui/gfx/color_utils.h"
diff --git a/chromium-new/patches/patch-extensions_common_stack__frame.cc b/chromium-new/patches/patch-extensions_common_stack__frame.cc
deleted file mode 100644
index 85d937d728..0000000000
--- a/chromium-new/patches/patch-extensions_common_stack__frame.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- extensions/common/stack_frame.cc.orig	2017-02-02 02:02:54.000000000 +0000
-+++ extensions/common/stack_frame.cc
-@@ -7,7 +7,11 @@
- #include <string>
- 
- #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 extensions {
- 
diff --git a/chromium-new/patches/patch-gpu_BUILD.gn b/chromium-new/patches/patch-gpu_BUILD.gn
deleted file mode 100644
index bc4e40e5e6..0000000000
--- a/chromium-new/patches/patch-gpu_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- gpu/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
-+++ gpu/BUILD.gn
-@@ -93,7 +93,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_program__manager.cc b/chromium-new/patches/patch-gpu_command__buffer_service_program__manager.cc
deleted file mode 100644
index e114fe2d57..0000000000
--- a/chromium-new/patches/patch-gpu_command__buffer_service_program__manager.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- gpu/command_buffer/service/program_manager.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/command_buffer/service/program_manager.cc
-@@ -31,7 +31,11 @@
- #include "gpu/command_buffer/service/program_cache.h"
- #include "gpu/command_buffer/service/progress_reporter.h"
- #include "gpu/command_buffer/service/shader_manager.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- #include "ui/gl/gl_version_info.h"
- 
- using base::TimeDelta;
diff --git a/chromium-new/patches/patch-gpu_config_BUILD.gn b/chromium-new/patches/patch-gpu_config_BUILD.gn
deleted file mode 100644
index 8e6cc59783..0000000000
--- a/chromium-new/patches/patch-gpu_config_BUILD.gn
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD$
-
---- gpu/config/BUILD.gn.orig	2017-02-02 02:02:55.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
deleted file mode 100644
index 0c239a3a6c..0000000000
--- a/chromium-new/patches/patch-gpu_config_gpu__control__list.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD$
-
---- gpu/config/gpu_control_list.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/config/gpu_control_list.cc
-@@ -19,7 +19,11 @@
- #include "base/sys_info.h"
- #include "gpu/config/gpu_info.h"
- #include "gpu/config/gpu_util.h"
-+#if defined(OS_BSD)
-+#include <re2/re2.h>
-+#else
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- 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;
-@@ -1606,7 +1610,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
deleted file mode 100644
index 408853cdc7..0000000000
--- a/chromium-new/patches/patch-gpu_config_gpu__control__list__unittest.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- gpu/config/gpu_control_list_unittest.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/config/gpu_control_list_unittest.cc
-@@ -175,8 +175,7 @@ TEST_F(GpuControlListTest, VendorOnAllOs
-   features = control_list->MakeDecision(
-       GpuControlList::kOsLinux, kOsVersion, gpu_info());
-   EXPECT_SINGLE_FEATURE(features, TEST_FEATURE_0);
--#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || \
--    defined(OS_OPENBSD)
-+#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_ANDROID))
-   // ControlList entries will be filtered to the current OS only upon loading.
-   EXPECT_TRUE(control_list->LoadList(
-       vendor_json, GpuControlList::kCurrentOsOnly));
diff --git a/chromium-new/patches/patch-gpu_config_gpu__info__collector.cc b/chromium-new/patches/patch-gpu_config_gpu__info__collector.cc
deleted file mode 100644
index 5473f65956..0000000000
--- a/chromium-new/patches/patch-gpu_config_gpu__info__collector.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- gpu/config/gpu_info_collector.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/config/gpu_info_collector.cc
-@@ -193,8 +193,10 @@ CollectInfoResult CollectGraphicsInfoGL(
-   gpu_info->pixel_shader_version = glsl_version;
-   gpu_info->vertex_shader_version = glsl_version;
- 
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
-   IdentifyActiveGPU(gpu_info);
-   return CollectDriverInfoGL(gpu_info);
-+#endif
- }
- 
- void MergeGPUInfoGL(GPUInfo* basic_gpu_info,
diff --git a/chromium-new/patches/patch-gpu_config_gpu__test__config.cc b/chromium-new/patches/patch-gpu_config_gpu__test__config.cc
deleted file mode 100644
index 77f7ac1e96..0000000000
--- a/chromium-new/patches/patch-gpu_config_gpu__test__config.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD$
-
---- gpu/config/gpu_test_config.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/config/gpu_test_config.cc
-@@ -24,7 +24,7 @@ namespace {
- GPUTestConfig::OS GetCurrentOS() {
- #if defined(OS_CHROMEOS)
-   return GPUTestConfig::kOsChromeOS;
--#elif defined(OS_LINUX) || defined(OS_OPENBSD)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-   return GPUTestConfig::kOsLinux;
- #elif defined(OS_WIN)
-   int32_t major_version = 0;
-@@ -255,6 +255,10 @@ bool GPUTestBotConfig::LoadCurrentConfig
-   bool rt;
-   if (gpu_info == NULL) {
-     GPUInfo my_gpu_info;
-+#if defined(OS_BSD)
-+    rt = false;
-+    LOG(WARNING) << "CollectGpuID not present on BSD";
-+#else
-     CollectInfoResult result = CollectGpuID(
-         &my_gpu_info.gpu.vendor_id, &my_gpu_info.gpu.device_id);
-     if (result != kCollectInfoSuccess) {
-@@ -264,6 +268,7 @@ bool GPUTestBotConfig::LoadCurrentConfig
-     } else {
-       rt = SetGPUInfo(my_gpu_info);
-     }
-+#endif
-   } else {
-     rt = SetGPUInfo(*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
deleted file mode 100644
index da715cb03b..0000000000
--- a/chromium-new/patches/patch-gpu_gles2__conform__support_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- gpu/gles2_conform_support/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/gles2_conform_support/BUILD.gn
-@@ -60,7 +60,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",
-@@ -413,7 +413,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
deleted file mode 100644
index 0a8963f1e8..0000000000
--- a/chromium-new/patches/patch-gpu_gles2__conform__support_native_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- gpu/gles2_conform_support/native/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/gles2_conform_support/native/BUILD.gn
-@@ -20,7 +20,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_ipc_client_BUILD.gn b/chromium-new/patches/patch-gpu_ipc_client_BUILD.gn
deleted file mode 100644
index 76d136193c..0000000000
--- a/chromium-new/patches/patch-gpu_ipc_client_BUILD.gn
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- gpu/ipc/client/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/ipc/client/BUILD.gn
-@@ -51,6 +51,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
deleted file mode 100644
index 2bfede58dc..0000000000
--- a/chromium-new/patches/patch-gpu_ipc_service_BUILD.gn
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- gpu/ipc/service/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/ipc/service/BUILD.gn
-@@ -104,11 +104,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_ipc_service_gpu__init.cc b/chromium-new/patches/patch-gpu_ipc_service_gpu__init.cc
deleted file mode 100644
index 87b416e960..0000000000
--- a/chromium-new/patches/patch-gpu_ipc_service_gpu__init.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- gpu/ipc/service/gpu_init.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/ipc/service/gpu_init.cc
-@@ -75,7 +75,7 @@ void GetGpuInfoFromCommandLine(gpu::GPUI
-   }
- }
- 
--#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_BSD)
- void CollectGraphicsInfo(gpu::GPUInfo& gpu_info) {
-   TRACE_EVENT0("gpu,startup", "Collect Graphics Info");
- 
-@@ -94,7 +94,7 @@ void CollectGraphicsInfo(gpu::GPUInfo& g
-       break;
-   }
- }
--#endif  // defined(OS_MACOSX)
-+#endif  // defined(OS_MACOSX) && defined(OS_BSD)
- 
- #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- bool CanAccessNvidiaDeviceFile() {
-@@ -189,7 +189,7 @@ bool GpuInit::InitializeAndStartSandbox(
-   // By skipping the following code on Mac, we don't really lose anything,
-   // because the basic GPU information is passed down from the host process.
-   base::TimeTicks before_collect_context_graphics_info = base::TimeTicks::Now();
--#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_BSD)
-   CollectGraphicsInfo(gpu_info_);
-   if (gpu_info_.context_info_state == gpu::kCollectInfoFatalFailure)
-     return false;
-@@ -206,7 +206,7 @@ bool GpuInit::InitializeAndStartSandbox(
-     gpu::ApplyGpuDriverBugWorkarounds(
-         gpu_info_, const_cast<base::CommandLine*>(&command_line));
-   }
--#endif  // !defined(OS_MACOSX)
-+#endif  // !defined(OS_MACOSX) && !defined(OS_BSD)
- 
-   base::TimeDelta collect_context_time =
-       base::TimeTicks::Now() - before_collect_context_graphics_info;
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
deleted file mode 100644
index dcf37c3c09..0000000000
--- a/chromium-new/patches/patch-gpu_tools_compositor__model__bench_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- gpu/tools/compositor_model_bench/BUILD.gn.orig	2017-02-02 02:02:55.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) {
-   executable("compositor_model_bench") {
-     sources = [
-       "compositor_model_bench.cc",
diff --git a/chromium-new/patches/patch-gpu_vulkan_BUILD.gn b/chromium-new/patches/patch-gpu_vulkan_BUILD.gn
deleted file mode 100644
index f3b3b28b45..0000000000
--- a/chromium-new/patches/patch-gpu_vulkan_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- gpu/vulkan/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
-+++ gpu/vulkan/BUILD.gn
-@@ -14,7 +14,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
deleted file mode 100644
index 94dc744885..0000000000
--- a/chromium-new/patches/patch-ipc_ipc__channel.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ipc/ipc_channel.h.orig	2017-02-02 02:02:55.000000000 +0000
-+++ ipc/ipc_channel.h
-@@ -245,7 +245,7 @@ class IPC_EXPORT Channel : public Sender
-   static std::string GenerateUniqueRandomChannelID();
- #endif
- 
--#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__common.cc b/chromium-new/patches/patch-ipc_ipc__channel__common.cc
deleted file mode 100644
index 11318e7210..0000000000
--- a/chromium-new/patches/patch-ipc_ipc__channel__common.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ipc/ipc_channel_common.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ ipc/ipc_channel_common.cc
-@@ -9,7 +9,7 @@
- 
- namespace IPC {
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- 
- namespace {
- int g_global_pid = 0;
diff --git a/chromium-new/patches/patch-ipc_ipc__message__utils.cc b/chromium-new/patches/patch-ipc_ipc__message__utils.cc
deleted file mode 100644
index 4bede79b23..0000000000
--- a/chromium-new/patches/patch-ipc_ipc__message__utils.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ipc/ipc_message_utils.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ ipc/ipc_message_utils.cc
-@@ -425,7 +425,7 @@ void ParamTraits<unsigned int>::Log(cons
-   l->append(base::UintToString(p));
- }
- 
--#if defined(OS_WIN) || defined(OS_LINUX) || \
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || \
-     (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS))
- void ParamTraits<long>::Log(const param_type& p, std::string* l) {
-   l->append(base::Int64ToString(static_cast<int64_t>(p)));
diff --git a/chromium-new/patches/patch-ipc_ipc__message__utils.h b/chromium-new/patches/patch-ipc_ipc__message__utils.h
deleted file mode 100644
index 2325ed535a..0000000000
--- a/chromium-new/patches/patch-ipc_ipc__message__utils.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ipc/ipc_message_utils.h.orig	2017-02-02 02:02:55.000000000 +0000
-+++ ipc/ipc_message_utils.h
-@@ -210,7 +210,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.
--#if defined(OS_WIN) || defined(OS_LINUX) || \
-+#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || \
-     (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS))
- template <>
- struct ParamTraits<long> {
diff --git a/chromium-new/patches/patch-ipc_unix__domain__socket__util.cc b/chromium-new/patches/patch-ipc_unix__domain__socket__util.cc
deleted file mode 100644
index 7b8f925fbe..0000000000
--- a/chromium-new/patches/patch-ipc_unix__domain__socket__util.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ipc/unix_domain_socket_util.cc.orig	2017-02-02 02:02:55.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)
-   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
deleted file mode 100644
index 7c90e0b14e..0000000000
--- a/chromium-new/patches/patch-media_audio_BUILD.gn
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
---- media/audio/BUILD.gn.orig	2017-02-02 02:02:55.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
deleted file mode 100644
index d58f5e4cc7..0000000000
--- a/chromium-new/patches/patch-media_audio_alsa_audio__manager__alsa.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-$NetBSD$
-
---- media/audio/alsa/audio_manager_alsa.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/audio/alsa/audio_manager_alsa.cc
-@@ -135,7 +135,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
-   int card = -1;
- 
-   // Loop through the sound cards to get ALSA device hints.
-+#ifdef OS_LINUX
-   while (!wrapper_->CardNext(&card) && card >= 0) {
-+#endif
-     void** hints = NULL;
-     int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
-     if (!error) {
-@@ -147,7 +149,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
-       DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: "
-                     << wrapper_->StrError(error);
-     }
-+#ifdef OS_LINUX
-   }
-+#endif
- }
- 
- void AudioManagerAlsa::GetAlsaDevicesInfo(
-@@ -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?
-+#ifdef OS_LINUX
-     static const char kDeviceTypeDesired[] = "plughw";
-+#else
-+    static const char kDeviceTypeDesired[] = "plug";
-+#endif
-     return strncmp(kDeviceTypeDesired,
-                    device_name,
-                    arraysize(kDeviceTypeDesired) - 1) == 0;
-@@ -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.
-+#ifdef OS_LINUX
-   while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) {
-+#endif
-     int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
-     if (!error) {
-       for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) {
-@@ -278,7 +288,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
-       DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: "
-                     << wrapper_->StrError(error);
-     }
-+#ifdef OS_LINUX
-   }
-+#endif
- 
-   return has_device;
- }
diff --git a/chromium-new/patches/patch-media_audio_audio__manager.cc b/chromium-new/patches/patch-media_audio_audio__manager.cc
deleted file mode 100644
index 725f33e339..0000000000
--- a/chromium-new/patches/patch-media_audio_audio__manager.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- media/audio/audio_manager.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/audio/audio_manager.cc
-@@ -95,7 +95,7 @@ class AudioManagerHelper : public base::
-   }
- #endif
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   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)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   std::string app_name_;
- #endif
- 
-@@ -365,7 +365,7 @@ void AudioManager::EnableCrashKeyLogging
-   g_helper.Pointer()->enable_crash_key_logging();
- }
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- // static
- void AudioManager::SetGlobalAppName(const std::string& app_name) {
-   g_helper.Pointer()->set_app_name(app_name);
diff --git a/chromium-new/patches/patch-media_audio_audio__manager.h b/chromium-new/patches/patch-media_audio_audio__manager.h
deleted file mode 100644
index 58803515d6..0000000000
--- a/chromium-new/patches/patch-media_audio_audio__manager.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/audio/audio_manager.h.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/audio/audio_manager.h
-@@ -84,7 +84,7 @@ class MEDIA_EXPORT AudioManager {
-   // See http://crbug.com/422522
-   static void EnableCrashKeyLoggingForAudioThreadHangs();
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   // Sets the name of the audio source as seen by external apps. Only actually
-   // used with PulseAudio as of this writing.
-   static void SetGlobalAppName(const std::string& app_name);
diff --git a/chromium-new/patches/patch-media_base_BUILD.gn b/chromium-new/patches/patch-media_base_BUILD.gn
deleted file mode 100644
index 8f87b17082..0000000000
--- a/chromium-new/patches/patch-media_base_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- media/base/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/base/BUILD.gn
-@@ -309,7 +309,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",
-@@ -345,7 +345,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_capture_BUILD.gn b/chromium-new/patches/patch-media_capture_BUILD.gn
deleted file mode 100644
index 8c0bb5670e..0000000000
--- a/chromium-new/patches/patch-media_capture_BUILD.gn
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- media/capture/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/capture/BUILD.gn
-@@ -127,6 +127,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
deleted file mode 100644
index a03d592ef4..0000000000
--- a/chromium-new/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/capture/video/fake_video_capture_device_factory.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/capture/video/fake_video_capture_device_factory.cc
-@@ -71,7 +71,7 @@ void FakeVideoCaptureDeviceFactory::GetD
-   for (int n = 0; n < number_of_devices_; ++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)
-                                      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
deleted file mode 100644
index 6e6ebd1e95..0000000000
--- a/chromium-new/patches/patch-media_capture_video_file__video__capture__device__factory.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/capture/video/file_video_capture_device_factory.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/capture/video/file_video_capture_device_factory.cc
-@@ -53,7 +53,7 @@ void FileVideoCaptureDeviceFactory::GetD
- #elif defined(OS_MACOSX)
-       command_line_file_path.value(), kFileVideoCaptureDeviceName,
-       VideoCaptureApi::MACOSX_AVFOUNDATION
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-       command_line_file_path.value(), kFileVideoCaptureDeviceName,
-       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 55b0144bff..0000000000
--- a/chromium-new/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD$
-
---- media/capture/video/linux/v4l2_capture_delegate.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/capture/video/linux/v4l2_capture_delegate.cc
-@@ -4,7 +4,9 @@
- 
- #include "media/capture/video/linux/v4l2_capture_delegate.h"
- 
-+#if !defined(OS_BSD)
- #include <linux/version.h>
-+#endif
- #include <poll.h>
- #include <sys/fcntl.h>
- #include <sys/ioctl.h>
-@@ -20,10 +22,10 @@
- #include "media/capture/video/blob_utils.h"
- #include "media/capture/video/linux/video_capture_device_linux.h"
- 
--#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
-+// #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
- // 16 bit depth, Realsense F200.
- #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ')
--#endif
-+// #endif
- 
- // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the
- // format is introduced to kernel.
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
deleted file mode 100644
index e5574a7e03..0000000000
--- a/chromium-new/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
+++ /dev/null
@@ -1,64 +0,0 @@
-$NetBSD$
-
---- media/capture/video/linux/video_capture_device_linux.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/capture/video/linux/video_capture_device_linux.cc
-@@ -21,6 +21,7 @@
- 
- namespace media {
- 
-+#if !defined(OS_FREEBSD)
- // Translates Video4Linux pixel formats to Chromium pixel formats.
- // static
- VideoPixelFormat VideoCaptureDeviceLinux::V4l2FourCcToChromiumPixelFormat(
-@@ -34,6 +35,7 @@ std::list<uint32_t> VideoCaptureDeviceLi
-     bool favour_mjpeg) {
-   return V4L2CaptureDelegate::GetListOfUsableFourCcs(favour_mjpeg);
- }
-+#endif // !defined(OS_FREEBSD)
- 
- VideoCaptureDeviceLinux::VideoCaptureDeviceLinux(
-     const VideoCaptureDeviceDescriptor& device_descriptor)
-@@ -47,6 +49,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDe
-   v4l2_thread_.Stop();
- }
- 
-+#if !defined(OS_FREEBSD)
- void VideoCaptureDeviceLinux::AllocateAndStart(
-     const VideoCaptureParams& params,
-     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)
-+void VideoCaptureDeviceLinux::AllocateAndStart(
-+    const VideoCaptureParams& params,
-+    std::unique_ptr<VideoCaptureDevice::Client> client) {}
-+#endif // !defined(OS_FREEBSD)
- 
-+#if !defined(OS_FREEBSD)
- void VideoCaptureDeviceLinux::StopAndDeAllocate() {
-   if (!v4l2_thread_.IsRunning())
-     return;  // Wrong state.
-@@ -110,7 +119,11 @@ void VideoCaptureDeviceLinux::SetPhotoOp
-       base::Bind(&V4L2CaptureDelegate::SetPhotoOptions, capture_impl_,
-                  base::Passed(&settings), base::Passed(&callback)));
- }
-+#else // !defined(OS_FREEBSD)
-+void VideoCaptureDeviceLinux::StopAndDeAllocate() {}
-+#endif // !defined(OS_FREEBSD)
- 
-+#if !defined(OS_FREEBSD)
- void VideoCaptureDeviceLinux::SetRotation(int rotation) {
-   if (v4l2_thread_.IsRunning()) {
-     v4l2_thread_.task_runner()->PostTask(
-@@ -118,6 +131,9 @@ void VideoCaptureDeviceLinux::SetRotatio
-         base::Bind(&V4L2CaptureDelegate::SetRotation, capture_impl_, rotation));
-   }
- }
-+#else // !defined(OS_FREEBSD)
-+void VideoCaptureDeviceLinux::SetRotation(int rotation) {}
-+#endif // !defined(OS_FREEBSD)
- 
- // static
- int VideoCaptureDeviceLinux::TranslatePowerLineFrequencyToV4L2(
diff --git a/chromium-new/patches/patch-media_capture_video_video__capture__device__client.cc b/chromium-new/patches/patch-media_capture_video_video__capture__device__client.cc
deleted file mode 100644
index 78e7fffb91..0000000000
--- a/chromium-new/patches/patch-media_capture_video_video__capture__device__client.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- media/capture/video/video_capture_device_client.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/capture/video/video_capture_device_client.cc
-@@ -193,7 +193,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-media_capture_video_video__capture__device__factory.cc b/chromium-new/patches/patch-media_capture_video_video__capture__device__factory.cc
deleted file mode 100644
index c778d565b9..0000000000
--- a/chromium-new/patches/patch-media_capture_video_video__capture__device__factory.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD$
-
---- media/capture/video/video_capture_device_factory.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/capture/video/video_capture_device_factory.cc
-@@ -18,6 +18,10 @@ namespace media {
- std::unique_ptr<VideoCaptureDeviceFactory>
- VideoCaptureDeviceFactory::CreateFactory(
-     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
-+#if defined(OS_BSD)
-+  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
-@@ -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
deleted file mode 100644
index 0182280629..0000000000
--- a/chromium-new/patches/patch-media_cast_BUILD.gn
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- media/cast/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/cast/BUILD.gn
-@@ -356,7 +356,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") {
-@@ -410,7 +410,7 @@ if (is_win || is_mac || (is_linux && !is
-       "//ui/gfx/geometry",
-     ]
- 
--    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",
-@@ -513,7 +513,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
deleted file mode 100644
index 5c1ad23b20..0000000000
--- a/chromium-new/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- media/cdm/ppapi/ppapi_cdm_adapter.gni.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/cdm/ppapi/ppapi_cdm_adapter.gni
-@@ -5,7 +5,7 @@
- # This template defines a CDM adapter target. Just use this as you would a
- # normal target and everything should work correctly.
- 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"
-@@ -57,7 +57,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_ffmpeg_ffmpeg__common.h b/chromium-new/patches/patch-media_ffmpeg_ffmpeg__common.h
deleted file mode 100644
index 6aeec36fed..0000000000
--- a/chromium-new/patches/patch-media_ffmpeg_ffmpeg__common.h
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- media/ffmpeg/ffmpeg_common.h.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/ffmpeg/ffmpeg_common.h
-@@ -25,7 +25,7 @@ extern "C" {
- // Disable deprecated features which result in spammy compile warnings.  This
- // list of defines must mirror those in the 'defines' section of FFmpeg's
- // BUILD.gn file or the headers below will generate different structures!
--#define FF_API_CONVERGENCE_DURATION 0
-+//#define FF_API_CONVERGENCE_DURATION 0
- // Upstream libavcodec/utils.c still uses the deprecated
- // av_dup_packet(), causing deprecation warnings.
- // The normal fix for such things is to disable the feature as below,
-@@ -39,7 +39,6 @@ extern "C" {
- MSVC_PUSH_DISABLE_WARNING(4244);
- #include <libavcodec/avcodec.h>
- #include <libavformat/avformat.h>
--#include <libavformat/internal.h>
- #include <libavformat/avio.h>
- #include <libavutil/avutil.h>
- #include <libavutil/imgutils.h>
diff --git a/chromium-new/patches/patch-media_filters_ffmpeg__demuxer.cc b/chromium-new/patches/patch-media_filters_ffmpeg__demuxer.cc
deleted file mode 100644
index 58b42d35be..0000000000
--- a/chromium-new/patches/patch-media_filters_ffmpeg__demuxer.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD$
-
---- media/filters/ffmpeg_demuxer.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/filters/ffmpeg_demuxer.cc
-@@ -1198,24 +1198,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone
-   // If no estimate is found, the stream entry will be kInfiniteDuration.
-   std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
-                                                     kInfiniteDuration);
--  const AVFormatInternal* internal = format_context->internal;
--  if (internal && internal->packet_buffer &&
--      format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
--    struct AVPacketList* packet_buffer = internal->packet_buffer;
--    while (packet_buffer != internal->packet_buffer_end) {
--      DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
--                start_time_estimates.size());
--      const AVStream* stream =
--          format_context->streams[packet_buffer->pkt.stream_index];
--      if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
--        const base::TimeDelta packet_pts =
--            ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
--        if (packet_pts < start_time_estimates[stream->index])
--          start_time_estimates[stream->index] = packet_pts;
--      }
--      packet_buffer = packet_buffer->next;
--    }
--  }
- 
-   std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
- 
diff --git a/chromium-new/patches/patch-media_filters_vp9__parser.h b/chromium-new/patches/patch-media_filters_vp9__parser.h
deleted file mode 100644
index fb496a9b65..0000000000
--- a/chromium-new/patches/patch-media_filters_vp9__parser.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- media/filters/vp9_parser.h.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/filters/vp9_parser.h
-@@ -14,6 +14,7 @@
- 
- #include <stddef.h>
- #include <stdint.h>
-+#include <unistd.h>
- #include <sys/types.h>
- 
- #include <deque>
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
deleted file mode 100644
index c5daf371fe..0000000000
--- a/chromium-new/patches/patch-media_formats_common_offset__byte__queue.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- media/formats/common/offset_byte_queue.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/formats/common/offset_byte_queue.cc
-@@ -46,13 +46,13 @@ void OffsetByteQueue::PeekAt(int64_t off
-   *size = tail() - offset;
- }
- 
--bool OffsetByteQueue::Trim(int64_t max_offset) {
--  if (max_offset < head_) return true;
--  if (max_offset > tail()) {
-+bool OffsetByteQueue::Trim(int64_t _max_offset) {
-+  if (_max_offset < head_) return true;
-+  if (_max_offset > tail()) {
-     Pop(size_);
-     return false;
-   }
--  Pop(max_offset - head_);
-+  Pop(_max_offset - head_);
-   return true;
- }
- 
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
deleted file mode 100644
index f0f70ff6b3..0000000000
--- a/chromium-new/patches/patch-media_formats_common_offset__byte__queue.h
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- media/formats/common/offset_byte_queue.h.orig	2017-02-02 02:02:55.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.
-   void PeekAt(int64_t offset, const uint8_t** buf, int* size);
- 
--  // Marks the bytes up to (but not including) |max_offset| as ready for
-+  // Marks the bytes up to (but not including) |_max_offset| as ready for
-   // deletion. This is relatively inexpensive, but will not necessarily reduce
-   // the resident buffer size right away (or ever).
-   //
-   // Returns true if the full range of bytes were successfully trimmed,
--  // including the case where |max_offset| is less than the current head.
--  // Returns false if |max_offset| > tail() (although all bytes currently
-+  // including the case where |_max_offset| is less than the current head.
-+  // Returns false if |_max_offset| > tail() (although all bytes currently
-   // buffered are still cleared).
--  bool Trim(int64_t max_offset);
-+  bool Trim(int64_t _max_offset);
- 
-   // The head and tail positions, in terms of the file's absolute offsets.
-   // tail() is an exclusive bound.
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
deleted file mode 100644
index c5920e8785..0000000000
--- a/chromium-new/patches/patch-media_formats_mp2t_es__parser__adts.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
---- media/formats/mp2t/es_parser_adts.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/formats/mp2t/es_parser_adts.cc
-@@ -54,11 +54,11 @@ bool EsParserAdts::LookForAdtsFrame(Adts
-   const uint8_t* es;
-   es_queue_->Peek(&es, &es_size);
- 
--  int max_offset = es_size - kADTSHeaderMinSize;
--  if (max_offset <= 0)
-+  int _max_offset = es_size - kADTSHeaderMinSize;
-+  if (_max_offset <= 0)
-     return false;
- 
--  for (int offset = 0; offset < max_offset; offset++) {
-+  for (int offset = 0; offset < _max_offset; offset++) {
-     const uint8_t* cur_buf = &es[offset];
-     if (!isAdtsSyncWord(cur_buf))
-       continue;
-@@ -96,7 +96,7 @@ bool EsParserAdts::LookForAdtsFrame(Adts
-     return true;
-   }
- 
--  es_queue_->Pop(max_offset);
-+  es_queue_->Pop(_max_offset);
-   return false;
- }
- 
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
deleted file mode 100644
index c0cce624c1..0000000000
--- a/chromium-new/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
---- media/formats/mp2t/es_parser_mpeg1audio.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ media/formats/mp2t/es_parser_mpeg1audio.cc
-@@ -109,11 +109,11 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud
-   const uint8_t* es;
-   es_queue_->Peek(&es, &es_size);
- 
--  int max_offset = es_size - MPEG1AudioStreamParser::kHeaderSize;
--  if (max_offset <= 0)
-+  int _max_offset = es_size - MPEG1AudioStreamParser::kHeaderSize;
-+  if (_max_offset <= 0)
-     return false;
- 
--  for (int offset = 0; offset < max_offset; offset++) {
-+  for (int offset = 0; offset < _max_offset; offset++) {
-     const uint8_t* cur_buf = &es[offset];
-     if (cur_buf[0] != 0xff)
-       continue;
-@@ -154,7 +154,7 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud
-     return true;
-   }
- 
--  es_queue_->Pop(max_offset);
-+  es_queue_->Pop(_max_offset);
-   return false;
- }
- 
diff --git a/chromium-new/patches/patch-mojo_BUILD.gn b/chromium-new/patches/patch-mojo_BUILD.gn
deleted file mode 100644
index 6a0ee91061..0000000000
--- a/chromium-new/patches/patch-mojo_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- mojo/BUILD.gn.orig	2017-02-02 02:02:55.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")) {
-     deps += [ "//mojo/public" ]
-   }
- 
diff --git a/chromium-new/patches/patch-mojo_edk_embedder_platform__channel__utils__posix.cc b/chromium-new/patches/patch-mojo_edk_embedder_platform__channel__utils__posix.cc
deleted file mode 100644
index 989949ecda..0000000000
--- a/chromium-new/patches/patch-mojo_edk_embedder_platform__channel__utils__posix.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- mojo/edk/embedder/platform_channel_utils_posix.cc.orig	2017-02-02 02:02:55.000000000 +0000
-+++ mojo/edk/embedder/platform_channel_utils_posix.cc
-@@ -36,7 +36,7 @@ bool IsRecoverableError() {
- 
- bool GetPeerEuid(PlatformHandle handle, 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)
-   uid_t socket_euid;
-   gid_t socket_gid;
-   if (getpeereid(handle.handle, &socket_euid, &socket_gid) < 0) {
diff --git a/chromium-new/patches/patch-mojo_edk_test_BUILD.gn b/chromium-new/patches/patch-mojo_edk_test_BUILD.gn
deleted file mode 100644
index 9e12968d04..0000000000
--- a/chromium-new/patches/patch-mojo_edk_test_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- mojo/edk/test/BUILD.gn.orig	2017-02-02 02:02:55.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-native__client__sdk_src_BUILD.gn b/chromium-new/patches/patch-native__client__sdk_src_BUILD.gn
deleted file mode 100644
index 294e520f75..0000000000
--- a/chromium-new/patches/patch-native__client__sdk_src_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- native_client_sdk/src/BUILD.gn.orig	2017-02-02 02:02:56.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-net_BUILD.gn b/chromium-new/patches/patch-net_BUILD.gn
deleted file mode 100644
index 73e10240d5..0000000000
--- a/chromium-new/patches/patch-net_BUILD.gn
+++ /dev/null
@@ -1,88 +0,0 @@
-$NetBSD$
-
---- net/BUILD.gn.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/BUILD.gn
-@@ -153,6 +153,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) {
-@@ -278,6 +283,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
-     }
-@@ -966,7 +978,7 @@ if (!is_ios && !is_android) {
-   }
- }
- 
--if (is_linux || is_mac) {
-+if (is_linux || is_bsd || is_mac) {
-   executable("cachetool") {
-     testonly = true
-     sources = [
-@@ -995,7 +1007,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",
-@@ -1098,7 +1110,7 @@ if (is_android) {
-   }
- }
- 
--if (is_android || is_linux) {
-+if (is_android || is_linux || is_bsd) {
-   executable("disk_cache_memory_test") {
-     testonly = true
-     sources = [
-@@ -1276,7 +1288,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/",
-@@ -1299,7 +1311,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",
-@@ -1319,6 +1331,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.h b/chromium-new/patches/patch-net_base_address__tracker__linux.h
deleted file mode 100644
index b7b57c02ea..0000000000
--- a/chromium-new/patches/patch-net_base_address__tracker__linux.h
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD$
-
---- net/base/address_tracker_linux.h.orig	2017-02-02 02:02:56.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(__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>
- #undef net
-+#endif
- #include <stddef.h>
- 
- #include <map>
-@@ -34,8 +36,11 @@ namespace internal {
- class NET_EXPORT_PRIVATE AddressTrackerLinux :
-     public base::MessageLoopForIO::Watcher {
-  public:
-+#if !defined(__FreeBSD__) && !defined(__NetBSD__)
-   typedef std::map<IPAddress, struct ifaddrmsg> AddressMap;
--
-+#else
-+  typedef void* AddressMap;
-+#endif
-   // Non-tracking version constructor: it takes a snapshot of the
-   // current system configuration. Once Init() returns, the
-   // configuration is available through GetOnlineLinks() and
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
deleted file mode 100644
index fba97b3981..0000000000
--- a/chromium-new/patches/patch-net_base_address__tracker__linux__unittest.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- net/base/address_tracker_linux_unittest.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/base/address_tracker_linux_unittest.cc
-@@ -4,7 +4,11 @@
- 
- #include "net/base/address_tracker_linux.h"
- 
-+#if defined(__linux__)
- #include <linux/if.h>
-+#else
-+#include <net/if.h>
-+#endif
- 
- #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
deleted file mode 100644
index 6c5c6b62ce..0000000000
--- a/chromium-new/patches/patch-net_base_mime__util__unittest.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- net/base/mime_util_unittest.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/base/mime_util_unittest.cc
-@@ -243,7 +243,7 @@ TEST(MimeUtilTest, TestGetExtensionsForM
-     { "MeSsAge/*",  1, "eml" },
-     { "image/bmp",  1, "bmp" },
-     { "video/*",    6, "mp4" },
--#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_IOS)
-+#if (defined(OS_POSIX) && !defined(OS_MACOSX)) || defined(OS_IOS)
-     { "video/*",    6, "mpg" },
- #else
-     { "video/*",    6, "mpeg" },
diff --git a/chromium-new/patches/patch-net_base_network__change__notifier.cc b/chromium-new/patches/patch-net_base_network__change__notifier.cc
deleted file mode 100644
index c23b890961..0000000000
--- a/chromium-new/patches/patch-net_base_network__change__notifier.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD$
-
---- net/base/network_change_notifier.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/base/network_change_notifier.cc
-@@ -533,7 +533,6 @@ NetworkChangeNotifier* NetworkChangeNoti
- #elif defined(OS_MACOSX)
-   return new NetworkChangeNotifierMac();
- #else
--  NOTIMPLEMENTED();
-   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
deleted file mode 100644
index 2153f82594..0000000000
--- a/chromium-new/patches/patch-net_base_network__change__notifier.h
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- net/base/network_change_notifier.h.orig	2017-02-02 02:02:56.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
deleted file mode 100644
index f236949846..0000000000
--- a/chromium-new/patches/patch-net_base_network__interfaces__linux.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-$NetBSD$
-
---- net/base/network_interfaces_linux.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/base/network_interfaces_linux.cc
-@@ -6,12 +6,14 @@
- 
- #include <memory>
- 
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
- #if !defined(OS_ANDROID)
- #include <linux/ethtool.h>
- #endif  // !defined(OS_ANDROID)
- #include <linux/if.h>
- #include <linux/sockios.h>
- #include <linux/wireless.h>
-+#endif  // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
- #include <set>
- #include <sys/ioctl.h>
- #include <sys/types.h>
-@@ -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.
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
-   if (native_attributes & (
- #if !defined(OS_ANDROID)
-                               IFA_F_OPTIMISTIC | IFA_F_DADFAILED |
-@@ -66,6 +69,10 @@ bool TryConvertNativeToNetIPAttributes(i
-   }
- 
-   return true;
-+#else
-+  // the flags tested above are not present on FreeBSD
-+  return false;
-+#endif  // !OS_FREEBSD && !OS_NETBSD
- }
- 
- }  // namespace
-@@ -80,13 +87,15 @@ NetworkChangeNotifier::ConnectionType Ge
-   if (!s.is_valid())
-     return NetworkChangeNotifier::CONNECTION_UNKNOWN;
- 
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
-   // Test wireless extensions for CONNECTION_WIFI
-   struct iwreq pwrq = {};
-   strncpy(pwrq.ifr_name, ifname.c_str(), IFNAMSIZ - 1);
-   if (ioctl(s.get(), SIOCGIWNAME, &pwrq) != -1)
-     return NetworkChangeNotifier::CONNECTION_WIFI;
-+#endif  // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
- 
--#if !defined(OS_ANDROID)
-+#if !defined(OS_ANDROID) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
-   // Test ethtool for CONNECTION_ETHERNET
-   struct ethtool_cmd ecmd = {};
-   ecmd.cmd = ETHTOOL_GSET;
-@@ -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;
--#endif  // !defined(OS_ANDROID)
-+#endif  // !defined(OS_ANDROID) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
- 
-   return NetworkChangeNotifier::CONNECTION_UNKNOWN;
- }
- 
- std::string GetInterfaceSSID(const std::string& ifname) {
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
-   base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0));
-   if (!ioctl_socket.is_valid())
-     return "";
-@@ -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;
-+#endif  // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
-   return "";
- }
- 
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
- bool GetNetworkListImpl(
-     NetworkInterfaceList* networks,
-     int policy,
-@@ -183,6 +195,7 @@ bool GetNetworkListImpl(
- 
-   return true;
- }
-+#endif  // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
- 
- std::string GetWifiSSIDFromInterfaceListInternal(
-     const NetworkInterfaceList& interfaces,
-@@ -207,12 +220,16 @@ bool GetNetworkList(NetworkInterfaceList
-   if (networks == NULL)
-     return false;
- 
-+#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
-   internal::AddressTrackerLinux tracker;
-   tracker.Init();
- 
-   return internal::GetNetworkListImpl(
-       networks, policy, tracker.GetOnlineLinks(), tracker.GetAddressMap(),
-       &internal::AddressTrackerLinux::GetInterfaceName);
-+#else
-+  return false;
-+#endif
- }
- 
- std::string GetWifiSSID() {
diff --git a/chromium-new/patches/patch-net_base_network__interfaces__posix.cc b/chromium-new/patches/patch-net_base_network__interfaces__posix.cc
deleted file mode 100644
index 4c49b40155..0000000000
--- a/chromium-new/patches/patch-net_base_network__interfaces__posix.cc
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- net/base/network_interfaces_posix.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/base/network_interfaces_posix.cc
-@@ -20,6 +20,7 @@ namespace net {
- #if !defined(OS_NACL)
- namespace internal {
- 
-+#if !defined(OS_BSD)
- // The application layer can pass |policy| defined in net_util.h to
- // request filtering out certain type of interfaces.
- bool ShouldIgnoreInterface(const std::string& name, int policy) {
-@@ -33,6 +34,7 @@ bool ShouldIgnoreInterface(const std::st
- 
-   return false;
- }
-+#endif
- 
- // Check if the address is unspecified (i.e. made of zeroes) or loopback.
- bool IsLoopbackOrUnspecifiedAddress(const sockaddr* addr) {
diff --git a/chromium-new/patches/patch-net_dns_address__sorter__posix.cc b/chromium-new/patches/patch-net_dns_address__sorter__posix.cc
deleted file mode 100644
index e7552ee5d4..0000000000
--- a/chromium-new/patches/patch-net_dns_address__sorter__posix.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- net/dns/address_sorter_posix.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/dns/address_sorter_posix.cc
-@@ -13,6 +13,9 @@
- #include <sys/socket.h>  // Must be included before ifaddrs.h.
- #include <ifaddrs.h>
- #include <net/if.h>
-+#if defined(OS_FREEBSD)
-+#include <net/if_var.h>
-+#endif
- #include <netinet/in_var.h>
- #include <string.h>
- #include <sys/ioctl.h>
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
deleted file mode 100644
index d041d6f69e..0000000000
--- a/chromium-new/patches/patch-net_dns_dns__config__service__posix__unittest.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- net/dns/dns_config_service_posix_unittest.cc.orig	2017-02-02 02:02:56.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
- // found in the LICENSE file.
- 
--#include <resolv.h>
--
- #include <memory>
- 
- #include "base/cancelable_callback.h"
diff --git a/chromium-new/patches/patch-net_dns_dns__reloader.cc b/chromium-new/patches/patch-net_dns_dns__reloader.cc
deleted file mode 100644
index 5329b85abf..0000000000
--- a/chromium-new/patches/patch-net_dns_dns__reloader.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD$
-
---- net/dns/dns_reloader.cc.orig	2016-11-10 20:02:16.000000000 +0000
-+++ net/dns/dns_reloader.cc
-@@ -7,6 +7,10 @@
- #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
-     !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_http_http__auth__gssapi__posix.cc b/chromium-new/patches/patch-net_http_http__auth__gssapi__posix.cc
deleted file mode 100644
index 9d759206b9..0000000000
--- a/chromium-new/patches/patch-net_http_http__auth__gssapi__posix.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- net/http/http_auth_gssapi_posix.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/http/http_auth_gssapi_posix.cc
-@@ -431,8 +431,8 @@ base::NativeLibrary GSSAPISharedLibrary:
-     static const char* const kDefaultLibraryNames[] = {
- #if defined(OS_MACOSX)
-       "/System/Library/Frameworks/Kerberos.framework/Kerberos"
--#elif defined(OS_OPENBSD)
--      "libgssapi.so"          // Heimdal - OpenBSD
-+#elif defined(OS_BSD)
-+      "libgssapi.so"          // Heimdal - OpenBSD / FreeBSD
- #else
-       "libgssapi_krb5.so.2",  // MIT Kerberos - FC, Suse10, Debian
-       "libgssapi.so.4",       // Heimdal - Suse10, MDK
diff --git a/chromium-new/patches/patch-net_http_http__network__session.cc b/chromium-new/patches/patch-net_http_http__network__session.cc
deleted file mode 100644
index 25bb8a9d4f..0000000000
--- a/chromium-new/patches/patch-net_http_http__network__session.cc
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- net/http/http_network_session.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/http/http_network_session.cc
-@@ -17,7 +17,9 @@
- #include "base/strings/string_util.h"
- #include "base/values.h"
- #include "net/base/network_throttle_manager.h"
-+#if defined(USE_KERBEROS)
- #include "net/http/http_auth_handler_factory.h"
-+#endif
- #include "net/http/http_response_body_drainer.h"
- #include "net/http/http_stream_factory_impl.h"
- #include "net/http/url_security_manager.h"
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
deleted file mode 100644
index 1701f1abff..0000000000
--- a/chromium-new/patches/patch-net_proxy_proxy__config__service__linux.cc
+++ /dev/null
@@ -1,147 +0,0 @@
-$NetBSD$
-
---- net/proxy/proxy_config_service_linux.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/proxy/proxy_config_service_linux.cc
-@@ -11,7 +11,14 @@
- #include <limits.h>
- #include <stdio.h>
- #include <stdlib.h>
-+#if defined(OS_FREEBSD) || defined(OS_NETBSD)
-+#include <fcntl.h>
-+#include <sys/types.h>
-+#include <sys/event.h>
-+#include <sys/time.h>
-+#else
- #include <sys/inotify.h>
-+#endif
- #include <unistd.h>
- 
- #include <map>
-@@ -863,6 +870,7 @@ class SettingGetterImplKDE : public Prox
-  public:
-   explicit SettingGetterImplKDE(base::Environment* env_var_getter)
-       : inotify_fd_(-1),
-+        config_fd_(-1),
-         notify_delegate_(nullptr),
-         debounce_timer_(new base::OneShotTimer()),
-         indirect_manual_(false),
-@@ -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_LT(inotify_fd_, 0);
-+    DCHECK_LT(config_fd_, 0);
-   }
- 
-   bool Init(const scoped_refptr<base::SingleThreadTaskRunner>& glib_task_runner,
-@@ -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_LT(inotify_fd_, 0);
-+#if defined(OS_BSD)
-+    inotify_fd_ = kqueue();
-+#else
-     inotify_fd_ = inotify_init();
-+#endif
-     if (inotify_fd_ < 0) {
-+#if defined(OS_BSD)
-+      PLOG(ERROR) << "kqueue failed";
-+#else
-       PLOG(ERROR) << "inotify_init failed";
-+#endif
-       return false;
-     }
-     if (!base::SetNonBlocking(inotify_fd_)) {
-@@ -974,22 +991,40 @@ class SettingGetterImplKDE : public Prox
-       close(inotify_fd_);
-       inotify_fd_ = -1;
-     }
-+    if (config_fd_ >= 0) {
-+      close(config_fd_);
-+      config_fd_ = -1;
-+    }
-     debounce_timer_.reset();
-   }
- 
-   bool SetUpNotifications(
-       ProxyConfigServiceLinux::Delegate* delegate) override {
-     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_BSD)
-+    config_fd_ = HANDLE_EINTR(open(kde_config_dir_.value().c_str(), O_RDONLY));
-+
-+    if (config_fd_ == -1)
-+      return false;
-+
-+    struct kevent ev;
-+    EV_SET(&ev, config_fd_, EVFILT_VNODE, EV_ADD | EV_CLEAR, NOTE_WRITE,
-+            0, NULL);
-+    if (kevent(inotify_fd_, &ev, 1, NULL, 0, NULL) == -1)
-+      return false;
-+#else
-     if (inotify_add_watch(inotify_fd_, kde_config_dir_.value().c_str(),
-                           IN_MODIFY | IN_MOVED_TO) < 0) {
-       return false;
-     }
-+#endif
-     notify_delegate_ = delegate;
-     if (!base::MessageLoopForIO::current()->WatchFileDescriptor(
-             inotify_fd_, true, base::MessageLoopForIO::WATCH_READ,
-@@ -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_BSD)
-+    struct kevent ev;
-+    int rv = kevent(inotify_fd_, NULL, 0, &ev, 1, NULL);
-+
-+    if (rv != -1 && (ev.flags & EV_ERROR) == 0) {
-+      OnChangeNotification();
-+    } else {
-+      LOG(ERROR) << "kevent() failure; no longer watching kioslaverc!";
-+      ShutDown();
-+    }
-+#else
-     OnChangeNotification();
-+#endif
-   }
-   void OnFileCanWriteWithoutBlocking(int fd) override { NOTREACHED(); }
- 
-@@ -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_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
-@@ -1321,6 +1371,7 @@ class SettingGetterImplKDE : public Prox
-         inotify_fd_ = -1;
-       }
-     }
-+#endif
-     if (kioslaverc_touched) {
-       // We don't use Reset() because the timer may not yet be running.
-       // (In that case Stop() is a no-op.)
-@@ -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_;
-   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
deleted file mode 100644
index a4a45158b2..0000000000
--- a/chromium-new/patches/patch-net_proxy_proxy__service.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- net/proxy/proxy_service.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/proxy/proxy_service.cc
-@@ -49,7 +49,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) || defined(OS_NETBSD)
- #include "net/proxy/proxy_config_service_linux.h"
- #elif defined(OS_ANDROID)
- #include "net/proxy/proxy_config_service_android.h"
-@@ -1520,7 +1520,7 @@ ProxyService::CreateSystemProxyConfigSer
-              << "profile_io_data.cc::CreateProxyConfigService and this should "
-              << "be used only for examples.";
-   return base::WrapUnique(new UnsetProxyConfigService);
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-   std::unique_ptr<ProxyConfigServiceLinux> linux_config_service(
-       new ProxyConfigServiceLinux());
- 
diff --git a/chromium-new/patches/patch-net_socket_socks5__client__socket.cc b/chromium-new/patches/patch-net_socket_socks5__client__socket.cc
deleted file mode 100644
index f01ac2cf79..0000000000
--- a/chromium-new/patches/patch-net_socket_socks5__client__socket.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- net/socket/socks5_client_socket.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/socket/socks5_client_socket.cc
-@@ -4,6 +4,10 @@
- 
- #include "net/socket/socks5_client_socket.h"
- 
-+#if defined(OS_BSD)
-+#include <netinet/in.h>
-+#endif
-+
- #include <utility>
- 
- #include "base/callback_helpers.h"
diff --git a/chromium-new/patches/patch-net_socket_udp__socket__posix.cc b/chromium-new/patches/patch-net_socket_udp__socket__posix.cc
deleted file mode 100644
index 88b214fc9a..0000000000
--- a/chromium-new/patches/patch-net_socket_udp__socket__posix.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- net/socket/udp_socket_posix.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/socket/udp_socket_posix.cc
-@@ -58,7 +58,7 @@ const int kBindRetries = 10;
- const int kPortStart = 1024;
- const int kPortEnd = 65535;
- 
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- 
- // Returns IPv4 address in network order.
- int GetIPv4AddressFromIndex(int socket, uint32_t index, uint32_t* address) {
-@@ -762,7 +762,7 @@ int UDPSocketPosix::SetMulticastOptions(
-   if (multicast_interface_ != 0) {
-     switch (addr_family_) {
-       case AF_INET: {
--#if !defined(OS_MACOSX)
-+#if !defined(OS_MACOSX) && !defined(OS_BSD)
-         ip_mreqn mreq;
-         mreq.imr_ifindex = multicast_interface_;
-         mreq.imr_address.s_addr = htonl(INADDR_ANY);
-@@ -837,7 +837,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_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_tools_get__server__time_get__server__time.cc b/chromium-new/patches/patch-net_tools_get__server__time_get__server__time.cc
deleted file mode 100644
index 8790b69b66..0000000000
--- a/chromium-new/patches/patch-net_tools_get__server__time_get__server__time.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- net/tools/get_server_time/get_server_time.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/tools/get_server_time/get_server_time.cc
-@@ -46,7 +46,7 @@
- 
- #if defined(OS_MACOSX)
- #include "base/mac/scoped_nsautorelease_pool.h"
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- #include "net/proxy/proxy_config.h"
- #include "net/proxy/proxy_config_service_fixed.h"
- #endif
-@@ -142,7 +142,7 @@ class PrintingLogObserver : public net::
- std::unique_ptr<net::URLRequestContext> BuildURLRequestContext(
-     net::NetLog* net_log) {
-   net::URLRequestContextBuilder builder;
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   // On Linux, use a fixed ProxyConfigService, since the default one
-   // depends on glib.
-   //
diff --git a/chromium-new/patches/patch-net_url__request_url__request__context__builder.cc b/chromium-new/patches/patch-net_url__request_url__request__context__builder.cc
deleted file mode 100644
index 68cd090276..0000000000
--- a/chromium-new/patches/patch-net_url__request_url__request__context__builder.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- net/url_request/url_request_context_builder.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ net/url_request/url_request_context_builder.cc
-@@ -327,7 +327,7 @@ std::unique_ptr<URLRequestContext> URLRe
-   if (!proxy_service_) {
-     // TODO(willchan): Switch to using this code when
-     // ProxyService::CreateSystemProxyConfigService()'s signature doesn't suck.
--#if !defined(OS_LINUX) && !defined(OS_ANDROID)
-+#if !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_BSD)
-     if (!proxy_config_service_) {
-       proxy_config_service_ = ProxyService::CreateSystemProxyConfigService(
-           base::ThreadTaskRunnerHandle::Get().get(),
diff --git a/chromium-new/patches/patch-pdf_pdfium_pdfium__engine.cc b/chromium-new/patches/patch-pdf_pdfium_pdfium__engine.cc
deleted file mode 100644
index 7a0896afeb..0000000000
--- a/chromium-new/patches/patch-pdf_pdfium_pdfium__engine.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-$NetBSD$
-
---- pdf/pdfium/pdfium_engine.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ pdf/pdfium/pdfium_engine.cc
-@@ -127,7 +127,7 @@ std::vector<uint32_t> GetPageNumbersFrom
-   return page_numbers;
- }
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- 
- PP_Instance g_last_instance_id;
- 
-@@ -629,7 +629,7 @@ bool InitializeSDK() {
-   config.m_v8EmbedderSlot = gin::kEmbedderPDFium;
-   FPDF_InitLibraryWithConfig(&config);
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   // Font loading doesn't work in the renderer sandbox in Linux.
-   FPDF_SetSystemFontInfo(&g_font_info);
- #else
-@@ -654,7 +654,7 @@ bool InitializeSDK() {
- 
- void ShutdownSDK() {
-   FPDF_DestroyLibrary();
--#if !defined(OS_LINUX)
-+#if !defined(OS_LINUX) && !defined(OS_BSD)
-   delete g_font_info;
- #endif
-   TearDownV8();
-@@ -758,7 +758,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Cl
-   IFSDK_PAUSE::user = nullptr;
-   IFSDK_PAUSE::NeedToPauseNow = Pause_NeedToPauseNow;
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   // PreviewModeClient does not know its pp::Instance.
-   pp::Instance* instance = client_->GetPluginInstance();
-   if (instance)
-@@ -1510,7 +1510,7 @@ pp::Buffer_Dev PDFiumEngine::PrintPagesA
-     FPDF_ClosePage(pdf_page);
-   }
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   g_last_instance_id = client_->GetPluginInstance()->pp_instance();
- #endif
- 
-@@ -2919,7 +2919,7 @@ bool PDFiumEngine::ContinuePaint(int pro
-   DCHECK_LT(static_cast<size_t>(progressive_index), progressive_paints_.size());
-   DCHECK(image_data);
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   g_last_instance_id = client_->GetPluginInstance()->pp_instance();
- #endif
- 
-@@ -3377,7 +3377,7 @@ void PDFiumEngine::SetCurrentPage(int in
-     FORM_DoPageAAction(old_page, form_, FPDFPAGE_AACTION_CLOSE);
-   }
-   most_visible_page_ = index;
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     g_last_instance_id = client_->GetPluginInstance()->pp_instance();
- #endif
-   if (most_visible_page_ != -1 && called_do_document_action_) {
diff --git a/chromium-new/patches/patch-ppapi_proxy_file__io__resource.cc b/chromium-new/patches/patch-ppapi_proxy_file__io__resource.cc
deleted file mode 100644
index bcaf478525..0000000000
--- a/chromium-new/patches/patch-ppapi_proxy_file__io__resource.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD$
-
---- ppapi/proxy/file_io_resource.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ ppapi/proxy/file_io_resource.cc
-@@ -285,17 +285,19 @@ int32_t FileIOResource::Write(int64_t of
- 
-   if (check_quota_) {
-     int64_t increase = 0;
--    uint64_t max_offset = 0;
-+    uint64_t _max_offset = 0;
-+    // (rene) avoid name collission with /usr/include/vm/vm_map.h on FreeBSD
-+    // which also defines max_offset
-     bool append = (open_flags_ & PP_FILEOPENFLAG_APPEND) != 0;
-     if (append) {
-       increase = bytes_to_write;
-     } else {
--      uint64_t max_offset = offset + bytes_to_write;
--      if (max_offset >
-+      uint64_t _max_offset = offset + bytes_to_write;
-+      if (_max_offset >
-           static_cast<uint64_t>(std::numeric_limits<int64_t>::max())) {
-         return PP_ERROR_FAILED;  // amount calculation would overflow.
-       }
--      increase = static_cast<int64_t>(max_offset) - max_written_offset_;
-+      increase = static_cast<int64_t>(_max_offset) - max_written_offset_;
-     }
- 
-     if (increase > 0) {
-@@ -319,7 +321,7 @@ int32_t FileIOResource::Write(int64_t of
-       if (append)
-         append_mode_write_amount_ += bytes_to_write;
-       else
--        max_written_offset_ = max_offset;
-+        max_written_offset_ = _max_offset;
-     }
-   }
-   return WriteValidated(offset, buffer, bytes_to_write, callback);
-@@ -597,9 +599,9 @@ void FileIOResource::OnRequestWriteQuota
-   } else {
-     DCHECK_LE(offset + bytes_to_write - max_written_offset_, granted);
- 
--    int64_t max_offset = offset + bytes_to_write;
--    if (max_written_offset_ < max_offset)
--      max_written_offset_ = max_offset;
-+    int64_t _max_offset = offset + bytes_to_write;
-+    if (max_written_offset_ < _max_offset)
-+      max_written_offset_ = _max_offset;
-   }
- 
-   if (callback->is_blocking()) {
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
deleted file mode 100644
index 2c07f1e1a7..0000000000
--- a/chromium-new/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- ppapi/shared_impl/private/net_address_private_impl.cc.orig	2017-02-02 02:02:56.000000000 +0000
-+++ ppapi/shared_impl/private/net_address_private_impl.cc
-@@ -26,9 +26,12 @@
- #include <arpa/inet.h>
- #include <sys/socket.h>
- #include <sys/types.h>
-+#if defined(OS_BSD)
-+#include <netinet/in.h>
-+#endif
- #endif
- 
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- // This is a bit evil, but it's standard operating procedure for |s6_addr|....
- #define s6_addr16 __u6_addr.__u6_addr16
- #endif
diff --git a/chromium-new/patches/patch-ppapi_tests_extensions_BUILD.gn b/chromium-new/patches/patch-ppapi_tests_extensions_BUILD.gn
deleted file mode 100644
index b1c806835c..0000000000
--- a/chromium-new/patches/patch-ppapi_tests_extensions_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ppapi/tests/extensions/BUILD.gn.orig	2017-02-02 02:02:56.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
deleted file mode 100644
index d8ca55ed2c..0000000000
--- a/chromium-new/patches/patch-printing_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- printing/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
-+++ printing/BUILD.gn
-@@ -129,7 +129,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)
-@@ -206,7 +206,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
deleted file mode 100644
index c679054a00..0000000000
--- a/chromium-new/patches/patch-printing_cups__config__helper.py
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- printing/cups_config_helper.py.orig	2017-02-02 02:02:57.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-remoting_host_BUILD.gn b/chromium-new/patches/patch-remoting_host_BUILD.gn
deleted file mode 100644
index d0bb541ade..0000000000
--- a/chromium-new/patches/patch-remoting_host_BUILD.gn
+++ /dev/null
@@ -1,49 +0,0 @@
-$NetBSD$
-
---- remoting/host/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
-+++ remoting/host/BUILD.gn
-@@ -326,7 +326,7 @@ static_library("host") {
-     deps += [ "//components/policy:generated" ]
-   }
- 
--  if (is_linux && !is_chromeos) {
-+  if ((is_linux || is_bsd) && !is_chromeos) {
-     libs += [ "pam" ]
-   }
- 
-@@ -349,7 +349,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",
-@@ -538,7 +538,7 @@ source_set("unit_tests") {
-     "touch_injector_win_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) {
-@@ -755,7 +755,7 @@ if (enable_me2me_host) {
-         deps += [ "//build/config/linux/gtk2" ]
-       }
-     }
--    if ((is_linux && !is_chromeos) || is_mac) {
-+    if ((is_linux && !is_chromeos) || is_mac || is_bsd) {
-       libs = [ "pam" ]
-     }
- 
-@@ -825,7 +825,7 @@ if (enable_me2me_host) {
-       }
-     }
-   }
--  if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) {
-+  if (is_chrome_branded && enable_me2me_host && is_linux && is_bsd && !is_chromeos) {
-     group("remoting_me2me_host_archive") {
-       deps = [
-         "//remoting/host/installer/linux:remoting_me2me_host_archive",
diff --git a/chromium-new/patches/patch-sdch_BUILD.gn b/chromium-new/patches/patch-sdch_BUILD.gn
deleted file mode 100644
index 3a5a253132..0000000000
--- a/chromium-new/patches/patch-sdch_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- sdch/BUILD.gn.orig	2017-02-02 02:02:57.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_service__manager_runner_host_BUILD.gn b/chromium-new/patches/patch-services_service__manager_runner_host_BUILD.gn
deleted file mode 100644
index b19a514491..0000000000
--- a/chromium-new/patches/patch-services_service__manager_runner_host_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- services/service_manager/runner/host/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
-+++ services/service_manager/runner/host/BUILD.gn
-@@ -51,7 +51,7 @@ source_set("child_process_base") {
-     "//services/service_manager/runner/common",
-   ]
- 
--  if (is_linux && !is_android) {
-+  if (is_linux && !is_android && !is_bsd) {
-     sources += [
-       "linux_sandbox.cc",
-       "linux_sandbox.h",
diff --git a/chromium-new/patches/patch-services_service__manager_standalone_context.cc b/chromium-new/patches/patch-services_service__manager_standalone_context.cc
deleted file mode 100644
index 7e7f52a93a..0000000000
--- a/chromium-new/patches/patch-services_service__manager_standalone_context.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- services/service_manager/standalone/context.cc.orig	2017-02-02 02:02:57.000000000 +0000
-+++ services/service_manager/standalone/context.cc
-@@ -208,7 +208,7 @@ void Context::Init(std::unique_ptr<InitP
-       tracing::mojom::StartupPerformanceDataCollectorPtr collector;
-       ConnectToInterface(service_manager(), source_identity, tracing_identity,
-                          &collector);
--#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->SetServiceManagerProcessCreationTime(
diff --git a/chromium-new/patches/patch-services_ui_BUILD.gn b/chromium-new/patches/patch-services_ui_BUILD.gn
deleted file mode 100644
index 4e891485c3..0000000000
--- a/chromium-new/patches/patch-services_ui_BUILD.gn
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- services/ui/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
-+++ services/ui/BUILD.gn
-@@ -13,7 +13,6 @@ group("all") {
-   testonly = true
-   deps = [
-     ":ui",
--    "//services/ui/ime/test_ime_driver",
-     "//services/ui/test_wm",
-   ]
- }
-@@ -38,7 +37,6 @@ service("ui") {
- 
-   data_deps = [
-     ":manifest",
--    "//services/ui/ime/test_ime_driver",
-   ]
- 
-   resources = [
diff --git a/chromium-new/patches/patch-services_ui_ime_BUILD.gn b/chromium-new/patches/patch-services_ui_ime_BUILD.gn
deleted file mode 100644
index 7f9d771fde..0000000000
--- a/chromium-new/patches/patch-services_ui_ime_BUILD.gn
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- services/ui/ime/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
-+++ services/ui/ime/BUILD.gn
-@@ -50,7 +50,6 @@ test("mus_ime_unittests") {
-     ":test_manifest",
-     ":lib",
-     "//services/ui",
--    "//services/ui/ime/test_ime_driver",
-   ]
- }
- 
diff --git a/chromium-new/patches/patch-services_ui_public_cpp_gles2__context.cc b/chromium-new/patches/patch-services_ui_public_cpp_gles2__context.cc
deleted file mode 100644
index 3a6c476dec..0000000000
--- a/chromium-new/patches/patch-services_ui_public_cpp_gles2__context.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- services/ui/public/cpp/gles2_context.cc.orig	2017-02-02 02:02:57.000000000 +0000
-+++ services/ui/public/cpp/gles2_context.cc
-@@ -46,7 +46,7 @@ bool GLES2Context::Initialize(
-   gpu::CommandBuffer* command_buffer = command_buffer_proxy_impl_.get();
-   gpu::GpuControl* gpu_control = command_buffer_proxy_impl_.get();
- 
--  constexpr gpu::SharedMemoryLimits default_limits;
-+  constexpr gpu::SharedMemoryLimits default_limits = gpu::SharedMemoryLimits();
-   gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer));
-   if (!gles2_helper_->Initialize(default_limits.command_buffer_size))
-     return false;
diff --git a/chromium-new/patches/patch-services_ui_surfaces_surfaces__context__provider.cc b/chromium-new/patches/patch-services_ui_surfaces_surfaces__context__provider.cc
deleted file mode 100644
index 35a5252116..0000000000
--- a/chromium-new/patches/patch-services_ui_surfaces_surfaces__context__provider.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- services/ui/surfaces/surfaces_context_provider.cc.orig	2017-02-02 02:02:57.000000000 +0000
-+++ services/ui/surfaces/surfaces_context_provider.cc
-@@ -78,7 +78,7 @@ bool SurfacesContextProvider::BindToCurr
-   gpu::CommandBuffer* command_buffer = command_buffer_proxy_impl_.get();
- 
-   gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer));
--  constexpr gpu::SharedMemoryLimits default_limits;
-+  constexpr gpu::SharedMemoryLimits default_limits = gpu::SharedMemoryLimits();
-   if (!gles2_helper_->Initialize(default_limits.command_buffer_size))
-     return false;
-   gles2_helper_->SetAutomaticFlushes(false);
diff --git a/chromium-new/patches/patch-skia_BUILD.gn b/chromium-new/patches/patch-skia_BUILD.gn
deleted file mode 100644
index 3bc005d871..0000000000
--- a/chromium-new/patches/patch-skia_BUILD.gn
+++ /dev/null
@@ -1,48 +0,0 @@
-$NetBSD$
-
---- skia/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
-+++ skia/BUILD.gn
-@@ -135,7 +135,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",
-@@ -363,7 +363,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.cpp",
-       "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp",
-@@ -375,14 +375,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",
-@@ -421,7 +421,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
deleted file mode 100644
index e2bcf9438d..0000000000
--- a/chromium-new/patches/patch-skia_ext_SkMemory__new__handler.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- skia/ext/SkMemory_new_handler.cpp.orig	2017-02-02 02:02:57.000000000 +0000
-+++ skia/ext/SkMemory_new_handler.cpp
-@@ -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;
--#if  defined(OS_IOS)
-+#if  defined(OS_IOS) || defined(OS_BSD)
-     result = malloc(size);
- #else
-     // It's the responsibility of the caller to check the return value.
-@@ -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;
--#if  defined(OS_IOS)
-+#if  defined(OS_IOS) || defined(OS_BSD)
-     result = calloc(1, size);
- #else
-     // It's the responsibility of the caller to check the return value.
diff --git a/chromium-new/patches/patch-skia_ext_platform__canvas.h b/chromium-new/patches/patch-skia_ext_platform__canvas.h
deleted file mode 100644
index f790a468a1..0000000000
--- a/chromium-new/patches/patch-skia_ext_platform__canvas.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- skia/ext/platform_canvas.h.orig	2017-02-02 02:02:57.000000000 +0000
-+++ skia/ext/platform_canvas.h
-@@ -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(__NetBSD__)
-   // Linux ---------------------------------------------------------------------
- 
-   // Construct a canvas from the given memory region. The memory is not cleared
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 25466f49ce..0000000000
--- a/chromium-new/patches/patch-testing_gtest_src_gtest.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- testing/gtest/src/gtest.cc.orig	2017-02-02 02:03:46.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-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
deleted file mode 100644
index 42b41ba982..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp.orig	2017-02-02 02:03:08.000000000 +0000
-+++ third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
-@@ -46,6 +46,8 @@
- 
- #if OS(WIN)
- #include <malloc.h>
-+#elif OS(FREEBSD) || OS(NETBSD)
-+#include <stdlib.h>
- #else
- #include <alloca.h>
- #endif
diff --git a/chromium-new/patches/patch-third__party_WebKit_Source_core_layout_BUILD.gn b/chromium-new/patches/patch-third__party_WebKit_Source_core_layout_BUILD.gn
deleted file mode 100644
index 0ce9d7d07b..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_core_layout_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/core/layout/BUILD.gn.orig	2017-02-02 02:03:09.000000000 +0000
-+++ third_party/WebKit/Source/core/layout/BUILD.gn
-@@ -361,7 +361,7 @@ blink_core_sources("layout") {
-     sources += [ "LayoutThemeFontProviderDefault.cpp" ]
-   }
- 
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     sources += [
-       "LayoutThemeLinux.cpp",
-       "LayoutThemeLinux.h",
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
deleted file mode 100644
index 5d276c14fd..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/fonts/FontCache.cpp.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/platform/fonts/FontCache.cpp
-@@ -62,9 +62,9 @@ using namespace WTF;
- 
- namespace blink {
- 
--#if !OS(WIN) && !OS(LINUX)
-+#if !OS(WIN) && !OS(LINUX) && !OS(FREEBSD) && !OS(OPENBSD) && !OS(NETBSD)
- FontCache::FontCache() : m_purgePreventCount(0), m_fontManager(nullptr) {}
--#endif  // !OS(WIN) && !OS(LINUX)
-+#endif  // !OS(WIN) && !OS(LINUX) && !OS(FREEBSD) && !OS(OPENBSD)
- 
- typedef HashMap<unsigned,
-                 std::unique_ptr<FontPlatformData>,
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
deleted file mode 100644
index 9b48566add..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/fonts/FontCache.h.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/platform/fonts/FontCache.h
-@@ -122,7 +122,7 @@ class PLATFORM_EXPORT FontCache {
- #else
-   static const AtomicString& legacySystemFontFamily();
- #endif
--#if OS(LINUX) || OS(ANDROID)
-+#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD) || OS(NETBSD)
-   static void setSystemFontFamily(const AtomicString&);
- #endif
- 
-@@ -232,7 +232,7 @@ class PLATFORM_EXPORT FontCache {
-                                    const FontFaceCreationParams&,
-                                    CString& name);
- 
--#if OS(ANDROID) || OS(LINUX)
-+#if OS(ANDROID) || OS(LINUX) || OS(FREEBSD) || OS(OPENBSD) || OS(NETBSD)
-   static AtomicString getFamilyNameForCharacter(SkFontMgr*,
-                                                 UChar32,
-                                                 const FontDescription&,
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
deleted file mode 100644
index fa1980f419..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
-@@ -99,7 +99,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),
-@@ -122,7 +122,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())),
-@@ -155,7 +155,7 @@ FontPlatformData::FontPlatformData(sk_sp
-       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())),
-@@ -200,7 +200,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
- 
-@@ -226,7 +226,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
deleted file mode 100644
index d4de0ce178..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/fonts/FontPlatformData.h.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/platform/fonts/FontPlatformData.h
-@@ -47,9 +47,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;
-@@ -149,7 +149,7 @@ class PLATFORM_EXPORT FontPlatformData {
-   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; }
-@@ -177,7 +177,7 @@ class PLATFORM_EXPORT FontPlatformData {
-   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
deleted file mode 100644
index 218766c43f..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
-@@ -50,7 +50,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
-@@ -105,7 +105,7 @@ void SimpleFontData::platformInit(bool s
-   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).
-@@ -149,7 +149,7 @@ void SimpleFontData::platformInit(bool s
-       ascent = SkScalarRoundToScalar(-metrics.fAscent);
-       descent = SkScalarRoundToScalar(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
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
deleted file mode 100644
index bdd8eae395..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp
-@@ -67,7 +67,7 @@ AtomicString toAtomicString(const SkStri
-   return AtomicString::fromUTF8(str.c_str(), str.size());
- }
- 
--#if OS(ANDROID) || OS(LINUX)
-+#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:
-@@ -234,7 +234,7 @@ sk_sp<SkTypeface> FontCache::createTypef
-   }
- #endif
- 
--#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
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
deleted file mode 100644
index e4f323469a..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/heap/GCInfo.cpp.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/platform/heap/GCInfo.cpp
-@@ -7,6 +7,8 @@
- #include "platform/heap/Handle.h"
- #include "platform/heap/Heap.h"
- 
-+#include <stdlib.h>
-+
- namespace blink {
- 
- // GCInfo indices start from 1 for heap objects, with 0 being treated
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
deleted file mode 100644
index a6dcb67ae4..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
-@@ -6,6 +6,10 @@
- 
- #include "public/platform/Platform.h"
- 
-+#if OS(FREEBSD)
-+#include <pthread_np.h>
-+#endif
-+
- #if OS(WIN)
- #include <stddef.h>
- #include <windows.h>
-@@ -68,7 +72,7 @@ size_t StackFrameDepth::getUnderestimate
- // FIXME: On Mac OSX and Linux, this method cannot estimate stack size
- // correctly for the main thread.
- 
--#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD)
-+#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD) || OS(NETBSD)
-   // pthread_getattr_np() can fail if the thread is not invoked by
-   // pthread_create() (e.g., the main thread of webkit_unit_tests).
-   // If so, a conservative size estimate is returned.
-@@ -89,7 +93,7 @@ size_t StackFrameDepth::getUnderestimate
-     pthread_attr_destroy(&attr);
-     return size;
-   }
--#if OS(FREEBSD)
-+#if OS(FREEBSD) || OS(NETBSD)
-   pthread_attr_destroy(&attr);
- #endif
- 
-@@ -135,7 +139,7 @@ size_t StackFrameDepth::getUnderestimate
- }
- 
- void* StackFrameDepth::getStackStart() {
--#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD)
-+#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD) || OS(NETBSD)
-   pthread_attr_t attr;
-   int error;
- #if OS(FREEBSD)
-@@ -152,7 +156,7 @@ void* StackFrameDepth::getStackStart() {
-     pthread_attr_destroy(&attr);
-     return reinterpret_cast<uint8_t*>(base) + size;
-   }
--#if OS(FREEBSD)
-+#if OS(FREEBSD) || OS(NETBSD)
-   pthread_attr_destroy(&attr);
- #endif
- #if defined(__GLIBC__)
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
deleted file mode 100644
index 7773574c2f..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/web/PopupMenuImpl.cpp.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/web/PopupMenuImpl.cpp
-@@ -154,7 +154,7 @@ class PopupMenuImpl::ItemIterationContex
-         m_isInGroup(false),
-         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_wtf_Assertions.cpp b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp
deleted file mode 100644
index eca6684e70..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/wtf/Assertions.cpp.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/wtf/Assertions.cpp
-@@ -60,7 +60,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>
-@@ -164,7 +164,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
-@@ -215,7 +215,7 @@ class FrameToNameScope {
- };
- 
- FrameToNameScope::FrameToNameScope(void* addr) : 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
deleted file mode 100644
index 1ba93f7ba4..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_Atomics.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/wtf/Atomics.h.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/wtf/Atomics.h
-@@ -176,7 +176,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_BUILD.gn b/chromium-new/patches/patch-third__party_WebKit_Source_wtf_BUILD.gn
deleted file mode 100644
index dcb83326f5..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_BUILD.gn
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/wtf/BUILD.gn.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/wtf/BUILD.gn
-@@ -284,6 +284,10 @@ component("wtf") {
-     libs = [ "dl" ]
-   }
- 
-+  if (is_bsd) {
-+    libs = [ "execinfo" ]
-+  }
-+
-   if (is_mac) {
-     libs = [
-       "CoreFoundation.framework",
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
deleted file mode 100644
index d0dbab5d88..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/wtf/ByteSwap.h.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/WebKit/Source/wtf/ByteSwap.h
-@@ -60,15 +60,21 @@ ALWAYS_INLINE uint16_t bswap16(uint16_t 
- 
- #else
- 
-+#ifndef bswap64
- ALWAYS_INLINE uint64_t bswap64(uint64_t x) {
-   return __builtin_bswap64(x);
- }
-+#endif
-+#ifndef bswap32
- ALWAYS_INLINE uint32_t bswap32(uint32_t x) {
-   return __builtin_bswap32(x);
- }
-+#endif
-+#ifndef bswap16
- ALWAYS_INLINE uint16_t bswap16(uint16_t x) {
-   return __builtin_bswap16(x);
- }
-+#endif
- 
- #endif
- 
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
deleted file mode 100644
index 631c7a62df..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/wtf/ContainerAnnotations.h.orig	2017-02-02 02:03:10.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
deleted file mode 100644
index 8d3f60c7b7..0000000000
--- a/chromium-new/patches/patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- third_party/WebKit/Source/wtf/ThreadingPthreads.cpp.orig	2017-02-02 02:03:10.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(FREEBSD)
-+#include <pthread_np.h>
-+#endif
-+
-+#if OS(LINUX) || OS(ANDROID) || OS(BSD)
- #include <unistd.h>
- #endif
- 
-@@ -91,6 +95,8 @@ ThreadIdentifier currentThread() {
-   return pthread_mach_thread_np(pthread_self());
- #elif OS(LINUX)
-   return syscall(__NR_gettid);
-+#elif OS(FREEBSD)
-+  return pthread_getthreadid_np();
- #elif OS(ANDROID)
-   return gettid();
- #else
diff --git a/chromium-new/patches/patch-third__party_angle_BUILD.gn b/chromium-new/patches/patch-third__party_angle_BUILD.gn
deleted file mode 100644
index 7f25b94f76..0000000000
--- a/chromium-new/patches/patch-third__party_angle_BUILD.gn
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD$
-
---- third_party/angle/BUILD.gn.orig	2017-02-02 02:03:46.000000000 +0000
-+++ third_party/angle/BUILD.gn
-@@ -16,6 +16,12 @@ if (ozone_platform_gbm) {
-   }
- }
- 
-+if (use_x11) {
-+  pkg_config("x11") {
-+    packages = [ "x11", "xi", "xext" ]
-+  }
-+}
-+
- angle_git_is_present = exec_script("src/commit_id.py",
-                                    [
-                                      "check",
-@@ -340,11 +346,7 @@ static_library("libANGLE") {
-     if (use_x11) {
-       sources += rebase_path(gles_gypi.libangle_gl_glx_sources, ".", "src")
-       deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ]
--      libs += [
--        "X11",
--        "Xi",
--        "Xext",
--      ]
-+      configs += [ ":x11" ]
-     }
-     if (is_mac) {
-       sources += rebase_path(gles_gypi.libangle_gl_cgl_sources, ".", "src")
-@@ -486,7 +488,7 @@ util_gypi = exec_script("//build/gypi_to
- 
- config("angle_util_config") {
-   include_dirs = [ "util" ]
--  if (is_linux && use_x11) {
-+  if ((is_linux || is_bsd) && use_x11) {
-     libs = [ "X11" ]
-   }
- }
diff --git a/chromium-new/patches/patch-third__party_angle_gni_angle.gni b/chromium-new/patches/patch-third__party_angle_gni_angle.gni
deleted file mode 100644
index e77b3dd93e..0000000000
--- a/chromium-new/patches/patch-third__party_angle_gni_angle.gni
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/angle/gni/angle.gni.orig	2017-02-02 02:03:46.000000000 +0000
-+++ third_party/angle/gni/angle.gni
-@@ -20,6 +20,8 @@ if (is_win) {
-   import("//build/config/win/visual_studio_version.gni")
- } else if (is_linux && use_x11 && !is_chromeos) {
-   angle_enable_gl = true
-+} else if (is_bsd) {
-+  angle_enable_gl = true
- } else if (is_mac || ozone_platform_gbm) {
-   angle_enable_gl = true
- } else if (is_android) {
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
deleted file mode 100644
index 61b8c060bf..0000000000
--- a/chromium-new/patches/patch-third__party_angle_src_tests_BUILD.gn
+++ /dev/null
@@ -1,67 +0,0 @@
-$NetBSD$
-
---- third_party/angle/src/tests/BUILD.gn.orig	2017-02-02 02:03:47.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"),
-@@ -82,7 +82,7 @@ if (is_win || is_linux || is_mac || is_a
-       "//third_party/angle:libANGLE_config",
-     ]
- 
--    if (is_linux && !is_component_build) {
-+    if ((is_linux || is_bsd) && !is_component_build) {
-       # Set rpath to find libEGL.so and libGLESv2.so even in a non-component build.
-       configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
-     }
-@@ -175,7 +175,7 @@ if (build_angle_deqp_tests) {
-     # Ask the system headers to expose all the regular function otherwise
-     # dEQP doesn't compile and produces warnings about implicitly defined
-     # functions.
--    if (is_linux) {
-+    if (is_linux || is_bsd) {
-       # This has to be GNU_SOURCE as on Linux dEQP uses syscall()
-       defines += [ "_GNU_SOURCE" ]
-     }
-@@ -198,7 +198,7 @@ if (build_angle_deqp_tests) {
-     ]
-   }
- 
--  if (is_linux || is_android) {
-+  if (is_linux || is_android || is_bsd) {
-     deqp_undefine_configs += [ "//build/config/gcc:no_exceptions" ]
-   }
- 
-@@ -234,7 +234,7 @@ if (build_angle_deqp_tests) {
-     if (is_win) {
-       sources += rebase_path(deqp_gypi.deqp_libtester_sources_win, ".", "../..")
-     }
--    if (is_linux || is_android) {
-+    if (is_linux || is_android || is_bsd) {
-       sources +=
-           rebase_path(deqp_gypi.deqp_libtester_sources_unix, ".", "../..")
-     }
-@@ -262,7 +262,7 @@ if (build_angle_deqp_tests) {
- 
-     # Taken from gpu/BUILD.gn
-     # TODO(jmadill): this should be in a shared location
--    if (is_linux && !is_chromecast) {
-+    if ((is_linux || is_bsd) && !is_chromecast) {
-       libs = [ "pci" ]
-     }
-   }
-@@ -335,7 +335,7 @@ if (build_angle_deqp_tests) {
-         "../../../deqp/src/data/",
-       ]
- 
--      if (is_linux && !is_component_build) {
-+      if ((is_linux || is_bsd) && !is_component_build) {
-         # Set rpath to find *.so files even in a non-component build.
-         configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
-       }
diff --git a/chromium-new/patches/patch-third__party_boringssl_BUILD.gn b/chromium-new/patches/patch-third__party_boringssl_BUILD.gn
deleted file mode 100644
index 4c0a200672..0000000000
--- a/chromium-new/patches/patch-third__party_boringssl_BUILD.gn
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- third_party/boringssl/BUILD.gn.orig	2017-02-02 02:03:10.000000000 +0000
-+++ third_party/boringssl/BUILD.gn
-@@ -83,7 +83,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" ]
-@@ -91,14 +91,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
-     } else {
-       public_configs = [ ":no_asm_config" ]
diff --git a/chromium-new/patches/patch-third__party_boringssl_src_crypto_ex__data.c b/chromium-new/patches/patch-third__party_boringssl_src_crypto_ex__data.c
deleted file mode 100644
index 58887f23eb..0000000000
--- a/chromium-new/patches/patch-third__party_boringssl_src_crypto_ex__data.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- third_party/boringssl/src/crypto/ex_data.c.orig	2017-02-02 02:03:46.000000000 +0000
-+++ third_party/boringssl/src/crypto/ex_data.c
-@@ -188,7 +188,9 @@ int CRYPTO_set_ex_data(CRYPTO_EX_DATA *a
-     }
-   }
- 
--  sk_void_set(ad->sk, index, val);
-+  // expression result unused; should this cast be to 'void'?
-+  // seems it should, feel free to investigate those #def
-+  (void) sk_void_set(ad->sk, index, val);
-   return 1;
- }
- 
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
deleted file mode 100644
index 7652e24b65..0000000000
--- a/chromium-new/patches/patch-third__party_boringssl_src_include_openssl_thread.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- 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
-@@ -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];
-+#if defined(__NetBSD__)
-+  uint8_t      nbpad[64 + 8];
-+#endif
- } CRYPTO_MUTEX;
- #endif
- 
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
deleted file mode 100644
index fea4a67fa8..0000000000
--- a/chromium-new/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h.orig	2017-02-02 02:03:11.000000000 +0000
-+++ third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
-@@ -334,6 +334,8 @@ class Status {
-      */
-     PERMANENT_FAILURE
-   };
-+  
-+  Status() : code_(SUCCESS), message_() {}
- 
-   /* Creates a new Status object given the code and message. */
-   Status(Code code, const string& message) : code_(code), message_(message) {}
diff --git a/chromium-new/patches/patch-third__party_expat_BUILD.gn b/chromium-new/patches/patch-third__party_expat_BUILD.gn
deleted file mode 100644
index 71903cba44..0000000000
--- a/chromium-new/patches/patch-third__party_expat_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/expat/BUILD.gn.orig	2017-02-02 02:03:11.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_BUILD.gn b/chromium-new/patches/patch-third__party_ffmpeg_BUILD.gn
deleted file mode 100644
index b44b40ca1a..0000000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_BUILD.gn
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- third_party/ffmpeg/BUILD.gn.orig	2017-02-02 02:03:48.000000000 +0000
-+++ third_party/ffmpeg/BUILD.gn
-@@ -6,8 +6,13 @@ import("ffmpeg_options.gni")
- import("ffmpeg_generated.gni")
- 
- # Path to platform configuration files.
--platform_config_root =
--    "chromium/config/$ffmpeg_branding/$os_config/$ffmpeg_arch"
-+if (!is_bsd) {
-+  platform_config_root =
-+      "chromium/config/$ffmpeg_branding/$os_config/$ffmpeg_arch"
-+} else {
-+  platform_config_root =
-+      "chromium/config/$ffmpeg_branding/linux/$ffmpeg_arch"
-+}
- 
- has_yasm_deps =
-     ffmpeg_yasm_sources != [] &&
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
deleted file mode 100644
index d51c0754c1..0000000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$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_ffmpeg__generated.gni b/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
deleted file mode 100644
index d817c16e18..0000000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
+++ /dev/null
@@ -1,287 +0,0 @@
-$NetBSD$
-
---- third_party/ffmpeg/ffmpeg_generated.gni.orig	2017-02-02 02:03:48.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) || (is_android && current_cpu == "arm64") || (is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || (is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm") || (is_linux && current_cpu == "arm64") || (is_linux && current_cpu == "mipsel") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && current_cpu == "arm64") || (is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || (is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm") || ((is_linux || is_bsd) && current_cpu == "arm64") || ((is_linux || is_bsd) && current_cpu == "mipsel") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
-   ffmpeg_c_sources += [
-     "libavcodec/allcodecs.c",
-     "libavcodec/autorename_libavcodec_flacdec.c",
-@@ -160,7 +160,7 @@ if ((is_android && current_cpu == "arm" 
-   ]
- }
- 
--if ((is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm") || (is_linux && current_cpu == "arm64") || (is_linux && current_cpu == "mipsel") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm") || ((is_linux || is_bsd) && current_cpu == "arm64") || ((is_linux || is_bsd) && current_cpu == "mipsel") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
-   ffmpeg_c_sources += [
-     "libavcodec/autorename_libavcodec_hpeldsp.c",
-     "libavcodec/autorename_libavcodec_videodsp.c",
-@@ -175,7 +175,7 @@ if ((is_linux && current_cpu == "arm" &&
-   ]
- }
- 
--if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && 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 == "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_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && curre
nt_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (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_win && ffmpeg_branding == "Chrome")) {
-+if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && 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 == "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_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_b
sd) && 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 == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) {
-   ffmpeg_c_sources += [
-     "libavcodec/aac_ac3_parser.c",
-     "libavcodec/aac_parser.c",
-@@ -212,7 +212,7 @@ if ((current_cpu == "x64" && ffmpeg_bran
-   ]
- }
- 
--if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
-   ffmpeg_c_sources += [
-     "libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c",
-     "libavcodec/x86/constants.c",
-@@ -225,7 +225,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 && ffmpeg_branding == "Chrome") || (is_win && 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 && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Chrome")) {
-   ffmpeg_c_sources += [
-     "libavcodec/cabac.c",
-     "libavcodec/h2645_parse.c",
-@@ -257,7 +257,7 @@ if ((is_android && current_cpu == "arm" 
-   ]
- }
- 
--if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm")) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm")) {
-   ffmpeg_c_sources += [
-     "libavcodec/arm/fft_fixed_init_arm.c",
-     "libavcodec/arm/fft_init_arm.c",
-@@ -276,7 +276,7 @@ if ((is_android && current_cpu == "arm" 
-   ]
- }
- 
--if ((is_android && current_cpu == "x64") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if ((is_android && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
-   ffmpeg_yasm_sources += [
-     "libavcodec/x86/fft.asm",
-     "libavcodec/x86/flacdsp.asm",
-@@ -288,7 +288,7 @@ if ((is_android && current_cpu == "x64")
-   ]
- }
- 
--if ((is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
-+if (((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
-   ffmpeg_c_sources += [
-     "libavcodec/x86/autorename_libavcodec_x86_videodsp_init.c",
-     "libavcodec/x86/h264_intrapred_init.c",
-@@ -308,7 +308,7 @@ if ((is_linux && current_cpu == "x64") |
-   ]
- }
- 
--if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && 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_win && ffmpeg_branding == "Chrome")) {
-+if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && 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_win && ffmpeg_branding == "Chrome")) {
-   ffmpeg_c_sources += [
-     "libavcodec/x86/aacpsdsp_init.c",
-     "libavcodec/x86/dct_init.c",
-@@ -317,7 +317,7 @@ if ((current_cpu == "x64" && ffmpeg_bran
-   ]
- }
- 
--if ((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_win && ffmpeg_branding == "Chrome")) {
-+if ((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_win && ffmpeg_branding == "Chrome")) {
-   ffmpeg_yasm_sources += [
-     "libavcodec/x86/aacpsdsp.asm",
-     "libavcodec/x86/dct32.asm",
-@@ -326,7 +326,7 @@ if ((current_cpu == "x64" && ffmpeg_bran
-   ]
- }
- 
--if ((is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm")) {
-+if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm")) {
-   ffmpeg_c_sources += [
-     "libavcodec/arm/h264pred_init_arm.c",
-     "libavcodec/arm/hpeldsp_init_arm.c",
-@@ -346,13 +346,13 @@ if ((is_linux && current_cpu == "arm" &&
-   ]
- }
- 
--if ((is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || (is_linux && current_cpu == "mipsel")) {
-+if ((is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || ((is_linux || is_bsd) && current_cpu == "mipsel")) {
-   ffmpeg_c_sources += [
-     "libavutil/mips/float_dsp_mips.c",
-   ]
- }
- 
--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 || 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",
-@@ -407,7 +407,7 @@ if ((is_linux && current_cpu == "arm" &&
-   ]
- }
- 
--if ((is_android && current_cpu == "arm64") || (is_linux && current_cpu == "arm64")) {
-+if ((is_android && current_cpu == "arm64") || ((is_linux || is_bsd) && current_cpu == "arm64")) {
-   ffmpeg_c_sources += [
-     "libavcodec/aarch64/fft_init_aarch64.c",
-     "libavcodec/aarch64/vorbisdsp_init.c",
-@@ -422,7 +422,7 @@ if ((is_android && current_cpu == "arm64
-   ]
- }
- 
--if ((is_android && current_cpu == "arm" && arm_use_neon && 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_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",
-@@ -433,7 +433,7 @@ if ((is_android && current_cpu == "arm" 
-   ]
- }
- 
--if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm" && arm_use_neon)) {
-+if ((is_android && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon)) {
-   ffmpeg_c_sources += [
-     "libavutil/arm/float_dsp_init_neon.c",
-   ]
-@@ -448,7 +448,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" && ffmpeg_branding == "Chrome") || (is_linux && 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",
-@@ -459,7 +459,7 @@ if ((is_linux && current_cpu == "arm" &&
-   ]
- }
- 
--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 && ffmpeg_branding == "Chrome") || (is_win && 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 && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Chrome")) {
-   ffmpeg_c_sources += [
-     "libavcodec/x86/h264_qpel.c",
-     "libavcodec/x86/h264chroma_init.c",
-@@ -480,7 +480,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 || 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",
-@@ -489,7 +489,7 @@ if ((is_android && current_cpu == "mips6
-   ]
- }
- 
--if (is_linux && current_cpu == "mipsel") {
-+if ((is_linux || is_bsd) && current_cpu == "mipsel") {
-   ffmpeg_c_sources += [
-     "libavcodec/mips/h264pred_init_mips.c",
-     "libavcodec/mips/hpeldsp_init_mips.c",
-@@ -497,7 +497,7 @@ if (is_linux && current_cpu == "mipsel")
-   ]
- }
- 
--if ((is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && 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",
-@@ -505,7 +505,7 @@ if ((is_linux && current_cpu == "mipsel"
-   ]
- }
- 
--if (is_linux && current_cpu == "arm64") {
-+if ((is_linux || is_bsd) && current_cpu == "arm64") {
-   ffmpeg_c_sources += [
-     "libavcodec/aarch64/h264pred_init.c",
-     "libavcodec/aarch64/hpeldsp_init_aarch64.c",
-@@ -518,7 +518,7 @@ if (is_linux && current_cpu == "arm64") 
-   ]
- }
- 
--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 || 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",
-@@ -529,7 +529,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 || 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",
-@@ -543,7 +543,7 @@ if ((is_linux && current_cpu == "arm64" 
-   ]
- }
- 
--if (is_linux && current_cpu == "arm" && arm_use_neon) {
-+if ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) {
-   ffmpeg_c_sources += [
-     "libavcodec/arm/hpeldsp_init_neon.c",
-     "libavcodec/arm/vp8dsp_init_neon.c",
-@@ -556,14 +556,14 @@ if (is_linux && current_cpu == "arm" && 
-   ]
- }
- 
--if ((is_android && current_cpu == "arm" && arm_use_neon && 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_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",
-   ]
- }
- 
--if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && 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",
-@@ -587,13 +587,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 || 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 || 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",
-@@ -608,7 +608,7 @@ if (is_win && current_cpu == "x64") {
-   ]
- }
- 
--if ((is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && 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",
-@@ -635,7 +635,7 @@ if ((is_linux && current_cpu == "x64" &&
-   ]
- }
- 
--if (is_linux && 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",
-@@ -648,7 +648,7 @@ if (is_linux && current_cpu == "mipsel" 
-   ]
- }
- 
--if (is_linux && 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_libavutil_cpu.c b/chromium-new/patches/patch-third__party_ffmpeg_libavutil_cpu.c
deleted file mode 100644
index a85caf3552..0000000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_libavutil_cpu.c
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- third_party/ffmpeg/libavutil/cpu.c.orig	2017-02-02 02:03:48.000000000 +0000
-+++ third_party/ffmpeg/libavutil/cpu.c
-@@ -25,9 +25,15 @@
- #include "common.h"
- 
- #if HAVE_SCHED_GETAFFINITY
-+#if defined(__NetBSD__)
-+#ifndef _NETBSD_SOURCE
-+# define _NETBSD_SOURCE
-+#endif
-+#else
- #ifndef _GNU_SOURCE
- # define _GNU_SOURCE
- #endif
-+#endif
- #include <sched.h>
- #endif
- #if HAVE_GETPROCESSAFFINITYMASK || HAVE_WINRT
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 a039008277..0000000000
--- a/chromium-new/patches/patch-third__party_ffmpeg_libavutil_mem.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- third_party/ffmpeg/libavutil/mem.c.orig	2017-02-02 02:03:48.000000000 +0000
-+++ third_party/ffmpeg/libavutil/mem.c
-@@ -32,9 +32,6 @@
- #include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
--#if HAVE_MALLOC_H
--#include <malloc.h>
--#endif
- 
- #include "avassert.h"
- #include "avutil.h"
diff --git a/chromium-new/patches/patch-third__party_fontconfig_BUILD.gn b/chromium-new/patches/patch-third__party_fontconfig_BUILD.gn
deleted file mode 100644
index c5967f5902..0000000000
--- a/chromium-new/patches/patch-third__party_fontconfig_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/fontconfig/BUILD.gn.orig	2017-02-02 02:03:11.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
deleted file mode 100644
index cb55e76b91..0000000000
--- a/chromium-new/patches/patch-third__party_freetype2_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/freetype2/BUILD.gn.orig	2017-02-02 02:03:11.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
deleted file mode 100644
index 7f4df4a995..0000000000
--- a/chromium-new/patches/patch-third__party_glslang_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- third_party/glslang/BUILD.gn.orig	2017-02-02 02:03:11.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
deleted file mode 100644
index e30e340080..0000000000
--- a/chromium-new/patches/patch-third__party_harfbuzz-ng_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- third_party/harfbuzz-ng/BUILD.gn.orig	2017-02-02 02:03:11.000000000 +0000
-+++ third_party/harfbuzz-ng/BUILD.gn
-@@ -50,7 +50,7 @@ if (use_system_harfbuzz) {
- 
-   # See also chrome/browser/ui/libgtkui/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
deleted file mode 100644
index fef2489ff6..0000000000
--- a/chromium-new/patches/patch-third__party_icu_android_patch__locale.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/icu/android/patch_locale.sh.orig	2017-02-02 02:03:49.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
deleted file mode 100644
index 7c0bc825da..0000000000
--- a/chromium-new/patches/patch-third__party_icu_source_configure
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- third_party/icu/source/configure.orig	2017-02-02 02:03:49.000000000 +0000
-+++ third_party/icu/source/configure
-@@ -7772,13 +7772,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_leveldatabase_env__chromium.cc b/chromium-new/patches/patch-third__party_leveldatabase_env__chromium.cc
deleted file mode 100644
index df48f1fa4a..0000000000
--- a/chromium-new/patches/patch-third__party_leveldatabase_env__chromium.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- third_party/leveldatabase/env_chromium.cc.orig	2017-02-02 02:03:11.000000000 +0000
-+++ third_party/leveldatabase/env_chromium.cc
-@@ -25,7 +25,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
- #include "third_party/re2/src/re2/re2.h"
-+#endif
- 
- using base::FilePath;
- using leveldb::FileLock;
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
deleted file mode 100644
index fc4240fa3d..0000000000
--- a/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/memory/singleton.h.orig	2017-02-02 02:03:50.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"
- #include "phonenumbers/base/thread_checker.h"
- 
--#if !defined(__linux__) && !defined(__APPLE__)
-+#if !defined(__linux__) && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
- 
- namespace i18n {
- namespace phonenumbers {
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
deleted file mode 100644
index 9baa19c863..0000000000
--- a/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/synchronization/lock.h.orig	2017-02-02 02:03:50.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
- // different platform and care about thread-safety, please compile with
- // -DI18N_PHONENUMBERS_USE_BOOST.
--#if !defined(__linux__) && !defined(__APPLE__)
-+#if !defined(__linux__) && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
- 
- namespace i18n {
- namespace phonenumbers {
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
deleted file mode 100644
index 787c93648a..0000000000
--- a/chromium-new/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD$
-
---- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/thread_checker.h.orig	2017-02-02 02:03:50.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
- // it is not depending on Boost.
- #if !defined(__linux__) && !defined(__APPLE__) && \
-+    !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && \
-     !defined(I18N_PHONENUMBERS_NO_THREAD_SAFETY)
- #error Building without Boost, please provide \
-        -DI18N_PHONENUMBERS_NO_THREAD_SAFETY
-@@ -31,7 +32,7 @@
- #endif
- 
- #if !defined(NDEBUG) && !defined(I18N_PHONENUMBERS_USE_BOOST) && \
--    (defined(__linux__) || defined(__apple__))
-+    (defined(__linux__) || defined(__apple__)) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
- 
- #include <pthread.h>
- 
diff --git a/chromium-new/patches/patch-third__party_libusb_BUILD.gn b/chromium-new/patches/patch-third__party_libusb_BUILD.gn
deleted file mode 100644
index bf24c4b83a..0000000000
--- a/chromium-new/patches/patch-third__party_libusb_BUILD.gn
+++ /dev/null
@@ -1,263 +0,0 @@
-$NetBSD$
-
---- third_party/libusb/BUILD.gn.orig	2017-02-02 02:03:11.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_libxml_BUILD.gn b/chromium-new/patches/patch-third__party_libxml_BUILD.gn
deleted file mode 100644
index 84f29e0a58..0000000000
--- a/chromium-new/patches/patch-third__party_libxml_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/libxml/BUILD.gn.orig	2017-02-02 02:03:11.000000000 +0000
-+++ third_party/libxml/BUILD.gn
-@@ -4,7 +4,7 @@
- 
- # Define an "os_include" variable that points at the OS-specific generated
- # headers.  These were generated by running the configure script offline.
--if (is_linux || is_android || is_nacl) {
-+if (is_linux || is_bsd || is_android || is_nacl) {
-   os_include = "linux"
- } else if (is_mac || is_ios) {
-   os_include = "mac"
diff --git a/chromium-new/patches/patch-third__party_libxslt_BUILD.gn b/chromium-new/patches/patch-third__party_libxslt_BUILD.gn
deleted file mode 100644
index 9645f4eed5..0000000000
--- a/chromium-new/patches/patch-third__party_libxslt_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/libxslt/BUILD.gn.orig	2017-02-02 02:03:11.000000000 +0000
-+++ third_party/libxslt/BUILD.gn
-@@ -82,7 +82,7 @@ static_library("libxslt") {
-   public_configs = [ ":libxslt_config" ]
- 
-   cflags = []
--  if (is_linux || is_android) {
-+  if (is_linux || is_bsd || is_android) {
-     include_dirs = [ "linux" ]
-   } else if (is_win) {
-     include_dirs = [ "win32" ]
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
deleted file mode 100644
index d12fff6176..0000000000
--- a/chromium-new/patches/patch-third__party_libyuv_include_libyuv_row.h
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD$
-
---- third_party/libyuv/include/libyuv/row.h.orig	2017-02-02 02:03:50.000000000 +0000
-+++ third_party/libyuv/include/libyuv/row.h
-@@ -161,10 +161,14 @@ extern "C" {
- #define HAS_ARGBSHADEROW_SSE2
- #define HAS_ARGBSUBTRACTROW_SSE2
- #define HAS_ARGBUNATTENUATEROW_SSE2
-+#if !(defined(__i386__) && defined(__GNUC__))
- #define HAS_BLENDPLANEROW_SSSE3
-+#endif
- #define HAS_COMPUTECUMULATIVESUMROW_SSE2
- #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
-+#if !(defined(__i386__) && defined(__GNUC__))
- #define HAS_INTERPOLATEROW_SSSE3
-+#endif
- #define HAS_RGBCOLORTABLEROW_X86
- #define HAS_SOBELROW_SSE2
- #define HAS_SOBELTOPLANEROW_SSE2
-@@ -211,7 +215,9 @@ extern "C" {
- #define HAS_I422TORGB565ROW_AVX2
- #define HAS_I422TORGBAROW_AVX2
- #define HAS_I444TOARGBROW_AVX2
-+#if !(defined(__i386__) && defined(__GNUC__))
- #define HAS_INTERPOLATEROW_AVX2
-+#endif
- #define HAS_J422TOARGBROW_AVX2
- #define HAS_MERGEUVROW_AVX2
- #define HAS_MIRRORROW_AVX2
-@@ -234,7 +240,9 @@ extern "C" {
- #define HAS_ARGBMULTIPLYROW_AVX2
- #define HAS_ARGBSUBTRACTROW_AVX2
- #define HAS_ARGBUNATTENUATEROW_AVX2
-+#if !(defined(__i386__) && defined(__GNUC__))
- #define HAS_BLENDPLANEROW_AVX2
-+#endif
- 
- #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
-     defined(_MSC_VER)
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
deleted file mode 100644
index 0053511eb9..0000000000
--- a/chromium-new/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- 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
- 
- #endif
--struct FILE;  // For jpeglib.h.
- 
- // C++ build requires extern C for jpeg internals.
- #ifdef __cplusplus
diff --git a/chromium-new/patches/patch-third__party_mesa_BUILD.gn b/chromium-new/patches/patch-third__party_mesa_BUILD.gn
deleted file mode 100644
index 292533fc55..0000000000
--- a/chromium-new/patches/patch-third__party_mesa_BUILD.gn
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
---- third_party/mesa/BUILD.gn.orig	2017-02-02 02:03:11.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_minigbm_BUILD.gn b/chromium-new/patches/patch-third__party_minigbm_BUILD.gn
deleted file mode 100644
index a3100289d7..0000000000
--- a/chromium-new/patches/patch-third__party_minigbm_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/minigbm/BUILD.gn.orig	2017-02-02 02:03:11.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
deleted file mode 100644
index 6e44dbff0c..0000000000
--- a/chromium-new/patches/patch-third__party_opus_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/opus/BUILD.gn.orig	2017-02-02 02:03:11.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
deleted file mode 100644
index 2942163422..0000000000
--- a/chromium-new/patches/patch-third__party_ots_include_opentype-sanitiser.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- third_party/ots/include/opentype-sanitiser.h.orig	2017-02-02 02:03:11.000000000 +0000
-+++ third_party/ots/include/opentype-sanitiser.h
-@@ -22,6 +22,7 @@ typedef unsigned __int64 uint64_t;
- #else
- #include <arpa/inet.h>
- #include <stdint.h>
-+#include <sys/types.h>
- #endif
- 
- #include <algorithm>
diff --git a/chromium-new/patches/patch-third__party_pdfium_BUILD.gn b/chromium-new/patches/patch-third__party_pdfium_BUILD.gn
deleted file mode 100644
index af15d3ff73..0000000000
--- a/chromium-new/patches/patch-third__party_pdfium_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/pdfium/BUILD.gn.orig	2017-02-02 02:03:52.000000000 +0000
-+++ third_party/pdfium/BUILD.gn
-@@ -44,7 +44,7 @@ config("pdfium_core_config") {
-   cflags = []
-   configs = [ ":pdfium_common_config" ]
-   defines = [ "V8_DEPRECATION_WARNINGS" ]
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     if (current_cpu == "x64") {
-       defines += [ "_FX_CPU_=_FX_X64_" ]
-       cflags += [ "-fPIC" ]
diff --git a/chromium-new/patches/patch-third__party_pdfium_core_fxcrt_fx__system.h b/chromium-new/patches/patch-third__party_pdfium_core_fxcrt_fx__system.h
deleted file mode 100644
index aea8096fe8..0000000000
--- a/chromium-new/patches/patch-third__party_pdfium_core_fxcrt_fx__system.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/pdfium/core/fxcrt/fx_system.h.orig	2017-02-02 02:03:52.000000000 +0000
-+++ third_party/pdfium/core/fxcrt/fx_system.h
-@@ -40,7 +40,7 @@
- #elif defined(_WIN64)
- #define _FX_OS_ _FX_WIN64_DESKTOP_
- #define _FXM_PLATFORM_ _FXM_PLATFORM_WINDOWS_
--#elif defined(__linux__)
-+#elif defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
- #define _FX_OS_ _FX_LINUX_DESKTOP_
- #define _FXM_PLATFORM_ _FXM_PLATFORM_LINUX_
- #elif defined(__APPLE__)
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
deleted file mode 100644
index d641eb4a3d..0000000000
--- a/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD$
-
---- third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp.orig	2017-02-02 02:03:53.000000000 +0000
-+++ third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp
-@@ -458,11 +458,12 @@ v8::Local<v8::Date> CJS_Date::ToV8Date(C
- }
- 
- double _getLocalTZA() {
-+  struct tm *lt;
-   if (!FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS))
-     return 0;
-   time_t t = 0;
-   time(&t);
--  localtime(&t);
-+  lt = localtime(&t);
- #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
-@@ -470,7 +471,11 @@ double _getLocalTZA() {
-   long timezone = 0;
-   _get_timezone(&timezone);
- #endif
-+#if defined(__FreeBSD__)
-+  return (double)(-(lt->tm_gmtoff * 1000));
-+#else
-   return (double)(-(timezone * 1000));
-+#endif
- }
- 
- int _getDaylightSavingTA(double d) {
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
deleted file mode 100644
index 6182da64f5..0000000000
--- a/chromium-new/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-$NetBSD$
-
---- third_party/pdfium/fpdfsdk/javascript/PublicMethods.cpp.orig	2017-02-02 02:03:53.000000000 +0000
-+++ third_party/pdfium/fpdfsdk/javascript/PublicMethods.cpp
-@@ -68,6 +68,103 @@ const FX_WCHAR* const fullmonths[] = {L"
-                                       L"July",    L"August",   L"September",
-                                       L"October", L"November", L"December"};
- 
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
-+/*
-+ * cvt.c - IEEE floating point formatting routines for FreeBSD
-+ * from GNU libc-4.6.27
-+ */
-+
-+/*
-+ *    ap_ecvt converts to decimal
-+ *      the number of digits is specified by ndigit
-+ *      decpt is set to the position of the decimal point
-+ *      sign is set to 0 for positive, 1 for negative
-+ */
-+
-+#define	NDIG	80
-+
-+static char *
-+     ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag)
-+{
-+    register int r2;
-+    double fi, fj;
-+    register char *p, *p1;
-+    static char buf[NDIG];
-+
-+    if (ndigits >= NDIG - 1)
-+	ndigits = NDIG - 2;
-+    r2 = 0;
-+    *sign = 0;
-+    p = &buf[0];
-+    if (arg < 0) {
-+	*sign = 1;
-+	arg = -arg;
-+    }
-+    arg = modf(arg, &fi);
-+    p1 = &buf[NDIG];
-+    /*
-+     * Do integer part
-+     */
-+    if (fi != 0) {
-+	p1 = &buf[NDIG];
-+	while (fi != 0) {
-+	    fj = modf(fi / 10, &fi);
-+	    *--p1 = (int) ((fj + .03) * 10) + '0';
-+	    r2++;
-+	}
-+	while (p1 < &buf[NDIG])
-+	    *p++ = *p1++;
-+    }
-+    else if (arg > 0) {
-+	while ((fj = arg * 10) < 1) {
-+	    arg = fj;
-+	    r2--;
-+	}
-+    }
-+    p1 = &buf[ndigits];
-+    if (eflag == 0)
-+	p1 += r2;
-+    *decpt = r2;
-+    if (p1 < &buf[0]) {
-+	buf[0] = '\0';
-+	return (buf);
-+    }
-+    while (p <= p1 && p < &buf[NDIG]) {
-+	arg *= 10;
-+	arg = modf(arg, &fj);
-+	*p++ = (int) fj + '0';
-+    }
-+    if (p1 >= &buf[NDIG]) {
-+	buf[NDIG - 1] = '\0';
-+	return (buf);
-+    }
-+    p = p1;
-+    *p1 += 5;
-+    while (*p1 > '9') {
-+	*p1 = '0';
-+	if (p1 > buf)
-+	    ++ * --p1;
-+	else {
-+	    *p1 = '1';
-+	    (*decpt)++;
-+	    if (eflag == 0) {
-+		if (p > buf)
-+		    *p = '0';
-+		p++;
-+	    }
-+	}
-+    }
-+    *p = '\0';
-+    return (buf);
-+}
-+
-+static char *
-+     fcvt(double arg, int ndigits, int *decpt, int *sign)
-+{
-+    return (ap_cvt(arg, ndigits, decpt, sign, 0));
-+}
-+#endif // defined(__FreeBSD__)
-+
- CFX_ByteString StrTrim(const CFX_ByteString& pStr) {
-   CFX_ByteString result(pStr);
-   result.TrimLeft(' ');
diff --git a/chromium-new/patches/patch-third__party_pdfium_skia_BUILD.gn b/chromium-new/patches/patch-third__party_pdfium_skia_BUILD.gn
deleted file mode 100644
index 9a5b5bf6e3..0000000000
--- a/chromium-new/patches/patch-third__party_pdfium_skia_BUILD.gn
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- third_party/pdfium/skia/BUILD.gn.orig	2017-02-02 02:03:53.000000000 +0000
-+++ third_party/pdfium/skia/BUILD.gn
-@@ -102,7 +102,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",
-@@ -280,7 +280,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",
-@@ -309,7 +309,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 e5f4cfec33..0000000000
--- 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	2017-02-02 02:03:53.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
deleted file mode 100644
index a0d77d0a4c..0000000000
--- a/chromium-new/patches/patch-third__party_protobuf_post__process__dist.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/protobuf/post_process_dist.sh.orig	2017-02-02 02:03:11.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_skia_src_gpu_GrAutoLocaleSetter.h b/chromium-new/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
deleted file mode 100644
index 35da2f0eb5..0000000000
--- a/chromium-new/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- 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>
- #endif
- 
--#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION)
-+#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) || defined(__NetBSD__)
- #define HAVE_LOCALE_T 0
- #else
- #define HAVE_LOCALE_T 1
diff --git a/chromium-new/patches/patch-third__party_sqlite_BUILD.gn b/chromium-new/patches/patch-third__party_sqlite_BUILD.gn
deleted file mode 100644
index f55c0f1063..0000000000
--- a/chromium-new/patches/patch-third__party_sqlite_BUILD.gn
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD$
-
---- third_party/sqlite/BUILD.gn.orig	2017-02-02 02:03:12.000000000 +0000
-+++ third_party/sqlite/BUILD.gn
-@@ -22,7 +22,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.
-@@ -187,7 +187,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" ]
-@@ -216,7 +216,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")
-@@ -235,7 +235,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_usrsctp_BUILD.gn b/chromium-new/patches/patch-third__party_usrsctp_BUILD.gn
deleted file mode 100644
index 99b87b799e..0000000000
--- a/chromium-new/patches/patch-third__party_usrsctp_BUILD.gn
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
---- third_party/usrsctp/BUILD.gn.orig	2017-02-02 02:03:12.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_webrtc_BUILD.gn b/chromium-new/patches/patch-third__party_webrtc_BUILD.gn
deleted file mode 100644
index 3024ac8ffe..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_BUILD.gn
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/BUILD.gn.orig	2017-02-02 02:03:57.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_LINUX", "WEBRTC_BSD", "WEBRTC_THREAD_RR" ]
-+  }
-   if (is_mac) {
-     defines += [ "WEBRTC_MAC" ]
-   }
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_BUILD.gn b/chromium-new/patches/patch-third__party_webrtc_base_BUILD.gn
deleted file mode 100644
index a9da9557f3..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_BUILD.gn
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/BUILD.gn.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/base/BUILD.gn
-@@ -650,7 +650,6 @@ rtc_static_library("rtc_base") {
-       "x11windowpicker.h",
-     ]
-     libs += [
--      "dl",
-       "rt",
-       "Xext",
-       "X11",
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_httpcommon.cc b/chromium-new/patches/patch-third__party_webrtc_base_httpcommon.cc
deleted file mode 100644
index 799070e397..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_httpcommon.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/httpcommon.cc.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/base/httpcommon.cc
-@@ -384,7 +384,7 @@ bool HttpDateToSeconds(const std::string
-     gmt = non_gmt + kTimeZoneOffsets[zindex] * 60 * 60;
-   }
-   // TODO: Android should support timezone, see b/2441195
--#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) || defined(BSD)
-+#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD)
-   tm *tm_for_timezone = localtime(&gmt);
-   *seconds = gmt + tm_for_timezone->tm_gmtoff;
- #else
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
deleted file mode 100644
index f03dcec9c2..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_ifaddrs__converter.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/ifaddrs_converter.h.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/base/ifaddrs_converter.h
-@@ -14,6 +14,8 @@
- #if defined(WEBRTC_ANDROID)
- #include "webrtc/base/ifaddrs-android.h"
- #else
-+#include <sys/types.h>
-+#include <sys/socket.h>
- #include <ifaddrs.h>
- #endif  // 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
deleted file mode 100644
index 03c13c13e7..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_ipaddress.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/ipaddress.h.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/base/ipaddress.h
-@@ -17,6 +17,10 @@
- #include <arpa/inet.h>
- #include <netdb.h>
- #endif
-+#if defined(WEBRTC_BSD)
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#endif
- #if defined(WEBRTC_WIN)
- #include <winsock2.h>
- #include <ws2tcpip.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
deleted file mode 100644
index 1f10587b7b..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_linux.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/linux.cc.orig	2017-02-02 02:03:57.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.
-  */
- 
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- #include "webrtc/base/linux.h"
- 
- #include <ctype.h>
-@@ -261,4 +261,4 @@ int ReadCpuMaxFreq() {
- 
- }  // namespace rtc
- 
--#endif  // defined(WEBRTC_LINUX)
-+#endif  // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_linux.h b/chromium-new/patches/patch-third__party_webrtc_base_linux.h
deleted file mode 100644
index f00e443ecc..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_linux.h
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/linux.h.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/base/linux.h
-@@ -11,7 +11,7 @@
- #ifndef WEBRTC_BASE_LINUX_H_
- #define WEBRTC_BASE_LINUX_H_
- 
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- #include <string>
- #include <map>
- #include <memory>
-@@ -114,5 +114,5 @@ int ReadCpuMaxFreq();
- 
- }  // namespace rtc
- 
--#endif  // defined(WEBRTC_LINUX)
-+#endif  // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- #endif  // WEBRTC_BASE_LINUX_H_
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_network.cc b/chromium-new/patches/patch-third__party_webrtc_base_network.cc
deleted file mode 100644
index b41d2be439..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_network.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/network.cc.orig	2017-02-02 02:03:57.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
- // it's transitively required by linux/route.h, so include that version on
- // linux instead of the standard posix one.
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
- #include <linux/if.h>
- #include <linux/route.h>
- #elif !defined(__native_client__)
-@@ -656,7 +656,7 @@ bool BasicNetworkManager::CreateNetworks
- }
- #endif  // WEBRTC_WIN
- 
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
- bool IsDefaultRoute(const std::string& network_name) {
-   FileStream fs;
-   if (!fs.Open("/proc/net/route", "r", NULL)) {
-@@ -699,7 +699,7 @@ bool BasicNetworkManager::IsIgnoredNetwo
-       strncmp(network.name().c_str(), "vboxnet", 7) == 0) {
-     return true;
-   }
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
-   // Make sure this is a default route, if we're ignoring non-defaults.
-   if (ignore_non_default_routes_ && !IsDefaultRoute(network.name())) {
-     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
deleted file mode 100644
index 07a45d5367..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_network.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/network.h.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/base/network.h
-@@ -23,6 +23,10 @@
- #include "webrtc/base/messagehandler.h"
- #include "webrtc/base/sigslot.h"
- 
-+#if defined(WEBRTC_BSD)
-+#include <sys/types.h>
-+#endif
-+
- #if defined(WEBRTC_POSIX)
- struct ifaddrs;
- #endif  // defined(WEBRTC_POSIX)
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_physicalsocketserver.cc b/chromium-new/patches/patch-third__party_webrtc_base_physicalsocketserver.cc
deleted file mode 100644
index 93f4ac9cc1..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_physicalsocketserver.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/physicalsocketserver.cc.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/base/physicalsocketserver.cc
-@@ -61,7 +61,11 @@ typedef void* SockOptArg;
- 
- int64_t GetSocketRecvTimestamp(int socket) {
-   struct timeval tv_ioctl;
-+#if defined(WEBRTC_BSD)
-+  int ret = ioctl(socket, SO_TIMESTAMP, &tv_ioctl);
-+#else
-   int ret = ioctl(socket, SIOCGSTAMP, &tv_ioctl);
-+#endif
-   if (ret != 0)
-     return -1;
-   int64_t timestamp =
-@@ -274,7 +278,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) {
--#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
-     *value = (*value != IP_PMTUDISC_DONT) ? 1 : 0;
- #endif
-   }
-@@ -287,7 +291,7 @@ int PhysicalSocket::SetOption(Option opt
-   if (TranslateOption(opt, &slevel, &sopt) == -1)
-     return -1;
-   if (opt == OPT_DONTFRAGMENT) {
--#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
-+#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
-     value = (value) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
- #endif
-   }
-@@ -569,10 +573,10 @@ int PhysicalSocket::TranslateOption(Opti
-       *slevel = IPPROTO_IP;
-       *sopt = IP_DONTFRAGMENT;
-       break;
--#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__)
-+#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD) || defined(__native_client__)
-       LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported.";
-       return -1;
--#elif defined(WEBRTC_POSIX)
-+#elif defined(WEBRTC_POSIX) && !defined(WEBRTC_BSD)
-       *slevel = IPPROTO_IP;
-       *sopt = IP_MTU_DISCOVER;
-       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
deleted file mode 100644
index 3606d44d69..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_platform__thread.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD$
-
---- 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 @@
- 
- #include "webrtc/base/checks.h"
- 
--#if defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_LINUX) && !defined(__FreeBSD__) && !defined(__NetBSD__)
- #include <sys/prctl.h>
- #include <sys/syscall.h>
- #endif
- 
-+#if defined(WEBRTC_BSD)
-+#include <pthread.h>
-+#if !defined(__NetBSD__)
-+#include <pthread_np.h>
-+#include <sys/thr.h>
-+#endif
-+#include <sys/syscall.h>
-+#endif
-+
- namespace rtc {
- 
- PlatformThreadId CurrentThreadId() {
-@@ -26,6 +35,10 @@ PlatformThreadId CurrentThreadId() {
- #elif defined(WEBRTC_POSIX)
- #if defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
-   ret = pthread_mach_thread_np(pthread_self());
-+#elif defined(__OpenBSD__) || defined(__NetBSD__)
-+  ret = reinterpret_cast<uint64_t>(pthread_self());
-+#elif defined(WEBRTC_BSD)
-+  ret = static_cast<int>(pthread_getthreadid_np());
- #elif defined(WEBRTC_LINUX)
-   ret =  syscall(__NR_gettid);
- #elif defined(WEBRTC_ANDROID)
-@@ -69,7 +82,11 @@ void SetCurrentThreadName(const char* na
-                      reinterpret_cast<ULONG_PTR*>(&threadname_info));
-   } __except (EXCEPTION_EXECUTE_HANDLER) {
-   }
--#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
-+#elif defined(__NetBSD__)
-+  pthread_setname_np(pthread_self(), "%s", const_cast<void*>(reinterpret_cast<const void*>(name)));
-+#elif defined(WEBRTC_BSD)
-+  pthread_set_name_np(pthread_self(), name);
-+#elif (defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)) && !defined(WEBRTC_BSD)
-   prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name));
- #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
-   pthread_setname_np(name);
diff --git a/chromium-new/patches/patch-third__party_webrtc_base_stringutils.h b/chromium-new/patches/patch-third__party_webrtc_base_stringutils.h
deleted file mode 100644
index bf8bd1c997..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_stringutils.h
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/stringutils.h.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/base/stringutils.h
-@@ -23,11 +23,11 @@
- #endif  // WEBRTC_WIN 
- 
- #if defined(WEBRTC_POSIX)
--#ifdef BSD
-+#if defined(WEBRTC_BSD) || defined(BSD)
- #include <stdlib.h>
--#else  // BSD
-+#else  // WEBRTC_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
deleted file mode 100644
index 782e91fd53..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_base_systeminfo.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/base/systeminfo.cc.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/base/systeminfo.cc
-@@ -20,8 +20,12 @@
- #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
- #include <ApplicationServices/ApplicationServices.h>
- #include <CoreServices/CoreServices.h>
--#elif defined(WEBRTC_LINUX)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- #include <unistd.h>
-+#if defined(WEBRTC_BSD)
-+#include <sys/types.h>
-+#include <sys/sysctl.h>
-+#endif
- #endif
- #if defined(WEBRTC_MAC)
- #include <sys/sysctl.h>
-@@ -66,7 +70,7 @@ static int DetectNumberOfCores() {
-   SYSTEM_INFO si;
-   GetSystemInfo(&si);
-   number_of_cores = static_cast<int>(si.dwNumberOfProcessors);
--#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD)
-   number_of_cores = static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
- #elif defined(WEBRTC_MAC)
-   int name[] = {CTL_HW, HW_AVAILCPU};
-@@ -174,9 +178,13 @@ int64_t SystemInfo::GetMemorySize() {
-     LOG_GLE(LS_WARNING) << "GlobalMemoryStatusEx failed.";
-   }
- 
--#elif defined(WEBRTC_MAC)
-+#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD)
-   size_t len = sizeof(memory);
-+  #if defined(WEBRTC_MAC) 
-   int error = sysctlbyname("hw.memsize", &memory, &len, NULL, 0);
-+  #else
-+  int error = sysctlbyname("hw.physmem", &memory, &len, NULL, 0);
-+  #endif
-   if (error || memory == 0)
-     memory = -1;
- #elif defined(WEBRTC_LINUX)
diff --git a/chromium-new/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn b/chromium-new/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn
deleted file mode 100644
index 4345eddb9a..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/modules/audio_device/BUILD.gn.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/modules/audio_device/BUILD.gn
-@@ -77,7 +77,7 @@ rtc_static_library("audio_device") {
-   ]
- 
-   include_dirs = []
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     include_dirs += [ "linux" ]
-   }
-   if (is_ios) {
-@@ -125,7 +125,7 @@ rtc_static_library("audio_device") {
-     if (rtc_use_dummy_audio_file_devices) {
-       defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ]
-     } else {
--      if (is_linux) {
-+      if (is_linux || is_bsd) {
-         sources += [
-           "linux/alsasymboltable_linux.cc",
-           "linux/alsasymboltable_linux.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
deleted file mode 100644
index 3e039f4d8b..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
-@@ -13,6 +13,7 @@
- #include <string.h>
- 
- #include <algorithm>
-+#include <cstdlib>
- #include <iterator>
- #include <utility>
- 
diff --git a/chromium-new/patches/patch-third__party_webrtc_modules_video__coding_BUILD.gn b/chromium-new/patches/patch-third__party_webrtc_modules_video__coding_BUILD.gn
deleted file mode 100644
index 5ab50ec2e8..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_modules_video__coding_BUILD.gn
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/modules/video_coding/BUILD.gn.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/modules/video_coding/BUILD.gn
-@@ -137,9 +137,7 @@ rtc_static_library("webrtc_h264") {
-   }
- 
-   defines = []
--  deps = [
--    "../../system_wrappers",
--  ]
-+  deps = []
- 
-   if (rtc_use_h264) {
-     defines += [ "WEBRTC_USE_H264" ]
-@@ -153,9 +151,9 @@ rtc_static_library("webrtc_h264") {
-       "codecs/h264/h264_encoder_impl.h",
-     ]
-     deps += [
--      "../../common_video",
-       "//third_party/ffmpeg:ffmpeg",
-       "//third_party/openh264:encoder",
-+      "../../common_video",
-     ]
-   }
- }
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
deleted file mode 100644
index 53fcbb2290..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/system_wrappers/BUILD.gn.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/system_wrappers/BUILD.gn
-@@ -90,7 +90,7 @@ rtc_static_library("system_wrappers") {
-     libs += [ "log" ]
-   }
- 
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     defines += [ "WEBRTC_THREAD_RR" ]
- 
-     if (!build_with_chromium) {
-@@ -100,7 +100,7 @@ rtc_static_library("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__non__darwin__unix.cc b/chromium-new/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc
deleted file mode 100644
index f373f1f807..0000000000
--- a/chromium-new/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/webrtc/system_wrappers/source/atomic32_non_darwin_unix.cc.orig	2017-02-02 02:03:57.000000000 +0000
-+++ third_party/webrtc/system_wrappers/source/atomic32_non_darwin_unix.cc
-@@ -12,7 +12,7 @@
- 
- #include <assert.h>
- #include <inttypes.h>
--#include <malloc.h>
-+#include <stdlib.h>
- 
- #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 113aff3d0f..0000000000
--- 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	2017-02-02 02:03:57.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
deleted file mode 100644
index dd264a4908..0000000000
--- a/chromium-new/patches/patch-third__party_widevine_cdm_BUILD.gn
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
---- third_party/widevine/cdm/BUILD.gn.orig	2017-02-02 02:03:12.000000000 +0000
-+++ third_party/widevine/cdm/BUILD.gn
-@@ -26,7 +26,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) {
-@@ -160,7 +160,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) ]
-@@ -183,7 +183,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
deleted file mode 100644
index fafa2d3752..0000000000
--- a/chromium-new/patches/patch-third__party_widevine_cdm_stub_widevine__cdm__version.h
+++ /dev/null
@@ -1,11 +0,0 @@
-$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
deleted file mode 100644
index 463d02d76d..0000000000
--- a/chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal
+++ /dev/null
@@ -1,62 +0,0 @@
-$NetBSD$
-
---- third_party/xdg-utils/scripts/xdg-terminal.orig	2017-02-02 02:03:57.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
deleted file mode 100644
index 6f2552b19e..0000000000
--- a/chromium-new/patches/patch-third__party_xdg-utils_scripts_xdg-terminal.in
+++ /dev/null
@@ -1,53 +0,0 @@
-$NetBSD$
-
---- third_party/xdg-utils/scripts/xdg-terminal.in.orig	2017-02-02 02:03:57.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
deleted file mode 100644
index 5816b39ba3..0000000000
--- a/chromium-new/patches/patch-third__party_yasm_BUILD.gn
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
---- third_party/yasm/BUILD.gn.orig	2017-02-02 02:03:12.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
deleted file mode 100644
index c8e7e37d99..0000000000
--- a/chromium-new/patches/patch-third__party_zlib_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- third_party/zlib/BUILD.gn.orig	2017-02-02 02:03:12.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
deleted file mode 100644
index 2c1b26a03f..0000000000
--- a/chromium-new/patches/patch-tools_battor__agent_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- tools/battor_agent/BUILD.gn.orig	2017-02-02 02:03:12.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
deleted file mode 100644
index b8daf3aee9..0000000000
--- a/chromium-new/patches/patch-tools_gn_args.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-$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
deleted file mode 100644
index bf9d79f831..0000000000
--- a/chromium-new/patches/patch-tools_gn_bootstrap_bootstrap.py
+++ /dev/null
@@ -1,65 +0,0 @@
-$NetBSD$
-
---- tools/gn/bootstrap/bootstrap.py.orig	2017-02-02 02:03:12.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_mac = sys.platform.startswith('darwin')
--is_posix = is_linux or is_mac
-+is_freebsd = sys.platform.startswith('freebsd')
-+is_netbsd = sys.platform.startswith('netbsd')
-+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_variations_fieldtrial__to__struct.py b/chromium-new/patches/patch-tools_variations_fieldtrial__to__struct.py
deleted file mode 100644
index 7dd43ff964..0000000000
--- a/chromium-new/patches/patch-tools_variations_fieldtrial__to__struct.py
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- tools/variations/fieldtrial_to_struct.py.orig	2017-02-02 02:03:13.000000000 +0000
-+++ tools/variations/fieldtrial_to_struct.py
-@@ -116,7 +116,7 @@ def main(arguments):
-   if not opts.platform:
-     parser.error('You must specify a --platform.')
- 
--  supported_platforms = ['android', 'chromeos', 'ios', 'linux', 'mac', 'win']
-+  supported_platforms = ['android', 'chromeos', 'ios', 'linux', 'mac', 'win', 'netbsd']
-   if opts.platform not in supported_platforms:
-     parser.error('\'%s\' is an unknown platform. Supported platforms: %s' %
-         (opts.platform, supported_platforms))
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
deleted file mode 100644
index 59d90ee755..0000000000
--- a/chromium-new/patches/patch-ui_accessibility_platform_ax__platform__node.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/accessibility/platform/ax_platform_node.h.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/accessibility/platform/ax_platform_node.h
-@@ -22,7 +22,7 @@
- #define PLATFORM_HAS_AX_PLATFORM_NODE_IMPL 1
- #endif
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(USE_X11)
- #define PLATFORM_HAS_AX_PLATFORM_NODE_IMPL 1
- #endif
- 
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
deleted file mode 100644
index a636ce1875..0000000000
--- a/chromium-new/patches/patch-ui_app__list_app__list__constants.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/app_list/app_list_constants.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/app_list/app_list_constants.cc
-@@ -140,7 +140,7 @@ const char kSearchQueryLength[] = "Apps.
- const char kSearchResultDistanceFromOrigin[] =
-     "Apps.AppListSearchResultDistanceFromOrigin";
- 
--#if defined(OS_LINUX)
-+#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
deleted file mode 100644
index a67c86d8ed..0000000000
--- a/chromium-new/patches/patch-ui_app__list_app__list__constants.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- ui/app_list/app_list_constants.h.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/app_list/app_list_constants.h
-@@ -89,8 +89,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)
-+// 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_views_app__list__item__view.cc b/chromium-new/patches/patch-ui_app__list_views_app__list__item__view.cc
deleted file mode 100644
index 511cf6b5c7..0000000000
--- a/chromium-new/patches/patch-ui_app__list_views_app__list__item__view.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/app_list/views/app_list_item_view.cc.orig	2017-02-02 02:03:13.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
deleted file mode 100644
index 5733a3588d..0000000000
--- a/chromium-new/patches/patch-ui_app__list_views_app__list__view.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/app_list/views/app_list_view.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/app_list/views/app_list_view.cc
-@@ -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
-@@ -538,7 +538,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
deleted file mode 100644
index 4080c8d328..0000000000
--- a/chromium-new/patches/patch-ui_aura_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/aura/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/aura/BUILD.gn
-@@ -361,7 +361,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
deleted file mode 100644
index dfd646194d..0000000000
--- a/chromium-new/patches/patch-ui_base_BUILD.gn
+++ /dev/null
@@ -1,63 +0,0 @@
-$NetBSD$
-
---- ui/base/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/base/BUILD.gn
-@@ -348,7 +348,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.
-@@ -450,11 +450,11 @@ component("base") {
-     ]
-   }
- 
--  if (!use_aura || !is_linux) {
-+  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" ]
-   }
- 
-@@ -462,7 +462,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",
-@@ -801,7 +801,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) {
-@@ -924,7 +924,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.
-@@ -937,7 +937,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
deleted file mode 100644
index 6677024824..0000000000
--- a/chromium-new/patches/patch-ui_base_ime_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/base/ime/BUILD.gn.orig	2017-02-02 02:03:13.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
deleted file mode 100644
index 0657c7fdb9..0000000000
--- a/chromium-new/patches/patch-ui_base_ime_ime__engine__handler__interface.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/base/ime/ime_engine_handler_interface.h.orig	2017-02-02 02:03:13.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).
-   virtual void HideInputView() = 0;
- 
--#elif defined(OS_LINUX) || defined(OS_WIN)
-+#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
- 
-   // Get the id of the IME extension.
-   virtual std::string GetExtensionId() const = 0;
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
deleted file mode 100644
index db83c3df00..0000000000
--- a/chromium-new/patches/patch-ui_base_ime_input__method__factory.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
---- ui/base/ime/input_method_factory.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/base/ime/input_method_factory.cc
-@@ -14,7 +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(OS_BSD)) && \
-+      defined(USE_X11)
- #include "ui/base/ime/input_method_auralinux.h"
- #elif defined(OS_ANDROID)
- #include "ui/base/ime/input_method_android.h"
-@@ -55,7 +56,8 @@ std::unique_ptr<InputMethod> CreateInput
-   return base::MakeUnique<InputMethodWin>(delegate, widget);
- #elif defined(OS_MACOSX)
-   return base::MakeUnique<InputMethodMac>(delegate);
--#elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11)
-+#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD)) && \
-+      defined(USE_X11)
-   return base::MakeUnique<InputMethodAuraLinux>(delegate);
- #elif defined(OS_ANDROID)
-   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
deleted file mode 100644
index 14687984fe..0000000000
--- a/chromium-new/patches/patch-ui_base_ime_input__method__initializer.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD$
-
---- ui/base/ime/input_method_initializer.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/base/ime/input_method_initializer.cc
-@@ -8,14 +8,14 @@
- 
- #if defined(OS_CHROMEOS)
- #include "ui/base/ime/ime_bridge.h"
--#elif defined(USE_AURA) && defined(OS_LINUX)
-+#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
- #include "base/logging.h"
- #include "ui/base/ime/linux/fake_input_method_context_factory.h"
- #endif
- 
- namespace {
- 
--#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
-+#if !defined(OS_CHROMEOS) && defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
- const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory;
- #endif
- 
-@@ -38,7 +38,7 @@ void ShutdownInputMethod() {
- void InitializeInputMethodForTesting() {
- #if defined(OS_CHROMEOS)
-   IMEBridge::Initialize();
--#elif defined(USE_AURA) && defined(OS_LINUX)
-+#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
-   if (!g_linux_input_method_context_factory)
-     g_linux_input_method_context_factory = new FakeInputMethodContextFactory();
-   const LinuxInputMethodContextFactory* factory =
-@@ -54,7 +54,7 @@ void InitializeInputMethodForTesting() {
- void ShutdownInputMethodForTesting() {
- #if defined(OS_CHROMEOS)
-   IMEBridge::Shutdown();
--#elif defined(USE_AURA) && defined(OS_LINUX)
-+#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD)) 
-   const LinuxInputMethodContextFactory* factory =
-       LinuxInputMethodContextFactory::instance();
-   CHECK(!factory || factory == g_linux_input_method_context_factory)
diff --git a/chromium-new/patches/patch-ui_base_resource_resource__bundle.cc b/chromium-new/patches/patch-ui_base_resource_resource__bundle.cc
deleted file mode 100644
index bf6dc845fc..0000000000
--- a/chromium-new/patches/patch-ui_base_resource_resource__bundle.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/base/resource/resource_bundle.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/base/resource/resource_bundle.cc
-@@ -651,7 +651,7 @@ void ResourceBundle::ReloadFonts() {
- }
- 
- ScaleFactor ResourceBundle::GetMaxScaleFactor() const {
--#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
-+#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
-   return max_scale_factor_;
- #else
-   return GetSupportedScaleFactors().back();
-@@ -711,7 +711,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__features.gni b/chromium-new/patches/patch-ui_base_ui__features.gni
deleted file mode 100644
index 0d62cef5d0..0000000000
--- a/chromium-new/patches/patch-ui_base_ui__features.gni
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD$
-
---- ui/base/ui_features.gni.orig	2017-02-02 02:03:13.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
deleted file mode 100644
index f478519c16..0000000000
--- a/chromium-new/patches/patch-ui_base_webui_web__ui__util.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/base/webui/web_ui_util.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/base/webui/web_ui_util.cc
-@@ -161,7 +161,7 @@ std::string GetFontFamily() {
- 
- // TODO(dnicoara) Remove Ozone check when PlatformFont support is introduced
- // into Ozone: crbug.com/320050
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
-   font_family = ui::ResourceBundle::GetSharedInstance().GetFont(
-       ui::ResourceBundle::BaseFont).GetFontName() + ", " + font_family;
- #endif
diff --git a/chromium-new/patches/patch-ui_compositor_BUILD.gn b/chromium-new/patches/patch-ui_compositor_BUILD.gn
deleted file mode 100644
index c907bf561c..0000000000
--- a/chromium-new/patches/patch-ui_compositor_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/compositor/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/compositor/BUILD.gn
-@@ -201,7 +201,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
deleted file mode 100644
index 1d2e41a952..0000000000
--- a/chromium-new/patches/patch-ui_events_event__switches.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/events/event_switches.cc.orig	2017-02-02 02:03:13.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_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
deleted file mode 100644
index 69f0b3ef05..0000000000
--- a/chromium-new/patches/patch-ui_events_event__switches.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/events/event_switches.h.orig	2017-02-02 02:03:13.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_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
deleted file mode 100644
index 7333abfc4c..0000000000
--- a/chromium-new/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/events/keycodes/dom/keycode_converter.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/events/keycodes/dom/keycode_converter.cc
-@@ -19,7 +19,7 @@ namespace {
- // and DOM Level 3 |code| strings.
- #if defined(OS_WIN)
- #define USB_KEYMAP(usb, evdev, xkb, win, mac, code, id) {usb, win, code}
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- #define USB_KEYMAP(usb, evdev, xkb, win, mac, code, id) {usb, xkb, code}
- #elif defined(OS_MACOSX)
- #define USB_KEYMAP(usb, evdev, xkb, win, mac, code, id) {usb, mac, code}
diff --git a/chromium-new/patches/patch-ui_gfx_BUILD.gn b/chromium-new/patches/patch-ui_gfx_BUILD.gn
deleted file mode 100644
index 62399e54ce..0000000000
--- a/chromium-new/patches/patch-ui_gfx_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/gfx/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/gfx/BUILD.gn
-@@ -371,7 +371,7 @@ component("gfx") {
-   }
- 
-   # Linux.
--  if (is_linux) {
-+  if (is_linux || is_bsd) {
-     deps += [ "//build/linux:fontconfig" ]
-   }
- 
-@@ -549,7 +549,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
deleted file mode 100644
index c724328df0..0000000000
--- a/chromium-new/patches/patch-ui_gfx_canvas__skia.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/gfx/canvas_skia.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/gfx/canvas_skia.cc
-@@ -209,7 +209,7 @@ void Canvas::DrawStringRectWithShadows(c
-     Range range = StripAcceleratorChars(flags, &adjusted_text);
-     bool elide_text = ((flags & NO_ELLIPSIS) == 0);
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     // On Linux, eliding really means fading the end of the string. But only
-     // for LTR text. RTL text is still elided (on the left) with "...".
-     if (elide_text) {
diff --git a/chromium-new/patches/patch-ui_gfx_font__fallback__linux.cc b/chromium-new/patches/patch-ui_gfx_font__fallback__linux.cc
deleted file mode 100644
index 479793745d..0000000000
--- a/chromium-new/patches/patch-ui_gfx_font__fallback__linux.cc
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
---- ui/gfx/font_fallback_linux.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/gfx/font_fallback_linux.cc
-@@ -15,6 +15,10 @@
- #include "base/memory/ptr_util.h"
- #include "ui/gfx/font.h"
- 
-+#if defined(OS_BSD)
-+#include <unistd.h>
-+#endif
-+
- namespace gfx {
- 
- namespace {
diff --git a/chromium-new/patches/patch-ui_gfx_font__render__params.h b/chromium-new/patches/patch-ui_gfx_font__render__params.h
deleted file mode 100644
index 52048be39d..0000000000
--- a/chromium-new/patches/patch-ui_gfx_font__render__params.h
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD$
-
---- ui/gfx/font_render_params.h.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/gfx/font_render_params.h
-@@ -106,13 +106,13 @@ GFX_EXPORT FontRenderParams GetFontRende
-     const FontRenderParamsQuery& query,
-     std::string* family_out);
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- // Clears GetFontRenderParams()'s cache. Intended to be called by tests that are
- // changing Fontconfig's configuration.
- GFX_EXPORT void ClearFontRenderParamsCacheForTest();
- #endif
- 
--#if defined(OS_CHROMEOS) || defined(OS_LINUX)
-+#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
- // Gets the device scale factor to query the FontRenderParams.
- GFX_EXPORT float GetFontRenderParamsDeviceScaleFactor();
- 
diff --git a/chromium-new/patches/patch-ui_gfx_render__text.cc b/chromium-new/patches/patch-ui_gfx_render__text.cc
deleted file mode 100644
index da565eec8b..0000000000
--- a/chromium-new/patches/patch-ui_gfx_render__text.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-$NetBSD$
-
---- ui/gfx/render_text.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/gfx/render_text.cc
-@@ -972,32 +972,33 @@ void RenderText::SetDisplayOffset(int ho
-   const int extra_content = GetContentWidth() - display_rect_.width();
-   const int cursor_width = cursor_enabled_ ? 1 : 0;
- 
--  int min_offset = 0;
--  int max_offset = 0;
-+  // avoid collisions with vm_map.h on FreeBSD --cmt
-+  int _min_offset = 0;
-+  int _max_offset = 0;
-   if (extra_content > 0) {
-     switch (GetCurrentHorizontalAlignment()) {
-       case ALIGN_LEFT:
--        min_offset = -extra_content;
-+        _min_offset = -extra_content;
-         break;
-       case ALIGN_RIGHT:
--        max_offset = extra_content;
-+        _max_offset = extra_content;
-         break;
-       case ALIGN_CENTER:
-         // The extra space reserved for cursor at the end of the text is ignored
-         // when centering text. So, to calculate the valid range for offset, we
-         // exclude that extra space, calculate the range, and add it back to the
-         // range (if cursor is enabled).
--        min_offset = -(extra_content - cursor_width + 1) / 2 - cursor_width;
--        max_offset = (extra_content - cursor_width) / 2;
-+        _min_offset = -(extra_content - cursor_width + 1) / 2 - cursor_width;
-+        _max_offset = (extra_content - cursor_width) / 2;
-         break;
-       default:
-         break;
-     }
-   }
--  if (horizontal_offset < min_offset)
--    horizontal_offset = min_offset;
--  else if (horizontal_offset > max_offset)
--    horizontal_offset = max_offset;
-+  if (horizontal_offset < _min_offset)
-+    horizontal_offset = _min_offset;
-+  else if (horizontal_offset > _max_offset)
-+    horizontal_offset = _max_offset;
- 
-   cached_bounds_and_offset_valid_ = true;
-   display_offset_.set_x(horizontal_offset);
diff --git a/chromium-new/patches/patch-ui_gl_BUILD.gn b/chromium-new/patches/patch-ui_gl_BUILD.gn
deleted file mode 100644
index 00fa54f981..0000000000
--- a/chromium-new/patches/patch-ui_gl_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/gl/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/gl/BUILD.gn
-@@ -13,7 +13,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 || ozone_platform_x11
- 
- if (is_android) {
-@@ -170,7 +170,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_sync__control__vsync__provider.cc b/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.cc
deleted file mode 100644
index a4744f00b9..0000000000
--- a/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.cc
+++ /dev/null
@@ -1,65 +0,0 @@
-$NetBSD$
-
---- ui/gl/sync_control_vsync_provider.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/gl/sync_control_vsync_provider.cc
-@@ -11,7 +11,7 @@
- #include "base/trace_event/trace_event.h"
- #include "build/build_config.h"
- 
--#if defined(OS_LINUX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
- // 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;
-@@ -21,17 +21,17 @@ const int64_t kMaxVsyncIntervalUs = base
- // we think the latest computed interval is invalid (noisey due to
- // monitor configuration change, moving a window between monitors, etc.).
- const double kRelativeIntervalDifferenceThreshold = 0.05;
--#endif  // defined(OS_LINUX) || defined(OS_WIN)
-+#endif  // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
- 
- namespace gl {
- 
- SyncControlVSyncProvider::SyncControlVSyncProvider() : gfx::VSyncProvider() {
--#if defined(OS_LINUX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
-   // On platforms where we can't get an accurate reading on the refresh
-   // rate we fall back to the assumption that we're displaying 60 frames
-   // per second.
-   last_good_interval_ = base::TimeDelta::FromSeconds(1) / 60;
--#endif  // defined(OS_LINUX) || defined(OS_WIN)
-+#endif  // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
- }
- 
- SyncControlVSyncProvider::~SyncControlVSyncProvider() {}
-@@ -39,7 +39,7 @@ SyncControlVSyncProvider::~SyncControlVS
- void SyncControlVSyncProvider::GetVSyncParameters(
-     const UpdateVSyncCallback& callback) {
-   TRACE_EVENT0("gpu", "SyncControlVSyncProvider::GetVSyncParameters");
--#if defined(OS_LINUX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
-   base::TimeTicks timebase;
- 
-   int64_t system_time;
-@@ -129,10 +129,10 @@ void SyncControlVSyncProvider::GetVSyncP
-   last_timebase_ = timebase;
-   last_media_stream_counter_ = media_stream_counter;
-   callback.Run(timebase, last_good_interval_);
--#endif  // defined(OS_LINUX) || defined(OS_WIN)
-+#endif  // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
- }
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- bool SyncControlVSyncProvider::AdjustSyncValues(int64_t* system_time,
-                                                 int64_t* media_stream_counter) {
-   // Both Intel and Mali drivers will return TRUE for GetSyncValues
-@@ -192,7 +192,7 @@ bool SyncControlVSyncProvider::AdjustSyn
- 
-   return true;
- }
--#endif  // defined(OS_LINUX)
-+#endif  // defined(OS_LINUX) || defined(OS_BSD)
- 
- #if defined(OS_WIN)
- bool SyncControlVSyncProvider::AdjustSyncValues(int64_t* system_time,
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
deleted file mode 100644
index abbae8a562..0000000000
--- a/chromium-new/patches/patch-ui_gl_sync__control__vsync__provider.h
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/gl/sync_control_vsync_provider.h.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/gl/sync_control_vsync_provider.h
-@@ -32,7 +32,7 @@ class GL_EXPORT SyncControlVSyncProvider
-   virtual bool GetMscRate(int32_t* numerator, int32_t* denominator) = 0;
- 
-  private:
--#if defined(OS_LINUX) || defined(OS_WIN)
-+#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
-   bool AdjustSyncValues(int64_t* system_time, int64_t* media_stream_counter);
- 
-   base::TimeTicks last_timebase_;
-@@ -48,7 +48,7 @@ class GL_EXPORT SyncControlVSyncProvider
-   std::queue<base::TimeDelta> last_computed_intervals_;
- #endif  //  defined(OS_LINUX) || defined(OS_WIN)
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   bool invalid_msc_ = false;
- #endif  // defined(OS_LINUX)
- 
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
deleted file mode 100644
index eefd0a6ae8..0000000000
--- a/chromium-new/patches/patch-ui_message__center_message__center__style.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/message_center/message_center_style.h.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/message_center/message_center_style.h
-@@ -115,7 +115,7 @@ const int kButtonHorizontalPadding = 16;
- const int kButtonIconTopPadding = 11;      // In DIPs.
- const int kButtonIconToTitlePadding = 16;  // In DIPs.
- 
--#if !defined(OS_LINUX) || defined(USE_AURA)
-+#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(USE_AURA)
- const SkColor kButtonSeparatorColor = SkColorSetRGB(234, 234, 234);
- const SkColor kHoveredButtonBackgroundColor = SkColorSetRGB(243, 243, 243);
- #endif
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
deleted file mode 100644
index 610097dd41..0000000000
--- a/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-$NetBSD$
-
---- ui/message_center/views/message_center_button_bar.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/message_center/views/message_center_button_bar.cc
-@@ -95,7 +95,7 @@ MessageCenterButtonBar::MessageCenterBut
-     const base::string16& title)
-     : message_center_view_(message_center_view),
-       message_center_(message_center),
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-       close_bubble_button_(NULL),
- #endif
-       title_arrow_(NULL),
-@@ -170,7 +170,7 @@ MessageCenterButtonBar::MessageCenterBut
-                                    IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL);
-   button_container_->AddChildView(settings_button_);
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   close_bubble_button_ = new views::ImageButton(this);
-   close_bubble_button_->SetImage(
-       views::Button::STATE_NORMAL,
-@@ -232,7 +232,7 @@ void MessageCenterButtonBar::ViewVisibil
-                     0,
-                     0);
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   // The close-bubble button.
-   column->AddColumn(views::GridLayout::LEADING,
-                     views::GridLayout::LEADING,
-@@ -247,7 +247,7 @@ void MessageCenterButtonBar::ViewVisibil
-     layout->AddView(title_arrow_);
-   layout->AddView(notification_label_);
-   layout->AddView(button_container_);
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   layout->AddView(close_bubble_button_);
- #endif
- }
-@@ -297,7 +297,7 @@ void MessageCenterButtonBar::ButtonPress
-     else
-       message_center()->EnterQuietModeWithExpire(base::TimeDelta::FromDays(1));
-     quiet_mode_button_->SetToggled(message_center()->IsQuietMode());
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   } else if (sender == close_bubble_button_) {
-     message_center_view()->tray()->HideMessageCenterBubble();
- #endif
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
deleted file mode 100644
index 73553a4601..0000000000
--- a/chromium-new/patches/patch-ui_message__center_views_message__center__button__bar.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/message_center/views/message_center_button_bar.h.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/message_center/views/message_center_button_bar.h
-@@ -74,7 +74,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.
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   views::ImageButton* close_bubble_button_;
- #endif
- 
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
deleted file mode 100644
index d192358dfa..0000000000
--- a/chromium-new/patches/patch-ui_message__center_views_message__view__factory.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/message_center/views/message_view_factory.cc.orig	2017-02-02 02:03:13.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_resources_ui__resources.grd b/chromium-new/patches/patch-ui_resources_ui__resources.grd
deleted file mode 100644
index b3a9e5f311..0000000000
--- a/chromium-new/patches/patch-ui_resources_ui__resources.grd
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/resources/ui_resources.grd.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/resources/ui_resources.grd
-@@ -15,7 +15,7 @@
-       <!-- KEEP THESE IN ALPHABETICAL ORDER!  DO NOT ADD TO RANDOM PLACES JUST
-            BECAUSE YOUR RESOURCES ARE FUNCTIONALLY RELATED OR FALL UNDER THE
-            SAME CONDITIONALS. -->
--      <if expr="is_linux and use_aura">
-+      <if expr="(is_linux or is_bsd) and use_aura">
-         <structure type="chrome_scaled_image" name="IDR_AURA_CURSOR_BIG_ALIAS" file="common/pointers/alias_big.png" />
-         <structure type="chrome_scaled_image" name="IDR_AURA_CURSOR_BIG_CELL" file="common/pointers/cell_big.png" />
-         <structure type="chrome_scaled_image" name="IDR_AURA_CURSOR_BIG_COL_RESIZE" file="common/pointers/sb_h_double_arrow_big.png" />
diff --git a/chromium-new/patches/patch-ui_views_BUILD.gn b/chromium-new/patches/patch-ui_views_BUILD.gn
deleted file mode 100644
index 487e050a5e..0000000000
--- a/chromium-new/patches/patch-ui_views_BUILD.gn
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/views/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/BUILD.gn
-@@ -426,7 +426,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 {
-@@ -618,7 +618,7 @@ component("views") {
-           "widget/desktop_aura/desktop_window_tree_host_ozone.cc",
-         ]
-       }
--      if (is_linux) {
-+      if (is_linux || is_bsd) {
-         sources += [
-           "style/platform_style_linux.cc",
-           "widget/desktop_aura/desktop_cursor_loader_updater_auralinux.cc",
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
deleted file mode 100644
index ae51367171..0000000000
--- a/chromium-new/patches/patch-ui_views_accessibility_native__view__accessibility.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/accessibility/native_view_accessibility.h.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/accessibility/native_view_accessibility.h
-@@ -22,7 +22,7 @@
- #define PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL 1
- #endif
- 
--#if defined(OS_LINUX) && defined(USE_X11) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && defined(USE_X11) && !defined(OS_CHROMEOS)
- #define PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL 1
- #endif
- 
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
deleted file mode 100644
index 80841a90c8..0000000000
--- a/chromium-new/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/bubble/bubble_dialog_delegate.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/bubble/bubble_dialog_delegate.cc
-@@ -73,7 +73,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_label.cc b/chromium-new/patches/patch-ui_views_controls_label.cc
deleted file mode 100644
index 40bea69323..0000000000
--- a/chromium-new/patches/patch-ui_views_controls_label.cc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- ui/views/controls/label.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/controls/label.cc
-@@ -523,7 +523,7 @@ bool Label::OnMousePressed(const ui::Mou
-     GetFocusManager()->SetFocusedView(this);
-   }
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   if (event.IsOnlyMiddleMouseButton() && GetFocusManager())
-     GetFocusManager()->SetFocusedView(this);
- #endif
-@@ -687,7 +687,7 @@ bool Label::PasteSelectionClipboard() {
- }
- 
- void Label::UpdateSelectionClipboard() {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   if (!obscured()) {
-     ui::ScopedClipboardWriter(ui::CLIPBOARD_TYPE_SELECTION)
-         .WriteText(GetSelectedText());
diff --git a/chromium-new/patches/patch-ui_views_controls_textfield_textfield.cc b/chromium-new/patches/patch-ui_views_controls_textfield_textfield.cc
deleted file mode 100644
index 16ea1ff0ea..0000000000
--- a/chromium-new/patches/patch-ui_views_controls_textfield_textfield.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-$NetBSD$
-
---- ui/views/controls/textfield/textfield.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/controls/textfield/textfield.cc
-@@ -53,7 +53,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/base/ime/linux/text_edit_command_auralinux.h"
- #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
-@@ -146,14 +146,14 @@ ui::TextEditCommand GetCommandForKeyEven
-     case ui::VKEY_BACK:
-       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 ui::TextEditCommand::DELETE_TO_BEGINNING_OF_LINE;
- #endif
-       return ui::TextEditCommand::DELETE_WORD_BACKWARD;
-     case ui::VKEY_DELETE:
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-       // Only erase by line break on Linux and ChromeOS.
-       if (shift && control)
-         return ui::TextEditCommand::DELETE_TO_END_OF_LINE;
-@@ -580,7 +580,7 @@ bool Textfield::OnMousePressed(const ui:
-     ShowImeIfNeeded();
-   }
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   if (!handled && !HasFocus() && event.IsOnlyMiddleMouseButton())
-     RequestFocus();
- #endif
-@@ -617,7 +617,7 @@ bool Textfield::OnKeyPressed(const ui::K
-   if (!textfield)
-     return handled;
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
-       ui::GetTextEditKeyBindingsDelegate();
-   std::vector<ui::TextEditCommandAuraLinux> commands;
-@@ -757,7 +757,7 @@ void Textfield::AboutToRequestFocusFromT
- }
- 
- bool Textfield::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   // Skip any accelerator handling that conflicts with custom keybindings.
-   ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
-       ui::GetTextEditKeyBindingsDelegate();
-@@ -1035,7 +1035,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)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   // Desktop Linux Aura does not yet support transparency in drag images.
-   canvas->DrawColor(GetBackgroundColor());
- #endif
-@@ -1827,7 +1827,7 @@ bool Textfield::PasteSelectionClipboard(
- }
- 
- void Textfield::UpdateSelectionClipboard() {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   if (text_input_type_ != ui::TEXT_INPUT_TYPE_PASSWORD) {
-     ui::ScopedClipboardWriter(ui::CLIPBOARD_TYPE_SELECTION)
-         .WriteText(GetSelectedText());
diff --git a/chromium-new/patches/patch-ui_views_controls_webview_BUILD.gn b/chromium-new/patches/patch-ui_views_controls_webview_BUILD.gn
deleted file mode 100644
index c7ad441e93..0000000000
--- a/chromium-new/patches/patch-ui_views_controls_webview_BUILD.gn
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/controls/webview/BUILD.gn.orig	2017-02-02 02:03:13.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_corewm_tooltip__aura.cc b/chromium-new/patches/patch-ui_views_corewm_tooltip__aura.cc
deleted file mode 100644
index c058497d8b..0000000000
--- a/chromium-new/patches/patch-ui_views_corewm_tooltip__aura.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/corewm/tooltip_aura.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/corewm/tooltip_aura.cc
-@@ -34,7 +34,7 @@ const int kCursorOffsetY = 15;
- 
- // TODO(varkha): Update if native widget can be transparent on Linux.
- bool CanUseTranslucentTooltipWidget() {
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   return false;
- #else
-   return true;
diff --git a/chromium-new/patches/patch-ui_views_examples_widget__example.cc b/chromium-new/patches/patch-ui_views_examples_widget__example.cc
deleted file mode 100644
index c60bfccf47..0000000000
--- a/chromium-new/patches/patch-ui_views_examples_widget__example.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/examples/widget_example.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/examples/widget_example.cc
-@@ -77,7 +77,7 @@ void WidgetExample::CreateExampleView(Vi
-   BuildButton(container, "Popup widget", POPUP);
-   BuildButton(container, "Dialog widget", DIALOG);
-   BuildButton(container, "Modal Dialog", MODAL_DIALOG);
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-   // Windows does not support TYPE_CONTROL top-level widgets.
-   BuildButton(container, "Child widget", CHILD);
- #endif
diff --git a/chromium-new/patches/patch-ui_views_selection__controller.cc b/chromium-new/patches/patch-ui_views_selection__controller.cc
deleted file mode 100644
index eac4d654c0..0000000000
--- a/chromium-new/patches/patch-ui_views_selection__controller.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/selection_controller.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/selection_controller.cc
-@@ -20,7 +20,7 @@ SelectionController::SelectionController
-       delegate_(delegate),
-       handles_selection_clipboard_(false) {
- // On Linux, update the selection clipboard on a text selection.
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
-   set_handles_selection_clipboard(true);
- #endif
- 
diff --git a/chromium-new/patches/patch-ui_views_style_platform__style.cc b/chromium-new/patches/patch-ui_views_style_platform__style.cc
deleted file mode 100644
index 17560c6191..0000000000
--- a/chromium-new/patches/patch-ui_views_style_platform__style.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/style/platform_style.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/style/platform_style.cc
-@@ -17,7 +17,7 @@
- #include "ui/views/controls/focusable_border.h"
- #include "ui/views/controls/scrollbar/scroll_bar_views.h"
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
- #define DESKTOP_LINUX
- #endif
- 
diff --git a/chromium-new/patches/patch-ui_views_views__delegate.cc b/chromium-new/patches/patch-ui_views_views__delegate.cc
deleted file mode 100644
index c10749d973..0000000000
--- a/chromium-new/patches/patch-ui_views_views__delegate.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/views_delegate.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/views_delegate.cc
-@@ -71,7 +71,7 @@ HICON ViewsDelegate::GetDefaultWindowIco
- bool ViewsDelegate::IsWindowInMetro(gfx::NativeWindow window) const {
-   return false;
- }
--#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
- gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const {
-   return nullptr;
- }
diff --git a/chromium-new/patches/patch-ui_views_views__delegate.h b/chromium-new/patches/patch-ui_views_views__delegate.h
deleted file mode 100644
index 0c0a245a1a..0000000000
--- a/chromium-new/patches/patch-ui_views_views__delegate.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/views_delegate.h.orig	2017-02-02 02:03:13.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
-   // environment.
-   virtual bool IsWindowInMetro(gfx::NativeWindow window) const;
--#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
-   virtual gfx::ImageSkia* GetDefaultWindowIcon() const;
- #endif
- 
diff --git a/chromium-new/patches/patch-ui_views_views__switches.cc b/chromium-new/patches/patch-ui_views_views__switches.cc
deleted file mode 100644
index 408f0c4697..0000000000
--- a/chromium-new/patches/patch-ui_views_views__switches.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/views_switches.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/views_switches.cc
-@@ -18,7 +18,7 @@ const char kDisableViewsRectBasedTargeti
-     "disable-views-rect-based-targeting";
- 
- bool IsRectBasedTargetingEnabled() {
--#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
-+#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
-   return !base::CommandLine::ForCurrentProcess()->HasSwitch(
-       kDisableViewsRectBasedTargeting);
- #else
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
deleted file mode 100644
index 9d3761c060..0000000000
--- a/chromium-new/patches/patch-ui_views_window_custom__frame__view.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/window/custom_frame_view.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/window/custom_frame_view.cc
-@@ -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.
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
-   return FrameBorderThickness();
- #else
-   return frame_->IsMaximized() ? FrameBorderThickness() : kFrameShadowThickness;
diff --git a/chromium-new/patches/patch-ui_views_window_dialog__delegate.cc b/chromium-new/patches/patch-ui_views_window_dialog__delegate.cc
deleted file mode 100644
index e3c172c0d9..0000000000
--- a/chromium-new/patches/patch-ui_views_window_dialog__delegate.cc
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/views/window/dialog_delegate.cc.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/views/window/dialog_delegate.cc
-@@ -56,7 +56,7 @@ Widget::InitParams DialogDelegate::GetDi
-   params.bounds = bounds;
-   DialogDelegate* dialog = delegate->AsDialogDelegate();
- 
--#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
-+#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_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
deleted file mode 100644
index fd959145a0..0000000000
--- a/chromium-new/patches/patch-ui_webui_resources_js_cr.js
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- ui/webui/resources/js/cr.js.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/webui/resources/js/cr.js
-@@ -451,6 +451,11 @@ var cr = cr || function() {
-     get doc() {
-       return document;
-     },
-+    
-+    /** Whether this is on *BSD. */
-+    get isBSD() {
-+      return /BSD/.test(navigator.userAgent);
-+    },
- 
-     /** Whether we are using a Mac or not. */
-     get isMac() {
diff --git a/chromium-new/patches/patch-ui_webui_resources_js_icon.js b/chromium-new/patches/patch-ui_webui_resources_js_icon.js
deleted file mode 100644
index d3bd09f8bd..0000000000
--- a/chromium-new/patches/patch-ui_webui_resources_js_icon.js
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- ui/webui/resources/js/icon.js.orig	2017-02-02 02:03:13.000000000 +0000
-+++ ui/webui/resources/js/icon.js
-@@ -14,7 +14,7 @@ cr.define('cr.icon', function() {
-       // supports SCALE_FACTOR_100P on all non-iOS platforms.
-       supportedScaleFactors.push(1);
-     }
--    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 have
-       // high DPI assets for 2x.  Let the renderer pick the closest image for
diff --git a/chromium-new/patches/patch-v8_BUILD.gn b/chromium-new/patches/patch-v8_BUILD.gn
deleted file mode 100644
index aca9c52942..0000000000
--- a/chromium-new/patches/patch-v8_BUILD.gn
+++ /dev/null
@@ -1,41 +0,0 @@
-$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
deleted file mode 100644
index e2d744339c..0000000000
--- a/chromium-new/patches/patch-v8_src_base_platform_platform-netbsd.cc
+++ /dev/null
@@ -1,301 +0,0 @@
-$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
deleted file mode 100644
index 8ea1f9b17d..0000000000
--- a/chromium-new/patches/patch-v8_src_base_platform_platform-posix.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD$
-
---- v8/src/base/platform/platform-posix.cc.orig	2016-11-10 20:03:08.000000000 +0000
-+++ v8/src/base/platform/platform-posix.cc
-@@ -27,6 +27,10 @@
- #include <sys/sysctl.h>  // NOLINT, for sysctl
- #endif
- 
-+#if defined(__NetBSD__)
-+#include <lwp.h>	// for _lwp_self
-+#endif
-+
- #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());
-+#elif V8_OS_DRAGONFLYBSD || defined(__DragonFly__)
-+  return static_cast<int>(lwp_gettid());
-+#elif V8_OS_FREEBSD
-+  return static_cast<int>(pthread_getthreadid_np());
-+#elif V8_OS_NETBSD
-+  return reinterpret_cast<uint64_t>(pthread_self());
- #elif V8_OS_AIX
-   return static_cast<int>(thread_self());
- #elif V8_OS_SOLARIS
-@@ -532,8 +542,13 @@ Thread::Thread(const Options& options)
-     : data_(new PlatformData),
-       stack_size_(options.stack_size()),
-       start_semaphore_(NULL) {
-+#if defined(__NetBSD__)
-+  if (stack_size_ > 0 && static_cast<size_t>(stack_size_) < sysconf(_SC_THREAD_STACK_MIN)) {
-+    stack_size_ = sysconf(_SC_THREAD_STACK_MIN);
-+#else
-   if (stack_size_ > 0 && static_cast<size_t>(stack_size_) < PTHREAD_STACK_MIN) {
-     stack_size_ = PTHREAD_STACK_MIN;
-+#endif
-   }
-   set_name(options.name());
- }
-@@ -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);
--  pthread_setname_np(pthread_self(), "%s", name);
-+  pthread_setname_np(pthread_self(), "%s", (void *)name);
- #elif V8_OS_MACOSX
-   // pthread_setname_np is only available in 10.6 or later, so test
-   // for it at runtime.
diff --git a/chromium-new/patches/patch-v8_src_base_platform_platform.h b/chromium-new/patches/patch-v8_src_base_platform_platform.h
deleted file mode 100644
index 3053955077..0000000000
--- a/chromium-new/patches/patch-v8_src_base_platform_platform.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- 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_
- 
- #include <cstdarg>
-+#include <cstdio>
- #include <string>
- #include <vector>
- 
diff --git a/chromium-new/patches/patch-v8_src_globals.h b/chromium-new/patches/patch-v8_src_globals.h
deleted file mode 100644
index 17ff6e41f0..0000000000
--- a/chromium-new/patches/patch-v8_src_globals.h
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD$
-
---- v8/src/globals.h.orig	2017-02-02 02:04:00.000000000 +0000
-+++ v8/src/globals.h
-@@ -182,7 +182,11 @@ const size_t kCodeRangeAreaAlignment = 2
- const size_t kMaximalCodeRangeSize = 512 * MB;
- const size_t kCodeRangeAreaAlignment = 64 * KB;  // OS page on PPC Linux
- #else
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
-+const size_t kMaximalCodeRangeSize = 256 * MB;
-+#else
- const size_t kMaximalCodeRangeSize = 512 * MB;
-+#endif
- const size_t kCodeRangeAreaAlignment = 4 * KB;  // OS page.
- #endif
- #if V8_OS_WIN
diff --git a/chromium-new/patches/patch-v8_tools_run-llprof.sh b/chromium-new/patches/patch-v8_tools_run-llprof.sh
deleted file mode 100644
index b6e6743590..0000000000
--- a/chromium-new/patches/patch-v8_tools_run-llprof.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- v8/tools/run-llprof.sh.orig	2017-02-02 02:04:01.000000000 +0000
-+++ v8/tools/run-llprof.sh
-@@ -46,7 +46,7 @@ framework, then calls the low level tick
- EOF
- }
- 
--if [ $# -eq 0 ] || [ "$1" == "-h" ]  || [ "$1" == "--help" ] ; then
-+if [ $# -eq 0 ] || [ "$1" = "-h" ]  || [ "$1" = "--help" ] ; then
-   usage
-   exit 1
- fi
diff --git a/chromium/DESCR b/chromium/DESCR
new file mode 100644
index 0000000000..2a86084420
--- /dev/null
+++ b/chromium/DESCR
@@ -0,0 +1,3 @@
+Chromium is an open-source browser project that aims to build a
+safer, faster, and more stable way for all Internet users to
+experience the web.
diff --git a/chromium/Makefile b/chromium/Makefile
new file mode 100644
index 0000000000..446033fdd7
--- /dev/null
+++ b/chromium/Makefile
@@ -0,0 +1,372 @@
+# $NetBSD: Makefile,v 1.14 2012/09/24 18:26:53 asau Exp $
+
+DISTNAME=	chromium-56.0.2924.87
+CATEGORIES=	www
+MASTER_SITES=	http://commondatastorage.googleapis.com/chromium-browser-official/
+EXTRACT_SUFX=	.tar.xz
+
+MAINTAINER=	ryoon%NetBSD.org@localhost
+HOMEPAGE=	http://www.chromium.org/Home
+COMMENT=	Chromium web browser
+LICENSE=	modified-bsd AND gnu-lgpl-v3 AND mpl-2.0
+
+USE_TOOLS+=	bash bison flex:pkgsrc gmake pax perl pkg-config
+TOOLS_PLATFORM.flex=   # override the platform definition to use pkgsrc's flex.
+USE_LANGUAGES=	c c++
+
+BUILD_DEPENDS+=	gperf>=3.0.1:../../devel/gperf
+BUILD_DEPENDS+=	yasm-[0-9]*:../../devel/yasm
+BUILD_DEPENDS+=	ninja-build-[0-9]*:../../devel/ninja-build
+BUILD_DEPENDS+=	${PYPKGPREFIX}-html5lib-[0-9]*:../../textproc/py-html5lib
+BUILD_DEPENDS+=	${PYPKGPREFIX}-beautifulsoup4-[0-9]*:../../www/py-beautifulsoup4
+BUILD_DEPENDS+=	${PYPKGPREFIX}-ply-[0-9]*:../../devel/py-ply
+
+DEPENDS+=	xdg-utils-[0-9]*:../../misc/xdg-utils
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/compiler.mk"
+
+#ONLY_FOR_PLATFORM+=	*-*-arm # not tested yet
+ONLY_FOR_PLATFORM+=	*-*-x86_64
+
+# Workaround
+BUILDLINK_TRANSFORM.NetBSD+=	rm:-ldl
+
+REPLACE_BASH=		chrome/tools/build/linux/chrome-wrapper
+SUBST_CLASSES+=		path
+SUBST_STAGE.path=	post-patch
+SUBST_MESSAGE.path=	Fixing pkg path
+SUBST_FILES.path+=	chrome/common/chrome_paths.cc
+SUBST_SED.path+=	-e 's:/usr/local/:${PREFIX}/:'
+
+CFLAGS+=		-fno-stack-protector
+
+.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/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/inspector_protocol \
+		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 \
+		v8/third_party/inspector_protocol \
+		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.
+GN_ARGS+=	proprietary_codecs=true \
+		ffmpeg_branding="Chrome"
+
+GN_ARGS+=	use_gconf=false \
+		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 \
+		is_clang=false \
+		enable_webrtc=false \
+		use_gnome_keyring=true
+GN_ARGS+=	extra_cxxflags="-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
+
+GN_BOOTSTRAP_FLAGS+=	--no-clean --no-rebuild
+
+# API key and OAuth credential for Google.
+# This is pkgsrc use only.
+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
+
+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/remove_bundled_libraries.py \
+		${KEEPLIBS} --do-remove \
+			|| ${FALSE}
+
+	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
+
+# 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:
+	cd ${WRKSRC} && \
+	${SETENV} ${MAKE_ENV} \
+		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
+.for i in ${ICON_SIZES}
+ICONS_DIR${i}+=		share/icons/hicolor/${i}x${i}/apps
+INSTALLATION_DIRS+=	${ICONS_DIR${i}}
+.endfor
+
+CHROMIUM_PROGS+=	chrome
+CHROMIUM_SCRIPTS+=	chrome-wrapper
+
+CHROMIUM_FILES+=	chrome.1
+CHROMIUM_FILES+=	chrome_100_percent.pak
+CHROMIUM_FILES+=	chrome_200_percent.pak
+CHROMIUM_FILES+=	icudtl.dat
+CHROMIUM_FILES+=	keyboard_resources.pak
+CHROMIUM_FILES+=	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
+.for i in ${CHROMIUM_FILES}
+	${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${i} \
+		${DESTDIR}${PREFIX}/${CHROMIUM_DIR}
+.endfor
+	cd ${DESTDIR}${PREFIX}/bin && \
+		${LN} -sf ../${CHROMIUM_DIR}/chrome .
+	${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/chrome.1 \
+		${DESTDIR}/${PREFIX}/${PKGMANDIR}/man1
+.for i in ${ICON_SIZES}
+	${INSTALL_DATA} ${WRKSRC}/chrome/app/theme/chromium/product_logo_${i}.png \
+		${DESTDIR}${PREFIX}/${ICONS_DIR${i}}/chrome.png
+.endfor
+.for i in locales resources
+	cd ${WRKSRC}/out/${BUILDTYPE} && \
+		${FIND} ${i} -type f -print | \
+		pax -rw -pmp ${DESTDIR}${PREFIX}/${CHROMIUM_DIR}
+.endfor
+
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../audio/speech-dispatcher/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"
+.include "../../x11/libdrm/buildlink3.mk"
+.include "../../textproc/expat/buildlink3.mk"
+.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 "../../graphics/libexif/buildlink3.mk"
+.include "../../fonts/fontconfig/buildlink3.mk"
+.include "../../security/libgcrypt/buildlink3.mk"
+.include "../../textproc/jsoncpp/buildlink3.mk"
+.include "../../devel/nspr/buildlink3.mk"
+.include "../../devel/nss/buildlink3.mk"
+.include "../../sysutils/pciutils/buildlink3.mk"
+# Use -lpciutils instead of -lpci under NetBSD.
+BUILDLINK_TRANSFORM.NetBSD+=	opt:-lpci:-lpciutils
+.include "../../graphics/png/buildlink3.mk"
+.include "../../devel/re2/buildlink3.mk"
+.include "../../devel/snappy/buildlink3.mk"
+.include "../../audio/speex/buildlink3.mk"
+.include "../../graphics/libwebp/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../textproc/libxslt/buildlink3.mk"
+.include "../../devel/dconf/buildlink3.mk"
+.include "../../x11/gtk2/buildlink3.mk"
+.include "../../x11/gtk3/buildlink3.mk"
+.include "../../x11/scrnsaverproto/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXcomposite/buildlink3.mk"
+.include "../../x11/xcursor/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../x11/libXdamage/buildlink3.mk"
+.include "../../x11/libXfixes/buildlink3.mk"
+.include "../../x11/libXi/buildlink3.mk"
+.include "../../x11/xproto/buildlink3.mk"
+.include "../../x11/libXrandr/buildlink3.mk"
+.include "../../x11/libXrender/buildlink3.mk"
+.include "../../x11/libXScrnSaver/buildlink3.mk"
+.include "../../x11/libXtst/buildlink3.mk"
+.include "../../archivers/bzip2/buildlink3.mk"
+.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/PLIST b/chromium/PLIST
new file mode 100644
index 0000000000..3c89ac297c
--- /dev/null
+++ b/chromium/PLIST
@@ -0,0 +1,216 @@
+@comment $NetBSD$
+bin/chrome
+chrome/chrome
+chrome/chrome-wrapper
+chrome/chrome.1
+chrome/chrome_100_percent.pak
+chrome/chrome_200_percent.pak
+chrome/icudtl.dat
+chrome/keyboard_resources.pak
+chrome/locales/am.pak
+chrome/locales/ar.pak
+chrome/locales/bg.pak
+chrome/locales/bn.pak
+chrome/locales/ca.pak
+chrome/locales/cs.pak
+chrome/locales/da.pak
+chrome/locales/de.pak
+chrome/locales/el.pak
+chrome/locales/en-GB.pak
+chrome/locales/en-US.pak
+chrome/locales/es-419.pak
+chrome/locales/es.pak
+chrome/locales/et.pak
+chrome/locales/fa.pak
+chrome/locales/fi.pak
+chrome/locales/fil.pak
+chrome/locales/fr.pak
+chrome/locales/gu.pak
+chrome/locales/he.pak
+chrome/locales/hi.pak
+chrome/locales/hr.pak
+chrome/locales/hu.pak
+chrome/locales/id.pak
+chrome/locales/it.pak
+chrome/locales/ja.pak
+chrome/locales/kn.pak
+chrome/locales/ko.pak
+chrome/locales/lt.pak
+chrome/locales/lv.pak
+chrome/locales/ml.pak
+chrome/locales/mr.pak
+chrome/locales/ms.pak
+chrome/locales/nb.pak
+chrome/locales/nl.pak
+chrome/locales/pl.pak
+chrome/locales/pt-BR.pak
+chrome/locales/pt-PT.pak
+chrome/locales/ro.pak
+chrome/locales/ru.pak
+chrome/locales/sk.pak
+chrome/locales/sl.pak
+chrome/locales/sr.pak
+chrome/locales/sv.pak
+chrome/locales/sw.pak
+chrome/locales/ta.pak
+chrome/locales/te.pak
+chrome/locales/th.pak
+chrome/locales/tr.pak
+chrome/locales/uk.pak
+chrome/locales/vi.pak
+chrome/locales/zh-CN.pak
+chrome/locales/zh-TW.pak
+chrome/resources.pak
+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
+chrome/resources/inspector/Images/breakpointConditional_2x.png
+chrome/resources/inspector/Images/breakpoint_2x.png
+chrome/resources/inspector/Images/checker.png
+chrome/resources/inspector/Images/chromeDisabledSelect.png
+chrome/resources/inspector/Images/chromeDisabledSelect_2x.png
+chrome/resources/inspector/Images/chromeLeft.png
+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/deleteIcon.png
+chrome/resources/inspector/Images/domain.png
+chrome/resources/inspector/Images/errorWave.png
+chrome/resources/inspector/Images/errorWave_2x.png
+chrome/resources/inspector/Images/fileSystem.png
+chrome/resources/inspector/Images/forward.png
+chrome/resources/inspector/Images/frame.png
+chrome/resources/inspector/Images/ic_info_black_18dp.svg
+chrome/resources/inspector/Images/ic_warning_black_18dp.svg
+chrome/resources/inspector/Images/navigationControls.png
+chrome/resources/inspector/Images/navigationControls_2x.png
+chrome/resources/inspector/Images/paneAddButtons.png
+chrome/resources/inspector/Images/paneFilterButtons.png
+chrome/resources/inspector/Images/paneRefreshButtons.png
+chrome/resources/inspector/Images/popoverArrows.png
+chrome/resources/inspector/Images/profileGroupIcon.png
+chrome/resources/inspector/Images/profileIcon.png
+chrome/resources/inspector/Images/profileSmallIcon.png
+chrome/resources/inspector/Images/radioDot.png
+chrome/resources/inspector/Images/resizeDiagonal.png
+chrome/resources/inspector/Images/resizeDiagonal_2x.png
+chrome/resources/inspector/Images/resizeHorizontal.png
+chrome/resources/inspector/Images/resizeHorizontal_2x.png
+chrome/resources/inspector/Images/resizeVertical.png
+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/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
+chrome/resources/inspector/Images/toolbarItemSelected.png
+chrome/resources/inspector/Images/toolbarResizerHorizontal.png
+chrome/resources/inspector/Images/toolbarResizerVertical.png
+chrome/resources/inspector/Images/touchCursor.png
+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/accessibility_module.js
+chrome/resources/inspector/animation/animation_module.js
+chrome/resources/inspector/audits/audits_module.js
+chrome/resources/inspector/audits2/audits2_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_compatibility.js
+chrome/resources/inspector/devtools_extension_api.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
+chrome/resources/inspector/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5-horizontal-navigation-1x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5-horizontal-navigation-2x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-default-1x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-default-2x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-keyboard-1x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-keyboard-2x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-navigation-1x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5-vertical-navigation-2x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-default-1x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-default-2x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-default-1x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-default-2x.png
+chrome/resources/inspector/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png
+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/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/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/layer_viewer/layer_viewer_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/terminal/terminal_module.js
+chrome/resources/inspector/text_editor/text_editor_module.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/ui_lazy_module.js
+chrome/resources/inspector/utility_shared_worker.js
+man/man1/chrome.1
+share/icons/hicolor/128x128/apps/chrome.png
+share/icons/hicolor/22x22/apps/chrome.png
+share/icons/hicolor/24x24/apps/chrome.png
+share/icons/hicolor/256x256/apps/chrome.png
+share/icons/hicolor/48x48/apps/chrome.png
+share/icons/hicolor/64x64/apps/chrome.png
diff --git a/chromium/TODO b/chromium/TODO
new file mode 100644
index 0000000000..a9e2ec6b03
--- /dev/null
+++ b/chromium/TODO
@@ -0,0 +1,5 @@
+To Do:
+
+* No html5 audio (video has no problem)
+* 'Passwords cryptographer error was encountered:' and
+  'Failed to receive encryption key from server.' errors
diff --git a/chromium/distinfo b/chromium/distinfo
new file mode 100644
index 0000000000..2e6af83759
--- /dev/null
+++ b/chromium/distinfo
@@ -0,0 +1,535 @@
+$NetBSD$
+
+SHA1 (chromium-56.0.2924.87.tar.xz) = e61013b257e0818be5d347cbb94070ddfb25cbe9
+RMD160 (chromium-56.0.2924.87.tar.xz) = 87ba33280652e0fa165d4ffb63c430e2a0f87bfc
+SHA512 (chromium-56.0.2924.87.tar.xz) = 1c154004a9bca73e2491c73520a5f7d5c50c5b9d66e8e2660bf46585dd9b6ad3db706a9d824356f319794fa790bc3918ae6199843bcba717b9e74efbf26882c9
+Size (chromium-56.0.2924.87.tar.xz) = 514429808 bytes
+SHA1 (patch-BUILD.gn) = 6048c60cbea6db3da66111983b287aa13c13b864
+SHA1 (patch-apps_ui_views_app__window__frame__view.cc) = 76d3579b2f0724da307e72abd745d0a2d06a1b2a
+SHA1 (patch-ash_display_mirror__window__controller.cc) = 7141713c7cd313283e93b1fcd2914d15053016d2
+SHA1 (patch-ash_shell.cc) = 815ff1639fc925cb18df91e15f17f3ea94295b72
+SHA1 (patch-base_BUILD.gn) = c0ae3f59abff661fea1720b1aa1c634eb863f72b
+SHA1 (patch-base_allocator_BUILD.gn) = 0f4e5fec23135798fd64cadd208958e9c2eb104a
+SHA1 (patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc) = 9c1fbbbd31d6ce2e2de3f1d242c2a0381182665c
+SHA1 (patch-base_allocator_allocator__shim__override__libc__symbols.h) = 36ae829fc99c7b21a52ef2f6fe6ac4f99c033caa
+SHA1 (patch-base_allocator_allocator__shim__unittest.cc) = 53c3dfd0a383f1e87e0595975ca48d4c784eb08b
+SHA1 (patch-base_base__paths__posix.cc) = e8fd62904c1d335829d24b6b7af6452111ed3e1e
+SHA1 (patch-base_debug_debugger__posix.cc) = 30f2f2f1050a43242b51003c02a9501faaa5de4f
+SHA1 (patch-base_debug_proc__maps__linux.cc) = 4802235584a8c50cd8fa8d3286c15dafd5921857
+SHA1 (patch-base_debug_stack__trace__posix.cc) = d0be4c5de5acec8a7f3bbc47f269001b839bb490
+SHA1 (patch-base_debug_thread__heap__usage__tracker.cc) = c0257b07c6b48bb8f81337a6331c171f5c446b16
+SHA1 (patch-base_files_file__path__unittest.cc) = 32d3ae1807ce7e6c7149db00206f3f7990792e23
+SHA1 (patch-base_files_file__path__watcher__kqueue.h) = d42bdcc35a81c0efc96960bb4876a4e463234a21
+SHA1 (patch-base_files_file__util.h) = 98b14b7428de66649a49009663a3088342ad8b62
+SHA1 (patch-base_linux__util.cc) = 55a969aaf3805f645bc9bf84ae7e338e51f69b8f
+SHA1 (patch-base_native__library__posix.cc) = dffa3c8e8350da3d27d59c403668b684d8bb09d5
+SHA1 (patch-base_posix_unix__domain__socket__linux.cc) = 664400c5d4dfb9c4508ea0c5d066daa38fca89cc
+SHA1 (patch-base_posix_unix__domain__socket__linux__unittest.cc) = 8ca74cf09df07f9d9181aa2d62b63f2f1c59cdce
+SHA1 (patch-base_process_internal__linux.h) = c2162d1c8b674a1f31e3c82466cde5a13fded50c
+SHA1 (patch-base_process_launch.cc) = 455fbcedb84e60beb40172a7f075b88e28791d9f
+SHA1 (patch-base_process_launch.h) = 3906250654b2a869ef13a5ff9f89ea9a78b6051f
+SHA1 (patch-base_process_launch__posix.cc) = 2827562545db2b3b7a41915756f95eff8b6c66c9
+SHA1 (patch-base_process_memory.h) = ba6ba94147feb6b831515b0a6d60d780db4d1880
+SHA1 (patch-base_process_memory__stubs.cc) = 9074b49015593afbb454730a76074aabd7a6b4cf
+SHA1 (patch-base_process_memory__unittest.cc) = ea90b76941baf283be5ecaac15e3de193e2504f6
+SHA1 (patch-base_process_process__handle__freebsd.cc) = 99ea09ebc94e273854a054c56d602b15a50a7fd2
+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) = bb5ef10a2e23ab1939e34ff71722036afa9efd38
+SHA1 (patch-base_process_process__iterator__netbsd.cc) = 54f8209180488a726127d75587295d6372fdf608
+SHA1 (patch-base_process_process__metrics.h) = ff68258a6b6811b63765c3ae955b8080420abb9a
+SHA1 (patch-base_process_process__metrics__freebsd.cc) = 3ae26aa1ba2f109f272d3fbeeb58609ccbace48e
+SHA1 (patch-base_process_process__metrics__netbsd.cc) = 488acce8faaf88f2295b57999f8ce5d106c65213
+SHA1 (patch-base_process_process__posix.cc) = adba10a7257113840403d9c672d5d849f483288d
+SHA1 (patch-base_profiler_stack__sampling__profiler__unittest.cc) = 3817093473a23924c01b3d2b38c809ae83d14df2
+SHA1 (patch-base_security__unittest.cc) = a698ce71858c0937598e73e3ced3ddc51aab465f
+SHA1 (patch-base_sys__info__freebsd.cc) = 51061da3c7f2d5f3e92e5f9d3b2a129a8a1d3335
+SHA1 (patch-base_sys__info__netbsd.cc) = 448098a286bf4c20402af9740b457e405dd351f3
+SHA1 (patch-base_sys__info__posix.cc) = d4eed955f2d6cf18fb9d40e28493d4507b8e91a2
+SHA1 (patch-base_test_BUILD.gn) = 12c2c621632c4d86d8a90d67e891a05f25116e94
+SHA1 (patch-base_test_launcher_test__launcher.cc) = 631d1d63d4ecf6e0c7af9369ce7471760819b13c
+SHA1 (patch-base_test_test__file__util__posix.cc) = 737464deacae03303871c09d3925c2ffd4f4ff37
+SHA1 (patch-base_third__party_libevent_BUILD.gn) = 111e8801e7045554f05484414e0a0a5c6c528972
+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.h) = 92c741da852ef6829aff32ba9d85771d70b7a13c
+SHA1 (patch-base_threading_platform__thread__linux.cc) = 9a352369d04ca37eb49fa483c4a2401649371b87
+SHA1 (patch-base_threading_platform__thread__netbsd.cc) = f6c99ab4d517bf45a56f71b7e03b64f4c2a7b91b
+SHA1 (patch-base_threading_platform__thread__posix.cc) = 36243fea738ee1754002fda9de3c1ee26298a36d
+SHA1 (patch-base_trace__event_malloc__dump__provider.cc) = b048f40e508b905e4356c990f405d3eeb7dd23f8
+SHA1 (patch-base_trace__event_process__memory__dump.cc) = 209b645e6523d9589bc843e660ee583937e31cb9
+SHA1 (patch-base_trace__event_process__memory__dump.h) = b60638b9cc5148b22c99e2e7c32711b8a6d93cbe
+SHA1 (patch-breakpad_BUILD.gn) = 64c1f4aa0e32381125e3c91794417c70f0ef522c
+SHA1 (patch-build_config_BUILD.gn) = 7daeac790c6fb9236e7a33106100154bef9c1d32
+SHA1 (patch-build_config_BUILDCONFIG.gn) = 87b601fb278e7fdd8bb3e31a7f587bc5148f305b
+SHA1 (patch-build_config_allocator.gni) = 283f97567088a3ee4157d71df4742e73826523d1
+SHA1 (patch-build_config_clang_BUILD.gn) = d07f0efc3be516fe30d6bb42862be8f47c6b7517
+SHA1 (patch-build_config_compiler_BUILD.gn) = e671a2b0015d1abfe619643e12ffcf2e5c0278c2
+SHA1 (patch-build_config_crypto.gni) = a59011431c313ee572496eb385de50cadfebf729
+SHA1 (patch-build_config_features.gni) = 46c95ef1ccb7b347df04b90d7e9037cfba77b4b4
+SHA1 (patch-build_config_linux_gtk2_BUILD.gn) = a3c70c55d87dd240238fe193e7c336684bb71dea
+SHA1 (patch-build_config_linux_gtk3_BUILD.gn) = f2203c0b39c528e2a08beb9efc5d74ee11e06be2
+SHA1 (patch-build_config_linux_pkg-config.py) = 3856027edc929121a0acc21fd7cfe1c8ba431a70
+SHA1 (patch-build_config_sanitizers_BUILD.gn) = 2b8baf65102d78505c033ae9f38a151ed37695a7
+SHA1 (patch-build_config_sanitizers_sanitizers.gni) = 7d9cff7979c927eb6149b93871b8e18a42805bea
+SHA1 (patch-build_config_ui.gni) = 144b705d185e77b975681fb5b78be429ab2d75be
+SHA1 (patch-build_linux_libpci_BUILD.gn) = 37d53722dd1fdd8e2a51848197c91fa7d6676315
+SHA1 (patch-build_secondary_third__party_nss_BUILD.gn) = 826532cdd5c045b8d19f733db156fe4649997b39
+SHA1 (patch-build_toolchain_gcc__toolchain.gni) = 01d1054a64792ed1a98394d695d614f84f523be2
+SHA1 (patch-build_toolchain_get__concurrent__links.py) = 86e1889df43be2722b60d1b26783db7248890964
+SHA1 (patch-cc_layers_scrollbar__layer__impl__base.cc) = 49edea56caa1d4c78cc0edd274ea0e8ac4b2e54a
+SHA1 (patch-cc_trees_property__tree.cc) = 9393e1f8027990957b6757776f793cc3509bb6fa
+SHA1 (patch-chrome_BUILD.gn) = 02f9dc0c174a739e7c1281e3c361aa7afacd51db
+SHA1 (patch-chrome_app_chrome__command__ids.h) = 7b2ed24ca1577423ba82eaff8213967520322ae4
+SHA1 (patch-chrome_app_chrome__main__delegate.cc) = 6142c823e9ee7e850e717ddd15de233f4f69217c
+SHA1 (patch-chrome_app_chrome__main__delegate.h) = a4649ca8fe030669dc2605d352e4ab5ff8297bbd
+SHA1 (patch-chrome_app_chromium__strings.grd) = f650e2dafad1a1266fc9cfacaf09c8ae7ea19e2d
+SHA1 (patch-chrome_app_generated__resources.grd) = 7d670ee5479b1f51225aca15de11f90f57ccdc43
+SHA1 (patch-chrome_app_resources_locale__settings.grd) = 7e7fc563a6c0d6a722e480afcc1654f5c893ffe3
+SHA1 (patch-chrome_browser_BUILD.gn) = ab9e6a27cd9b980591facc3f09406ab7d23c2964
+SHA1 (patch-chrome_browser_about__flags.cc) = 81bd82c14804ff4a5591b8298b6e56ef383a765d
+SHA1 (patch-chrome_browser_browser__process__impl.cc) = 0185bbc785142d5979e056c0b38320d4fc22c27f
+SHA1 (patch-chrome_browser_browser__process__impl.h) = ddb9153d789977daa8ab41e3e40b8dfc3d821b4d
+SHA1 (patch-chrome_browser_browser__resources.grd) = b8daeccd22c9ca276ee63284225433e24dd57ee6
+SHA1 (patch-chrome_browser_chrome__browser__main.cc) = 8339e9a23fc5ad838a1026e2b7782ed3a4c38cd0
+SHA1 (patch-chrome_browser_chrome__browser__main__linux.cc) = 5d5c6e0ff8c085a0f104b54950db6e305c3daae5
+SHA1 (patch-chrome_browser_chrome__browser__main__posix.cc) = 34d77c519c75ca27ae54a346a4d5ccbc251f320e
+SHA1 (patch-chrome_browser_chrome__content__browser__client.cc) = 050aac3666c7893ba3c0fe635793caea4563145d
+SHA1 (patch-chrome_browser_chrome__content__browser__client.h) = 79e8340b8001e8d0377fa9657582ab8e4abf144e
+SHA1 (patch-chrome_browser_defaults.cc) = 2e72fa88deac85509144dd1e7f071eb07d5c46ee
+SHA1 (patch-chrome_browser_diagnostics_diagnostics__writer.cc) = 98af97d2c9c3dfd1dc042175e83159d8ad075550
+SHA1 (patch-chrome_browser_diagnostics_diagnostics__writer.h) = 8015a6b250fb754d1c2b77c7c769d31e773bf499
+SHA1 (patch-chrome_browser_download_chrome__download__manager__delegate.cc) = b7caae84f3c31e16c7ee87cad668bf50c828962d
+SHA1 (patch-chrome_browser_download_download__commands.cc) = a6090d16a689e71f7052fbcfe3acd5c94a8ce8fc
+SHA1 (patch-chrome_browser_download_download__commands.h) = 3d9c10c5918207500b650bf9496a548eadcec175
+SHA1 (patch-chrome_browser_download_download__prefs.cc) = 0038d04198dc493f165756d981e55dd07299949a
+SHA1 (patch-chrome_browser_download_download__prefs.h) = 157dd4d34dbcabb62c46a4a5488dc8545f901680
+SHA1 (patch-chrome_browser_download_download__query.cc) = 95b6f39cd5e157c00bb1e1991cbd885f9cbe8cb3
+SHA1 (patch-chrome_browser_download_download__shelf__context__menu.cc) = efe1dbde0e4a4371e920c3a5f8f7825ac94804cf
+SHA1 (patch-chrome_browser_extensions_BUILD.gn) = 8dd2413364b90dce048de381ad5f5160b42a6cb9
+SHA1 (patch-chrome_browser_extensions_activity__log_activity__log.cc) = ef50853e6823a10f6fa5789d42d00dddda7fe16f
+SHA1 (patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc) = 4f3e04b4c407a8af8ed136507384100b3acd2da6
+SHA1 (patch-chrome_browser_extensions_api_input__ime_input__ime__api.h) = 114d2c6b9a6285ea8993d7ee65160fc3b65e8bdd
+SHA1 (patch-chrome_browser_extensions_api_messaging_message__service.cc) = 3d7c829d9c53e3ff50ea5a43962c5bc0b139ef75
+SHA1 (patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc) = 3c4f3bf57adb21a6c49a94e8a464fd0168fbf6ab
+SHA1 (patch-chrome_browser_extensions_api_omnibox_omnibox__api.cc) = 038e251f01e1f1fc0ed51b4ba8048922388f6c33
+SHA1 (patch-chrome_browser_extensions_bookmark__app__helper.cc) = b181086905a69b7fbde4e3d1d81ec894c737030c
+SHA1 (patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc) = 2a7f0f4e7b3bd6e26f0997d0d0f8a47a8066c80b
+SHA1 (patch-chrome_browser_extensions_external__provider__impl.cc) = f9821c7000bd24eb68bc13693c2313fa6fd08e03
+SHA1 (patch-chrome_browser_gpu_gl__string__manager.cc) = 7c103a3228cb7592af6c0cd2d5a5deaf31497c4b
+SHA1 (patch-chrome_browser_gpu_gpu__feature__checker.cc) = 065079005d4385525ece3059750d52d62f72fe74
+SHA1 (patch-chrome_browser_interstitials_chrome__controller__client.cc) = e035e6cce4b858f0389a52857905e3fa93ca4dd9
+SHA1 (patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc) = 8af06656ac60a4e7276aa003ae34c599a06b2559
+SHA1 (patch-chrome_browser_media__galleries_media__file__system__registry.cc) = 73a8a83f0606ce8d72e5d5257e632e22f7e5b0bc
+SHA1 (patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc) = cf5abc7ab023af031e4907a988b60d3599cd57c7
+SHA1 (patch-chrome_browser_memory__details.cc) = 53c7aaf8f168fdaca7809c5a2dabdf8429c80538
+SHA1 (patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc) = 1958dbf3e6a86446634a28c64fb3050c299e3c09
+SHA1 (patch-chrome_browser_net_async__dns__field__trial.cc) = 76d325d9e7dc62915b9b0163cf569840f44a2291
+SHA1 (patch-chrome_browser_notifications_message__center__notification__manager.cc) = ef2bd49bc9a369ea7656301bdc0e25b0de5b8b4a
+SHA1 (patch-chrome_browser_password__manager_chrome__password__manager__client.cc) = dc1e714c8c7d84c6e7943b032987815d8ac0c57f
+SHA1 (patch-chrome_browser_platform__util.h) = 02961d907d6dc9ff2b7de32ecf4a816d30306acd
+SHA1 (patch-chrome_browser_plugins_plugins__resource__service.cc) = a598526f4f3409cddf25b70c92d580b6690f07e7
+SHA1 (patch-chrome_browser_policy_policy__prefs__browsertest.cc) = 0f8e7eb949a841a5c0351a3d11531e0c47b3082e
+SHA1 (patch-chrome_browser_process__singleton__posix.cc) = 44a6848e9ac1a8fbafcbe781ad5dc382933fd37d
+SHA1 (patch-chrome_browser_profiles_profile__impl__io__data.cc) = 543fda0451574ebec094a52bb9d0c7511be71f78
+SHA1 (patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc) = e44138efd5ca8226bcdcc9948dfc430a0b7b133d
+SHA1 (patch-chrome_browser_renderer__preferences__util.cc) = cdc68c0bc56e8a3ec233beda627db8cb610193eb
+SHA1 (patch-chrome_browser_resources_safe__browsing_BUILD.gn) = 021d7277b75289c10e21d9c38b7889cfbd92fcde
+SHA1 (patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py) = 3cbc7d3fd66beb36a8cd15c3aaa5ef1df8b38cae
+SHA1 (patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc) = 56e41a0159bef13be9b8419b21a49013d3ef10a0
+SHA1 (patch-chrome_browser_safe__browsing_permission__reporter.cc) = f2ea8baba1f9cbb83e36aad209c03fb3fa10f0dc
+SHA1 (patch-chrome_browser_search_local__files__ntp__source.cc) = a04837a51941731d1967c318b2c05cfa24b83ff5
+SHA1 (patch-chrome_browser_speech_tts__controller__impl.cc) = 3a55fc9ca8d5da84894543477bf7a3fa456b33c5
+SHA1 (patch-chrome_browser_sync_chrome__sync__client.cc) = 5b8798b3179d20b9f5e2029d34356ca8d9418d52
+SHA1 (patch-chrome_browser_tracing_crash__service__uploader.cc) = 45ba210a84e11435d6fa31911dffa878093c5791
+SHA1 (patch-chrome_browser_ui_BUILD.gn) = c2dbe5d13ea4623941516e8d4a3e4403e5935e5f
+SHA1 (patch-chrome_browser_ui_browser__command__controller.cc) = d7d14479ce929c87f07679984457ef65c7226abc
+SHA1 (patch-chrome_browser_ui_browser__view__prefs.cc) = f618b9e9693f8430bebd64f5052dbc04893ddbe2
+SHA1 (patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc) = d01c2578f5411d1b418749af64e830d375396de0
+SHA1 (patch-chrome_browser_ui_input__method_input__method__engine__base.cc) = ac8af05e91fd4b33a674919256c702762c370d89
+SHA1 (patch-chrome_browser_ui_libgtkui_BUILD.gn) = eedad9ee346ea44c753d0206dc6587765b200c34
+SHA1 (patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc) = a8707e2d092c935789247560d0cf16c2aa6c9f73
+SHA1 (patch-chrome_browser_ui_startup_bad__flags__prompt.cc) = f9770251e55413dda294a664609f8e186b774a86
+SHA1 (patch-chrome_browser_ui_startup_startup__browser__creator.cc) = 965cdbb563e64fee00085a6aa98fa20f602bd3a0
+SHA1 (patch-chrome_browser_ui_toolbar_app__menu__model.cc) = 48a8ee0711c57816e21ab113b1c11e32611ae322
+SHA1 (patch-chrome_browser_ui_views_accelerator__table.cc) = 819da9d3708d047f3e513201e3346bfd565f085c
+SHA1 (patch-chrome_browser_ui_views_app__list_linux_app__list__linux.cc) = 7859cf07fc98d53d5b0142e5c6e8ef53bf53f7d2
+SHA1 (patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc) = c6c07d270e74c1a6d414957cace59ec3f9ab4dba
+SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate.cc) = fef0851b52dbea59e40a61376d6e87c71128c1e7
+SHA1 (patch-chrome_browser_ui_views_chrome__views__delegate.h) = d7310defa00496896aa955f39e913af2f28232af
+SHA1 (patch-chrome_browser_ui_views_first__run__dialog.cc) = 78a209320e84fa425599d17379eea14f87c3cb40
+SHA1 (patch-chrome_browser_ui_views_frame_browser__frame.cc) = e5fea87674a86f2b1796dec132f441b844677e96
+SHA1 (patch-chrome_browser_ui_views_frame_browser__view.cc) = 4a4fc1d6f17038a47301fe4c35bd9b60d149807c
+SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc) = 6f489c9c61b7a30b4fde02d507becf0e08a43c53
+SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc) = 589b83adde98f7cffe95d6e95ead97bf95a07e26
+SHA1 (patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc) = 62b38d89d596792e6ff421ec380c2b3d0215be89
+SHA1 (patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc) = 442b0ee850ac14c63ccad7295401fc7805934c3b
+SHA1 (patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc) = c8600c8db1aec759d65fc9a461c54ef5e7c72f46
+SHA1 (patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc) = e3555377623180fe8df59e1689f97fdce952edd1
+SHA1 (patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc) = 4a79877c4be2aebe2e07943f45b844b786fef7a8
+SHA1 (patch-chrome_browser_ui_views_tabs_tab__strip.cc) = e2ea9c649d517cbc2888f17f790093ffede41ea6
+SHA1 (patch-chrome_browser_ui_webui_about__ui.cc) = ce1a516bc0b6881145e6498e44559cc4ee29bdb0
+SHA1 (patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc) = e8bc888b2eadc969275ec9ff6ecac2480140346a
+SHA1 (patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc) = 8143a8a455277f057062a14541c0fc308ba3a35d
+SHA1 (patch-chrome_browser_ui_webui_options_browser__options__handler.cc) = c5764424d21a3022f33c1a3e87de8a86fbb3f67e
+SHA1 (patch-chrome_browser_ui_webui_options_browser__options__handler.h) = 62ffd0d9310a086d2c6db116e0055662c73068e0
+SHA1 (patch-chrome_browser_web__applications_web__app.cc) = c2a5af55ff27df7ba5d701d16c4bb8b94320b23e
+SHA1 (patch-chrome_browser_web__applications_web__app.h) = d362a9860a4f590139c95ed18beca53209b309dc
+SHA1 (patch-chrome_common_BUILD.gn) = 6d49f47c8220bc2d1ec8b4c1b4713579bfcf8dc2
+SHA1 (patch-chrome_common_chrome__paths.cc) = 24b9d60d7c9d74f0ffbbf632b7e29214a02c7e87
+SHA1 (patch-chrome_common_chrome__paths.h) = 313aecbf902f290511d8b4b5cd60e6131d60ddbf
+SHA1 (patch-chrome_common_chrome__paths__internal.h) = c594933e121aef567704ff8b320e74d5607180cb
+SHA1 (patch-chrome_common_chrome__switches.cc) = 7db509b709f09a297f6ae38102b2be92aa8136e8
+SHA1 (patch-chrome_common_chrome__switches.h) = 4571795580c3f5b728e507ba438d11b3ac76cab7
+SHA1 (patch-chrome_common_extensions_chrome__extensions__client.cc) = f83638a591859ab3553d03056ae55c684205c13f
+SHA1 (patch-chrome_common_extensions_command.cc) = b3e885e06a733c5a6b983725bde9ad6a5b10034c
+SHA1 (patch-chrome_common_features.gni) = a9129b9da584eef5212dde89ba3e5ad5b1cc5883
+SHA1 (patch-chrome_common_pref__names.cc) = 67ca61bc30e064beaaf529143e1956d2862afbae
+SHA1 (patch-chrome_common_pref__names.h) = 7efbd95d4d27a3deaca66118d22265a50d83f064
+SHA1 (patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc) = 2dd7048006e7b92a3ff5ef90e0bdfe6ebec712e5
+SHA1 (patch-chrome_renderer_pepper_pepper__flash__font__file__host.h) = 02485704079526c439c6b50b49cbeec5ff9d8934
+SHA1 (patch-chrome_test_BUILD.gn) = d418acd6a1148942f8dff3b819fb1d93d7a31026
+SHA1 (patch-chrome_test_base_in__process__browser__test.cc) = 19e68dbb99cdcc97d7cc1008cb7b7ed6644a3b77
+SHA1 (patch-chrome_test_base_testing__browser__process.h) = 298b75baaea7b62a41e6df1ef59beda2e1c07afa
+SHA1 (patch-chrome_test_chromedriver_chrome_chrome__finder.cc) = 172d429f3f7f1cd3235849ada09cd96241914769
+SHA1 (patch-chromecast_BUILD.gn) = 79d9f7fdc95095f5dc8ed374bb81f9003094ff84
+SHA1 (patch-chromecast_browser_BUILD.gn) = d97d74bf663c154bc0627017922f5958d2579b71
+SHA1 (patch-chromecast_browser_metrics_BUILD.gn) = 2c85d6da0dccc443f46a4adb7af6101029aa5fc1
+SHA1 (patch-chromecast_crash_BUILD.gn) = 7a0cd494b0fb342734454bccf322bc808eddeae5
+SHA1 (patch-components_BUILD.gn) = 00a0c4a5b98dc071f82724955c553b4266859f83
+SHA1 (patch-components_autofill_content_renderer_password__form__conversion__utils.cc) = 70b5313c7b25ec8462b207c1ada10d92f0fa535e
+SHA1 (patch-components_content__settings_core_browser_website__settings__registry.cc) = dec58b392c59da35f5331f3f54f942d388670154
+SHA1 (patch-components_content__settings_core_browser_website__settings__registry.h) = fab24d4f0f6cf957dc08fc4e48af2071188d6082
+SHA1 (patch-components_cookie__config_cookie__store__util.cc) = d73103abf8961044fedbe9bb5112f284653e9242
+SHA1 (patch-components_crash_content_app_BUILD.gn) = d8a45e9fe48f59e495751094ed58a5999a12ca8a
+SHA1 (patch-components_crash_content_browser_BUILD.gn) = ef7fd3ac6e2a84f46af8b254a107c68145513e4a
+SHA1 (patch-components_drive_drive__api__util.cc) = 230f11239d7bcb97b5611471928048f5aca24779
+SHA1 (patch-components_feedback_anonymizer__tool.cc) = 6250a9a5ecbec5b2605aa17544d8188f075b1013
+SHA1 (patch-components_flags__ui_flags__state.cc) = b44a39227aed271e30818cf18c011ed1d70b3ecf
+SHA1 (patch-components_gcm__driver_gcm__client.h) = 139bc9ff8098f0300aa979924dfc2c14c72aa6d3
+SHA1 (patch-components_gcm__driver_gcm__client__impl.cc) = 82462f82152e5f9f336046e0e1a3e5f79573827b
+SHA1 (patch-components_json__schema_json__schema__validator.cc) = 7a4841ec66ce0f418898bbc93862ddeedc3bda5b
+SHA1 (patch-components_keyed__service_core_dependency__graph__unittest.cc) = 6d470f79f381f91eedc96fe2863d89d9043620df
+SHA1 (patch-components_metrics_BUILD.gn) = 07e315597bab3823d479d066801fd0a4d6b2efe1
+SHA1 (patch-components_metrics_drive__metrics__provider__linux.cc) = cb3159f933daeebca8e44f950c2bdf02bd2bd6c2
+SHA1 (patch-components_metrics_system__memory__stats__recorder__linux.cc) = 57c6fb34359ffd26290fc2ed617504f175336654
+SHA1 (patch-components_neterror_resources_neterror.js) = 0bdd9d42e0d8c39db8be1189f81576e841018bd8
+SHA1 (patch-components_os__crypt_os__crypt.h) = 869ab4055b52e4368325de11ba68415f1e6d8a66
+SHA1 (patch-components_password__manager_core_browser_import_csv__reader.cc) = 24a50fe54bd53ad92e67f25bda1ead0f5accfc08
+SHA1 (patch-components_plugins_renderer_BUILD.gn) = 336c33401570155cdb81c5f2a5beb2974540d1ad
+SHA1 (patch-components_plugins_renderer_plugin__placeholder.cc) = f238b6fe143364e005883655d107ede068c61737
+SHA1 (patch-components_policy_BUILD.gn) = 2cb937986acc3556611a72e0216828e93d871694
+SHA1 (patch-components_policy_core_common_schema.cc) = 48392fb5005843a23353d178769372031faa8655
+SHA1 (patch-components_policy_resources_policy__templates.json) = 422c5d2fafddf21bde7e1f8d7e2768d3753dc775
+SHA1 (patch-components_policy_tools_generate__policy__source.py) = 37f6235ed99ae1ee87b7874773e4b575ed09bd7b
+SHA1 (patch-components_storage__monitor_BUILD.gn) = cbd07b6cb950b5af8eb0e3ddf6ea2ee9b39342a5
+SHA1 (patch-components_storage__monitor_storage__monitor.cc) = b7261eb26826a96fcd025894eb3d81259ebb32fb
+SHA1 (patch-components_storage__monitor_storage__monitor__freebsd.cc) = deeab8c51dc1bd368187ff6e4f9f6460aecead48
+SHA1 (patch-components_storage__monitor_storage__monitor__freebsd.h) = 87a16600e113b8bb9f72c6f0961058639e6ff608
+SHA1 (patch-components_storage__monitor_storage__monitor__netbsd.cc) = 944b7b24b3ecfccf7dba2d6bacab354539283ba4
+SHA1 (patch-components_storage__monitor_storage__monitor__netbsd.h) = 97ca19c232db4ad7c101c8a93db9fe43c7e0e2b7
+SHA1 (patch-components_sync_base_get__session__name__linux.cc) = 4370a8bdcb86674079e7159dcb18a37d57eaa257
+SHA1 (patch-components_update__client_update__query__params.cc) = 681dbd9725ed133a176d6641c48f6d6da035b393
+SHA1 (patch-components_url__matcher_regex__set__matcher.cc) = 329ba2c60bf889ced828c7020ac2ff19c2d764d3
+SHA1 (patch-components_url__matcher_url__matcher__factory.cc) = 5694c8f4ccdf9892a34ec071bf3658aa2b2e5a51
+SHA1 (patch-components_variations_proto_study.proto) = e5a28deb1ffd89fae109487689d9b01ceb3c6eb5
+SHA1 (patch-components_webcrypto_algorithms_test__helpers.cc) = a8d7105dd6009c225f5f3f967ab5f032473c476e
+SHA1 (patch-content_app_BUILD.gn) = 46e17d36d0b197b60de540732802c01c6ceee5c6
+SHA1 (patch-content_app_content__main__runner.cc) = f036e7d51143f12ef72afbfce5bc490d5be0b2b9
+SHA1 (patch-content_browser_BUILD.gn) = da63237339853693332ad0bce86ca0d6d8d011dd
+SHA1 (patch-content_browser_accessibility_browser__accessibility.h) = 8c6025bd481cdf35f1f1092dcb69a1d2379c13b6
+SHA1 (patch-content_browser_accessibility_browser__accessibility__manager.h) = 437098b5cb500ae0a699dc4b225e0bc7ddd2c372
+SHA1 (patch-content_browser_browser__main__loop.cc) = 45d6a690e931897bbbfcebda8b1cede4883805e8
+SHA1 (patch-content_browser_child__process__launcher.cc) = d566caca1f3a9aa2158f42f767fa78d59392f2af
+SHA1 (patch-content_browser_device__sensors_data__fetcher__shared__memory.h) = 1a8722be4984b40f67ec77d113abbb7b811f553c
+SHA1 (patch-content_browser_devtools_protocol_color__picker.cc) = 4e072b93d55ea86551c447d76340b2da289dc768
+SHA1 (patch-content_browser_download_base__file.cc) = 0db5df05ffa32649e1a7bcff411be372c5b8b7a9
+SHA1 (patch-content_browser_gpu_gpu__data__manager__impl__private.cc) = 982aef11bbd264113c5ab921d680ff9d4284feb9
+SHA1 (patch-content_browser_gpu_gpu__data__manager__impl__private.h) = 85b0b23e5fa89667cbab645a98c19852a61de530
+SHA1 (patch-content_browser_gpu_gpu__internals__ui.cc) = a54f02ffcc526b00f2b4557f275d7cb274f42da2
+SHA1 (patch-content_browser_gpu_gpu__process__host.cc) = 3245bc1d9983dd086d4dac521874bc4cc9aa7c7b
+SHA1 (patch-content_browser_media_media__internals.cc) = 310e14611666e0b971ec3ff4eeb7a5eff9d79f39
+SHA1 (patch-content_browser_memory_memory__coordinator__impl.cc) = c3da87398cc5b3d492088f6d5af2e2cf56b17566
+SHA1 (patch-content_browser_memory_memory__monitor.cc) = 228b077d9f703e5614ebf0091c035d8ad3637bbd
+SHA1 (patch-content_browser_ppapi__plugin__process__host.cc) = 3b182b3fcdd9ab7e7128ca91c5ccd2ef04dc9f5d
+SHA1 (patch-content_browser_renderer__host_render__process__host__impl.cc) = ce2cfb9cf824d62b955b0e4b6bfbad761da19a80
+SHA1 (patch-content_browser_renderer__host_render__widget__host__view__aura.cc) = e252d59fc80c49bfdb916704c20f36f80c3ea654
+SHA1 (patch-content_browser_tracing_tracing__controller__impl.cc) = 734833d85396d4af405ad2f5029ac4b6127485f5
+SHA1 (patch-content_browser_utility__process__host__impl.cc) = 367321c2a190e1172e0f7631b78e38f9171d4a27
+SHA1 (patch-content_common_BUILD.gn) = 26dd181503a45142b322c01a56443c8268cdcf03
+SHA1 (patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc) = f7dadebec82f13e0928ba9090293ee8db6573fce
+SHA1 (patch-content_common_set__process__title__linux.cc) = ef1083ed9f7f00a68e51d4bc29431f83a2889dd2
+SHA1 (patch-content_common_set__process__title__linux.h) = ee6ac0cf6e0d2bbb1429c72a2974c856ae7a1929
+SHA1 (patch-content_gpu_BUILD.gn) = db740dd9cb33b7d679bfb313ba44e3a9cc05bcd2
+SHA1 (patch-content_gpu_gpu__child__thread.cc) = d22cf6945091ec01fa559a8fa32d80c577b9bfcc
+SHA1 (patch-content_gpu_gpu__main.cc) = 338036c7de84dfa7bf2c76ed9d677ca22925bbd9
+SHA1 (patch-content_gpu_in__process__gpu__thread.cc) = 83b35a41dfa51c580325dfa608364da2c35ac121
+SHA1 (patch-content_public_common_child__process__host.h) = 110be83ed9fea9ad2700b7e5789d7e6db64020b7
+SHA1 (patch-content_public_common_content__switches.cc) = 54d854eb1c019ca2eaaeb357f07cd77e983f4e0f
+SHA1 (patch-content_public_common_content__switches.h) = 12fb8bdde5ec4159ecbd973b9405303813f0eafc
+SHA1 (patch-content_public_common_renderer__preferences.h) = abfe3248aced229cad2612832725897008f187a5
+SHA1 (patch-content_public_test_browser__test__base.cc) = 7a10a81aab19423b14cde8853ba01c0128d5e0dd
+SHA1 (patch-content_renderer_media_webrtc_processed__local__audio__source.cc) = c79d59f40576170f18e9cff36a55d3c2e0ba368b
+SHA1 (patch-content_renderer_pepper_pepper__media__device__manager.cc) = 871f67bb6a6d6dc65a1525024b3d6335fa7f4261
+SHA1 (patch-content_renderer_render__thread__impl.cc) = 9a8f3e3f562adbbcb7e4307f5185b23734a1bc02
+SHA1 (patch-content_renderer_renderer__blink__platform__impl.cc) = 81d74af26792b4d99f3529646f7bca87c00d2571
+SHA1 (patch-content_renderer_renderer__blink__platform__impl.h) = 0ea2370c65cee518a0e021d34d692d065d3930e1
+SHA1 (patch-content_renderer_renderer__main__platform__delegate__linux.cc) = 2cf9aa7a8722716d96f08d9cbd1c6f06d662bd10
+SHA1 (patch-content_renderer_webscrollbarbehavior__impl__aura.cc) = 556de6307607c96bf362bbc84b78fddf7e42fc75
+SHA1 (patch-content_shell_BUILD.gn) = b98b7e59d141e423398c536feaceed3275ab725b
+SHA1 (patch-content_shell_browser_shell__browser__context.cc) = fb6683ca2bf93da4e44d5bed33bfb0ab6441011f
+SHA1 (patch-content_shell_browser_shell__browser__main__parts.cc) = 9f720d613467abc14a2be6039407bcf47000004b
+SHA1 (patch-content_test_BUILD.gn) = 0ec5d1c68442eacfbd110c413f51e822e77c8d58
+SHA1 (patch-crypto_nss__util.cc) = de53a4d9d05a2d30ef52c8008fed40074782be69
+SHA1 (patch-device_BUILD.gn) = 674c723c84fc0dcd1942d8418db425347626be28
+SHA1 (patch-device_battery_BUILD.gn) = 50d8602ad02060157f2ea3735922716482100312
+SHA1 (patch-device_bluetooth_BUILD.gn) = c989943d15f1d52e7ae6e039f89caa52e103c9b5
+SHA1 (patch-device_gamepad_gamepad__provider.cc) = d9836f91f3d1913da2e59cd9285c339f41b70782
+SHA1 (patch-device_geolocation_BUILD.gn) = db2022714e053ff292452b00d2b089fdd82d6e29
+SHA1 (patch-device_geolocation_location__arbitrator.cc) = 3340531161ae9227ff2d901cc6717aa1be11fd71
+SHA1 (patch-device_hid_BUILD.gn) = f648f53cb8b65f74e2e9119b476a23a4617f4cd5
+SHA1 (patch-device_media__transfer__protocol_media__transfer__protocol__daemon__client.h) = 03956ffc581b44b3c60ab614b037a6d9eec3525d
+SHA1 (patch-device_media__transfer__protocol_media__transfer__protocol__manager.h) = efdc5e5982e22cdd8025dd976d2e059ff3590688
+SHA1 (patch-device_serial_BUILD.gn) = cad00a3b27fd9e29939a0a4503b272f721eac287
+SHA1 (patch-device_serial_serial__io__handler__posix.cc) = 35a3afea930d3e03b94c4b4be60642dc60a1d949
+SHA1 (patch-device_time__zone__monitor_time__zone__monitor.cc) = 97988feea8ad325be97443550fd484440f67e24e
+SHA1 (patch-device_time__zone__monitor_time__zone__monitor__linux.cc) = b792dd93060cf3ee35bf72ac5ac54fc242c36a9b
+SHA1 (patch-device_usb_usb__context.cc) = 0bccabf89881221b24dd7c143d2cb44157f8efbb
+SHA1 (patch-device_usb_usb__context__unittest.cc) = 65cc905bb4d41a7905e1aea2ff5584b2d0f06c0d
+SHA1 (patch-device_usb_usb__device__handle__impl.cc) = 5f85432154ca3a242996c870cd484c18deef83ed
+SHA1 (patch-device_usb_usb__device__handle__impl.h) = 9d4d4890c79d377093ee9b5bf9c3eb9414fff147
+SHA1 (patch-device_usb_usb__device__impl.cc) = 6e0f96d876f4af35fae503c0b260b096989da9d7
+SHA1 (patch-device_usb_usb__error.cc) = 5380f13996ee7508333b5f928f5b2e695172b1f1
+SHA1 (patch-device_usb_usb__service__impl.cc) = eed62c4bbfb537220e18d92d26174a6d51fef6b4
+SHA1 (patch-device_usb_usb__service__impl.h) = 38def3a5b1d47f1fe279868a6b08e7529a7d8df0
+SHA1 (patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc) = b98cc93451581faf86b4a6da26ee86bdf1f59471
+SHA1 (patch-extensions_browser_api_networking__private_networking__private__event__router__factory.cc) = 50e6a1948205dc042fe0a77fc6b240b92a40c2a6
+SHA1 (patch-extensions_browser_api_serial_serial__api.cc) = e0882a3d9228edb6c8dfc5e94899d0556ba28393
+SHA1 (patch-extensions_browser_api_web__request_form__data__parser.cc) = 84777878d372ef57ad2d76c5d95defda82f88389
+SHA1 (patch-extensions_common_image__util.cc) = 6cd63b2aff2546bb63de26f365deae5cc1a0eb1d
+SHA1 (patch-extensions_common_stack__frame.cc) = 49f82d266232e781fc5c89d7cc04d6dfcc660411
+SHA1 (patch-gpu_BUILD.gn) = 0f5867a4a651312174e62783a345706a279647d8
+SHA1 (patch-gpu_command__buffer_service_program__manager.cc) = d99618837690477ed7622ee4a21472ecdbe5331b
+SHA1 (patch-gpu_config_BUILD.gn) = e1ae3c7fa6962dcfb83eb2bb867dcc17f1b9b160
+SHA1 (patch-gpu_config_gpu__control__list.cc) = 3a44d7d8a489a8f97ca25b1958e2e986a58e08d4
+SHA1 (patch-gpu_config_gpu__control__list__unittest.cc) = edad53d855b06e08d5ae705aa0313991079a9d2a
+SHA1 (patch-gpu_config_gpu__info__collector.cc) = 9177b10305f7e8a84401d05fa877a1a10e84b731
+SHA1 (patch-gpu_config_gpu__test__config.cc) = 042666cac4079e3b648397ed2160da2ba55b3bb5
+SHA1 (patch-gpu_gles2__conform__support_BUILD.gn) = 4bdb2b0e4060d8f6e47b054ed64140b550777868
+SHA1 (patch-gpu_gles2__conform__support_native_BUILD.gn) = aab7d756de35dcf659468f647eb78587def2a2f9
+SHA1 (patch-gpu_ipc_client_BUILD.gn) = 6c37a9507105ad979b9f499dbaf6fc461f75fb0a
+SHA1 (patch-gpu_ipc_service_BUILD.gn) = a974363cbd13020c2c7500142288d9f7d57c42c5
+SHA1 (patch-gpu_ipc_service_gpu__init.cc) = 9dc0c963517618cd2984d836f6d95d32ff956fd6
+SHA1 (patch-gpu_tools_compositor__model__bench_BUILD.gn) = ac36f9523e5d2f65ac57d6cea54a96a842923545
+SHA1 (patch-gpu_vulkan_BUILD.gn) = 4f748065943acce2cdd449c6878e5acc034a3672
+SHA1 (patch-ipc_ipc__channel.h) = 5cbed9774cf8d6c81581517777f854a07459a483
+SHA1 (patch-ipc_ipc__channel__common.cc) = 57f677ac3abcf07baf54987cdaaa883a3da6ed5a
+SHA1 (patch-ipc_ipc__message__utils.cc) = 0e04c6b9fc4bf42279ffc6823d2cde9afc4163cb
+SHA1 (patch-ipc_ipc__message__utils.h) = 93e490d5810cdcc849e0b838d3a1930f9a1da2c2
+SHA1 (patch-ipc_unix__domain__socket__util.cc) = a0966196252e790aa9ae0c2f405bbf0dcbc21805
+SHA1 (patch-media_audio_BUILD.gn) = 4905d0dcf85b70383a7d0a2b4926fc513a95e3fe
+SHA1 (patch-media_audio_alsa_audio__manager__alsa.cc) = c0134672183060dcf1b380d45c0f677ce2591942
+SHA1 (patch-media_audio_audio__manager.cc) = 03a71977d7b35eb8a7a5fa6c6a7e0766d21638e1
+SHA1 (patch-media_audio_audio__manager.h) = e3a981f47b8e0852d665cb6dd98a99165c3032fe
+SHA1 (patch-media_base_BUILD.gn) = 69e28bef774270d89cc3bb80b662d523abfc2f01
+SHA1 (patch-media_capture_BUILD.gn) = acd8aeec3c6ebfcb0044e0dd461e049f1ec8bd53
+SHA1 (patch-media_capture_video_fake__video__capture__device__factory.cc) = 96e2d4fcf6da24083955062c4d3988d7cda0be39
+SHA1 (patch-media_capture_video_file__video__capture__device__factory.cc) = c283bc903dcd10e6fc41c61b9555c6e4e0b18bd5
+SHA1 (patch-media_capture_video_linux_v4l2__capture__delegate.cc) = 8b57056e5506d372eced80e29980ecf621c94800
+SHA1 (patch-media_capture_video_linux_video__capture__device__linux.cc) = e3bbb90e96fad902732a611d0e885af566168ef4
+SHA1 (patch-media_capture_video_video__capture__device__client.cc) = 7c3bf9cfb8a7885d4f088717476fc72e40c1656c
+SHA1 (patch-media_capture_video_video__capture__device__factory.cc) = 79e1368c6db9e02dfbbc86df9d12d9bc85d42c6f
+SHA1 (patch-media_cast_BUILD.gn) = a14df4231ec783b330ca39fb5202cd22ef138f76
+SHA1 (patch-media_cdm_ppapi_ppapi__cdm__adapter.gni) = 5d6ce505692589ee435b424d0b245edbcca32c52
+SHA1 (patch-media_ffmpeg_ffmpeg__common.h) = 85815384a2d984fcafc6c1bc30ac2039a3a08788
+SHA1 (patch-media_filters_ffmpeg__demuxer.cc) = 6f68bdca76622fdf9b4e2f42fb20720681f3efa2
+SHA1 (patch-media_filters_vp9__parser.h) = 001fa5210619ce648b964bcd85e2271349cec801
+SHA1 (patch-media_formats_common_offset__byte__queue.cc) = 471a8bcc41ba987b7ce4e3b225e7b8cdbe24ce8c
+SHA1 (patch-media_formats_common_offset__byte__queue.h) = 107df0836552ed0e77aa90c179154c5649fa14d5
+SHA1 (patch-media_formats_mp2t_es__parser__adts.cc) = c81bf6dab0a63d23b1cde122dc83600c30d294fa
+SHA1 (patch-media_formats_mp2t_es__parser__mpeg1audio.cc) = dfb24fad09189d289be151687cf628d7ad24616a
+SHA1 (patch-mojo_BUILD.gn) = 2e99f7edd51c4e0efc6f41b7a9976d9814cbf012
+SHA1 (patch-mojo_edk_embedder_platform__channel__utils__posix.cc) = 36389262cf1eac651a905494ac1bdf38a01d9329
+SHA1 (patch-mojo_edk_test_BUILD.gn) = 0fc97c48f9f23f310dd418acd1a6aa2da2a59a63
+SHA1 (patch-native__client__sdk_src_BUILD.gn) = e8a37ddf451ba6fc6cb3db7633d1503f2e1cd1f6
+SHA1 (patch-net_BUILD.gn) = 17fc59175acf03069c45d19c6b387f506dcb0d1d
+SHA1 (patch-net_base_address__tracker__linux.h) = df9305d3b8141a14f16b26569ffc4de7a020a96b
+SHA1 (patch-net_base_address__tracker__linux__unittest.cc) = 7080984a9db5d15229a70d37b341ea41ba601e51
+SHA1 (patch-net_base_mime__util__unittest.cc) = e67d8cb72cc00ddaeebcefa74b8af97bc4870e8c
+SHA1 (patch-net_base_network__change__notifier.cc) = 391c7f37698576ae8dc48498b3b88b34f2458f67
+SHA1 (patch-net_base_network__change__notifier.h) = 6cd5d206ed6a3e7bfb5070353a22f634a23c9d35
+SHA1 (patch-net_base_network__interfaces__linux.cc) = 7332f3591990abedd4e5563613bc922d03954945
+SHA1 (patch-net_base_network__interfaces__posix.cc) = 6da9061248ddbe608ba8be547b4911043cfeb0e0
+SHA1 (patch-net_dns_address__sorter__posix.cc) = 679058dc7875f34c3f74daa1cda09fc8ea035487
+SHA1 (patch-net_dns_dns__config__service__posix__unittest.cc) = df29c135544e7cd301ee4197e04979c2bf6fe5e8
+SHA1 (patch-net_dns_dns__reloader.cc) = 2d75fe56bb2689ff48c87329fd024921956d2f0e
+SHA1 (patch-net_http_http__auth__gssapi__posix.cc) = d42587565874d3406d4f25f2cc37af0efdc2aca4
+SHA1 (patch-net_http_http__network__session.cc) = 04ceeffade2c51363091e55ab494f3e2b7cbc379
+SHA1 (patch-net_proxy_proxy__config__service__linux.cc) = 3d225a1bc77461a4761755c128e032baca88e744
+SHA1 (patch-net_proxy_proxy__service.cc) = fd1c9d6a0697e1a5b629a6179c6c7d3aeadac414
+SHA1 (patch-net_socket_socks5__client__socket.cc) = cff5de418e216bd7592b974d9a6578a5ada7b1b8
+SHA1 (patch-net_socket_udp__socket__posix.cc) = b423629217c4be0325dbc0e5bd92419f14570f67
+SHA1 (patch-net_tools_get__server__time_get__server__time.cc) = bc6c0d55509e4b0717767cdf997b74f9b9b3a57c
+SHA1 (patch-net_url__request_url__request__context__builder.cc) = 0093afaa5b69a13e5bc1a0a56979cf4a7bebf133
+SHA1 (patch-pdf_pdfium_pdfium__engine.cc) = a3bd19411f579ffe91179d974797d0cd9aa79e4b
+SHA1 (patch-ppapi_proxy_file__io__resource.cc) = 5a43e34966caf0f8d7ce508dcfdfcac7a14f5387
+SHA1 (patch-ppapi_shared__impl_private_net__address__private__impl.cc) = 24ac448a7b8998f414d2201930f4858db06210a1
+SHA1 (patch-ppapi_tests_extensions_BUILD.gn) = 1f9e1f53489c1ac809e204298f473a01a4925e09
+SHA1 (patch-printing_BUILD.gn) = e46cd955134557ac930a43ad5f4a47182e0aa65e
+SHA1 (patch-printing_cups__config__helper.py) = c41a817c19e591fcdaeffcde97ca8d9b2057985e
+SHA1 (patch-remoting_host_BUILD.gn) = d89373b1380b2131aab65f2a0b2d4d7749b0f7be
+SHA1 (patch-sdch_BUILD.gn) = 9012f34a75bc389edb2ab64278a9ddd8da5b6e38
+SHA1 (patch-services_service__manager_runner_host_BUILD.gn) = 9408524b8b83ddd644107be0e5a325c9f761e305
+SHA1 (patch-services_service__manager_standalone_context.cc) = f3fcf0b1e4204a861539815c7a39c03780326edf
+SHA1 (patch-services_ui_BUILD.gn) = 7fbb89b6148d8cc907a0a4963ff9b5015938cd35
+SHA1 (patch-services_ui_ime_BUILD.gn) = 04a054eb7f6b25135dbedb9694e73a820cac7c77
+SHA1 (patch-services_ui_public_cpp_gles2__context.cc) = 58dbe9659ff6ca57a7248f332f48fcfdf3eb1ca3
+SHA1 (patch-services_ui_surfaces_surfaces__context__provider.cc) = 180049bbb77671c932b48f0da0f0c2d00e30a8ad
+SHA1 (patch-skia_BUILD.gn) = 3642c648af4dfd8eaf25c864601a159c31a7e70f
+SHA1 (patch-skia_ext_SkMemory__new__handler.cpp) = 62584ebda841bb01c05533a0e230e6cde553fce2
+SHA1 (patch-skia_ext_platform__canvas.h) = 8eb10136504a0efe934b1e1934984afc87cecacb
+SHA1 (patch-testing_gtest_src_gtest.cc) = 577f7350d29cd62a49a76196fae3c145f7c6903b
+SHA1 (patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp) = 4937bd271affcb227b728b9e51290211ec4b0b25
+SHA1 (patch-third__party_WebKit_Source_core_layout_BUILD.gn) = f02e88e4a77682143db9de1e92378eda1cd33317
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp) = 16b6d30681f92cf79229d4ed74dd3aa80cadea9c
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontCache.h) = 554e83347b0d75c2cc680b9a29f418eedab47c0d
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp) = 522362d6e99854eb5a91abc52b05e5781dbb493e
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h) = d2470af7d372bc04265673b0415a25efcda90264
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp) = 19e398c11fcb11f563110e8a3bb66434083fe4d6
+SHA1 (patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp) = cdf58980bff0336419965ae11f4dfd8b69295004
+SHA1 (patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp) = db921e977ea616cd679c6dff4dc00a3cffb89f37
+SHA1 (patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp) = 549d92bcd8b0b6e4d3d6fc0a6197600c382d16bb
+SHA1 (patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp) = f5514582e03da6d54ffcca07c93b88d1e4897875
+SHA1 (patch-third__party_WebKit_Source_wtf_Assertions.cpp) = 0844a90d48c25740d1033fdee552b74cc7d951b3
+SHA1 (patch-third__party_WebKit_Source_wtf_Atomics.h) = cb9503c7075b61f0bda183599fdec00853fae841
+SHA1 (patch-third__party_WebKit_Source_wtf_BUILD.gn) = 9b240c0db36f8fa5aca5e20377167273781c8b6f
+SHA1 (patch-third__party_WebKit_Source_wtf_ByteSwap.h) = 275f99b44f3128ba35773a172eb38c838c1f2de5
+SHA1 (patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h) = 46bab5203cdb0007f9a66e42838e8b63dcb8a847
+SHA1 (patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp) = 17ea97254e979651da0cc64e0fff585bdc160ba0
+SHA1 (patch-third__party_angle_BUILD.gn) = 534258a067143d8bcc1d1c62a3097ba842b6d4fc
+SHA1 (patch-third__party_angle_gni_angle.gni) = e96e2a5c84849c52edebe303504e0831db2ed695
+SHA1 (patch-third__party_angle_src_tests_BUILD.gn) = 646346543a6f498fce880eb4e036e82681b43404
+SHA1 (patch-third__party_boringssl_BUILD.gn) = 190542f4ffc7c287071012ef807058549f30235c
+SHA1 (patch-third__party_boringssl_src_crypto_ex__data.c) = dc21e89e2bbb15b94c438e2cbdf890cbe43465ff
+SHA1 (patch-third__party_boringssl_src_include_openssl_thread.h) = d197f660e6b8db4600f1ced9b50d80ad3bdf5267
+SHA1 (patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h) = b089af9cc12a0d044a35b30cec141cb298853609
+SHA1 (patch-third__party_expat_BUILD.gn) = 2115268685d71662a940a342198afb3fe95c349f
+SHA1 (patch-third__party_ffmpeg_BUILD.gn) = 13ffdc9a27902d71f413123e1a4cb085e3c82e57
+SHA1 (patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h) = 79214c51ac671d30038eb76e40c4fa1c227e7282
+SHA1 (patch-third__party_ffmpeg_ffmpeg__generated.gni) = 249f0453af30284f7afb757506c416875c4e276d
+SHA1 (patch-third__party_ffmpeg_libavutil_cpu.c) = 8a201020a008d0357a2760fdaf38ec6b36d05150
+SHA1 (patch-third__party_ffmpeg_libavutil_mem.c) = 5baa7e792afcc6f68c28944737f5c8aa46dd190b
+SHA1 (patch-third__party_fontconfig_BUILD.gn) = a4f73bbcd1186c26339f8fecbf0a10eb3badebe8
+SHA1 (patch-third__party_freetype2_BUILD.gn) = 00f40983b1e8b4c6be8532a0ada80d57a1660d39
+SHA1 (patch-third__party_glslang_BUILD.gn) = 257a796a30e4d94210f69280c6fd30d2a40c4a5f
+SHA1 (patch-third__party_harfbuzz-ng_BUILD.gn) = e04a3693cdbd3895781d9dc1bcac34f02f8c3ecf
+SHA1 (patch-third__party_icu_android_patch__locale.sh) = ca42a74c99df8e742e34fd3b865f5778bf60f479
+SHA1 (patch-third__party_icu_source_configure) = bf10fc8043534abf2c232cde966d83d6b5cc62e3
+SHA1 (patch-third__party_leveldatabase_env__chromium.cc) = 194edde951d753dbb6cb7a9eb0c76eefd4dd87ec
+SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h) = f5593ac3a4bfe86345876c97f5ad7221967b7728
+SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h) = ec75e9cba326cc46ab2816879e7827d17bec8a1b
+SHA1 (patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h) = 87fe2a7b4abd82bd2a558f3f0113ad726b3f5499
+SHA1 (patch-third__party_libusb_BUILD.gn) = e74c193fa0657602d28e2fe715bb4850ec4aaa96
+SHA1 (patch-third__party_libxml_BUILD.gn) = 40d404a8136fdb10272a5dc9ee61d8e03fe75ac5
+SHA1 (patch-third__party_libxslt_BUILD.gn) = 987a523f323069432bbde49ceb9bc05489f97be9
+SHA1 (patch-third__party_libyuv_include_libyuv_row.h) = 63aa2ac04d19ef82e62eabf3290cf0c6b72f6e33
+SHA1 (patch-third__party_libyuv_source_mjpeg__decoder.cc) = 04cd4b7cf41db3b697808c9d07d8c4a704a79d74
+SHA1 (patch-third__party_mesa_BUILD.gn) = e244363bee13cb3901356c205c417edde11826ae
+SHA1 (patch-third__party_minigbm_BUILD.gn) = 650d7f135b1e4ddbd61d86e62d05d365bee43576
+SHA1 (patch-third__party_opus_BUILD.gn) = d456791b41a876fd9ef332ebca98b74371af428a
+SHA1 (patch-third__party_ots_include_opentype-sanitiser.h) = 4b570c282b22f0b8dfacf7c4a9d8f8eb9f67f70c
+SHA1 (patch-third__party_pdfium_BUILD.gn) = 64ede6590d00ea974ab18a734597e2d5ff8fd12b
+SHA1 (patch-third__party_pdfium_core_fxcrt_fx__system.h) = 7337c0b1cb2807562945736f54f8b483cd35a38e
+SHA1 (patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp) = a0cefb180749d6cc5afd7b0c6d1649f034d9fdf3
+SHA1 (patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp) = 45d768605285b57f8ea5908012034f7702bbf702
+SHA1 (patch-third__party_pdfium_skia_BUILD.gn) = 0fdbb8b65b98d47f63480319318fed6a3d97d7be
+SHA1 (patch-third__party_pdfium_third__party_base_logging.h) = d5092d47a8539674b83f32054669791e2d62021e
+SHA1 (patch-third__party_protobuf_post__process__dist.sh) = 6460ef38c68c759df48ff57d3990c9f19ca8af51
+SHA1 (patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h) = 01988c17b537528f01efcc121c82accebc746a40
+SHA1 (patch-third__party_sqlite_BUILD.gn) = d85d4ddebed998aea6b1fd1f8b8bdb20114da3a3
+SHA1 (patch-third__party_usrsctp_BUILD.gn) = 4773526e4855e65ee0744e93faf9d3e5a37e1b93
+SHA1 (patch-third__party_webrtc_BUILD.gn) = c018bbc5cf3df0513f700e68394cc34e3db451bb
+SHA1 (patch-third__party_webrtc_base_BUILD.gn) = 59b25ddbe259699cb2bdc7b49a3da242299a97f5
+SHA1 (patch-third__party_webrtc_base_httpcommon.cc) = 4a01adfc44abce61eb71f174ea703efd496bdd43
+SHA1 (patch-third__party_webrtc_base_ifaddrs__converter.h) = 19ecf16087925d2def4fa55fb751baa6a656aa7a
+SHA1 (patch-third__party_webrtc_base_ipaddress.h) = 76a57a5d2e0f4ee518c6fa450a633adb706effcc
+SHA1 (patch-third__party_webrtc_base_linux.cc) = 2a5b245beb058e5a0b14e99c25c33685bd177b18
+SHA1 (patch-third__party_webrtc_base_linux.h) = 729352c50fdbe0b4a3b2d826541e3d78246fa12a
+SHA1 (patch-third__party_webrtc_base_network.cc) = 0f1607410a4cb1469822ccc5b62611b474d89dea
+SHA1 (patch-third__party_webrtc_base_network.h) = 90859faa79df2a55fb5294a75b2424a85d81c860
+SHA1 (patch-third__party_webrtc_base_physicalsocketserver.cc) = c25c236eef8d19ce8b97c1031b41ed8e3ecabecd
+SHA1 (patch-third__party_webrtc_base_platform__thread.cc) = 4da2c60ab7fa3184e692252c35cc09366cb7a454
+SHA1 (patch-third__party_webrtc_base_stringutils.h) = 747d89b0ae7c7b6d8e1275ae8e6ce20a8383adb8
+SHA1 (patch-third__party_webrtc_base_systeminfo.cc) = 272969d804f9758335326324ce543408b2a100cf
+SHA1 (patch-third__party_webrtc_modules_audio__device_BUILD.gn) = ff870a88d61069fe1524f250831a0bf2ca1097da
+SHA1 (patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc) = 891616bc18e26774ecddcaf1176747cb6c68612b
+SHA1 (patch-third__party_webrtc_modules_video__coding_BUILD.gn) = 2242bd1a75453c276e7cd05fd65ecf69d4f17577
+SHA1 (patch-third__party_webrtc_system__wrappers_BUILD.gn) = 969875cf7296857925619eac51ecef704647e8b9
+SHA1 (patch-third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc) = 7d77928fa9833417a1c5211ca174e06486cfd7f0
+SHA1 (patch-third__party_webrtc_voice__engine_voice__engine__defines.h) = a744478ee19844c7cfe0c72772d04963ce33faa6
+SHA1 (patch-third__party_widevine_cdm_BUILD.gn) = f299fcf9651b0761334a74415d4855d4559d395d
+SHA1 (patch-third__party_widevine_cdm_stub_widevine__cdm__version.h) = e88d8c99493d0829691ab53160166882682559b9
+SHA1 (patch-third__party_xdg-utils_scripts_xdg-terminal) = 24dee02aef958c4db0896bb1791b72f3c3325f31
+SHA1 (patch-third__party_xdg-utils_scripts_xdg-terminal.in) = 400440a080cbf0b588bfcb1de1e9fc10e6819697
+SHA1 (patch-third__party_yasm_BUILD.gn) = d98aaf9c4e51be8c1cd49f7642d8a9cda745b945
+SHA1 (patch-third__party_zlib_BUILD.gn) = f66e24321f1dd4f19af1365490ecc5f37aff0232
+SHA1 (patch-tools_battor__agent_BUILD.gn) = 007eb425b2bb6d30b789012792bf8a92483e90a0
+SHA1 (patch-tools_gn_args.cc) = 7891b7c0b998a7fe96b0b7bdfc8e4096ded98ebc
+SHA1 (patch-tools_gn_bootstrap_bootstrap.py) = a5e2a4d9dbf97e063e6615de3a7a2fa33172ab4c
+SHA1 (patch-tools_variations_fieldtrial__to__struct.py) = 49aa9e64e944bb25ffbda95250f23006124b8bd7
+SHA1 (patch-ui_accessibility_platform_ax__platform__node.h) = 16be3fb13c6500e74f3067702db95de0bd936024
+SHA1 (patch-ui_app__list_app__list__constants.cc) = 7963f801324f32086880fd9217537790950c9630
+SHA1 (patch-ui_app__list_app__list__constants.h) = 97245a5cdda933d34be1279710a6ca011f4d540c
+SHA1 (patch-ui_app__list_views_app__list__item__view.cc) = 8ea86a0cd0f56df16567ffbd54ccdbdef36dddad
+SHA1 (patch-ui_app__list_views_app__list__view.cc) = b62a156d362733c8ba81da448ab1248abc9de2bb
+SHA1 (patch-ui_aura_BUILD.gn) = 50abd0a701e26bec0812c2875b5ed06fcdb41d0e
+SHA1 (patch-ui_base_BUILD.gn) = 7467bf159b5f66f872d6a143e75c7c2721f49cc7
+SHA1 (patch-ui_base_ime_BUILD.gn) = bae1bec0160524ac0b1e8f70797f97bdfa1310db
+SHA1 (patch-ui_base_ime_ime__engine__handler__interface.h) = 43d94d3c0067596be9ce0f391843ba3fca54e422
+SHA1 (patch-ui_base_ime_input__method__factory.cc) = 97a6bd278a1b91c0db6bd22cb6f5be2acabd57d0
+SHA1 (patch-ui_base_ime_input__method__initializer.cc) = d14351f1a802c5bdaecf08056c156539e7bbd59d
+SHA1 (patch-ui_base_resource_resource__bundle.cc) = 95a08a028f452127603685386e9e6318abf8133c
+SHA1 (patch-ui_base_ui__features.gni) = 5c39f04748dab1877eaeb2f08bdd83e6c35d6498
+SHA1 (patch-ui_base_webui_web__ui__util.cc) = 9fdf09ed67f0a68f8273a63faef97c7ed145e258
+SHA1 (patch-ui_compositor_BUILD.gn) = 996b39b53bed16e910ed8be5c5f78762f1aacd1b
+SHA1 (patch-ui_events_event__switches.cc) = b4c73c980296cade3ff628393f0441db88c253c9
+SHA1 (patch-ui_events_event__switches.h) = d2f1a602721e1aead468cd3830396a26f1f9a7c7
+SHA1 (patch-ui_events_keycodes_dom_keycode__converter.cc) = 962bb47674721ac1afa4ce27b249b8c6a84ccc8b
+SHA1 (patch-ui_gfx_BUILD.gn) = d606b07e78351f55cce7ae7db1f22759b8566cbd
+SHA1 (patch-ui_gfx_canvas__skia.cc) = 3495e7225f3e6ac81544213098e225e2889f0f96
+SHA1 (patch-ui_gfx_font__fallback__linux.cc) = f57bd6693eee09dbb3e89f3d1b3571b7cde7089d
+SHA1 (patch-ui_gfx_font__render__params.h) = e4330a45aaa39a779268c725d7f26b9895ecb36e
+SHA1 (patch-ui_gfx_render__text.cc) = 43bcd4641fc57baa4d399ac147c9ad34c6cb5cc6
+SHA1 (patch-ui_gl_BUILD.gn) = 875a3d5ba23474c510699031cad27877c0290362
+SHA1 (patch-ui_gl_sync__control__vsync__provider.cc) = ef529650064c381c6c5c290cfea2fa7800bfc480
+SHA1 (patch-ui_gl_sync__control__vsync__provider.h) = af385e4f047b2776d4c90ec293f11c7fe02304a7
+SHA1 (patch-ui_message__center_message__center__style.h) = ba9ddfb8db9ad3f729ee84959379875d37b3e85b
+SHA1 (patch-ui_message__center_views_message__center__button__bar.cc) = 42bcee9775e57cd4782be78a419971cbfa5fd1cb
+SHA1 (patch-ui_message__center_views_message__center__button__bar.h) = 20fc04baa12a0d969e4126658c05336def04431b
+SHA1 (patch-ui_message__center_views_message__view__factory.cc) = 46d44eb2e86e8d33d50bc04b47b9f199f896382e
+SHA1 (patch-ui_resources_ui__resources.grd) = ff7b61eced0a3a92bacee5f9ce36363a45403e28
+SHA1 (patch-ui_views_BUILD.gn) = 2ce6a3ec95f9f06ed5c5570abf9851261ea1f93e
+SHA1 (patch-ui_views_accessibility_native__view__accessibility.h) = 12cc092f73e88a0dff8dd3d09de6ca1095dc36c9
+SHA1 (patch-ui_views_bubble_bubble__dialog__delegate.cc) = a807cbf78e5f7d437286c95efa814cdb7e32d9e4
+SHA1 (patch-ui_views_controls_label.cc) = c8fd0f239fd5e5349415b152183f44b71bd5829d
+SHA1 (patch-ui_views_controls_textfield_textfield.cc) = b1b529ba246c0126c61186ef3fb0420860cf5069
+SHA1 (patch-ui_views_controls_webview_BUILD.gn) = 4f7d2136638ba0511f39926529981b92a6dd04ff
+SHA1 (patch-ui_views_corewm_tooltip__aura.cc) = 9424e3c0634c6191004f4017b14c78daefdf6edc
+SHA1 (patch-ui_views_examples_widget__example.cc) = 0073c00059535f3f66fd6ff67601e881a5cef168
+SHA1 (patch-ui_views_selection__controller.cc) = 03128af849ddbb35b4931e8a98bdd6ed243f35e7
+SHA1 (patch-ui_views_style_platform__style.cc) = a124a78d2e95e5756ff5dd3272ba0aca16cd488a
+SHA1 (patch-ui_views_views__delegate.cc) = 24b78221d0eb252e15a60fde9e0ddc97f15c8449
+SHA1 (patch-ui_views_views__delegate.h) = 169791c216cdae532c1cceeb264ccf29c8637015
+SHA1 (patch-ui_views_views__switches.cc) = e924b4d1533578ccf487116defb58e0d92fec14e
+SHA1 (patch-ui_views_window_custom__frame__view.cc) = 0fa0aecb3f5cd2e3aab2a361bc43df62c6459891
+SHA1 (patch-ui_views_window_dialog__delegate.cc) = aeecc76ebf71125df51a4ea77253e734ceec00c8
+SHA1 (patch-ui_webui_resources_js_cr.js) = e0813d3bc36615f63c4a1b744d4ad372bc2500ef
+SHA1 (patch-ui_webui_resources_js_icon.js) = 5c474b3a46c1ee752a15cb3e5336ace5f4e4620b
+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) = a754cf1d4c048eed3f6d8629ba99f2b56f1b6bbd
+SHA1 (patch-v8_src_base_platform_platform.h) = b550c96973cf6b0fed9dcbde7b71301afa3585c1
+SHA1 (patch-v8_src_globals.h) = d88afa5a8b913431d509bf25ee5ad9975fb5200a
+SHA1 (patch-v8_tools_run-llprof.sh) = 84a3f81f71a49e63ea1d3a079e8ebafa5595fde4
diff --git a/chromium/options.mk b/chromium/options.mk
new file mode 100644
index 0000000000..ef4929e54c
--- /dev/null
+++ b/chromium/options.mk
@@ -0,0 +1,33 @@
+# $NetBSD: options.mk,v 1.32 2016/08/20 11:17:32 ryoon Exp $
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.chromium
+PKG_OPTIONS_REQUIRED_GROUPS=	audio
+PKG_OPTIONS_GROUP.audio=	alsa pulseaudio
+PKG_SUPPORTED_OPTIONS+=		debug
+PKG_SUGGESTED_OPTIONS=		pulseaudio
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+GN_ARGS+=	use_alsa=true
+GN_ARGS+=	use_pulseaudio=false
+.include "../../audio/alsa-lib/buildlink3.mk"
+.elif !empty(PKG_OPTIONS:Mpulseaudio)
+GN_ARGS+=	use_alsa=false
+GN_ARGS+=	use_pulseaudio=true
+.include "../../audio/pulseaudio/buildlink3.mk"
+.endif
+
+.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/patches/patch-BUILD.gn b/chromium/patches/patch-BUILD.gn
new file mode 100644
index 0000000000..3621f56fca
--- /dev/null
+++ b/chromium/patches/patch-BUILD.gn
@@ -0,0 +1,175 @@
+$NetBSD$
+
+--- BUILD.gn.orig	2017-02-02 02:02:46.000000000 +0000
++++ BUILD.gn
+@@ -217,7 +217,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",
+@@ -277,7 +277,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 += [
+@@ -320,7 +320,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" ]
+   }
+ 
+@@ -488,7 +488,7 @@ group("both_gn_and_gyp") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     # The following are definitely linux-only.
+     deps += [
+       "//chrome:manpage",
+@@ -515,9 +515,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",
+@@ -588,7 +595,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" ]
+ 
+@@ -698,7 +705,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)" ]
+   }
+ 
+@@ -743,7 +750,7 @@ group("gn_only") {
+     deps += [ "//components/proximity_auth:proximity_auth_unittests" ]
+   }
+ 
+-  if (is_win || is_linux) {
++  if (is_win || is_linux || is_bsd) {
+     deps += [
+       "//mash:all",
+       "//media/mojo/services:media_mojo_shell_unittests",
+@@ -763,7 +770,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 += [
+@@ -816,7 +823,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 += [
+@@ -824,7 +831,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" ]
+     }
+   }
+@@ -834,7 +841,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",
+@@ -877,7 +884,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 = [
+@@ -903,7 +910,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") {
+@@ -949,7 +956,7 @@ if (!is_ios) {
+       data_deps += [ "//content/shell:content_shell_crash_service" ]
+     }
+ 
+-    if (!is_win && !is_android) {
++    if (!is_win && !is_android && !is_bsd) {
+       data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
+     }
+ 
+@@ -957,7 +964,7 @@ if (!is_ios) {
+       data_deps += [ "//breakpad:dump_syms($host_toolchain)" ]
+     }
+ 
+-    if (is_linux) {
++    if (is_linux && !is_bsd) {
+       data_deps += [ "//breakpad:dump_syms($host_toolchain)" ]
+     }
+ 
+@@ -979,7 +986,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) {
+     data_deps = [
+       "//cc:cc_perftests",
+       "//chrome/test:load_library_perf_tests",
+@@ -1009,7 +1016,7 @@ group("chromium_builder_perf") {
+         "//chrome/installer/mini_installer:mini_installer",
+         "//chrome/test:angle_perftests",
+       ]
+-    } else {
++    } else if (!is_bsd) {
+       data_deps += [ "//breakpad:minidump_stackwalk($host_toolchain)" ]
+     }
+   }
diff --git a/chromium/patches/patch-apps_ui_views_app__window__frame__view.cc b/chromium/patches/patch-apps_ui_views_app__window__frame__view.cc
new file mode 100644
index 0000000000..edee21b489
--- /dev/null
+++ b/chromium/patches/patch-apps_ui_views_app__window__frame__view.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- apps/ui/views/app_window_frame_view.cc.orig	2017-02-02 02:02:46.000000000 +0000
++++ apps/ui/views/app_window_frame_view.cc
+@@ -132,7 +132,7 @@ gfx::Rect AppWindowFrameView::GetBoundsF
+ gfx::Rect AppWindowFrameView::GetWindowBoundsForClientBounds(
+     const gfx::Rect& client_bounds) const {
+   gfx::Rect window_bounds = client_bounds;
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   // Get the difference between the widget's client area bounds and window
+   // bounds, and grow |window_bounds| by that amount.
+   gfx::Insets native_frame_insets =
diff --git a/chromium/patches/patch-ash_display_mirror__window__controller.cc b/chromium/patches/patch-ash_display_mirror__window__controller.cc
new file mode 100644
index 0000000000..0fbb47d140
--- /dev/null
+++ b/chromium/patches/patch-ash_display_mirror__window__controller.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- ash/display/mirror_window_controller.cc.orig	2017-02-02 02:02:46.000000000 +0000
++++ ash/display/mirror_window_controller.cc
+@@ -250,7 +250,11 @@ void MirrorWindowController::UpdateWindo
+                          return info.id() == iter->first;
+                        }) == display_info_list.end()) {
+         CloseAndDeleteHost(iter->second, true);
++#if defined(__llvm__)
++        mirroring_host_info_map_.erase(iter++);
++#else
+         iter = mirroring_host_info_map_.erase(iter);
++#endif
+       } else {
+         ++iter;
+       }
diff --git a/chromium/patches/patch-ash_shell.cc b/chromium/patches/patch-ash_shell.cc
new file mode 100644
index 0000000000..e6f263d8d2
--- /dev/null
+++ b/chromium/patches/patch-ash_shell.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ash/shell.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ ash/shell.cc
+@@ -579,7 +579,7 @@ void Shell::Init(const ShellInitParams& 
+ 
+   immersive_handler_factory_ = base::MakeUnique<ImmersiveHandlerFactoryAsh>();
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   NOTREACHED() << "linux desktop does not support ash.";
+ #endif
+ 
diff --git a/chromium/patches/patch-base_BUILD.gn b/chromium/patches/patch-base_BUILD.gn
new file mode 100644
index 0000000000..c56537e644
--- /dev/null
+++ b/chromium/patches/patch-base_BUILD.gn
@@ -0,0 +1,103 @@
+$NetBSD$
+
+--- base/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/BUILD.gn
+@@ -1076,6 +1076,46 @@ 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",
++    ]
++    if (is_freebsd) {
++      sources += [
++        "files/file_path_watcher_stub.cc",
++        "process/process_handle_freebsd.cc",
++        "process/process_iterator_freebsd.cc",
++        "process/process_metrics_freebsd.cc",
++        "sys_info_freebsd.cc",
++      ]
++    }
++    if (is_netbsd) {
++      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) {
+@@ -1347,7 +1387,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" ]
+@@ -1372,7 +1412,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",
+@@ -1388,6 +1428,20 @@ component("base") {
+     }
+   }
+ 
++  if (is_freebsd) {
++    sources -= [
++      "threading/platform_thread_linux.cc",
++    ]
++    sources += [ "threading/platform_thread_freebsd.cc" ]
++  }
++
++  if (is_netbsd) {
++    sources -= [
++      "threading/platform_thread_linux.cc",
++    ]
++    sources += [ "threading/platform_thread_netbsd.cc" ]
++  }
++
+   # iOS
+   if (is_ios) {
+     set_sources_assignment_filter([])
+@@ -2154,6 +2208,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/patches/patch-base_allocator_BUILD.gn b/chromium/patches/patch-base_allocator_BUILD.gn
new file mode 100644
index 0000000000..bf705a3ca5
--- /dev/null
+++ b/chromium/patches/patch-base_allocator_BUILD.gn
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- base/allocator/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/allocator/BUILD.gn
+@@ -338,6 +338,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/patches/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc b/chromium/patches/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
new file mode 100644
index 0000000000..8cee8ea514
--- /dev/null
+++ b/chromium/patches/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
@@ -0,0 +1,88 @@
+$NetBSD$
+
+--- base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/allocator/allocator_shim_default_dispatch_to_glibc.cc
+@@ -3,19 +3,46 @@
+ // found in the LICENSE file.
+ 
+ #include "base/allocator/allocator_shim.h"
+-
+-#include <malloc.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 {
+@@ -23,23 +50,23 @@ 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);
+ }
+ 
+ void GlibcFree(const AllocatorDispatch*, void* address) {
+-  __libc_free(address);
++  __free(address);
+ }
+ 
+ size_t GlibcGetSizeEstimate(const AllocatorDispatch*, void* address) {
diff --git a/chromium/patches/patch-base_allocator_allocator__shim__override__libc__symbols.h b/chromium/patches/patch-base_allocator_allocator__shim__override__libc__symbols.h
new file mode 100644
index 0000000000..3d25ada194
--- /dev/null
+++ b/chromium/patches/patch-base_allocator_allocator__shim__override__libc__symbols.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/allocator/allocator_shim_override_libc_symbols.h.orig	2017-02-02 02:02:47.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/patches/patch-base_allocator_allocator__shim__unittest.cc b/chromium/patches/patch-base_allocator_allocator__shim__unittest.cc
new file mode 100644
index 0000000000..1ff9951ac2
--- /dev/null
+++ b/chromium/patches/patch-base_allocator_allocator__shim__unittest.cc
@@ -0,0 +1,63 @@
+$NetBSD$
+
+--- base/allocator/allocator_shim_unittest.cc.orig	2017-02-02 02:02:47.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/patches/patch-base_base__paths__posix.cc b/chromium/patches/patch-base_base__paths__posix.cc
new file mode 100644
index 0000000000..224ab5238b
--- /dev/null
+++ b/chromium/patches/patch-base_base__paths__posix.cc
@@ -0,0 +1,47 @@
+$NetBSD$
+
+--- 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"
+ #include "build/build_config.h"
+ 
+-#if defined(OS_FREEBSD)
++#if defined(OS_BSD)
+ #include <sys/param.h>
+ #include <sys/sysctl.h>
++#include <unistd.h>
+ #elif defined(OS_SOLARIS)
+ #include <stdlib.h>
+ #endif
+@@ -59,6 +60,30 @@ bool PathProviderPosix(int key, FilePath
+       }
+       *result = FilePath(FilePath::StringType(bin_dir, length - 1));
+       return true;
++#elif defined(OS_NETBSD)
++      char pathname[MAXPATHLEN];
++      int mib[4];
++      int ret;
++      size_t size;
++
++      mib[0] = CTL_KERN;
++      mib[1] = KERN_PROC_ARGS;
++      mib[2] = getpid();
++      mib[3] = KERN_PROC_PATHNAME;
++
++      size = sizeof(pathname);
++      ret = sysctl(mib, 4, NULL, &size, NULL, 0);
++      if (ret == -1) {
++        return false;
++      }
++
++      ret = sysctl(mib, 4, pathname, &size, NULL, 0);
++      if (ret == -1 || strlen(pathname) == 0) {
++        return false;
++      }
++
++      *result = FilePath(FilePath::StringType(pathname, size - 1));
++      return true;
+ #elif defined(OS_SOLARIS)
+       char bin_dir[PATH_MAX + 1];
+       if (realpath(getexecname(), bin_dir) == NULL) {
diff --git a/chromium/patches/patch-base_debug_debugger__posix.cc b/chromium/patches/patch-base_debug_debugger__posix.cc
new file mode 100644
index 0000000000..44d088c97f
--- /dev/null
+++ b/chromium/patches/patch-base_debug_debugger__posix.cc
@@ -0,0 +1,62 @@
+$NetBSD$
+
+--- 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 {
+ namespace debug {
+ 
+-#if defined(OS_MACOSX) || defined(OS_BSD)
++#if defined(OS_NETBSD)
++bool BeingDebugged() {
++  static bool is_set = false;
++  static bool being_debugged = false;
++  int ret;
++
++  if (is_set)
++    return being_debugged;
++
++  int mib[6];
++  size_t size;
++  struct kinfo_proc2 kproc;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = getpid();
++  mib[4] = sizeof(kinfo_proc2);
++  mib[5] = 1;
++
++  ret = sysctl((int *)mib, 6, NULL, &size, NULL, 0);
++  if (ret == -1) {
++    return -1;
++  }
++
++  mib[5] = (size / sizeof(kinfo_proc2));
+ 
++  ret = sysctl((int *)mib, 6, &kproc, &size, NULL, 0);
++  if (ret == -1) {
++    return -1;
++    is_set = true;
++    being_debugged = false;
++    return being_debugged;
++  }
++  
++  is_set = true;
++  being_debugged = (kproc.p_flag & P_TRACED) != 0;
++  return being_debugged;
++
++}
++#else
++#if defined(OS_MACOSX) || defined(OS_BSD)
+ // Based on Apple's recommended method as described in
+ // http://developer.apple.com/qa/qa2004/qa1361.html
+ bool BeingDebugged() {
+@@ -167,6 +207,7 @@ bool BeingDebugged() {
+ }
+ 
+ #endif
++#endif
+ 
+ // We want to break into the debugger in Debug mode, and cause a crash dump in
+ // Release mode. Breakpad behaves as follows:
diff --git a/chromium/patches/patch-base_debug_proc__maps__linux.cc b/chromium/patches/patch-base_debug_proc__maps__linux.cc
new file mode 100644
index 0000000000..02fc4d39c0
--- /dev/null
+++ b/chromium/patches/patch-base_debug_proc__maps__linux.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/debug/proc_maps_linux.cc.orig	2017-02-02 02:02:47.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/patches/patch-base_debug_stack__trace__posix.cc b/chromium/patches/patch-base_debug_stack__trace__posix.cc
new file mode 100644
index 0000000000..d9ff487d23
--- /dev/null
+++ b/chromium/patches/patch-base_debug_stack__trace__posix.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- base/debug/stack_trace_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/debug/stack_trace_posix.cc
+@@ -571,6 +571,10 @@ class SandboxSymbolizeHelper {
+   // for the modules that are loaded in the current process.
+   // Returns true on success.
+   bool CacheMemoryRegions() {
++#if defined(OS_FREEBSD) || defined(OS_NETBSD)
++    // TODO (rene) avoid link error, implement something?
++    return false;
++#else
+     // Reads /proc/self/maps.
+     std::string contents;
+     if (!ReadProcMaps(&contents)) {
+@@ -586,6 +590,7 @@ class SandboxSymbolizeHelper {
+ 
+     is_initialized_ = true;
+     return true;
++#endif
+   }
+ 
+   // Opens all object files and caches their file descriptors.
diff --git a/chromium/patches/patch-base_debug_thread__heap__usage__tracker.cc b/chromium/patches/patch-base_debug_thread__heap__usage__tracker.cc
new file mode 100644
index 0000000000..8bf244053e
--- /dev/null
+++ b/chromium/patches/patch-base_debug_thread__heap__usage__tracker.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- base/debug/thread_heap_usage_tracker.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/debug/thread_heap_usage_tracker.cc
+@@ -14,11 +14,13 @@
+ #include "base/threading/thread_local_storage.h"
+ #include "build/build_config.h"
+ 
++#if !defined(OS_BSD)
+ #if defined(OS_MACOSX) || defined(OS_IOS)
+ #include <malloc/malloc.h>
+ #else
+ #include <malloc.h>
+ #endif
++#endif
+ 
+ namespace base {
+ namespace debug {
diff --git a/chromium/patches/patch-base_files_file__path__unittest.cc b/chromium/patches/patch-base_files_file__path__unittest.cc
new file mode 100644
index 0000000000..8b7b61c55f
--- /dev/null
+++ b/chromium/patches/patch-base_files_file__path__unittest.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/files/file_path_unittest.cc.orig	2017-02-02 02:02:47.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/patches/patch-base_files_file__path__watcher__kqueue.h b/chromium/patches/patch-base_files_file__path__watcher__kqueue.h
new file mode 100644
index 0000000000..de2451c2be
--- /dev/null
+++ b/chromium/patches/patch-base_files_file__path__watcher__kqueue.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- base/files/file_path_watcher_kqueue.h.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/files/file_path_watcher_kqueue.h
+@@ -5,6 +5,10 @@
+ #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+ #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+ 
++#ifdef __FreeBSD__
++#include <sys/stdint.h>
++#include <sys/types.h>
++#endif
+ #include <sys/event.h>
+ 
+ #include <memory>
diff --git a/chromium/patches/patch-base_files_file__util.h b/chromium/patches/patch-base_files_file__util.h
new file mode 100644
index 0000000000..6adc59f702
--- /dev/null
+++ b/chromium/patches/patch-base_files_file__util.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/files/file_util.h.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/files/file_util.h
+@@ -404,7 +404,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/patches/patch-base_linux__util.cc b/chromium/patches/patch-base_linux__util.cc
new file mode 100644
index 0000000000..fedfdad949
--- /dev/null
+++ b/chromium/patches/patch-base_linux__util.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- base/linux_util.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/linux_util.cc
+@@ -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_BSD)
+   return g_linux_distro;
+ #elif defined(OS_LINUX)
+   LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance();
diff --git a/chromium/patches/patch-base_native__library__posix.cc b/chromium/patches/patch-base_native__library__posix.cc
new file mode 100644
index 0000000000..a787417f72
--- /dev/null
+++ b/chromium/patches/patch-base_native__library__posix.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/native_library_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/native_library_posix.cc
+@@ -35,7 +35,7 @@ NativeLibrary LoadNativeLibraryWithOptio
+   // further investigation, as it might vary across 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/patches/patch-base_posix_unix__domain__socket__linux.cc b/chromium/patches/patch-base_posix_unix__domain__socket__linux.cc
new file mode 100644
index 0000000000..1395578e8c
--- /dev/null
+++ b/chromium/patches/patch-base_posix_unix__domain__socket__linux.cc
@@ -0,0 +1,47 @@
+$NetBSD$
+
+--- base/posix/unix_domain_socket_linux.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/posix/unix_domain_socket_linux.cc
+@@ -23,6 +23,15 @@
+ 
+ namespace base {
+ 
++#if defined(OS_BSD)
++// Port over Linux ucred structure
++struct ucred {
++  pid_t pid; // process ID of the sending process
++  uid_t uid; // user ID of the sending process
++  gid_t gid; // group ID of the sending process
++};
++#endif
++
+ const size_t UnixDomainSocket::kMaxFileDescriptors = 16;
+ 
+ #if !defined(OS_NACL_NONSFI)
+@@ -40,8 +49,14 @@ static bool CreateSocketPair(ScopedFD* o
+ 
+ // static
+ bool UnixDomainSocket::EnableReceiveProcessId(int fd) {
++#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
+ }
+ #endif  // !defined(OS_NACL_NONSFI)
+ 
+@@ -147,7 +162,11 @@ ssize_t UnixDomainSocket::RecvMsgWithFla
+       // The PNaCl toolchain for Non-SFI binary build does not support
+       // SCM_CREDENTIALS.
+       if (cmsg->cmsg_level == SOL_SOCKET &&
++#if defined(OS_BSD)
++        1) { // XXX(rene) carpet getting full ...
++#else
+           cmsg->cmsg_type == SCM_CREDENTIALS) {
++#endif
+         DCHECK_EQ(payload_len, sizeof(struct ucred));
+         DCHECK_EQ(pid, -1);
+         pid = reinterpret_cast<struct ucred*>(CMSG_DATA(cmsg))->pid;
diff --git a/chromium/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc b/chromium/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc
new file mode 100644
index 0000000000..5307336f30
--- /dev/null
+++ b/chromium/patches/patch-base_posix_unix__domain__socket__linux__unittest.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- base/posix/unix_domain_socket_linux_unittest.cc.orig	2017-02-02 02:02:47.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
+ // found in the LICENSE file.
+ 
++#include "build/build_config.h"
++
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <sys/socket.h>
+ #include <sys/types.h>
++#if defined(OS_BSD)
++#include <signal.h>
++#endif
+ #include <unistd.h>
+ 
+ #include "base/bind.h"
diff --git a/chromium/patches/patch-base_process_internal__linux.h b/chromium/patches/patch-base_process_internal__linux.h
new file mode 100644
index 0000000000..726368b225
--- /dev/null
+++ b/chromium/patches/patch-base_process_internal__linux.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/process/internal_linux.h.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/process/internal_linux.h
+@@ -14,6 +14,8 @@
+ 
+ #include "base/files/file_path.h"
+ 
++#include <unistd.h> /* pid_t */
++
+ namespace base {
+ 
+ class Time;
diff --git a/chromium/patches/patch-base_process_launch.cc b/chromium/patches/patch-base_process_launch.cc
new file mode 100644
index 0000000000..58d2e42ffd
--- /dev/null
+++ b/chromium/patches/patch-base_process_launch.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/process/launch.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/process/launch.cc
+@@ -15,7 +15,7 @@ LaunchOptions::~LaunchOptions() = defaul
+ 
+ LaunchOptions LaunchOptionsForTest() {
+   LaunchOptions options;
+-#if defined(OS_LINUX)
++#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/patches/patch-base_process_launch.h b/chromium/patches/patch-base_process_launch.h
new file mode 100644
index 0000000000..758ce9c67a
--- /dev/null
+++ b/chromium/patches/patch-base_process_launch.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- base/process/launch.h.orig	2017-02-02 02:02:47.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 = false;
+ 
+-#if defined(OS_LINUX)
++#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 = false;
+-#endif  // defined(OS_LINUX)
++#endif  // defined(OS_LINUX) || defined(OS_BSD)
+ 
+ #if defined(OS_POSIX)
+   // If not empty, launch the specified executable instead of
diff --git a/chromium/patches/patch-base_process_launch__posix.cc b/chromium/patches/patch-base_process_launch__posix.cc
new file mode 100644
index 0000000000..8bac342272
--- /dev/null
+++ b/chromium/patches/patch-base_process_launch__posix.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- base/process/launch_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/process/launch_posix.cc
+@@ -64,6 +64,7 @@
+ #include "base/feature_list.h"
+ #else
+ extern char** environ;
++#pragma weak environ
+ #endif
+ 
+ namespace base {
+@@ -219,6 +220,8 @@ static const char kFDDir[] = "/dev/fd";
+ static const char kFDDir[] = "/dev/fd";
+ #elif defined(OS_FREEBSD)
+ static const char kFDDir[] = "/dev/fd";
++#elif defined(OS_NETBSD)
++static const char kFDDir[] = "/dev/fd";
+ #elif defined(OS_OPENBSD)
+ static const char kFDDir[] = "/dev/fd";
+ #elif defined(OS_ANDROID)
diff --git a/chromium/patches/patch-base_process_memory.h b/chromium/patches/patch-base_process_memory.h
new file mode 100644
index 0000000000..c835e6d423
--- /dev/null
+++ b/chromium/patches/patch-base_process_memory.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/process/memory.h.orig	2017-02-02 02:02:47.000000000 +0000
++++ 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);
+ 
+-#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;
+ 
+ // The maximum allowed value for the OOM score.
diff --git a/chromium/patches/patch-base_process_memory__stubs.cc b/chromium/patches/patch-base_process_memory__stubs.cc
new file mode 100644
index 0000000000..d37b9a0b61
--- /dev/null
+++ b/chromium/patches/patch-base_process_memory__stubs.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- base/process/memory_stubs.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/process/memory_stubs.cc
+@@ -31,6 +31,8 @@ void TerminateBecauseOutOfMemory(size_t 
+ // their respective stdlib function since those functions will return null on a
+ // failure to allocate.
+ 
++#if !defined(OS_FREEBSD)
++// FreeBSD brings it's own implementation in memory.cc -- cmt
+ bool UncheckedMalloc(size_t size, void** result) {
+   *result = malloc(size);
+   return *result != nullptr;
+@@ -40,5 +42,6 @@ bool UncheckedCalloc(size_t num_items, s
+   *result = calloc(num_items, size);
+   return *result != nullptr;
+ }
++#endif
+ 
+ }  // namespace base
diff --git a/chromium/patches/patch-base_process_memory__unittest.cc b/chromium/patches/patch-base_process_memory__unittest.cc
new file mode 100644
index 0000000000..e8bd922e6c
--- /dev/null
+++ b/chromium/patches/patch-base_process_memory__unittest.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- base/process/memory_unittest.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/process/memory_unittest.cc
+@@ -82,10 +82,10 @@ TEST(MemoryTest, AllocatorShimWorking) {
+   ASSERT_TRUE(base::allocator::IsAllocatorInitialized());
+ }
+ 
+-// 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_OPENBSD) && \
++#if !defined(OS_BSD) && \
+     BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) && \
+     !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
+ 
+@@ -439,5 +439,5 @@ TEST_F(OutOfMemoryHandledTest, Unchecked
+   EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_));
+   EXPECT_TRUE(value_ == NULL);
+ }
+-#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/patches/patch-base_process_process__handle__freebsd.cc b/chromium/patches/patch-base_process_process__handle__freebsd.cc
new file mode 100644
index 0000000000..80ed602a2e
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__handle__freebsd.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/process/process_handle_freebsd.cc.orig	2017-02-02 02:02:47.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/patches/patch-base_process_process__handle__netbsd.cc b/chromium/patches/patch-base_process_process__handle__netbsd.cc
new file mode 100644
index 0000000000..9c4aee894e
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__handle__netbsd.cc
@@ -0,0 +1,71 @@
+$NetBSD$
+
+--- base/process/process_handle_netbsd.cc.orig	2016-11-16 08:03:06.205887318 +0000
++++ base/process/process_handle_netbsd.cc
+@@ -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.
++
++#include "base/macros.h"
++#include "base/process/process_handle.h"
++
++#include <stddef.h>
++#include <sys/sysctl.h>
++#include <sys/types.h>
++#include <unistd.h>
++
++namespace base {
++
++ProcessId GetParentProcessId(ProcessHandle process) {
++  struct kinfo_proc2 info;
++  size_t info_size = sizeof(struct kinfo_proc2);
++  int mib[6];
++  int ret;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return -1;
++  }
++  if (info_size == 0) {
++    return -1;
++  }
++
++  return info.p_ppid;
++}
++
++FilePath GetProcessExecutablePath(ProcessHandle process) {
++  size_t size = sizeof(struct kinfo_proc2);
++  int mib[4];
++  int ret;
++  char pathname[MAXPATHLEN];
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC_ARGS;
++  mib[2] = process;
++  mib[3] = KERN_PROC_PATHNAME;
++
++  ret = sysctl(mib, 4, NULL, &size, NULL, 0);
++  if (ret == -1) {
++    return FilePath();
++  }
++
++  ret = sysctl(mib, 4, pathname, &size, NULL, 0);
++  if (ret == -1) {
++    return FilePath();
++  }
++  if (size == 0 || strlen(pathname) == 0) {
++    return FilePath();
++  }
++
++  return FilePath(pathname);
++}
++
++}  // namespace base
diff --git a/chromium/patches/patch-base_process_process__info__linux.cc b/chromium/patches/patch-base_process_process__info__linux.cc
new file mode 100644
index 0000000000..ad55c1a0b2
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__info__linux.cc
@@ -0,0 +1,74 @@
+$NetBSD$
+
+--- 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"
+ #include "base/time/time.h"
+ 
++#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#endif
++
+ namespace base {
+ 
+ // static
+ const Time CurrentProcessInfo::CreationTime() {
++#if defined(__FreeBSD__) || defined(__DragonFly__)
++  int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
++  struct kinfo_proc proc;
++  size_t len = sizeof(struct kinfo_proc);
++  if (sysctl(mib, arraysize(mib), &proc, &len, NULL, 0) < 0)
++    return Time();
++#if defined(__DragonFly__)
++  return Time::FromTimeVal(proc.kp_start);
++#else
++  return Time::FromTimeVal(proc.ki_start);
++#endif
++#elif defined(__NetBSD__)
++  struct kinfo_proc2 kproc;
++  size_t esize = sizeof(kinfo_proc2);
++  size_t size;
++  int st;
++  int mib[6];
++  struct timeval tv;
++
++  tv.tv_sec = 0;
++  tv.tv_usec = 0;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = getpid();
++  mib[4] = esize;
++  mib[5] = 0;
++
++  st = sysctl(mib, 6, NULL, &size, NULL, (size_t)0);
++  if (st == -1) {
++      return Time::FromTimeVal(tv);
++  }
++
++  mib[5] = (int)(size / esize);
++  st = sysctl(mib, 6, &kproc, &size, NULL, (size_t)0);
++  if (st == -1) {
++      return Time::FromTimeVal(tv);
++  }
++
++  tv.tv_sec = kproc.p_ustart_sec;
++  tv.tv_usec = kproc.p_ustart_usec;
++
++  return Time::FromTimeVal(tv);
++#else
+   ProcessHandle pid = GetCurrentProcessHandle();
+   int64_t start_ticks =
+       internal::ReadProcStatsAndGetFieldAsInt64(pid, internal::VM_STARTTIME);
+@@ -23,6 +74,7 @@ const Time CurrentProcessInfo::CreationT
+   Time boot_time = internal::GetBootTime();
+   DCHECK(!boot_time.is_null());
+   return Time(boot_time + start_offset);
++#endif
+ }
+ 
+ }  // namespace base
diff --git a/chromium/patches/patch-base_process_process__iterator.h b/chromium/patches/patch-base_process_process__iterator.h
new file mode 100644
index 0000000000..c0c34ff00c
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__iterator.h
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- 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)
+ #include <windows.h>
+ #include <tlhelp32.h>
+-#elif defined(OS_MACOSX) || defined(OS_OPENBSD)
++#elif defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_NETBSD)
+ #include <sys/sysctl.h>
+ #elif defined(OS_FREEBSD)
+ #include <sys/user.h>
+@@ -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_POSIX)
+   DIR* procfs_dir_;
+ #endif
diff --git a/chromium/patches/patch-base_process_process__iterator__freebsd.cc b/chromium/patches/patch-base_process_process__iterator__freebsd.cc
new file mode 100644
index 0000000000..d0a01fcde8
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__iterator__freebsd.cc
@@ -0,0 +1,38 @@
+$NetBSD$
+
+--- base/process/process_iterator_freebsd.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/process/process_iterator_freebsd.cc
+@@ -10,6 +10,10 @@
+ #include <sys/sysctl.h>
+ #include <unistd.h>
+ 
++/* getuid() */
++#include <unistd.h>
++#include <sys/types.h>
++
+ #include "base/logging.h"
+ #include "base/macros.h"
+ #include "base/strings/string_split.h"
+@@ -72,19 +76,13 @@ bool ProcessIterator::CheckForNextProces
+   for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
+     size_t length;
+     struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_];
+-    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid };
++    int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, kinfo.ki_pid };
+ 
+     if ((kinfo.ki_pid > 0) && (kinfo.ki_stat == SZOMB))
+       continue;
+ 
+-    length = 0;
+-    if (sysctl(mib, arraysize(mib), NULL, &length, NULL, 0) < 0) {
+-      LOG(ERROR) << "failed to figure out the buffer size for a command line";
+-      continue;
+-    }
+-
+-    data.resize(length);
+-
++    data.resize(ARG_MAX);
++    length = ARG_MAX;
+     if (sysctl(mib, arraysize(mib), &data[0], &length, NULL, 0) < 0) {
+       LOG(ERROR) << "failed to fetch a commandline";
+       continue;
diff --git a/chromium/patches/patch-base_process_process__iterator__netbsd.cc b/chromium/patches/patch-base_process_process__iterator__netbsd.cc
new file mode 100644
index 0000000000..92c19eb86c
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__iterator__netbsd.cc
@@ -0,0 +1,151 @@
+$NetBSD$
+
+--- 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.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "base/process/process_iterator.h"
++
++#include <errno.h>
++#include <sys/types.h>
++#include <stddef.h>
++#include <sys/sysctl.h>
++#include <unistd.h>
++
++/* getuid() */
++#include <unistd.h>
++#include <sys/types.h>
++
++#include "base/logging.h"
++#include "base/macros.h"
++#include "base/strings/string_split.h"
++#include "base/strings/string_util.h"
++
++namespace base {
++
++ProcessIterator::ProcessIterator(const ProcessFilter* filter)
++  : index_of_kinfo_proc_(),
++  filter_(filter) {
++
++  int mib[6];
++
++  printf("%s\n", __PRETTY_FUNCTION__);
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_UID;
++  mib[3] = getuid();
++  mib[4] = sizeof(struct kinfo_proc2);
++  mib[5] = 0;
++
++  bool done = false;
++  int try_num = 1;
++  const int max_tries = 10;
++
++  do {
++    size_t len = 0;
++    if (sysctl(mib, 6, NULL, &len, NULL, 0) <0 ){
++      LOG(ERROR) << "failed to get the size needed for the process list";
++      kinfo_procs_.resize(0);
++      done = true;
++    } else {
++      size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);
++      // Leave some spare room for process table growth (more could show up
++      // between when we check and now)
++      num_of_kinfo_proc += 16;
++      kinfo_procs_.resize(num_of_kinfo_proc);
++      len = num_of_kinfo_proc * sizeof(struct kinfo_proc2);
++      if (sysctl(mib, 6, &kinfo_procs_[0], &len, NULL, 0) <0) {
++        // If we get a mem error, it just means we need a bigger buffer, so
++        // loop around again.  Anything else is a real error and give up.
++        if (errno != ENOMEM) {
++          LOG(ERROR) << "failed to get the process list";
++          kinfo_procs_.resize(0);
++          done = true;
++        }
++      } else {
++        // Got the list, just make sure we're sized exactly right
++        size_t num_of_kinfo_proc = len / sizeof(struct kinfo_proc2);
++        kinfo_procs_.resize(num_of_kinfo_proc);
++        done = true;
++      }
++    }
++  } while (!done && (try_num++ < max_tries));
++
++  if (!done) {
++    LOG(ERROR) << "failed to collect the process list in a few tries";
++    kinfo_procs_.resize(0);
++  }
++}
++
++ProcessIterator::~ProcessIterator() {
++}
++
++bool ProcessIterator::CheckForNextProcess() {
++  std::string data;
++  for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
++    kinfo_proc2& kinfo = kinfo_procs_[index_of_kinfo_proc_];
++
++    // Skip processes just awaiting collection
++    if ((kinfo.p_pid > 0) && (kinfo.p_stat == SZOMB))
++      continue;
++
++    int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.p_pid };
++
++    // Find out what size buffer we need.
++    size_t data_len = 0;
++    if (sysctl(mib, arraysize(mib), NULL, &data_len, NULL, 0) < 0) {
++      DVPLOG(1) << "failed to figure out the buffer size for a commandline";
++      continue;
++    }
++
++    data.resize(data_len);
++    if (sysctl(mib, arraysize(mib), &data[0], &data_len, NULL, 0) < 0) {
++      DVPLOG(1) << "failed to fetch a commandline";
++      continue;
++    }
++
++    // |data| contains all the command line parameters of the process, separated
++    // by blocks of one or more null characters. We tokenize |data| into a
++    // vector of strings using '\0' as a delimiter and populate
++    // |entry_.cmd_line_args_|.
++    std::string delimiters;
++    delimiters.push_back('\0');
++    entry_.cmd_line_args_ = SplitString(data, delimiters, KEEP_WHITESPACE,
++                                        SPLIT_WANT_NONEMPTY);
++
++    // |data| starts with the full executable path followed by a null character.
++    // We search for the first instance of '\0' and extract everything before it
++    // to populate |entry_.exe_file_|.
++    size_t exec_name_end = data.find('\0');
++    if (exec_name_end == std::string::npos) {
++      DLOG(ERROR) << "command line data didn't match expected format";
++      continue;
++    }
++
++    entry_.pid_ = kinfo.p_pid;
++    entry_.ppid_ = kinfo.p_ppid;
++    entry_.gid_ = kinfo.p__pgid;
++    size_t last_slash = data.rfind('/', exec_name_end);
++    if (last_slash == std::string::npos)
++      entry_.exe_file_.assign(data, 0, exec_name_end);
++    else
++      entry_.exe_file_.assign(data, last_slash + 1,
++                              exec_name_end - last_slash - 1);
++    // Start w/ the next entry next time through
++    ++index_of_kinfo_proc_;
++    // Done
++    return true;
++  }
++  return false;
++}
++
++bool NamedProcessIterator::IncludeEntry() {
++  return (executable_name_ == entry().exe_file() &&
++                            ProcessIterator::IncludeEntry());
++}
++
++}  // namespace base
diff --git a/chromium/patches/patch-base_process_process__metrics.h b/chromium/patches/patch-base_process_process__metrics.h
new file mode 100644
index 0000000000..e6404b3051
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__metrics.h
@@ -0,0 +1,35 @@
+$NetBSD$
+
+--- base/process/process_metrics.h.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/process/process_metrics.h
+@@ -22,6 +22,12 @@
+ #include "base/values.h"
+ #include "build/build_config.h"
+ 
++#if defined(OS_BSD)
++#include <kvm.h>
++#include <sys/param.h>
++#include <sys/sysctl.h>
++#endif
++
+ #if defined(OS_MACOSX)
+ #include <mach/mach.h>
+ #include "base/process/port_provider_mac.h"
+@@ -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_BSD)
+ // 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.
+ // Returns 0 on failure.
+ BASE_EXPORT int GetNumberOfThreads(ProcessHandle process);
++#endif
+ 
++#if defined(OS_LINUX) || defined(OS_ANDROID)
+ // /proc/self/exe refers to the current executable.
+ BASE_EXPORT extern const char kProcSelfExe[];
+ 
diff --git a/chromium/patches/patch-base_process_process__metrics__freebsd.cc b/chromium/patches/patch-base_process_process__metrics__freebsd.cc
new file mode 100644
index 0000000000..982d01b66f
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__metrics__freebsd.cc
@@ -0,0 +1,38 @@
+$NetBSD$
+
+--- base/process/process_metrics_freebsd.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/process/process_metrics_freebsd.cc
+@@ -13,6 +13,9 @@
+ #include "base/memory/ptr_util.h"
+ #include "base/sys_info.h"
+ 
++#include <unistd.h> /* getpagesize() */
++#include <fcntl.h>  /* O_RDONLY */
++
+ namespace base {
+ 
+ ProcessMetrics::ProcessMetrics(ProcessHandle process)
+@@ -122,4 +125,23 @@ size_t GetSystemCommitCharge() {
+   return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
+ }
+ 
++int GetNumberOfThreads(ProcessHandle process) {
++  // Taken from FreeBSD top (usr.bin/top/machine.c)
++
++  kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open");
++  if (kd == NULL)
++    return 0;
++
++  struct kinfo_proc* pbase;
++  int nproc;
++  pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc);
++  if (pbase == NULL)
++    return 0;
++
++  if (kvm_close(kd) == -1)
++    return 0;
++
++  return nproc;
++}
++
+ }  // namespace base
diff --git a/chromium/patches/patch-base_process_process__metrics__netbsd.cc b/chromium/patches/patch-base_process_process__metrics__netbsd.cc
new file mode 100644
index 0000000000..b56177f955
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__metrics__netbsd.cc
@@ -0,0 +1,208 @@
+$NetBSD$
+
+--- base/process/process_metrics_netbsd.cc.orig	2016-11-12 06:32:44.816301555 +0000
++++ base/process/process_metrics_netbsd.cc
+@@ -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.
++
++#include "base/process/process_metrics.h"
++
++#include <stddef.h>
++#include <sys/sysctl.h>
++#include <sys/user.h>
++#include <unistd.h>
++
++#include "base/macros.h"
++#include "base/memory/ptr_util.h"
++#include "base/sys_info.h"
++
++#include <unistd.h> /* getpagesize() */
++#include <fcntl.h>  /* O_RDONLY */
++
++#include <uvm/uvm_extern.h> /* struct vmtotal */
++
++namespace base {
++
++ProcessMetrics::ProcessMetrics(ProcessHandle process)
++    : process_(process),
++      last_system_time_(0),
++      last_cpu_(0) {
++  processor_count_ = base::SysInfo::NumberOfProcessors();
++}
++
++// static
++std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
++    ProcessHandle process) {
++  return WrapUnique(new ProcessMetrics(process));
++}
++
++size_t ProcessMetrics::GetPagefileUsage() const {
++  struct kinfo_proc2 info;
++  int mib[6];
++  size_t info_size = sizeof(info);
++  int ret;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process_;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  if (info_size == 0) {
++    return 0;
++  }
++
++  return (info.p_vm_tsize + info.p_vm_dsize + info.p_vm_ssize);
++}
++
++size_t ProcessMetrics::GetPeakPagefileUsage() const {
++  printf("%s\n", __PRETTY_FUNCTION__);
++  return 0;
++}
++
++size_t ProcessMetrics::GetWorkingSetSize() const {
++  struct kinfo_proc2 info;
++  int mib[6];
++  size_t info_size = sizeof(info);
++  int ret;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process_;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  if (info_size == 0) {
++    return 0;
++  }
++
++  return info.p_vm_rssize * getpagesize();
++}
++
++size_t ProcessMetrics::GetPeakWorkingSetSize() const {
++  return 0;
++}
++
++bool ProcessMetrics::GetMemoryBytes(size_t* private_bytes,
++                                    size_t* shared_bytes) {
++  WorkingSetKBytes ws_usage;
++  if (!GetWorkingSetKBytes(&ws_usage))
++    return false;
++
++  if (private_bytes)
++    *private_bytes = ws_usage.priv << 10;
++
++  if (shared_bytes)
++    *shared_bytes = ws_usage.shared * 1024;
++
++  return true;
++}
++
++bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {
++// TODO(bapt) be sure we can't be precise
++  size_t priv = GetWorkingSetSize();
++  if (!priv)
++    return false;
++  ws_usage->priv = priv / 1024;
++  ws_usage->shareable = 0;
++  ws_usage->shared = 0;
++
++  return true;
++}
++
++double ProcessMetrics::GetCPUUsage() {
++  struct kinfo_proc2 info;
++  int mib[6];
++  size_t info_size = sizeof(info);
++  int ret;
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process_;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  if (info_size == 0) {
++    return 0;
++  }
++
++  return (info.p_pctcpu / FSCALE) * 100.0;
++}
++
++bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
++/* ryoon: should be written */
++  return false;
++}
++
++size_t GetSystemCommitCharge() {
++  int mib[2], pagesize;
++  struct vmtotal vmtotal;
++  unsigned long mem_total, mem_free, mem_inactive;
++  size_t len = sizeof(vmtotal);
++  int ret;
++
++  printf("%s\n", __PRETTY_FUNCTION__);
++
++  mib[0] = CTL_VM;
++  mib[1] = VM_METER;
++
++  ret = sysctl(mib, 2, &vmtotal, &len, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  mem_total = vmtotal.t_vm;
++  mem_free = vmtotal.t_free;
++  mem_inactive = vmtotal.t_vm - vmtotal.t_avm;
++
++  pagesize = getpagesize();
++
++  return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
++}
++
++int GetNumberOfThreads(ProcessHandle process) {
++  int ret;
++  int mib[6];
++  struct kinfo_proc2 info;
++  size_t info_size = sizeof(info);
++
++  mib[0] = CTL_KERN;
++  mib[1] = KERN_PROC2;
++  mib[2] = KERN_PROC_PID;
++  mib[3] = process;
++  mib[4] = info_size;
++  mib[5] = 1;
++
++  ret = sysctl(mib, 6, &info, &info_size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  if (info_size == 0) {
++    return 0;
++  }
++
++  return info.p_nlwps;
++}
++
++}  // namespace base
diff --git a/chromium/patches/patch-base_process_process__posix.cc b/chromium/patches/patch-base_process_process__posix.cc
new file mode 100644
index 0000000000..4df01352bd
--- /dev/null
+++ b/chromium/patches/patch-base_process_process__posix.cc
@@ -0,0 +1,92 @@
+$NetBSD$
+
+--- base/process/process_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/process/process_posix.cc
+@@ -21,8 +21,18 @@
+ #include <sys/event.h>
+ #endif
+ 
++#if defined(OS_BSD)
++#include <signal.h>
++#include <sys/types.h>
++#include <sys/event.h>
++#include <sys/time.h>
++#endif
++
+ namespace {
+ 
++const int kBackgroundPriority = 5;
++const int kForegroundPriority = 0;
++
+ #if !defined(OS_NACL_NONSFI)
+ 
+ bool WaitpidWithTimeout(base::ProcessHandle handle,
+@@ -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_FREEBSD)
+     // On Mac we can wait on non child processes.
+-    return WaitForSingleNonChildProcess(handle, timeout);
++    /* return WaitForSingleNonChildProcess(handle, timeout); */
+ #else
+     // Currently on Linux we can't handle non child processes.
+     NOTIMPLEMENTED();
+-#endif  // OS_MACOSX
++#endif  // OS_MACOSX || OS_FREEBSD
+   }
+ 
+   int status;
+@@ -257,12 +267,16 @@ Process Process::DeprecatedGetProcessFro
+   return Process(handle);
+ }
+ 
+-#if !defined(OS_LINUX) && !defined(OS_MACOSX)
++#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD)
+ // static
+ bool Process::CanBackgroundProcesses() {
+   return false;
+ }
+-#endif  // !defined(OS_LINUX) && !defined(OS_MACOSX)
++#elif defined(OS_FREEBSD)
++bool Process::CanBackgroundProcesses() {
++  return true;
++}
++#endif  // !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_FREEBSD)
+ 
+ bool Process::IsValid() const {
+   return process_ != kNullProcessHandle;
+@@ -365,15 +379,32 @@ bool Process::WaitForExitWithTimeout(Tim
+ bool Process::IsProcessBackgrounded() const {
+   // See SetProcessBackgrounded().
+   DCHECK(IsValid());
++#if defined(OS_FREEBSD)
++  return true;
++#else
+   return false;
++#endif
+ }
+ 
+ bool Process::SetProcessBackgrounded(bool value) {
++#if !defined(OS_FREEBSD)
+   // Not implemented for POSIX systems other than Linux and Mac. With POSIX, if
+   // we were to lower the process priority we wouldn't be able to raise it back
+   // to its initial priority.
+   NOTIMPLEMENTED();
+   return false;
++#else
++  DCHECK(IsValid());
++
++  if (!CanBackgroundProcesses())
++    return false;
++
++  int priority = value ? kBackgroundPriority : kForegroundPriority;
++  int result   = setpriority(PRIO_PROCESS, process_, priority);
++
++  DPCHECK(result == 0);
++  return result == 0;
++#endif // !defined(OS_FREEBSD)
+ }
+ #endif  // !defined(OS_LINUX) && !defined(OS_MACOSX)
+ 
diff --git a/chromium/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc b/chromium/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
new file mode 100644
index 0000000000..c927332ebf
--- /dev/null
+++ b/chromium/patches/patch-base_profiler_stack__sampling__profiler__unittest.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/profiler/stack_sampling_profiler_unittest.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/profiler/stack_sampling_profiler_unittest.cc
+@@ -31,7 +31,7 @@
+ #include <intrin.h>
+ #include <malloc.h>
+ #include <windows.h>
+-#else
++#elif !defined(OS_BSD)
+ #include <alloca.h>
+ #endif
+ 
diff --git a/chromium/patches/patch-base_security__unittest.cc b/chromium/patches/patch-base_security__unittest.cc
new file mode 100644
index 0000000000..dc620b46aa
--- /dev/null
+++ b/chromium/patches/patch-base_security__unittest.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/security_unittest.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/security_unittest.cc
+@@ -74,7 +74,7 @@ bool IsTcMallocBypassed() {
+ // FAILS_ is too clunky.
+ void OverflowTestsSoftExpectTrue(bool overflow_detected) {
+   if (!overflow_detected) {
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_NACL)
+     // Sadly, on Linux, Android, and OSX we don't have a good story yet. Don't
+     // fail the test, but report.
+     printf("Platform has overflow: %s\n",
diff --git a/chromium/patches/patch-base_sys__info__freebsd.cc b/chromium/patches/patch-base_sys__info__freebsd.cc
new file mode 100644
index 0000000000..dbb9c8fc7b
--- /dev/null
+++ b/chromium/patches/patch-base_sys__info__freebsd.cc
@@ -0,0 +1,74 @@
+$NetBSD$
+
+--- base/sys_info_freebsd.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/sys_info_freebsd.cc
+@@ -12,12 +12,34 @@
+ 
+ namespace base {
+ 
++int64_t SysInfo::AmountOfAvailablePhysicalMemory() {
++  int page_size, r = 0;
++  unsigned pgfree, pginact, pgcache;
++  size_t size = sizeof(page_size);
++  size_t szpg = sizeof(pgfree);
++  if(r == 0)
++    r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
++  if(r == 0)
++    r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0);
++  if(r == 0)
++    r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0);
++  if(r == 0)
++    r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0);
++  if (r == -1) {
++    NOTREACHED();
++    return 0;
++  }
++  return static_cast<int64_t>((pgfree + pginact + pgcache) * page_size);
++}
++
+ int64_t SysInfo::AmountOfPhysicalMemory() {
+-  int pages, page_size;
++  int pages, page_size, r = 0;
+   size_t size = sizeof(pages);
+-  sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);
+-  sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
+-  if (pages == -1 || page_size == -1) {
++  if(r == 0)
++    r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);
++  if(r == 0)
++    r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
++  if (r == -1) {
+     NOTREACHED();
+     return 0;
+   }
+@@ -25,14 +47,24 @@ int64_t SysInfo::AmountOfPhysicalMemory(
+ }
+ 
+ // 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];
++  size_t size = arraysize(name);
++  if (sysctl(mib, arraysize(mib), &name, &size, NULL, 0) == 0)
++    return name;
++  return std::string();
++}
++
++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) == -1) {
+     NOTREACHED();
+-    return 0;
++    return 1;
+   }
+-  return static_cast<uint64_t>(limit);
++  return ncpu;
+ }
+ 
+ }  // namespace base
diff --git a/chromium/patches/patch-base_sys__info__netbsd.cc b/chromium/patches/patch-base_sys__info__netbsd.cc
new file mode 100644
index 0000000000..4d30cd6993
--- /dev/null
+++ b/chromium/patches/patch-base_sys__info__netbsd.cc
@@ -0,0 +1,82 @@
+$NetBSD$
+
+--- base/sys_info_netbsd.cc.orig	2016-11-12 07:18:17.632595486 +0000
++++ base/sys_info_netbsd.cc
+@@ -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.
++
++#include "base/sys_info.h"
++
++#include <stddef.h>
++#include <stdint.h>
++#include <sys/param.h>
++#include <sys/shm.h>
++#include <sys/sysctl.h>
++
++#include "base/logging.h"
++#include "base/macros.h"
++
++namespace {
++
++int64_t AmountOfMemory(int pages_name) {
++  long pages = sysconf(pages_name);
++  long page_size = sysconf(_SC_PAGESIZE);
++  if (pages == -1 || page_size == -1) {
++    NOTREACHED();
++    return 0;
++  }
++  return static_cast<int64_t>(pages) * page_size;
++}
++
++}  // namespace
++
++namespace base {
++
++int64_t SysInfo::AmountOfPhysicalMemory() {
++  return AmountOfMemory(_SC_PHYS_PAGES);
++}
++
++// static
++int64_t SysInfo::AmountOfAvailablePhysicalMemory() {
++  int ret;
++  int mib[2];
++  int64_t memsize;
++  unsigned long size = sizeof(memsize);
++
++  mib[0] = CTL_HW;
++  mib[1] = HW_PHYSMEM64;
++
++  ret = sysctl(mib, 2, &memsize, &size, NULL, 0);
++  if (ret == -1) {
++    return 0;
++  }
++
++  return memsize;
++}
++
++// static
++std::string SysInfo::CPUModelName() {
++  int mib[] = { CTL_HW, HW_MODEL };
++  char name[256];
++  size_t len = arraysize(name);
++  if (sysctl(mib, arraysize(mib), name, &len, NULL, 0) < 0) {
++    NOTREACHED();
++    return std::string();
++  }
++  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/patches/patch-base_sys__info__posix.cc b/chromium/patches/patch-base_sys__info__posix.cc
new file mode 100644
index 0000000000..08b7902bad
--- /dev/null
+++ b/chromium/patches/patch-base_sys__info__posix.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- base/sys_info_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/sys_info_posix.cc
+@@ -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_BSD)
+ int SysInfo::NumberOfProcessors() {
+   return g_lazy_number_of_processors.Get().value();
+ }
diff --git a/chromium/patches/patch-base_test_BUILD.gn b/chromium/patches/patch-base_test_BUILD.gn
new file mode 100644
index 0000000000..a66376d19b
--- /dev/null
+++ b/chromium/patches/patch-base_test_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/test/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/test/BUILD.gn
+@@ -303,7 +303,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/patches/patch-base_test_launcher_test__launcher.cc b/chromium/patches/patch-base_test_launcher_test__launcher.cc
new file mode 100644
index 0000000000..1f4993adc8
--- /dev/null
+++ b/chromium/patches/patch-base_test_launcher_test__launcher.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- base/test/launcher/test_launcher.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/test/launcher/test_launcher.cc
+@@ -59,6 +59,10 @@
+ #include "base/win/windows_version.h"
+ #endif
+ 
++#if defined(OS_FREEBSD)
++#include <signal.h>
++#endif
++
+ namespace base {
+ 
+ // See https://groups.google.com/a/chromium.org/d/msg/chromium-dev/nkdTP7sstSc/uT3FaE_sgkAJ .
diff --git a/chromium/patches/patch-base_test_test__file__util__posix.cc b/chromium/patches/patch-base_test_test__file__util__posix.cc
new file mode 100644
index 0000000000..3bc8f71820
--- /dev/null
+++ b/chromium/patches/patch-base_test_test__file__util__posix.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/test/test_file_util_posix.cc.orig	2017-02-02 02:02:47.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/patches/patch-base_third__party_libevent_BUILD.gn b/chromium/patches/patch-base_third__party_libevent_BUILD.gn
new file mode 100644
index 0000000000..68cd0d1fbe
--- /dev/null
+++ b/chromium/patches/patch-base_third__party_libevent_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- base/third_party/libevent/BUILD.gn.orig	2017-02-02 02:02:47.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/patches/patch-base_third__party_libevent_event-config.h b/chromium/patches/patch-base_third__party_libevent_event-config.h
new file mode 100644
index 0000000000..e2dccf0835
--- /dev/null
+++ b/chromium/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/patches/patch-base_third__party_libevent_netbsd_config.h b/chromium/patches/patch-base_third__party_libevent_netbsd_config.h
new file mode 100644
index 0000000000..26de331d39
--- /dev/null
+++ b/chromium/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/patches/patch-base_third__party_libevent_netbsd_event-config.h b/chromium/patches/patch-base_third__party_libevent_netbsd_event-config.h
new file mode 100644
index 0000000000..d0882dbcf6
--- /dev/null
+++ b/chromium/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/patches/patch-base_threading_platform__thread.h b/chromium/patches/patch-base_threading_platform__thread.h
new file mode 100644
index 0000000000..02180f7b48
--- /dev/null
+++ b/chromium/patches/patch-base_threading_platform__thread.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/threading/platform_thread.h.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/threading/platform_thread.h
+@@ -205,7 +205,7 @@ class BASE_EXPORT PlatformThread {
+ 
+   static ThreadPriority GetCurrentThreadPriority();
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // Toggles a specific thread's priority at runtime. This can be used to
+   // change the priority of a thread in a different process and will fail
+   // if the calling process does not have proper permissions. The
diff --git a/chromium/patches/patch-base_threading_platform__thread__linux.cc b/chromium/patches/patch-base_threading_platform__thread__linux.cc
new file mode 100644
index 0000000000..a3756c880e
--- /dev/null
+++ b/chromium/patches/patch-base_threading_platform__thread__linux.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+--- base/threading/platform_thread_linux.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/threading/platform_thread_linux.cc
+@@ -19,7 +19,9 @@
+ 
+ #if !defined(OS_NACL)
+ #include <pthread.h>
++#if !defined(OS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/resource.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
+@@ -130,7 +132,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
+@@ -150,7 +152,7 @@ void PlatformThread::SetName(const std::
+ #endif  //  !defined(OS_NACL)
+ }
+ 
+-#if !defined(OS_NACL)
++#if !defined(OS_NACL) && !defined(OS_BSD)
+ // static
+ void PlatformThread::SetThreadPriority(PlatformThreadId thread_id,
+                                        ThreadPriority priority) {
diff --git a/chromium/patches/patch-base_threading_platform__thread__netbsd.cc b/chromium/patches/patch-base_threading_platform__thread__netbsd.cc
new file mode 100644
index 0000000000..0e5cb111a4
--- /dev/null
+++ b/chromium/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/patches/patch-base_threading_platform__thread__posix.cc b/chromium/patches/patch-base_threading_platform__thread__posix.cc
new file mode 100644
index 0000000000..61c65bbe19
--- /dev/null
+++ b/chromium/patches/patch-base_threading_platform__thread__posix.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/threading/platform_thread_posix.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/threading/platform_thread_posix.cc
+@@ -56,7 +56,7 @@ void* ThreadFunc(void* params) {
+     if (!thread_params->joinable)
+       base::ThreadRestrictions::SetSingletonAllowed(false);
+ 
+-#if !defined(OS_NACL)
++#if !defined(OS_NACL) && !defined(OS_BSD)
+     // Threads on linux/android may inherit their priority from the thread
+     // where they were created. This explicitly sets the priority of all new
+     // threads.
diff --git a/chromium/patches/patch-base_trace__event_malloc__dump__provider.cc b/chromium/patches/patch-base_trace__event_malloc__dump__provider.cc
new file mode 100644
index 0000000000..7c6e062a4d
--- /dev/null
+++ b/chromium/patches/patch-base_trace__event_malloc__dump__provider.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/trace_event/malloc_dump_provider.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/trace_event/malloc_dump_provider.cc
+@@ -21,7 +21,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/patches/patch-base_trace__event_process__memory__dump.cc b/chromium/patches/patch-base_trace__event_process__memory__dump.cc
new file mode 100644
index 0000000000..ffaa0feb1f
--- /dev/null
+++ b/chromium/patches/patch-base_trace__event_process__memory__dump.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/trace_event/process_memory_dump.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/trace_event/process_memory_dump.cc
+@@ -83,7 +83,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);
+-#if defined(OS_MACOSX) || defined(OS_IOS)
++#if defined(OS_MACOSX) || defined(OS_IOS) || defined(OS_BSD)
+   std::unique_ptr<char[]> vec(new char[max_vec_size]);
+ #elif defined(OS_WIN)
+   std::unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
diff --git a/chromium/patches/patch-base_trace__event_process__memory__dump.h b/chromium/patches/patch-base_trace__event_process__memory__dump.h
new file mode 100644
index 0000000000..fbeb7af248
--- /dev/null
+++ b/chromium/patches/patch-base_trace__event_process__memory__dump.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- base/trace_event/process_memory_dump.h.orig	2017-02-02 02:02:47.000000000 +0000
++++ base/trace_event/process_memory_dump.h
+@@ -24,7 +24,7 @@
+ 
+ // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the
+ // resident memory.
+-#if (defined(OS_POSIX) && !defined(OS_NACL)) || defined(OS_WIN)
++#if (defined(OS_POSIX) && !defined(OS_NACL) && !defined(OS_BSD)) || defined(OS_WIN)
+ #define COUNT_RESIDENT_BYTES_SUPPORTED
+ #endif
+ 
diff --git a/chromium/patches/patch-breakpad_BUILD.gn b/chromium/patches/patch-breakpad_BUILD.gn
new file mode 100644
index 0000000000..ff2c8d6086
--- /dev/null
+++ b/chromium/patches/patch-breakpad_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- breakpad/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
++++ breakpad/BUILD.gn
+@@ -468,7 +468,7 @@ if (is_mac) {
+   }
+ }
+ 
+-if (is_linux || is_android) {
++if (is_linux || is_bsd || is_android) {
+   if (current_toolchain == host_toolchain) {
+     executable("symupload") {
+       sources = [
diff --git a/chromium/patches/patch-build_config_BUILD.gn b/chromium/patches/patch-build_config_BUILD.gn
new file mode 100644
index 0000000000..7560cac93c
--- /dev/null
+++ b/chromium/patches/patch-build_config_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- build/config/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
++++ build/config/BUILD.gn
+@@ -224,7 +224,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?
+@@ -338,7 +338,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/patches/patch-build_config_BUILDCONFIG.gn b/chromium/patches/patch-build_config_BUILDCONFIG.gn
new file mode 100644
index 0000000000..5477c57ca1
--- /dev/null
+++ b/chromium/patches/patch-build_config_BUILDCONFIG.gn
@@ -0,0 +1,146 @@
+$NetBSD$
+
+--- build/config/BUILDCONFIG.gn.orig	2017-02-02 02:02:47.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: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/patches/patch-build_config_allocator.gni b/chromium/patches/patch-build_config_allocator.gni
new file mode 100644
index 0000000000..2669e67f80
--- /dev/null
+++ b/chromium/patches/patch-build_config_allocator.gni
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build/config/allocator.gni.orig	2017-02-02 02:02:47.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/patches/patch-build_config_clang_BUILD.gn b/chromium/patches/patch-build_config_clang_BUILD.gn
new file mode 100644
index 0000000000..d7056a4c4b
--- /dev/null
+++ b/chromium/patches/patch-build_config_clang_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- build/config/clang/BUILD.gn.orig	2017-02-02 02:02:47.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",
+@@ -37,7 +37,7 @@ config("find_bad_constructs") {
+       "find-bad-constructs",
+     ]
+ 
+-    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/patches/patch-build_config_compiler_BUILD.gn b/chromium/patches/patch-build_config_compiler_BUILD.gn
new file mode 100644
index 0000000000..6230206a05
--- /dev/null
+++ b/chromium/patches/patch-build_config_compiler_BUILD.gn
@@ -0,0 +1,102 @@
+$NetBSD$
+
+--- build/config/compiler/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
++++ build/config/compiler/BUILD.gn
+@@ -150,7 +150,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" ]
+@@ -277,7 +277,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.
+@@ -401,14 +401,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,
+@@ -458,7 +458,7 @@ config("compiler") {
+       ]
+ 
+       # 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 {
+@@ -478,7 +478,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" ]
+     }
+   }
+@@ -742,7 +742,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",
+@@ -788,7 +788,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" ]
+@@ -1038,7 +1038,7 @@ config("default_warnings") {
+         "-Wno-nonportable-include-path",
+ 
+         # TODO(hans): https://crbug.com/637306
+-        "-Wno-address-of-packed-member",
++        # "-Wno-address-of-packed-member",
+       ]
+     }
+   }
+@@ -1070,7 +1070,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
+@@ -1128,7 +1128,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/patches/patch-build_config_crypto.gni b/chromium/patches/patch-build_config_crypto.gni
new file mode 100644
index 0000000000..c48b169e59
--- /dev/null
+++ b/chromium/patches/patch-build_config_crypto.gni
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- build/config/crypto.gni.orig	2017-02-02 02:02:47.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/patches/patch-build_config_features.gni b/chromium/patches/patch-build_config_features.gni
new file mode 100644
index 0000000000..c5859dc72d
--- /dev/null
+++ b/chromium/patches/patch-build_config_features.gni
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- build/config/features.gni.orig	2017-02-02 02:02:47.000000000 +0000
++++ build/config/features.gni
+@@ -67,13 +67,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
+ 
+   # Whether or not to use external popup menu.
+   use_external_popup_menu = is_android || is_mac
diff --git a/chromium/patches/patch-build_config_linux_gtk2_BUILD.gn b/chromium/patches/patch-build_config_linux_gtk2_BUILD.gn
new file mode 100644
index 0000000000..4b61c919f9
--- /dev/null
+++ b/chromium/patches/patch-build_config_linux_gtk2_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build/config/linux/gtk2/BUILD.gn.orig	2017-02-02 02:02:47.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/patches/patch-build_config_linux_gtk3_BUILD.gn b/chromium/patches/patch-build_config_linux_gtk3_BUILD.gn
new file mode 100644
index 0000000000..a7f4642a2c
--- /dev/null
+++ b/chromium/patches/patch-build_config_linux_gtk3_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build/config/linux/gtk3/BUILD.gn.orig	2017-02-02 02:02:47.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/patches/patch-build_config_linux_pkg-config.py b/chromium/patches/patch-build_config_linux_pkg-config.py
new file mode 100644
index 0000000000..5ccb1ec358
--- /dev/null
+++ b/chromium/patches/patch-build_config_linux_pkg-config.py
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- build/config/linux/pkg-config.py.orig	2017-02-02 02:02:47.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/patches/patch-build_config_sanitizers_BUILD.gn b/chromium/patches/patch-build_config_sanitizers_BUILD.gn
new file mode 100644
index 0000000000..4aa5553118
--- /dev/null
+++ b/chromium/patches/patch-build_config_sanitizers_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- build/config/sanitizers/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
++++ build/config/sanitizers/BUILD.gn
+@@ -405,7 +405,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 = [
+@@ -418,7 +418,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/patches/patch-build_config_sanitizers_sanitizers.gni b/chromium/patches/patch-build_config_sanitizers_sanitizers.gni
new file mode 100644
index 0000000000..d28410f5eb
--- /dev/null
+++ b/chromium/patches/patch-build_config_sanitizers_sanitizers.gni
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- build/config/sanitizers/sanitizers.gni.orig	2017-02-02 02:02:47.000000000 +0000
++++ build/config/sanitizers/sanitizers.gni
+@@ -54,8 +54,9 @@ 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 && allow_posix_link_time_opt
++  is_cfi = (target_os == "linux" || target_os == "bsd") && !is_chromeos &&
++           target_cpu == "x64" && is_chrome_branded && is_official_build &&
++           allow_posix_link_time_opt
+ 
+   # 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/patches/patch-build_config_ui.gni b/chromium/patches/patch-build_config_ui.gni
new file mode 100644
index 0000000000..3bfc0b95f9
--- /dev/null
+++ b/chromium/patches/patch-build_config_ui.gni
@@ -0,0 +1,43 @@
+$NetBSD$
+
+--- build/config/ui.gni.orig	2017-02-02 02:02:47.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
+@@ -62,17 +62,17 @@ 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)
+ 
+ # 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/patches/patch-build_linux_libpci_BUILD.gn b/chromium/patches/patch-build_linux_libpci_BUILD.gn
new file mode 100644
index 0000000000..9fa53da64b
--- /dev/null
+++ b/chromium/patches/patch-build_linux_libpci_BUILD.gn
@@ -0,0 +1,56 @@
+$NetBSD$
+
+--- build/linux/libpci/BUILD.gn.orig	2017-02-02 02:02:47.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/patches/patch-build_secondary_third__party_nss_BUILD.gn b/chromium/patches/patch-build_secondary_third__party_nss_BUILD.gn
new file mode 100644
index 0000000000..89f1d15a7d
--- /dev/null
+++ b/chromium/patches/patch-build_secondary_third__party_nss_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- build/secondary/third_party/nss/BUILD.gn.orig	2017-02-02 02:02:47.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/patches/patch-build_toolchain_gcc__toolchain.gni b/chromium/patches/patch-build_toolchain_gcc__toolchain.gni
new file mode 100644
index 0000000000..89a67cfdd3
--- /dev/null
+++ b/chromium/patches/patch-build_toolchain_gcc__toolchain.gni
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- build/toolchain/gcc_toolchain.gni.orig	2017-02-02 02:02:47.000000000 +0000
++++ build/toolchain/gcc_toolchain.gni
+@@ -11,6 +11,11 @@ import("//build/toolchain/cc_wrapper.gni
+ import("//build/toolchain/goma.gni")
+ import("//build/toolchain/toolchain.gni")
+ 
++declare_args() {
++  extra_cxxflags = ""
++  extra_ldflags = ""
++}
++
+ # This template defines a toolchain for something that works like gcc
+ # (including clang).
+ #
+@@ -482,14 +487,23 @@ 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 = "${toolprefix}clang39"
++      cxx = "${toolprefix}clang++39"
++      ld = cxx
++      readelf = "readelf"
++      ar = "${toolprefix}llvm-ar39"
++      nm = "${toolprefix}llvm-nm39"
++    } 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/patches/patch-build_toolchain_get__concurrent__links.py b/chromium/patches/patch-build_toolchain_get__concurrent__links.py
new file mode 100644
index 0000000000..43587c5016
--- /dev/null
+++ b/chromium/patches/patch-build_toolchain_get__concurrent__links.py
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- build/toolchain/get_concurrent_links.py.orig	2017-02-02 02:02:47.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/patches/patch-cc_layers_scrollbar__layer__impl__base.cc b/chromium/patches/patch-cc_layers_scrollbar__layer__impl__base.cc
new file mode 100644
index 0000000000..618b97d09e
--- /dev/null
+++ b/chromium/patches/patch-cc_layers_scrollbar__layer__impl__base.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- cc/layers/scrollbar_layer_impl_base.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ cc/layers/scrollbar_layer_impl_base.cc
+@@ -174,8 +174,8 @@ gfx::Rect ScrollbarLayerImplBase::Comput
+   int thumb_offset = TrackStart();
+   if (maximum > 0) {
+     float ratio = clamped_current_pos / maximum;
+-    float max_offset = track_length - thumb_length;
+-    thumb_offset += static_cast<int>(ratio * max_offset);
++    float _max_offset = track_length - thumb_length;
++    thumb_offset += static_cast<int>(ratio * _max_offset);
+   }
+ 
+   float thumb_thickness_adjustment =
diff --git a/chromium/patches/patch-cc_trees_property__tree.cc b/chromium/patches/patch-cc_trees_property__tree.cc
new file mode 100644
index 0000000000..804bfb1486
--- /dev/null
+++ b/chromium/patches/patch-cc_trees_property__tree.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- cc/trees/property_tree.cc.orig	2017-02-02 02:02:47.000000000 +0000
++++ cc/trees/property_tree.cc
+@@ -1113,13 +1113,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollO
+ 
+   gfx::Size clip_layer_bounds = scroll_clip_layer_bounds(scroll_node->id);
+ 
+-  gfx::ScrollOffset max_offset(
++  gfx::ScrollOffset _max_offset(
+       scaled_scroll_bounds.width() - clip_layer_bounds.width(),
+       scaled_scroll_bounds.height() - clip_layer_bounds.height());
+ 
+-  max_offset.Scale(1 / scale_factor);
+-  max_offset.SetToMax(gfx::ScrollOffset());
+-  return max_offset;
++  _max_offset.Scale(1 / scale_factor);
++  _max_offset.SetToMax(gfx::ScrollOffset());
++  return _max_offset;
+ }
+ 
+ void ScrollTree::OnScrollOffsetAnimated(int layer_id,
diff --git a/chromium/patches/patch-chrome_BUILD.gn b/chromium/patches/patch-chrome_BUILD.gn
new file mode 100644
index 0000000000..5a85782baa
--- /dev/null
+++ b/chromium/patches/patch-chrome_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- chrome/BUILD.gn.orig	2017-02-02 02:02:47.000000000 +0000
++++ chrome/BUILD.gn
+@@ -132,7 +132,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",
+@@ -212,7 +212,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",
+@@ -1539,7 +1539,7 @@ if (enable_resource_whitelist_generation
+   }
+ }
+ 
+-if (is_linux) {
++if (is_linux || is_bsd) {
+   action("manpage") {
+     if (is_chrome_branded) {
+       name = "Google Chrome"
diff --git a/chromium/patches/patch-chrome_app_chrome__command__ids.h b/chromium/patches/patch-chrome_app_chrome__command__ids.h
new file mode 100644
index 0000000000..0484b364c4
--- /dev/null
+++ b/chromium/patches/patch-chrome_app_chrome__command__ids.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/app/chrome_command_ids.h.orig	2017-02-02 02:02:48.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/patches/patch-chrome_app_chrome__main__delegate.cc b/chromium/patches/patch-chrome_app_chrome__main__delegate.cc
new file mode 100644
index 0000000000..32fdce159b
--- /dev/null
+++ b/chromium/patches/patch-chrome_app_chrome__main__delegate.cc
@@ -0,0 +1,67 @@
+$NetBSD$
+
+--- chrome/app/chrome_main_delegate.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/app/chrome_main_delegate.cc
+@@ -117,7 +117,7 @@
+ #include "ui/base/x/x11_util.h"  // nogncheck
+ #endif
+ 
+-#if defined(OS_POSIX) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ #include "components/crash/content/app/breakpad_linux.h"
+ #endif
+ 
+@@ -560,7 +560,7 @@ bool ChromeMainDelegate::BasicStartupCom
+       std::string format_str =
+           command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
+       if (format_str == "machine") {
+-        format = diagnostics::DiagnosticsWriter::MACHINE;
++        format = diagnostics::DiagnosticsWriter::THEMACHINE;
+       } else if (format_str == "log") {
+         format = diagnostics::DiagnosticsWriter::LOG;
+       } else {
+@@ -610,7 +610,7 @@ bool ChromeMainDelegate::BasicStartupCom
+       std::string format_str =
+           command_line.GetSwitchValueASCII(switches::kDiagnosticsFormat);
+       if (format_str == "machine") {
+-        format = diagnostics::DiagnosticsWriter::MACHINE;
++        format = diagnostics::DiagnosticsWriter::THEMACHINE;
+       } else if (format_str == "human") {
+         format = diagnostics::DiagnosticsWriter::HUMAN;
+       } else {
+@@ -722,7 +722,7 @@ void ChromeMainDelegate::PreSandboxStart
+   std::string process_type =
+       command_line.GetSwitchValueASCII(switches::kProcessType);
+ 
+-#if defined(OS_POSIX)
++#if defined(OS_POSIX) && !defined(OS_BSD)
+   crash_reporter::SetCrashReporterClient(g_chrome_crash_client.Pointer());
+ #endif
+ 
+@@ -852,7 +852,7 @@ void ChromeMainDelegate::PreSandboxStart
+   chrome::InitializePDF();
+ #endif
+ 
+-#if defined(OS_POSIX) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+   // Zygote needs to call InitCrashReporter() in RunZygote().
+   if (process_type != switches::kZygoteProcess) {
+ #if defined(OS_ANDROID)
+@@ -870,7 +870,7 @@ void ChromeMainDelegate::PreSandboxStart
+     breakpad::InitCrashReporter(process_type);
+ #endif  // defined(OS_ANDROID)
+   }
+-#endif  // defined(OS_POSIX) && !defined(OS_MACOSX)
++#endif  // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ 
+   // After all the platform Breakpads have been initialized, store the command
+   // line for crash reporting.
+@@ -980,7 +980,7 @@ bool ChromeMainDelegate::DelaySandboxIni
+ #endif
+   return process_type == switches::kRelauncherProcess;
+ }
+-#elif defined(OS_POSIX) && !defined(OS_ANDROID)
++#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+ void ChromeMainDelegate::ZygoteStarting(
+     ScopedVector<content::ZygoteForkDelegate>* delegates) {
+ #if defined(OS_CHROMEOS)
diff --git a/chromium/patches/patch-chrome_app_chrome__main__delegate.h b/chromium/patches/patch-chrome_app_chrome__main__delegate.h
new file mode 100644
index 0000000000..51ed81d31f
--- /dev/null
+++ b/chromium/patches/patch-chrome_app_chrome__main__delegate.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/app/chrome_main_delegate.h.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/app/chrome_main_delegate.h
+@@ -44,7 +44,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;
+-#elif defined(OS_POSIX) && !defined(OS_ANDROID)
++#elif defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+   void ZygoteStarting(
+       ScopedVector<content::ZygoteForkDelegate>* delegates) override;
+   void ZygoteForked() override;
diff --git a/chromium/patches/patch-chrome_app_chromium__strings.grd b/chromium/patches/patch-chrome_app_chromium__strings.grd
new file mode 100644
index 0000000000..697e86691c
--- /dev/null
+++ b/chromium/patches/patch-chrome_app_chromium__strings.grd
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/app/chromium_strings.grd.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/app/chromium_strings.grd
+@@ -939,7 +939,7 @@ Signing in anyway will merge Chromium in
+       </message>
+ 
+       <!-- ProcessSingleton -->
+-      <if expr="is_linux or is_macosx">
++      <if expr="is_linux or is_macosx or is_bsd">
+         <message name="IDS_PROFILE_IN_USE_POSIX" desc="Message shown when the browser cannot start because the profile is in use on a different host.">
+           The profile appears to be in use by another Chromium process (<ph name="PROCESS_ID">$1<ex>12345</ex></ph>) on another computer (<ph name="HOST_NAME">$2<ex>example.com</ex></ph>). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium.
+         </message>
diff --git a/chromium/patches/patch-chrome_app_generated__resources.grd b/chromium/patches/patch-chrome_app_generated__resources.grd
new file mode 100644
index 0000000000..a3dc21393d
--- /dev/null
+++ b/chromium/patches/patch-chrome_app_generated__resources.grd
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- chrome/app/generated_resources.grd.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/app/generated_resources.grd
+@@ -6939,7 +6939,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_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>
+@@ -10334,7 +10334,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>
+-      <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>
+@@ -10342,7 +10342,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>
+@@ -11663,7 +11663,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>
diff --git a/chromium/patches/patch-chrome_app_resources_locale__settings.grd b/chromium/patches/patch-chrome_app_resources_locale__settings.grd
new file mode 100644
index 0000000000..9979592daa
--- /dev/null
+++ b/chromium/patches/patch-chrome_app_resources_locale__settings.grd
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/app/resources/locale_settings.grd.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/app/resources/locale_settings.grd
+@@ -151,7 +151,7 @@
+         55
+       </message>
+ 
+-      <if expr="is_win or is_linux or chromeos">
++      <if expr="is_win or is_linux or chromeos or is_bsd">
+         <!-- The width of the ash/ChromeOS system tray menu in pixels. -->
+         <message name="IDS_SYSTEM_TRAY_MENU_BUBBLE_WIDTH_PIXELS" use_name_for_id="true">
+           300
diff --git a/chromium/patches/patch-chrome_browser_BUILD.gn b/chromium/patches/patch-chrome_browser_BUILD.gn
new file mode 100644
index 0000000000..0b5157ef2a
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/BUILD.gn.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/BUILD.gn
+@@ -2142,7 +2142,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" ]
+   }
+ 
+@@ -3507,7 +3507,7 @@ split_static_library("browser") {
+     }
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     if (use_aura) {
+       deps += [ "//build/linux:fontconfig" ]
+       if (use_dbus) {
diff --git a/chromium/patches/patch-chrome_browser_about__flags.cc b/chromium/patches/patch-chrome_browser_about__flags.cc
new file mode 100644
index 0000000000..75c63d8844
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_about__flags.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/about_flags.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/about_flags.cc
+@@ -776,7 +776,7 @@ const FeatureEntry kFeatureEntries[] = {
+      kOsLinux | kOsCrOS | kOsWin | kOsAndroid,
+      ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSmoothScrolling,
+                                switches::kDisableSmoothScrolling)},
+-#if defined(USE_AURA) || defined(OS_LINUX)
++#if defined(USE_AURA) || defined(OS_LINUX) || defined(OS_BSD)
+     {"overlay-scrollbars", IDS_FLAGS_OVERLAY_SCROLLBARS_NAME,
+      IDS_FLAGS_OVERLAY_SCROLLBARS_DESCRIPTION,
+      // Uses the system preference on Mac (a different implementation).
+@@ -1769,7 +1769,7 @@ const FeatureEntry kFeatureEntries[] = {
+      IDS_FLAGS_ENABLE_MATERIAL_DESIGN_EXTENSIONS_DESCRIPTION, kOsDesktop,
+      FEATURE_VALUE_TYPE(features::kMaterialDesignExtensions)},
+ #endif  // ENABLE_EXTENSIONS
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+     {"enable-input-ime-api", IDS_FLAGS_ENABLE_INPUT_IME_API_NAME,
+      IDS_FLAGS_ENABLE_INPUT_IME_API_DESCRIPTION, kOsWin | kOsLinux,
+      ENABLE_DISABLE_VALUE_TYPE(switches::kEnableInputImeAPI,
diff --git a/chromium/patches/patch-chrome_browser_browser__process__impl.cc b/chromium/patches/patch-chrome_browser_browser__process__impl.cc
new file mode 100644
index 0000000000..6a134fee4a
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_browser__process__impl.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/browser_process_impl.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/browser_process_impl.cc
+@@ -165,7 +165,7 @@
+ #include "chrome/browser/media/webrtc/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
+ 
+@@ -771,7 +771,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/patches/patch-chrome_browser_browser__process__impl.h b/chromium/patches/patch-chrome_browser_browser__process__impl.h
new file mode 100644
index 0000000000..8fc499900f
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_browser__process__impl.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/browser_process_impl.h.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/browser_process_impl.h
+@@ -340,7 +340,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/patches/patch-chrome_browser_browser__resources.grd b/chromium/patches/patch-chrome_browser_browser__resources.grd
new file mode 100644
index 0000000000..6a269a67a7
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_browser__resources.grd
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/browser_resources.grd.orig	2016-11-10 20:02:10.000000000 +0000
++++ chrome/browser/browser_resources.grd
+@@ -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>
+-      <if expr="desktop_linux or (is_android and enable_plugins)">
++      <if expr="desktop_linux or (is_android and enable_plugins) or is_posix">
+         <include name="IDR_PLUGIN_DB_JSON" file="resources\plugin_metadata\plugins_linux.json" type="BINDATA" />
+       </if>
+       <if expr="is_android">
diff --git a/chromium/patches/patch-chrome_browser_chrome__browser__main.cc b/chromium/patches/patch-chrome_browser_chrome__browser__main.cc
new file mode 100644
index 0000000000..747b1b7ce8
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_chrome__browser__main.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- chrome/browser/chrome_browser_main.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/chrome_browser_main.cc
+@@ -181,7 +181,7 @@
+ #include "chrome/browser/feedback/feedback_profile_observer.h"
+ #endif  // defined(OS_ANDROID)
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ #include "chrome/browser/first_run/upgrade_util_linux.h"
+ #endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ 
+@@ -1194,11 +1194,11 @@ int ChromeBrowserMainParts::PreCreateThr
+   }
+ #endif  // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
+ 
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // Set the product channel for crash reports.
+   base::debug::SetCrashKeyValue(crash_keys::kChannel,
+                                 chrome::GetChannelString());
+-#endif  // defined(OS_LINUX) || defined(OS_OPENBSD)
++#endif  // defined(OS_LINUX) || defined(OS_BSD)
+ 
+   // Initialize tracking synchronizer system.
+   tracking_synchronizer_ = new metrics::TrackingSynchronizer(
diff --git a/chromium/patches/patch-chrome_browser_chrome__browser__main__linux.cc b/chromium/patches/patch-chrome_browser_chrome__browser__main__linux.cc
new file mode 100644
index 0000000000..f6691fdf05
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_chrome__browser__main__linux.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- chrome/browser/chrome_browser_main_linux.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/chrome_browser_main_linux.cc
+@@ -75,12 +75,14 @@ void ChromeBrowserMainPartsLinux::PrePro
+ void ChromeBrowserMainPartsLinux::PostProfileInit() {
+   ChromeBrowserMainPartsPosix::PostProfileInit();
+ 
++#if !defined(OS_BSD)
+   g_browser_process->metrics_service()->RecordBreakpadRegistration(
+       breakpad::IsCrashReporterEnabled());
++#endif
+ }
+ 
+ void ChromeBrowserMainPartsLinux::PostMainMessageLoopStart() {
+-#if !defined(OS_CHROMEOS)
++#if !defined(OS_CHROMEOS) && !defined(OS_BSD)
+   bluez::DBusThreadManagerLinux::Initialize();
+   bluez::BluezDBusManager::Initialize(
+       bluez::DBusThreadManagerLinux::Get()->GetSystemBus(), false);
+@@ -90,7 +92,7 @@ void ChromeBrowserMainPartsLinux::PostMa
+ }
+ 
+ void ChromeBrowserMainPartsLinux::PostDestroyThreads() {
+-#if !defined(OS_CHROMEOS)
++#if !defined(OS_CHROMEOS) && !defined(OS_BSD)
+   bluez::BluezDBusManager::Shutdown();
+   bluez::DBusThreadManagerLinux::Shutdown();
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_chrome__browser__main__posix.cc b/chromium/patches/patch-chrome_browser_chrome__browser__main__posix.cc
new file mode 100644
index 0000000000..806847e62c
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_chrome__browser__main__posix.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- chrome/browser/chrome_browser_main_posix.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/chrome_browser_main_posix.cc
+@@ -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_BSD)
++    // 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;
++#else
+ #if !defined(ADDRESS_SANITIZER) && !defined(KEEP_SHADOW_STACKS)
+     const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
+ #else
+@@ -283,6 +288,7 @@ void ChromeBrowserMainPartsPosix::PostMa
+     // size to avoid hitting the guard page.
+     const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
+ #endif
++#endif // OS_FREEBSD
+     // TODO(viettrungluu,willchan): crbug.com/29675 - This currently leaks, so
+     // if you change this, you'll probably need to change the suppression.
+     if (!base::PlatformThread::CreateNonJoinable(
diff --git a/chromium/patches/patch-chrome_browser_chrome__content__browser__client.cc b/chromium/patches/patch-chrome_browser_chrome__content__browser__client.cc
new file mode 100644
index 0000000000..b04903b472
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_chrome__content__browser__client.cc
@@ -0,0 +1,76 @@
+$NetBSD$
+
+--- chrome/browser/chrome_content_browser_client.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/chrome_content_browser_client.cc
+@@ -224,7 +224,7 @@
+ #include "chrome/browser/ui/browser_dialogs.h"
+ #include "chromeos/chromeos_switches.h"
+ #include "components/user_manager/user_manager.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/chrome_browser_main_linux.h"
+ #elif defined(OS_ANDROID)
+ #include "chrome/browser/chrome_browser_main_android.h"
+@@ -236,7 +236,7 @@
+ #include "chrome/browser/chrome_browser_main_posix.h"
+ #endif
+ 
+-#if defined(OS_POSIX) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ #include "base/debug/leak_annotations.h"
+ #include "components/crash/content/app/breakpad_linux.h"
+ #include "components/crash/content/browser/crash_handler_host_linux.h"
+@@ -261,7 +261,7 @@
+ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
+ #endif
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.h"
+ #endif
+ 
+@@ -555,7 +555,7 @@ bool CertMatchesFilter(const net::X509Ce
+   return false;
+ }
+ 
+-#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ breakpad::CrashHandlerHostLinux* CreateCrashHandlerHost(
+     const std::string& process_type) {
+   base::FilePath dumps_path;
+@@ -883,7 +883,7 @@ content::BrowserMainParts* ChromeContent
+   main_parts = new ChromeBrowserMainPartsMac(parameters);
+ #elif defined(OS_CHROMEOS)
+   main_parts = new chromeos::ChromeBrowserMainPartsChromeos(parameters);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   main_parts = new ChromeBrowserMainPartsLinux(parameters);
+ #elif defined(OS_ANDROID)
+   main_parts = new ChromeBrowserMainPartsAndroid(parameters);
+@@ -899,7 +899,7 @@ content::BrowserMainParts* ChromeContent
+   // Construct additional browser parts. Stages are called in the order in
+   // which they are added.
+ #if defined(TOOLKIT_VIEWS)
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
+   main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinux());
+ #else
+   main_parts->AddParts(new ChromeBrowserMainExtraPartsViews());
+@@ -1531,7 +1531,7 @@ void ChromeContentBrowserClient::AppendE
+     command_line->AppendSwitchASCII(switches::kMetricsClientID,
+                                     client_info->client_id);
+   }
+-#elif defined(OS_POSIX)
++#elif defined(OS_POSIX) && !defined(OS_BSD)
+   if (breakpad::IsCrashReporterEnabled()) {
+     std::string switch_value;
+     std::unique_ptr<metrics::ClientInfo> client_info =
+@@ -2834,7 +2834,7 @@ void ChromeContentBrowserClient::GetAddi
+   PathService::Get(base::DIR_ANDROID_APP_DATA, &app_data_path);
+   DCHECK(!app_data_path.empty());
+ }
+-#elif defined(OS_POSIX) && !defined(OS_MACOSX)
++#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
+     const base::CommandLine& command_line,
+     int child_process_id,
diff --git a/chromium/patches/patch-chrome_browser_chrome__content__browser__client.h b/chromium/patches/patch-chrome_browser_chrome__content__browser__client.h
new file mode 100644
index 0000000000..b45836dc13
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_chrome__content__browser__client.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/chrome_content_browser_client.h.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/chrome_content_browser_client.h
+@@ -271,7 +271,7 @@ class ChromeContentBrowserClient : publi
+       int child_process_id,
+       content::FileDescriptorInfo* mappings,
+       std::map<int, base::MemoryMappedFile::Region>* regions) override;
+-#elif defined(OS_POSIX) && !defined(OS_MACOSX)
++#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+   void GetAdditionalMappedFilesForChildProcess(
+       const base::CommandLine& command_line,
+       int child_process_id,
diff --git a/chromium/patches/patch-chrome_browser_defaults.cc b/chromium/patches/patch-chrome_browser_defaults.cc
new file mode 100644
index 0000000000..11c74d67c2
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_defaults.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/defaults.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/defaults.cc
+@@ -44,7 +44,7 @@ const bool kSyncAutoStarts = true;
+ const bool kSyncAutoStarts = false;
+ #endif
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ const bool kScrollEventChangesTab = true;
+ #else
+ const bool kScrollEventChangesTab = false;
diff --git a/chromium/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc b/chromium/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc
new file mode 100644
index 0000000000..30c765890d
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_diagnostics_diagnostics__writer.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/diagnostics/diagnostics_writer.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/diagnostics/diagnostics_writer.cc
+@@ -263,7 +263,7 @@ bool DiagnosticsWriter::WriteResult(bool
+       console_->SetColor(color);
+       console_->Write(base::ASCIIToUTF16(result));
+     }
+-    if (format_ == MACHINE) {
++    if (format_ == THEMACHINE) {
+       return WriteInfoLine(base::StringPrintf(
+           "%03d %s (%s)", outcome_code, id.c_str(), extra.c_str()));
+     } else {
diff --git a/chromium/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h b/chromium/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
new file mode 100644
index 0000000000..88e47ea4d8
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_diagnostics_diagnostics__writer.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/diagnostics/diagnostics_writer.h.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/diagnostics/diagnostics_writer.h
+@@ -19,7 +19,7 @@ class DiagnosticsWriter : public Diagnos
+  public:
+   // The type of formatting done by this writer.
+   enum FormatType {
+-    MACHINE,
++    THEMACHINE,
+     LOG,
+     HUMAN
+   };
diff --git a/chromium/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/chromium/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
new file mode 100644
index 0000000000..3ae0a0d004
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_download_chrome__download__manager__delegate.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/download/chrome_download_manager_delegate.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/download/chrome_download_manager_delegate.cc
+@@ -778,7 +778,7 @@ void ChromeDownloadManagerDelegate::OnDo
+         target_info->is_filetype_handled_safely)
+       DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
+ 
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+     if (item->GetOriginalMimeType() == "application/x-x509-user-cert")
+       DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
+ #endif
+@@ -793,7 +793,7 @@ void ChromeDownloadManagerDelegate::OnDo
+ 
+ bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile(
+     const base::FilePath& path) {
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+   if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) {
+     return !download_prefs_->ShouldOpenPdfInSystemReader();
+   }
diff --git a/chromium/patches/patch-chrome_browser_download_download__commands.cc b/chromium/patches/patch-chrome_browser_download_download__commands.cc
new file mode 100644
index 0000000000..2c38357b14
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_download_download__commands.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- chrome/browser/download/download_commands.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/download/download_commands.cc
+@@ -217,7 +217,7 @@ bool DownloadCommands::IsCommandChecked(
+       return download_item_->GetOpenWhenComplete() ||
+              download_crx_util::IsExtensionDownload(*download_item_);
+     case ALWAYS_OPEN_TYPE:
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+       if (CanOpenPdfInSystemViewer()) {
+         DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(
+             download_item_->GetBrowserContext());
+@@ -261,7 +261,7 @@ void DownloadCommands::ExecuteCommand(Co
+       bool is_checked = IsCommandChecked(ALWAYS_OPEN_TYPE);
+       DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(
+           download_item_->GetBrowserContext());
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+       if (CanOpenPdfInSystemViewer()) {
+         prefs->SetShouldOpenPdfInSystemReader(!is_checked);
+         DownloadItemModel(download_item_)
+@@ -374,7 +374,7 @@ Browser* DownloadCommands::GetBrowser() 
+   return browser_displayer.browser();
+ }
+ 
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ bool DownloadCommands::IsDownloadPdf() const {
+   base::FilePath path = download_item_->GetTargetFilePath();
+   return path.MatchesExtension(FILE_PATH_LITERAL(".pdf"));
+@@ -391,7 +391,7 @@ bool DownloadCommands::CanOpenPdfInSyste
+   return IsDownloadPdf() &&
+          (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date
+                                           : true);
+-#elif defined(OS_MACOSX) || defined(OS_LINUX)
++#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+   return IsDownloadPdf();
+ #endif
+ }
diff --git a/chromium/patches/patch-chrome_browser_download_download__commands.h b/chromium/patches/patch-chrome_browser_download_download__commands.h
new file mode 100644
index 0000000000..7c4995d086
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_download_download__commands.h
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- chrome/browser/download/download_commands.h.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/download/download_commands.h
+@@ -43,7 +43,8 @@ class DownloadCommands {
+   void ExecuteCommand(Command command);
+ 
+ #if defined(OS_WIN) || defined(OS_LINUX) || \
+-    (defined(OS_MACOSX) && !defined(OS_IOS))
++    defined(OS_BSD) || (defined(OS_MACOSX) && \
++    !defined(OS_IOS))
+   bool IsDownloadPdf() const;
+   bool CanOpenPdfInSystemViewer() const;
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_download_download__prefs.cc b/chromium/patches/patch-chrome_browser_download_download__prefs.cc
new file mode 100644
index 0000000000..4ae983f30f
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_download_download__prefs.cc
@@ -0,0 +1,67 @@
+$NetBSD$
+
+--- chrome/browser/download/download_prefs.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/download/download_prefs.cc
+@@ -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) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   base::FilePath home_dir = base::GetHomeDir();
+   if (download_path == home_dir) {
+     return true;
+@@ -136,7 +136,7 @@ DownloadPrefs::DownloadPrefs(Profile* pr
+                  GetDefaultDownloadDirectoryForProfile()));
+ #endif  // defined(OS_CHROMEOS)
+ 
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+   should_open_pdf_in_system_reader_ =
+       prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader) ||
+       prefs->GetBoolean(prefs::kPluginsAlwaysOpenPdfExternally);
+@@ -215,7 +215,7 @@ void DownloadPrefs::RegisterProfilePrefs
+                                  default_download_path);
+   registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory,
+                                  default_download_path);
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+   registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false);
+ #endif
+ }
+@@ -292,7 +292,7 @@ bool DownloadPrefs::IsDownloadPathManage
+ }
+ 
+ bool DownloadPrefs::IsAutoOpenUsed() const {
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+   if (ShouldOpenPdfInSystemReader())
+     return true;
+ #endif
+@@ -306,7 +306,7 @@ bool DownloadPrefs::IsAutoOpenEnabledBas
+     return false;
+   DCHECK(extension[0] == base::FilePath::kExtensionSeparator);
+   extension.erase(0, 1);
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+   if (extension == FILE_PATH_LITERAL("pdf") && ShouldOpenPdfInSystemReader())
+     return true;
+ #endif
+@@ -340,7 +340,7 @@ void DownloadPrefs::DisableAutoOpenBased
+   SaveAutoOpenState();
+ }
+ 
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) {
+   should_open_pdf_in_system_reader_ = should_open ||
+      profile_->GetPrefs()->GetBoolean(prefs::kPluginsAlwaysOpenPdfExternally);
+@@ -365,7 +365,7 @@ void DownloadPrefs::DisableAdobeVersionC
+ #endif
+ 
+ void DownloadPrefs::ResetAutoOpen() {
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+   SetShouldOpenPdfInSystemReader(false);
+ #endif
+   auto_open_.clear();
diff --git a/chromium/patches/patch-chrome_browser_download_download__prefs.h b/chromium/patches/patch-chrome_browser_download_download__prefs.h
new file mode 100644
index 0000000000..d1b0a293c9
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_download_download__prefs.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/download/download_prefs.h.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/download/download_prefs.h
+@@ -80,7 +80,7 @@ class DownloadPrefs {
+   // Disables auto-open based on file extension.
+   void DisableAutoOpenBasedOnExtension(const base::FilePath& file_name);
+ 
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+   // Store the user preference to disk. If |should_open| is true, also disable
+   // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin.
+   void SetShouldOpenPdfInSystemReader(bool should_open);
+@@ -115,7 +115,7 @@ class DownloadPrefs {
+                    AutoOpenCompareFunctor> AutoOpenSet;
+   AutoOpenSet auto_open_;
+ 
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+   bool should_open_pdf_in_system_reader_;
+   bool disable_adobe_version_check_for_tests_;
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_download_download__query.cc b/chromium/patches/patch-chrome_browser_download_download__query.cc
new file mode 100644
index 0000000000..f64e3f7503
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_download_download__query.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- chrome/browser/download/download_query.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/download/download_query.cc
+@@ -27,7 +27,11 @@
+ #include "components/url_formatter/url_formatter.h"
+ #include "content/public/browser/content_browser_client.h"
+ #include "content/public/browser/download_item.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ #include "url/gurl.h"
+ 
+ using content::DownloadDangerType;
diff --git a/chromium/patches/patch-chrome_browser_download_download__shelf__context__menu.cc b/chromium/patches/patch-chrome_browser_download_download__shelf__context__menu.cc
new file mode 100644
index 0000000000..62fd098755
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_download_download__shelf__context__menu.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/download/download_shelf_context_menu.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/download/download_shelf_context_menu.cc
+@@ -127,7 +127,7 @@ base::string16 DownloadShelfContextMenu:
+                    : IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS;
+           break;
+         }
+-#elif defined(OS_MACOSX) || defined(OS_LINUX)
++#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+         if (can_open_pdf_in_system_viewer) {
+           id = IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS;
+           break;
diff --git a/chromium/patches/patch-chrome_browser_extensions_BUILD.gn b/chromium/patches/patch-chrome_browser_extensions_BUILD.gn
new file mode 100644
index 0000000000..fb1999c8d7
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- chrome/browser/extensions/BUILD.gn.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/extensions/BUILD.gn
+@@ -1024,7 +1024,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) {
+@@ -1115,6 +1115,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 += [
+       "api/gcd_private/gcd_private_api.cc",
diff --git a/chromium/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc b/chromium/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc
new file mode 100644
index 0000000000..50911cfa0b
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_activity__log_activity__log.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- chrome/browser/extensions/activity_log/activity_log.cc.orig	2017-02-02 02:02:48.000000000 +0000
++++ chrome/browser/extensions/activity_log/activity_log.cc
+@@ -48,7 +48,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>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ #include "url/gurl.h"
+ 
+ namespace constants = activity_log_constants;
diff --git a/chromium/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc b/chromium/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc
new file mode 100644
index 0000000000..de5b30d21a
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_api_image__writer__private_image__writer__private__api.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc.orig	2017-02-02 02:02:49.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_BSD)
+   RemovableStorageProvider::GetAllDevices(
+     base::Bind(
+       &ImageWriterPrivateListRemovableStorageDevicesFunction::OnDeviceListReady,
+       this));
++#endif
+   return true;
+ }
+ 
diff --git a/chromium/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h b/chromium/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
new file mode 100644
index 0000000000..c9ec8edba9
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/extensions/api/input_ime/input_ime_api.h.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/extensions/api/input_ime/input_ime_api.h
+@@ -28,7 +28,7 @@
+ 
+ #if defined(OS_CHROMEOS)
+ #include "chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h"
+-#elif defined(OS_LINUX) || defined(OS_WIN)
++#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h"
+ #endif  // defined(OS_CHROMEOS)
+ 
diff --git a/chromium/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc b/chromium/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc
new file mode 100644
index 0000000000..652a2c75cc
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_api_messaging_message__service.cc
@@ -0,0 +1,37 @@
+$NetBSD$
+
+--- chrome/browser/extensions/api/messaging/message_service.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/extensions/api/messaging/message_service.cc
+@@ -119,7 +119,7 @@ MessageService::PolicyPermission Message
+ 
+ const char kReceivingEndDoesntExistError[] =
+     "Could not establish connection. Receiving end does not exist.";
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ const char kMissingPermissionError[] =
+     "Access to native messaging requires nativeMessaging permission.";
+ const char kProhibitedByPoliciesError[] =
+@@ -414,7 +414,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)
+   content::WebContents* web_contents =
+       content::WebContents::FromRenderFrameHost(source);
+   ExtensionWebContentsObserver* extension_web_contents_observer =
+@@ -477,12 +477,12 @@ void MessageService::OpenChannelToNative
+   channel->opener->IncrementLazyKeepaliveCount();
+ 
+   AddChannel(std::move(channel), receiver_port_id);
+-#else  // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX))
++#else  // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD))
+   const char kNativeMessagingNotSupportedError[] =
+       "Native Messaging is not supported on this platform.";
+   DispatchOnDisconnect(
+       source, receiver_port_id, kNativeMessagingNotSupportedError);
+-#endif  // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX))
++#endif  // !(defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD))
+ }
+ 
+ void MessageService::OpenChannelToTab(int source_process_id,
diff --git a/chromium/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc b/chromium/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc
new file mode 100644
index 0000000000..04c08b05ff
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_api_music__manager__private_device__id__linux.cc
@@ -0,0 +1,68 @@
+$NetBSD$
+
+--- chrome/browser/extensions/api/music_manager_private/device_id_linux.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/extensions/api/music_manager_private/device_id_linux.cc
+@@ -4,6 +4,10 @@
+ 
+ #include "chrome/browser/extensions/api/music_manager_private/device_id.h"
+ 
++#if defined(OS_BSD)
++#include <sys/types.h>
++#include <net/if_dl.h>
++#endif
+ #include <ifaddrs.h>
+ #include <net/if.h>
+ #include <stddef.h>
+@@ -105,11 +109,33 @@ class MacAddressProcessor {
+                         const char* const prefixes[],
+                         size_t prefixes_count) {
+     const int MAC_LENGTH = 6;
++#if defined(OS_BSD)
++    struct ifaddrs *ifap, *ifinfo;
++#else
+     struct ifreq ifinfo;
++#endif
+ 
+     memset(&ifinfo, 0, sizeof(ifinfo));
+-    strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1);
+ 
++#if defined(OS_BSD)
++    int result = getifaddrs(&ifap);
++    if (result != 0)
++      return true;
++    result = 1; // no MAC found yet
++    for (ifinfo = ifap; ifinfo != NULL; ifinfo = ifinfo->ifa_next) {
++      struct sockaddr* sa = ifinfo->ifa_addr;
++      if (sa->sa_family == AF_LINK &&
++        !strncmp(ifinfo->ifa_name, ifaddr->ifa_name,
++        sizeof(ifinfo->ifa_name) - 1)) { 
++          result = 0;
++	  break;
++      }
++    }
++
++    char mac_address[6];
++    strncpy(mac_address, (const char*)LLADDR((struct sockaddr_dl*)ifinfo->ifa_addr), sizeof(mac_address));
++#else
++    strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1);
+     int sd = socket(AF_INET, SOCK_DGRAM, 0);
+     int result = ioctl(sd, SIOCGIFHWADDR, &ifinfo);
+     close(sd);
+@@ -119,11 +145,17 @@ class MacAddressProcessor {
+ 
+     const char* mac_address =
+         static_cast<const char*>(ifinfo.ifr_hwaddr.sa_data);
++#endif
+     if (!is_valid_mac_address_.Run(mac_address, MAC_LENGTH))
+       return true;
+ 
++#if defined(OS_BSD)
++    if (!IsValidPrefix(ifinfo->ifa_name, prefixes, prefixes_count))
++      return true;
++#else
+     if (!IsValidPrefix(ifinfo.ifr_name, prefixes, prefixes_count))
+       return true;
++#endif
+ 
+     // Got one!
+     found_mac_address_ =
diff --git a/chromium/patches/patch-chrome_browser_extensions_api_omnibox_omnibox__api.cc b/chromium/patches/patch-chrome_browser_extensions_api_omnibox_omnibox__api.cc
new file mode 100644
index 0000000000..e03dae7902
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_api_omnibox_omnibox__api.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/extensions/api/omnibox/omnibox_api.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/extensions/api/omnibox/omnibox_api.cc
+@@ -45,7 +45,7 @@ const char kBackgroundTabDisposition[] =
+ // Pref key for omnibox.setDefaultSuggestion.
+ const char kOmniboxDefaultSuggestion[] = "omnibox_default_suggestion";
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ static const int kOmniboxIconPaddingLeft = 2;
+ static const int kOmniboxIconPaddingRight = 2;
+ #elif defined(OS_MACOSX)
diff --git a/chromium/patches/patch-chrome_browser_extensions_bookmark__app__helper.cc b/chromium/patches/patch-chrome_browser_extensions_bookmark__app__helper.cc
new file mode 100644
index 0000000000..9a814463ee
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_bookmark__app__helper.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/extensions/bookmark_app_helper.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/extensions/bookmark_app_helper.cc
+@@ -707,7 +707,7 @@ void BookmarkAppHelper::FinishInstallati
+ #if !defined(OS_MACOSX)
+ #if !defined(USE_ASH)
+   web_app::ShortcutLocations creation_locations;
+-#if defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+   creation_locations.on_desktop = true;
+ #else
+   creation_locations.on_desktop = false;
diff --git a/chromium/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc b/chromium/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
new file mode 100644
index 0000000000..59acfb29a2
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/extensions/browser_context_keyed_service_factories.cc
+@@ -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"
+-#elif defined(OS_LINUX) || defined(OS_WIN)
++#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
+ #endif
+ 
+@@ -110,7 +110,7 @@ void EnsureBrowserContextKeyedServiceFac
+ #if defined(OS_CHROMEOS)
+   extensions::InputImeAPI::GetFactoryInstance();
+   extensions::InputMethodAPI::GetFactoryInstance();
+-#elif defined(OS_LINUX) || defined(OS_WIN)
++#elif defined(OS_LINUX) || defined(OS_WIN) && !defined(OS_BSD)
+   extensions::InputImeAPI::GetFactoryInstance();
+ #endif
+   extensions::LanguageSettingsPrivateDelegateFactory::GetInstance();
diff --git a/chromium/patches/patch-chrome_browser_extensions_external__provider__impl.cc b/chromium/patches/patch-chrome_browser_extensions_external__provider__impl.cc
new file mode 100644
index 0000000000..fac92a1ee2
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_extensions_external__provider__impl.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/extensions/external_provider_impl.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/extensions/external_provider_impl.cc
+@@ -638,7 +638,7 @@ void ExternalProviderImpl::CreateExterna
+         Manifest::EXTERNAL_PREF, Manifest::EXTERNAL_PREF_DOWNLOAD,
+         oem_extension_creation_flags));
+   }
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   if (!profile->IsLegacySupervised()) {
+     provider_list->push_back(base::MakeUnique<ExternalProviderImpl>(
+         service,
+@@ -664,7 +664,7 @@ void ExternalProviderImpl::CreateExterna
+         bundled_extension_creation_flags));
+ 
+     // Define a per-user source of external extensions.
+-#if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(CHROMIUM_BUILD))
++#if defined(OS_MACOSX) || ((defined(OS_LINUX) || defined(OS_BSD)) && defined(CHROMIUM_BUILD))
+     provider_list->push_back(base::MakeUnique<ExternalProviderImpl>(
+         service, new ExternalPrefLoader(chrome::DIR_USER_EXTERNAL_EXTENSIONS,
+                                         ExternalPrefLoader::NONE, nullptr),
diff --git a/chromium/patches/patch-chrome_browser_gpu_gl__string__manager.cc b/chromium/patches/patch-chrome_browser_gpu_gl__string__manager.cc
new file mode 100644
index 0000000000..8edd8e923b
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_gpu_gl__string__manager.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/gpu/gl_string_manager.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/gpu/gl_string_manager.cc
+@@ -33,7 +33,7 @@ GLStringManager::~GLStringManager() {
+ 
+ void GLStringManager::Initialize() {
+   // On MacOSX or Windows, preliminary GPUInfo is enough.
+-#if defined(OS_LINUX)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
+   // We never remove this observer from GpuDataManager.
+   content::GpuDataManager::GetInstance()->AddObserver(this);
+ 
diff --git a/chromium/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc b/chromium/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc
new file mode 100644
index 0000000000..e874d97b41
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_gpu_gpu__feature__checker.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/gpu/gpu_feature_checker.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/gpu/gpu_feature_checker.cc
+@@ -34,7 +34,7 @@ void GPUFeatureChecker::CheckGPUFeatureA
+   CHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+ 
+   bool finalized = true;
+-#if defined(OS_LINUX)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
+   // On Windows and Mac, so far we can always make the final WebGL blacklisting
+   // decision based on partial GPU info; on Linux, we need to launch the GPU
+   // process to collect full GPU info and make the final decision.
diff --git a/chromium/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc b/chromium/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc
new file mode 100644
index 0000000000..bd2ae27f18
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_interstitials_chrome__controller__client.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/interstitials/chrome_controller_client.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/interstitials/chrome_controller_client.cc
+@@ -49,7 +49,7 @@ void LaunchDateAndTimeSettingsOnFileThre
+ #if defined(OS_ANDROID)
+   chrome::android::OpenDateAndTimeSettings();
+ 
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   struct ClockCommand {
+     const char* const pathname;
+     const char* const argument;
+@@ -136,7 +136,7 @@ void ChromeControllerClient::set_interst
+ 
+ bool ChromeControllerClient::CanLaunchDateAndTimeSettings() {
+ #if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_LINUX) || \
+-    defined(OS_MACOSX) || defined(OS_WIN)
++    defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+   return true;
+ #else
+   return false;
diff --git a/chromium/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc b/chromium/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
new file mode 100644
index 0000000000..b60b055bf4
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig	2017-02-02 02:02:49.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)
+     CreateMTPDeviceAsyncDelegate(
+         device_location, read_only,
+         base::Bind(&MTPDeviceMapService::AddAsyncDelegate,
+                    base::Unretained(this), device_location, read_only));
++#endif
+     mtp_device_usage_map_[key] = 0;
+   }
+ 
diff --git a/chromium/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc b/chromium/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
new file mode 100644
index 0000000000..b694e9d151
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_media__galleries_media__file__system__registry.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- chrome/browser/media_galleries/media_file_system_registry.cc.orig	2017-02-02 02:02:49.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.
+ MediaFileSystemRegistry::MediaFileSystemRegistry()
+     : file_system_context_(new MediaFileSystemContextImpl) {
+-  StorageMonitor::GetInstance()->AddObserver(this);
++  // This conditional is needed for shutdown.  Destructors
++  // try to get the media file system registry.
++  if (StorageMonitor::GetInstance())
++    StorageMonitor::GetInstance()->AddObserver(this);
+ }
+ 
+ MediaFileSystemRegistry::~MediaFileSystemRegistry() {
diff --git a/chromium/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/chromium/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
new file mode 100644
index 0000000000..b94539fa5f
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/media/webrtc/webrtc_log_uploader.cc
+@@ -344,6 +344,10 @@ void WebRtcLogUploader::SetupMultipart(
+   const char product[] = "Chrome_Android";
+ #elif defined(OS_CHROMEOS)
+   const char product[] = "Chrome_ChromeOS";
++#elif defined(OS_FREEBSD)
++  const char product[] = "Chrome_FreeBSD";
++#elif defined(OS_NETBSD)
++  const char product[] = "Chrome_NetBSD";
+ #else
+ #error Platform not supported.
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_memory__details.cc b/chromium/patches/patch-chrome_browser_memory__details.cc
new file mode 100644
index 0000000000..f53453c25b
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_memory__details.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/memory_details.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/memory_details.cc
+@@ -33,7 +33,7 @@
+ #include "extensions/features/features.h"
+ #include "ui/base/l10n/l10n_util.h"
+ 
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+ #include "content/public/browser/zygote_host_linux.h"
+ #endif
+ 
+@@ -335,7 +335,7 @@ void MemoryDetails::CollectChildInfoOnUI
+       process.titles.push_back(title);
+     }
+ 
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+     if (content::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) {
+       process.process_type = content::PROCESS_TYPE_ZYGOTE;
+     }
diff --git a/chromium/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/chromium/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
new file mode 100644
index 0000000000..e80a966769
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+@@ -42,12 +42,14 @@
+ 
+ #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ #include <gnu/libc-version.h>
++#endif
+ 
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "base/version.h"
+ #if defined(USE_X11)
+ #include "ui/base/x/x11_util.h"
+ #endif
+-#endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif
+ 
+ #if defined(USE_OZONE) || defined(USE_X11)
+ #include "ui/events/devices/input_device_event_observer.h"
diff --git a/chromium/patches/patch-chrome_browser_net_async__dns__field__trial.cc b/chromium/patches/patch-chrome_browser_net_async__dns__field__trial.cc
new file mode 100644
index 0000000000..42d0dcd46d
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_net_async__dns__field__trial.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/net/async_dns_field_trial.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/net/async_dns_field_trial.cc
+@@ -61,7 +61,7 @@ void HistogramPrefSource(PrefSource sour
+ }  // namespace
+ 
+ bool ConfigureAsyncDnsFieldTrial() {
+-#if defined(OS_CHROMEOS) || defined(OS_MACOSX)
++#if defined(OS_CHROMEOS) || defined(OS_MACOSX) || defined(OS_BSD)
+   const bool kDefault = true;
+ #else
+   const bool kDefault = false;
diff --git a/chromium/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc b/chromium/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc
new file mode 100644
index 0000000000..f40b4b7458
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_notifications_message__center__notification__manager.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/notifications/message_center_notification_manager.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/notifications/message_center_notification_manager.cc
+@@ -67,7 +67,7 @@ MessageCenterNotificationManager::Messag
+       base::MakeUnique<FullscreenNotificationBlocker>(message_center));
+ 
+ #if defined(OS_WIN) || defined(OS_MACOSX) \
+-  || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++  || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+   // On Windows, Linux and Mac, the notification manager owns the tray icon and
+   // views.Other platforms have global ownership and Create will return NULL.
+   tray_.reset(message_center::CreateMessageCenterTray());
diff --git a/chromium/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc b/chromium/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
new file mode 100644
index 0000000000..761b8f2ebc
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/password_manager/chrome_password_manager_client.cc
+@@ -57,7 +57,11 @@
+ #include "content/public/browser/web_contents.h"
+ #include "google_apis/gaia/gaia_urls.h"
+ #include "net/base/url_util.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ #if BUILDFLAG(ANDROID_JAVA_UI)
+ #include "chrome/browser/android/tab_android.h"
diff --git a/chromium/patches/patch-chrome_browser_platform__util.h b/chromium/patches/patch-chrome_browser_platform__util.h
new file mode 100644
index 0000000000..84875942b8
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_platform__util.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/platform_util.h.orig	2017-02-02 02:02:49.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/patches/patch-chrome_browser_plugins_plugins__resource__service.cc b/chromium/patches/patch-chrome_browser_plugins_plugins__resource__service.cc
new file mode 100644
index 0000000000..5468ac0e67
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_plugins_plugins__resource__service.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/plugins/plugins_resource_service.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/plugins/plugins_resource_service.cc
+@@ -31,7 +31,7 @@ GURL GetPluginsServerURL() {
+   std::string filename;
+ #if defined(OS_WIN)
+   filename = "plugins_win.json";
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   filename = "plugins_linux.json";
+ #elif defined(OS_MACOSX)
+   filename = "plugins_mac.json";
diff --git a/chromium/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc b/chromium/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc
new file mode 100644
index 0000000000..7c8137aaf9
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_policy_policy__prefs__browsertest.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/policy/policy_prefs_browsertest.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/policy/policy_prefs_browsertest.cc
+@@ -175,6 +175,8 @@ class PolicyTestCase {
+     const std::string os("chromeos");
+ #elif defined(OS_LINUX)
+     const std::string os("linux");
++#elif defined(OS_FREEBSD)
++    const std::string os("freebsd");
+ #else
+ #error "Unknown platform"
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_process__singleton__posix.cc b/chromium/patches/patch-chrome_browser_process__singleton__posix.cc
new file mode 100644
index 0000000000..484357656b
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_process__singleton__posix.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- chrome/browser/process_singleton_posix.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/process_singleton_posix.cc
+@@ -93,11 +93,11 @@
+ #include "net/base/network_interfaces.h"
+ #include "ui/base/l10n/l10n_util.h"
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/ui/process_singleton_dialog_linux.h"
+ #endif
+ 
+-#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "ui/views/linux_ui/linux_ui.h"
+ #endif
+ 
+@@ -321,7 +321,7 @@ bool DisplayProfileInUseError(const base
+   if (g_disable_prompt)
+     return false;
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   base::string16 relaunch_button_text = l10n_util::GetStringUTF16(
+       IDS_PROFILE_IN_USE_LINUX_RELAUNCH);
+   return ShowProcessSingletonDialog(error, relaunch_button_text);
+@@ -855,7 +855,7 @@ ProcessSingleton::NotifyResult ProcessSi
+     // The other process is shutting down, it's safe to start a new process.
+     return PROCESS_NONE;
+   } else if (strncmp(buf, kACKToken, arraysize(kACKToken) - 1) == 0) {
+-#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+     // Likely NULL in unit tests.
+     views::LinuxUI* linux_ui = views::LinuxUI::instance();
+     if (linux_ui)
diff --git a/chromium/patches/patch-chrome_browser_profiles_profile__impl__io__data.cc b/chromium/patches/patch-chrome_browser_profiles_profile__impl__io__data.cc
new file mode 100644
index 0000000000..e692e148dd
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_profiles_profile__impl__io__data.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/profiles/profile_impl_io_data.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/profiles/profile_impl_io_data.cc
+@@ -104,7 +104,7 @@ net::BackendType ChooseCacheBackendType(
+   }
+ #endif  // #if !defined(OS_ANDROID)
+ 
+-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+   return net::CACHE_BACKEND_SIMPLE;
+ #else
+   return net::CACHE_BACKEND_BLOCKFILE;
diff --git a/chromium/patches/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc b/chromium/patches/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc
new file mode 100644
index 0000000000..073a43f334
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
+@@ -1367,7 +1367,7 @@ void RenderViewContextMenu::AppendEditab
+ // 'Undo' and 'Redo' for text input with no suggestions and no text selected.
+ // We make an exception for OS X as context clicking will select the closest
+ // word. In this case both items are always shown.
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+   menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_UNDO,
+                                   IDS_CONTENT_CONTEXT_UNDO);
+   menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_REDO,
+@@ -1403,7 +1403,7 @@ void RenderViewContextMenu::AppendLangua
+   if (!use_spelling)
+     return;
+ 
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+   menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS,
+                                   IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS);
+ #else
+@@ -1645,7 +1645,7 @@ bool RenderViewContextMenu::IsCommandIdE
+     case IDC_CHECK_SPELLING_WHILE_TYPING:
+       return prefs->GetBoolean(spellcheck::prefs::kEnableSpellcheck);
+ 
+-#if !defined(OS_MACOSX) && defined(OS_POSIX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD) && defined(OS_POSIX)
+     // TODO(suzhe): this should not be enabled for password fields.
+     case IDC_INPUT_METHODS_MENU:
+       return true;
diff --git a/chromium/patches/patch-chrome_browser_renderer__preferences__util.cc b/chromium/patches/patch-chrome_browser_renderer__preferences__util.cc
new file mode 100644
index 0000000000..da10a40c89
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_renderer__preferences__util.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- chrome/browser/renderer_preferences_util.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/renderer_preferences_util.cc
+@@ -19,7 +19,7 @@
+ #include "third_party/WebKit/public/public_features.h"
+ #include "third_party/skia/include/core/SkColor.h"
+ 
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ #include "ui/gfx/font_render_params.h"
+ #endif
+ 
+@@ -31,7 +31,7 @@
+ #include "ui/base/cocoa/defaults_utils.h"
+ #endif
+ 
+-#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ #include "chrome/browser/themes/theme_service.h"
+ #include "chrome/browser/themes/theme_service_factory.h"
+ #include "ui/views/linux_ui/linux_ui.h"
+@@ -133,7 +133,7 @@ void UpdateFromSystemSettings(content::R
+     prefs->caret_blink_interval = interval.InSecondsF();
+ #endif
+ 
+-#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+   views::LinuxUI* linux_ui = views::LinuxUI::instance();
+   if (linux_ui) {
+     if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) {
+@@ -155,7 +155,7 @@ void UpdateFromSystemSettings(content::R
+   }
+ #endif
+ 
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_BSD)
+   CR_DEFINE_STATIC_LOCAL(const gfx::FontRenderParams, params,
+       (gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), NULL)));
+   prefs->should_antialias_text = params.antialiasing;
diff --git a/chromium/patches/patch-chrome_browser_resources_safe__browsing_BUILD.gn b/chromium/patches/patch-chrome_browser_resources_safe__browsing_BUILD.gn
new file mode 100644
index 0000000000..4e2b6f1555
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_resources_safe__browsing_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/resources/safe_browsing/BUILD.gn.orig	2017-02-02 02:02:49.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/patches/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py b/chromium/patches/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
new file mode 100644
index 0000000000..67ef8fbf1e
--- /dev/null
+++ b/chromium/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	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/resources/safe_browsing/gen_file_type_proto.py
+@@ -50,6 +50,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,
+   }
+@@ -201,7 +202,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/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc b/chromium/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
new file mode 100644
index 0000000000..c6061a7521
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- chrome/browser/safe_browsing/incident_reporting/incident_handler_util.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/safe_browsing/incident_reporting/incident_handler_util.cc
+@@ -8,7 +8,12 @@
+ 
+ #include "base/hash.h"
+ #include "base/logging.h"
++//XXX(rene) needs shim headers?
++#if defined(USE_SYSTEM_PROTOBUF)
++#include <google/protobuf/message_lite.h>
++#else
+ #include "third_party/protobuf/src/google/protobuf/message_lite.h"
++#endif
+ 
+ namespace safe_browsing {
+ 
diff --git a/chromium/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc b/chromium/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc
new file mode 100644
index 0000000000..8865922e5b
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_safe__browsing_permission__reporter.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/safe_browsing/permission_reporter.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/safe_browsing/permission_reporter.cc
+@@ -193,7 +193,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/patches/patch-chrome_browser_search_local__files__ntp__source.cc b/chromium/patches/patch-chrome_browser_search_local__files__ntp__source.cc
new file mode 100644
index 0000000000..a7c1bf8af7
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_search_local__files__ntp__source.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- chrome/browser/search/local_files_ntp_source.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/search/local_files_ntp_source.cc
+@@ -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"
++#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 {
+ 
diff --git a/chromium/patches/patch-chrome_browser_speech_tts__controller__impl.cc b/chromium/patches/patch-chrome_browser_speech_tts__controller__impl.cc
new file mode 100644
index 0000000000..a04e6d50be
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_speech_tts__controller__impl.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- chrome/browser/speech/tts_controller_impl.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/speech/tts_controller_impl.cc
+@@ -347,9 +347,13 @@ int TtsControllerImpl::QueueSize() {
+ }
+ 
+ TtsPlatformImpl* TtsControllerImpl::GetPlatformImpl() {
++#if defined(OS_BSD)
++  return NULL;
++#else
+   if (!platform_impl_)
+     platform_impl_ = TtsPlatformImpl::GetInstance();
+   return platform_impl_;
++#endif
+ }
+ 
+ int TtsControllerImpl::GetMatchingVoice(
diff --git a/chromium/patches/patch-chrome_browser_sync_chrome__sync__client.cc b/chromium/patches/patch-chrome_browser_sync_chrome__sync__client.cc
new file mode 100644
index 0000000000..73c24af789
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_sync_chrome__sync__client.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/sync/chrome_sync_client.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/sync/chrome_sync_client.cc
+@@ -578,7 +578,7 @@ void ChromeSyncClient::RegisterDesktopDa
+   }
+ #endif
+ 
+-#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_BSD)
+   // Dictionary sync is enabled by default.
+   if (!disabled_types.Has(syncer::DICTIONARY)) {
+     sync_service->RegisterDataTypeController(
diff --git a/chromium/patches/patch-chrome_browser_tracing_crash__service__uploader.cc b/chromium/patches/patch-chrome_browser_tracing_crash__service__uploader.cc
new file mode 100644
index 0000000000..8aa451d5db
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_tracing_crash__service__uploader.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- chrome/browser/tracing/crash_service_uploader.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/tracing/crash_service_uploader.cc
+@@ -156,6 +156,10 @@ void TraceCrashServiceUploader::DoUpload
+   const char product[] = "Chrome_Android";
+ #elif defined(OS_CHROMEOS)
+   const char product[] = "Chrome_ChromeOS";
++#elif defined(OS_FREEBSD)
++  const char product[] = "Chrome_FreeBSD";
++#elif defined(OS_NETBSD)
++  const char product[] = "Chrome_NetBSD";
+ #else
+ #error Platform not supported.
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_ui_BUILD.gn b/chromium/patches/patch-chrome_browser_ui_BUILD.gn
new file mode 100644
index 0000000000..9dfce87658
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/BUILD.gn.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/ui/BUILD.gn
+@@ -3090,7 +3090,7 @@ split_static_library("ui") {
+       ]
+     }
+   }
+-  if (is_linux) {  # Both desktop Linux and ChromeOS.
++  if (is_linux || is_bsd) {  # Both desktop Linux and ChromeOS.
+     sources += [
+       "certificate_dialogs.cc",
+       "certificate_dialogs.h",
diff --git a/chromium/patches/patch-chrome_browser_ui_browser__command__controller.cc b/chromium/patches/patch-chrome_browser_ui_browser__command__controller.cc
new file mode 100644
index 0000000000..c7e9701b96
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_browser__command__controller.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- chrome/browser/ui/browser_command_controller.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/ui/browser_command_controller.cc
+@@ -81,7 +81,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/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
+ #endif
+ 
+@@ -203,7 +203,7 @@ bool BrowserCommandController::IsReserve
+   if (window()->IsFullscreen() && command_id == IDC_FULLSCREEN)
+     return true;
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   // If this key was registered by the user as a content editing hotkey, then
+   // it is not reserved.
+   ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
+@@ -406,7 +406,7 @@ void BrowserCommandController::ExecuteCo
+       break;
+ #endif
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+     case IDC_USE_SYSTEM_TITLE_BAR: {
+       PrefService* prefs = browser_->profile()->GetPrefs();
+       prefs->SetBoolean(prefs::kUseCustomChromeFrame,
+@@ -766,7 +766,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
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   command_updater_.UpdateCommandEnabled(IDC_USE_SYSTEM_TITLE_BAR, true);
+ #endif
+ 
diff --git a/chromium/patches/patch-chrome_browser_ui_browser__view__prefs.cc b/chromium/patches/patch-chrome_browser_ui_browser__view__prefs.cc
new file mode 100644
index 0000000000..23d1c54b6b
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_browser__view__prefs.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/browser_view_prefs.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/ui/browser_view_prefs.cc
+@@ -10,7 +10,7 @@
+ #include "components/prefs/pref_registry_simple.h"
+ #include "components/prefs/pref_service.h"
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "ui/base/x/x11_util.h"  // nogncheck
+ #endif
+ 
diff --git a/chromium/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc b/chromium/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
new file mode 100644
index 0000000000..7cad53daf7
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
+@@ -16,7 +16,7 @@
+ 
+ // NOTE(koz): Linux doesn't use the thick shadowed border, so we add padding
+ // here.
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ const int ExclusiveAccessBubble::kPaddingPx = 8;
+ #else
+ const int ExclusiveAccessBubble::kPaddingPx = 15;
diff --git a/chromium/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc b/chromium/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
new file mode 100644
index 0000000000..91d49b9ea0
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/input_method/input_method_engine_base.cc.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/ui/input_method/input_method_engine_base.cc
+@@ -37,7 +37,7 @@
+ #elif defined(OS_WIN)
+ #include "ui/events/keycodes/dom/keycode_converter.h"
+ #include "ui/events/keycodes/keyboard_codes_win.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ #include "ui/events/keycodes/dom/keycode_converter.h"
+ #include "ui/events/keycodes/keyboard_codes_posix.h"
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_ui_libgtkui_BUILD.gn b/chromium/patches/patch-chrome_browser_ui_libgtkui_BUILD.gn
new file mode 100644
index 0000000000..84edc42745
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_libgtkui_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/libgtkui/BUILD.gn.orig	2017-02-02 02:02:49.000000000 +0000
++++ chrome/browser/ui/libgtkui/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/patches/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc b/chromium/patches/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc
new file mode 100644
index 0000000000..af6cb4da34
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- chrome/browser/ui/libgtkui/print_dialog_gtk.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/libgtkui/print_dialog_gtk.cc
+@@ -348,6 +348,7 @@ void PrintDialogGtk2::ShowDialog(
+   // Since we only generate PDF, only show printers that support PDF.
+   // TODO(thestig) Add more capabilities to support?
+   GtkPrintCapabilities cap = static_cast<GtkPrintCapabilities>(
++      GTK_PRINT_CAPABILITY_GENERATE_PS |
+       GTK_PRINT_CAPABILITY_GENERATE_PDF |
+       GTK_PRINT_CAPABILITY_PAGE_SET |
+       GTK_PRINT_CAPABILITY_COPIES |
diff --git a/chromium/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc b/chromium/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
new file mode 100644
index 0000000000..6723b91cc3
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/startup/bad_flags_prompt.cc
+@@ -71,7 +71,7 @@ void ShowBadFlagsPrompt(Browser* browser
+     // This flag gives extensions more powers.
+     extensions::switches::kExtensionsOnChromeURLs,
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+     // Speech dispatcher is buggy, it can crash and it can make Chrome freeze.
+     // http://crbug.com/327295
+     switches::kEnableSpeechDispatcher,
diff --git a/chromium/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/chromium/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
new file mode 100644
index 0000000000..407fc92192
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_startup_startup__browser__creator.cc
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- chrome/browser/ui/startup/startup_browser_creator.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/startup/startup_browser_creator.cc
+@@ -95,7 +95,7 @@
+ #include "components/user_manager/user_manager.h"
+ #endif
+ 
+-#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
++#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD))
+ #include "ui/events/devices/x11/touch_factory_x11.h"  // nogncheck
+ #endif
+ 
+@@ -651,9 +651,11 @@ bool StartupBrowserCreator::ProcessCmdLi
+   }
+ #endif  // OS_CHROMEOS
+ 
++#if 0 /* XXX */
+ #if defined(TOOLKIT_VIEWS) && defined(USE_X11)
+   ui::TouchFactory::SetTouchDeviceListFromCommandLine();
+ #endif
++#endif
+ 
+ #if defined(OS_MACOSX)
+   if (web_app::MaybeRebuildShortcut(command_line))
diff --git a/chromium/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc b/chromium/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc
new file mode 100644
index 0000000000..f9d6d47828
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_toolbar_app__menu__model.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/toolbar/app_menu_model.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/toolbar/app_menu_model.cc
+@@ -632,7 +632,7 @@ bool AppMenuModel::IsCommandIdVisible(in
+     case IDC_UPGRADE_DIALOG:
+       return browser_defaults::kShowUpgradeMenuItem &&
+           UpgradeDetector::GetInstance()->notify_upgrade();
+-#if !defined(OS_LINUX) || defined(USE_AURA)
++#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(USE_AURA)
+     case IDC_BOOKMARK_PAGE:
+       return !chrome::ShouldRemoveBookmarkThisPageUI(browser_->profile());
+     case IDC_BOOKMARK_ALL_TABS:
diff --git a/chromium/patches/patch-chrome_browser_ui_views_accelerator__table.cc b/chromium/patches/patch-chrome_browser_ui_views_accelerator__table.cc
new file mode 100644
index 0000000000..b933c2ccb7
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_accelerator__table.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/accelerator_table.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/accelerator_table.cc
+@@ -72,7 +72,7 @@ const AcceleratorMapping kAcceleratorMap
+   { ui::VKEY_S, ui::EF_CONTROL_DOWN, IDC_SAVE_PAGE },
+   { ui::VKEY_9, kPlatformModifier, IDC_SELECT_LAST_TAB },
+   { ui::VKEY_NUMPAD9, kPlatformModifier, IDC_SELECT_LAST_TAB },
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   { ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB },
+   { ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB },
+   { ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT },
+@@ -100,7 +100,7 @@ const AcceleratorMapping kAcceleratorMap
+   { ui::VKEY_NUMPAD7, kPlatformModifier, IDC_SELECT_TAB_6 },
+   { ui::VKEY_8, kPlatformModifier, IDC_SELECT_TAB_7 },
+   { ui::VKEY_NUMPAD8, kPlatformModifier, IDC_SELECT_TAB_7 },
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   { ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0 },
+   { ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0 },
+   { ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1 },
+@@ -149,7 +149,7 @@ const AcceleratorMapping kAcceleratorMap
+   { ui::VKEY_F11, ui::EF_NONE, IDC_FULLSCREEN },
+ 
+   // Platform-specific key maps.
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   { ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK },
+   { ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD },
+   { ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME },
diff --git a/chromium/patches/patch-chrome_browser_ui_views_app__list_linux_app__list__linux.cc b/chromium/patches/patch-chrome_browser_ui_views_app__list_linux_app__list__linux.cc
new file mode 100644
index 0000000000..b7604fd833
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_app__list_linux_app__list__linux.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/app_list/linux/app_list_linux.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/app_list/linux/app_list_linux.cc
+@@ -91,7 +91,7 @@ void AppListLinux::MoveNearCursor(app_li
+   view->SetBubbleArrow(views::BubbleBorder::FLOAT);
+ 
+   AppListPositioner::ScreenEdge edge;
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   // In the Unity desktop environment, special case SCREEN_EDGE_LEFT. It is
+   // always on the left side in Unity, but ShelfLocationInDisplay will not
+   // detect this if the shelf is hidden.
diff --git a/chromium/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc b/chromium/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
new file mode 100644
index 0000000000..29be2aaabd
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_apps_chrome__native__app__window__views__aura.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/apps/chrome_native_app_window_views_aura.cc.orig	2017-02-02 02:02:50.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"
+ #include "ui/views/widget/widget.h"
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/shell_integration_linux.h"
+ #endif
+ 
+@@ -57,7 +57,7 @@ void ChromeNativeAppWindowViewsAura::OnB
+     const AppWindow::CreateParams& create_params,
+     views::Widget::InitParams* init_params,
+     views::Widget* widget) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
+   std::string app_name = web_app::GenerateApplicationNameFromExtensionId(
+       app_window()->extension_id());
+   // Set up a custom WM_CLASS for app windows. This allows task switchers in
diff --git a/chromium/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc b/chromium/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc
new file mode 100644
index 0000000000..eb45aefad9
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_chrome__views__delegate.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/chrome_views_delegate.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/chrome_views_delegate.cc
+@@ -57,7 +57,7 @@
+ #include "ui/views/widget/native_widget_aura.h"
+ #endif
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
+ #include "ui/views/linux_ui/linux_ui.h"
+ #endif
+ 
+@@ -308,7 +308,7 @@ HICON ChromeViewsDelegate::GetSmallWindo
+   return GetSmallAppIcon();
+ }
+ 
+-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
+ gfx::ImageSkia* ChromeViewsDelegate::GetDefaultWindowIcon() const {
+   ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+   return rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_64);
+@@ -447,7 +447,7 @@ void ChromeViewsDelegate::OnBeforeWidget
+ #endif
+ }
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS)  || defined(OS_BSD)
+ bool ChromeViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) {
+   // On Ubuntu Unity, the system always provides a title bar for maximized
+   // windows.
diff --git a/chromium/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h b/chromium/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
new file mode 100644
index 0000000000..01438ad0d9
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_chrome__views__delegate.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/chrome_views_delegate.h.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/chrome_views_delegate.h
+@@ -37,7 +37,7 @@ class ChromeViewsDelegate : public views
+ #if defined(OS_WIN)
+   HICON GetDefaultWindowIcon() const override;
+   HICON GetSmallWindowIcon() const override;
+-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+   gfx::ImageSkia* GetDefaultWindowIcon() const override;
+ #endif
+ 
+@@ -50,7 +50,7 @@ class ChromeViewsDelegate : public views
+   void OnBeforeWidgetInit(
+       views::Widget::InitParams* params,
+       views::internal::NativeWidgetDelegate* delegate) override;
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+   bool WindowManagerProvidesTitleBar(bool maximized) override;
+ #endif
+   ui::ContextFactory* GetContextFactory() override;
diff --git a/chromium/patches/patch-chrome_browser_ui_views_first__run__dialog.cc b/chromium/patches/patch-chrome_browser_ui_views_first__run__dialog.cc
new file mode 100644
index 0000000000..25a483d8da
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_first__run__dialog.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/first_run_dialog.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/first_run_dialog.cc
+@@ -40,8 +40,10 @@ using views::GridLayout;
+ namespace {
+ 
+ void InitCrashReporterIfEnabled(bool enabled) {
++#ifndef OS_BSD
+   if (enabled)
+     breakpad::InitCrashReporter(std::string());
++#endif
+ }
+ 
+ }  // namespace
diff --git a/chromium/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc b/chromium/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
new file mode 100644
index 0000000000..4835233dd7
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_frame_browser__frame.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/frame/browser_frame.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/frame/browser_frame.cc
+@@ -37,11 +37,11 @@
+ #include "ash/common/wm_shell.h"  // nogncheck
+ #endif
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/ui/views/frame/browser_command_handler_linux.h"
+ #endif
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
+ #endif
+ 
+@@ -98,7 +98,7 @@ void BrowserFrame::InitBrowserFrame() {
+     non_client_view()->set_context_menu_controller(this);
+   }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   browser_command_handler_.reset(new BrowserCommandHandlerLinux(browser_view_));
+ #endif
+ }
diff --git a/chromium/patches/patch-chrome_browser_ui_views_frame_browser__view.cc b/chromium/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
new file mode 100644
index 0000000000..3a8ce49750
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_frame_browser__view.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/frame/browser_view.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/frame/browser_view.cc
+@@ -1913,7 +1913,7 @@ void BrowserView::OnThemeChanged() {
+ #endif
+ #if defined(OS_WIN)
+     ui::NativeThemeWin::instance()->NotifyObservers();
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+     ui::NativeThemeAura::instance()->NotifyObservers();
+ #endif
+   }
diff --git a/chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc b/chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
new file mode 100644
index 0000000000..dea047e625
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+@@ -38,7 +38,7 @@
+ #include "ui/views/window/frame_background.h"
+ #include "ui/views/window/window_shape.h"
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "ui/views/controls/menu/menu_runner.h"
+ #endif
+ 
+@@ -292,7 +292,7 @@ void OpaqueBrowserFrameView::ButtonPress
+ void OpaqueBrowserFrameView::OnMenuButtonClicked(views::MenuButton* source,
+                                                  const gfx::Point& point,
+                                                  const ui::Event* event) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   views::MenuRunner menu_runner(frame()->GetSystemMenuModel(),
+                                 views::MenuRunner::HAS_MNEMONICS);
+   ignore_result(menu_runner.RunMenuAt(browser_view()->GetWidget(),
diff --git a/chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc b/chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
new file mode 100644
index 0000000000..7d5de6f1b4
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__layout.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/frame/opaque_browser_frame_view_layout.cc
+@@ -20,7 +20,7 @@ namespace {
+ 
+ const int kCaptionButtonHeight = 18;
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
+ // Default extra space between the top of the frame and the top of the window
+ // caption buttons.
+ const int kExtraCaption = 2;
diff --git a/chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc b/chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
new file mode 100644
index 0000000000..cf59fa438e
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_specific.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_specific.cc
+@@ -10,7 +10,7 @@ bool OpaqueBrowserFrameViewPlatformSpeci
+   return false;
+ }
+ 
+-#if !defined(OS_LINUX)
++#if !defined(OS_LINUX) && !defined(OS_BSD)
+ 
+ // static
+ OpaqueBrowserFrameViewPlatformSpecific*
diff --git a/chromium/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc b/chromium/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
new file mode 100644
index 0000000000..51010c842c
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/frame/system_menu_model_builder.cc
+@@ -85,7 +85,7 @@ void SystemMenuModelBuilder::BuildSystem
+     model->AddSeparator(ui::NORMAL_SEPARATOR);
+     model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
+   }
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   model->AddSeparator(ui::NORMAL_SEPARATOR);
+   model->AddCheckItemWithStringId(IDC_USE_SYSTEM_TITLE_BAR,
+                                   IDS_SHOW_WINDOW_DECORATIONS_MENU);
+@@ -119,7 +119,7 @@ void SystemMenuModelBuilder::BuildSystem
+     model->AddSeparator(ui::NORMAL_SEPARATOR);
+     model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
+   }
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   model->AddSeparator(ui::NORMAL_SEPARATOR);
+   model->AddItemWithStringId(IDC_CLOSE_WINDOW, IDS_CLOSE);
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc b/chromium/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
new file mode 100644
index 0000000000..d0699aa7bc
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/frame/system_menu_model_delegate.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/frame/system_menu_model_delegate.cc
+@@ -13,7 +13,7 @@
+ #include "components/sessions/core/tab_restore_service.h"
+ #include "ui/base/l10n/l10n_util.h"
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "chrome/common/pref_names.h"
+ #include "components/prefs/pref_service.h"
+ #endif
+@@ -29,7 +29,7 @@ SystemMenuModelDelegate::~SystemMenuMode
+ }
+ 
+ bool SystemMenuModelDelegate::IsCommandIdChecked(int command_id) const {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   if (command_id == IDC_USE_SYSTEM_TITLE_BAR) {
+     PrefService* prefs = browser_->profile()->GetPrefs();
+     return !prefs->GetBoolean(prefs::kUseCustomChromeFrame);
diff --git a/chromium/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc b/chromium/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc
new file mode 100644
index 0000000000..261017133b
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_message__center_message__center__frame__view.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/message_center/message_center_frame_view.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/message_center/message_center_frame_view.cc
+@@ -15,7 +15,7 @@
+ namespace message_center {
+ 
+ MessageCenterFrameView::MessageCenterFrameView() {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   const int kBorderWidth = 1;
+   SetBorder(views::CreateSolidBorder(
+       kBorderWidth, message_center::kMessageCenterBorderColor));
diff --git a/chromium/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc b/chromium/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
new file mode 100644
index 0000000000..2d0a9c7f19
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/tabs/tab_drag_controller.cc
+@@ -270,7 +270,7 @@ void TabDragController::Init(
+   //     synchronous on desktop Linux, so use that.
+   // - Ash
+   //     Releasing capture on Ash cancels gestures so avoid it.
+-#if defined(OS_LINUX) || defined(USE_ASH)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(USE_ASH)
+   can_release_capture_ = false;
+ #endif
+   start_point_in_screen_ = gfx::Point(source_tab_offset, mouse_offset.y());
+@@ -620,7 +620,7 @@ TabDragController::DragBrowserToNewTabSt
+     // that to effect the position of any windows.
+     SetWindowPositionManaged(browser_widget->GetNativeWindow(), false);
+ 
+-#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(OS_CHROMEOS)
+     // 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.
+@@ -1819,7 +1819,7 @@ TabDragController::Liveness TabDragContr
+     if (dragged_window)
+       exclude.insert(dragged_window);
+   }
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+   // Exclude windows which are pending deletion via Browser::TabStripEmpty().
+   // These windows can be returned in the Linux Aura port because the browser
+   // window which was used for dragging is not hidden once all of its tabs are
diff --git a/chromium/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc b/chromium/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc
new file mode 100644
index 0000000000..c5a8cb802f
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_views_tabs_tab__strip.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/views/tabs/tab_strip.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/views/tabs/tab_strip.cc
+@@ -323,7 +323,7 @@ NewTabButton::NewTabButton(TabStrip* tab
+       tab_strip_(tab_strip),
+       destroyed_(NULL) {
+   set_animate_on_state_change(true);
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
+   set_triggerable_event_flags(triggerable_event_flags() |
+                               ui::EF_MIDDLE_MOUSE_BUTTON);
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_ui_webui_about__ui.cc b/chromium/patches/patch-chrome_browser_ui_webui_about__ui.cc
new file mode 100644
index 0000000000..f71e4ef9d8
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_webui_about__ui.cc
@@ -0,0 +1,72 @@
+$NetBSD$
+
+--- chrome/browser/ui/webui/about_ui.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/webui/about_ui.cc
+@@ -75,7 +75,7 @@
+ #include "chrome/browser/ui/webui/theme_source.h"
+ #endif
+ 
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "content/public/browser/zygote_host_linux.h"
+ #include "content/public/common/sandbox_linux.h"
+ #endif
+@@ -644,7 +644,7 @@ class AboutDnsHandler : public base::Ref
+   DISALLOW_COPY_AND_ASSIGN(AboutDnsHandler);
+ };
+ 
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ std::string AboutLinuxProxyConfig() {
+   std::string data;
+   AppendHeader(&data, 0,
+@@ -660,6 +660,7 @@ std::string AboutLinuxProxyConfig() {
+   return data;
+ }
+ 
++#if !defined(OS_BSD)
+ void AboutSandboxRow(std::string* data, int name_id, bool good) {
+   data->append("<tr><td>");
+   data->append(l10n_util::GetStringUTF8(name_id));
+@@ -674,6 +675,7 @@ void AboutSandboxRow(std::string* data, 
+   }
+   data->append("</td></tr>");
+ }
++#endif
+ 
+ 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;
+@@ -794,7 +798,7 @@ void AboutUIHTMLSource::StartDataRequest
+   } else if (source_name_ == chrome::kChromeUIDNSHost) {
+     AboutDnsHandler::Start(profile(), callback);
+     return;
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) {
+     response = AboutLinuxProxyConfig();
+ #endif
+@@ -803,7 +807,7 @@ void AboutUIHTMLSource::StartDataRequest
+     ChromeOSCreditsHandler::Start(path, callback);
+     return;
+ #endif
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   } else if (source_name_ == chrome::kChromeUISandboxHost) {
+     response = AboutSandbox();
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/chromium/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
new file mode 100644
index 0000000000..25b3db563c
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+@@ -286,7 +286,7 @@ bool IsAboutUI(const GURL& url) {
+ #if !defined(OS_ANDROID)
+           || url.host_piece() == chrome::kChromeUITermsHost
+ #endif
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+           || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost ||
+           url.host_piece() == chrome::kChromeUISandboxHost
+ #endif
diff --git a/chromium/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc b/chromium/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
new file mode 100644
index 0000000000..066bedf672
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_webui_extensions_extension__loader__handler.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- chrome/browser/ui/webui/extensions/extension_loader_handler.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/webui/extensions/extension_loader_handler.cc
+@@ -27,7 +27,11 @@
+ #include "extensions/common/constants.h"
+ #include "extensions/common/extension.h"
+ #include "extensions/common/manifest_constants.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ #include "ui/base/l10n/l10n_util.h"
+ 
+ namespace extensions {
diff --git a/chromium/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc b/chromium/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc
new file mode 100644
index 0000000000..eec487ed31
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.cc
@@ -0,0 +1,47 @@
+$NetBSD$
+
+--- chrome/browser/ui/webui/options/browser_options_handler.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/webui/options/browser_options_handler.cc
+@@ -564,13 +564,13 @@ void BrowserOptionsHandler::GetLocalized
+     { "syncButtonTextStart", IDS_SYNC_SETUP_BUTTON_LABEL },
+ #endif  // defined(OS_CHROMEOS)
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
+     { "showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS },
+     { "themesNativeButton", IDS_THEMES_GTK_BUTTON },
+     { "themesSetClassic", IDS_THEMES_SET_CLASSIC },
+ #else
+     { "themes", IDS_THEMES_GROUP_NAME },
+-#endif  // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif  // defined(OS_POSIX) && !defined(OS_CHROMEOS)
+ 
+ #if defined(OS_CHROMEOS) && defined(USE_ASH)
+     { "setWallpaper", IDS_SET_WALLPAPER_BUTTON },
+@@ -813,7 +813,7 @@ void BrowserOptionsHandler::RegisterMess
+       "requestProfilesInfo",
+       base::Bind(&BrowserOptionsHandler::HandleRequestProfilesInfo,
+                  base::Unretained(this)));
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
+   web_ui()->RegisterMessageCallback(
+       "themesSetNative",
+       base::Bind(&BrowserOptionsHandler::ThemesSetNative,
+@@ -1476,7 +1476,7 @@ void BrowserOptionsHandler::ObserveTheme
+   ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile);
+   bool is_system_theme = false;
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
+   bool profile_is_supervised = profile->IsSupervised();
+   is_system_theme = theme_service->UsingSystemTheme();
+   base::FundamentalValue native_theme_enabled(!is_system_theme &&
+@@ -1498,7 +1498,7 @@ void BrowserOptionsHandler::ThemesReset(
+   ThemeServiceFactory::GetForProfile(profile)->UseDefaultTheme();
+ }
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
+ void BrowserOptionsHandler::ThemesSetNative(const base::ListValue* args) {
+   content::RecordAction(UserMetricsAction("Options_GtkThemeSet"));
+   Profile* profile = Profile::FromWebUI(web_ui());
diff --git a/chromium/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h b/chromium/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h
new file mode 100644
index 0000000000..906819efe6
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_ui_webui_options_browser__options__handler.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/ui/webui/options/browser_options_handler.h.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/ui/webui/options/browser_options_handler.h
+@@ -208,7 +208,7 @@ class BrowserOptionsHandler
+ 
+   void ObserveThemeChanged();
+   void ThemesReset(const base::ListValue* args);
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_POSIX) && !defined(OS_CHROMEOS)
+   void ThemesSetNative(const base::ListValue* args);
+ #endif
+ 
diff --git a/chromium/patches/patch-chrome_browser_web__applications_web__app.cc b/chromium/patches/patch-chrome_browser_web__applications_web__app.cc
new file mode 100644
index 0000000000..fe5c7e2387
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_web__applications_web__app.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/web_applications/web_app.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/web_applications/web_app.cc
+@@ -507,7 +507,7 @@ void GetIconsInfo(const WebApplicationIn
+ }
+ #endif
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ std::string GetWMClassFromAppName(std::string app_name) {
+   base::i18n::ReplaceIllegalCharactersInPath(&app_name, '_');
+   base::TrimString(app_name, "_", &app_name);
diff --git a/chromium/patches/patch-chrome_browser_web__applications_web__app.h b/chromium/patches/patch-chrome_browser_web__applications_web__app.h
new file mode 100644
index 0000000000..af0d1ffb49
--- /dev/null
+++ b/chromium/patches/patch-chrome_browser_web__applications_web__app.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/browser/web_applications/web_app.h.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/browser/web_applications/web_app.h
+@@ -224,7 +224,7 @@ typedef std::vector<WebApplicationInfo::
+ void GetIconsInfo(const WebApplicationInfo& app_info, IconInfoList* icons);
+ #endif
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Windows that correspond to web apps need to have a deterministic (and
+ // different) WMClass than normal chrome windows so the window manager groups
+ // them as a separate application.
diff --git a/chromium/patches/patch-chrome_common_BUILD.gn b/chromium/patches/patch-chrome_common_BUILD.gn
new file mode 100644
index 0000000000..d9b04ff3b1
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- chrome/common/BUILD.gn.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/BUILD.gn
+@@ -243,6 +243,13 @@ static_library("common") {
+     public_deps += [ "//ppapi/shared_impl" ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "component_flash_hint_file_linux.cc",
++      "component_flash_hint_file_linux.h",
++    ]
++  }
++
+   if (enable_extensions) {
+     sources += [
+       "cast_messages.cc",
diff --git a/chromium/patches/patch-chrome_common_chrome__paths.cc b/chromium/patches/patch-chrome_common_chrome__paths.cc
new file mode 100644
index 0000000000..f81a9f6326
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_chrome__paths.cc
@@ -0,0 +1,55 @@
+$NetBSD$
+
+--- chrome/common/chrome_paths.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/chrome_paths.cc
+@@ -197,7 +197,7 @@ bool PathProvider(int key, base::FilePat
+         return false;
+       break;
+     case chrome::DIR_DEFAULT_DOWNLOADS_SAFE:
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+       if (!GetUserDownloadsDirectorySafe(&cur))
+         return false;
+       break;
+@@ -480,10 +480,12 @@ bool PathProvider(int key, base::FilePat
+       if (!base::PathExists(cur))  // We don't want to create this
+         return false;
+       break;
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
++#if defined(OS_POSIX) && !defined(OS_MACOSX)
+     case chrome::DIR_POLICY_FILES: {
+ #if defined(GOOGLE_CHROME_BUILD)
+       cur = base::FilePath(FILE_PATH_LITERAL("/etc/opt/chrome/policies"));
++#elif defined(OS_BSD)
++      cur = base::FilePath(FILE_PATH_LITERAL("/usr/pkg/etc/chrome/policies"));
+ #else
+       cur = base::FilePath(FILE_PATH_LITERAL("/etc/chromium/policies"));
+ #endif
+@@ -534,7 +536,7 @@ bool PathProvider(int key, base::FilePat
+ #endif
+       break;
+ 
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+     case chrome::DIR_NATIVE_MESSAGING:
+ #if defined(OS_MACOSX)
+ #if defined(GOOGLE_CHROME_BUILD)
+@@ -548,6 +550,9 @@ bool PathProvider(int key, base::FilePat
+ #if defined(GOOGLE_CHROME_BUILD)
+       cur = base::FilePath(FILE_PATH_LITERAL(
+           "/etc/opt/chrome/native-messaging-hosts"));
++#elif defined(OS_BSD)
++      cur = base::FilePath(FILE_PATH_LITERAL(
++          "/usr/pkg/etc/chrome/native-messaging-hosts"));
+ #else
+       cur = base::FilePath(FILE_PATH_LITERAL(
+           "/etc/chromium/native-messaging-hosts"));
+@@ -560,7 +565,7 @@ bool PathProvider(int key, base::FilePat
+         return false;
+       cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts"));
+       break;
+-#endif  // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif  // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ #if !defined(OS_ANDROID)
+     case chrome::DIR_GLOBAL_GCM_STORE:
+       if (!PathService::Get(chrome::DIR_USER_DATA, &cur))
diff --git a/chromium/patches/patch-chrome_common_chrome__paths.h b/chromium/patches/patch-chrome_common_chrome__paths.h
new file mode 100644
index 0000000000..a029bfeb83
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_chrome__paths.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- chrome/common/chrome_paths.h.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/chrome_paths.h
+@@ -49,7 +49,7 @@ enum {
+                                 // to set policies for chrome. This directory
+                                 // contains subdirectories.
+ #endif
+-#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && defined(CHROMIUM_BUILD)) || \
++#if defined(OS_CHROMEOS) || ((defined(OS_LINUX) || defined(OS_BSD)) && defined(CHROMIUM_BUILD)) || \
+     defined(OS_MACOSX)
+   DIR_USER_EXTERNAL_EXTENSIONS,  // Directory for per-user external extensions
+                                  // on Chrome Mac and Chromium Linux.
+@@ -58,7 +58,7 @@ enum {
+                                  // create it.
+ #endif
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   DIR_STANDALONE_EXTERNAL_EXTENSIONS,  // Directory for 'per-extension'
+                                        // definition manifest files that
+                                        // describe extensions which are to be
+@@ -112,7 +112,7 @@ enum {
+   DIR_SUPERVISED_USER_INSTALLED_WHITELISTS,  // Directory where sanitized
+                                              // supervised user whitelists are
+                                              // installed.
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_MACOSX)
+   DIR_NATIVE_MESSAGING,         // System directory where native messaging host
+                                 // manifest files are stored.
+   DIR_USER_NATIVE_MESSAGING,    // Directory with Native Messaging Hosts
diff --git a/chromium/patches/patch-chrome_common_chrome__paths__internal.h b/chromium/patches/patch-chrome_common_chrome__paths__internal.h
new file mode 100644
index 0000000000..ca44ff1e45
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_chrome__paths__internal.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/common/chrome_paths_internal.h.orig	2017-02-02 02:02:50.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.
+ bool GetUserDocumentsDirectory(base::FilePath* result);
+ 
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ // Gets the path to a safe default download directory for a user.
+ bool GetUserDownloadsDirectorySafe(base::FilePath* result);
+ #endif
diff --git a/chromium/patches/patch-chrome_common_chrome__switches.cc b/chromium/patches/patch-chrome_common_chrome__switches.cc
new file mode 100644
index 0000000000..994aa137ee
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_chrome__switches.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/common/chrome_switches.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/chrome_switches.cc
+@@ -1263,7 +1263,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 kDisableInputImeAPI[] = "disable-input-ime-api";
+ extern const char kEnableInputImeAPI[] = "enable-input-ime-api";
+ #endif
diff --git a/chromium/patches/patch-chrome_common_chrome__switches.h b/chromium/patches/patch-chrome_common_chrome__switches.h
new file mode 100644
index 0000000000..97e18e4cdb
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_chrome__switches.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/common/chrome_switches.h.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/chrome_switches.h
+@@ -385,7 +385,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 kDisableInputImeAPI[];
+ extern const char kEnableInputImeAPI[];
+ #endif
diff --git a/chromium/patches/patch-chrome_common_extensions_chrome__extensions__client.cc b/chromium/patches/patch-chrome_common_extensions_chrome__extensions__client.cc
new file mode 100644
index 0000000000..716e2b9804
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_extensions_chrome__extensions__client.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- chrome/common/extensions/chrome_extensions_client.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/extensions/chrome_extensions_client.cc
+@@ -105,7 +105,10 @@ ChromeChannelForHistogram GetChromeChann
+ static base::LazyInstance<ChromeExtensionsClient> g_client =
+     LAZY_INSTANCE_INITIALIZER;
+ 
+-ChromeExtensionsClient::ChromeExtensionsClient() {}
++ChromeExtensionsClient::ChromeExtensionsClient()
++    : chrome_api_permissions_(ChromeAPIPermissions()),
++      extensions_api_permissions_(ExtensionsAPIPermissions()) {
++}
+ 
+ ChromeExtensionsClient::~ChromeExtensionsClient() {
+ }
diff --git a/chromium/patches/patch-chrome_common_extensions_command.cc b/chromium/patches/patch-chrome_common_extensions_command.cc
new file mode 100644
index 0000000000..982bf08dbd
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_extensions_command.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/common/extensions/command.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/extensions/command.cc
+@@ -302,7 +302,7 @@ std::string Command::CommandPlatform() {
+   return values::kKeybindingPlatformMac;
+ #elif defined(OS_CHROMEOS)
+   return values::kKeybindingPlatformChromeOs;
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   return values::kKeybindingPlatformLinux;
+ #else
+   return "";
diff --git a/chromium/patches/patch-chrome_common_features.gni b/chromium/patches/patch-chrome_common_features.gni
new file mode 100644
index 0000000000..69c463f26f
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_features.gni
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chrome/common/features.gni.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/features.gni
+@@ -43,7 +43,7 @@ declare_args() {
+   enable_hotwording = is_chrome_branded && is_chromeos
+ 
+   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)
+ 
+   # Set to true to bundle all the mash related mojo services into chrome.
+   # Specify --mash to chrome to have chrome start the mash environment.
diff --git a/chromium/patches/patch-chrome_common_pref__names.cc b/chromium/patches/patch-chrome_common_pref__names.cc
new file mode 100644
index 0000000000..41dc584b87
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_pref__names.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- chrome/common/pref_names.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/pref_names.cc
+@@ -964,7 +964,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_BSD)) && !defined(OS_CHROMEOS)
+ // Linux specific preference on whether we should match the system theme.
+ const char kUsesSystemTheme[] = "extensions.theme.use_system";
+ #endif
+@@ -1051,7 +1051,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";
+@@ -1438,7 +1438,7 @@ const char kDownloadDefaultDirectory[] =
+ // upgrade a unsafe location to a safe location.
+ const char kDownloadDirUpgraded[] = "download.directory_upgrade";
+ 
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ const char kOpenPdfDownloadInSystemReader[] =
+     "download.open_pdf_in_system_reader";
+ #endif
diff --git a/chromium/patches/patch-chrome_common_pref__names.h b/chromium/patches/patch-chrome_common_pref__names.h
new file mode 100644
index 0000000000..fba60c8c52
--- /dev/null
+++ b/chromium/patches/patch-chrome_common_pref__names.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- chrome/common/pref_names.h.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/common/pref_names.h
+@@ -322,7 +322,7 @@ extern const char kForceGoogleSafeSearch
+ extern const char kForceYouTubeRestrict[];
+ extern const char kForceSessionSync[];
+ extern const char kAllowedDomainsForApps[];
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ extern const char kUsesSystemTheme[];
+ #endif
+ extern const char kCurrentThemePackFilename[];
+@@ -355,7 +355,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[];
+@@ -510,7 +510,7 @@ extern const char kAppWindowPlacement[];
+ extern const char kDownloadDefaultDirectory[];
+ extern const char kDownloadExtensionsToOpen[];
+ extern const char kDownloadDirUpgraded[];
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ extern const char kOpenPdfDownloadInSystemReader[];
+ #endif
+ 
diff --git a/chromium/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc b/chromium/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc
new file mode 100644
index 0000000000..4b7fc59da8
--- /dev/null
+++ b/chromium/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- chrome/renderer/pepper/pepper_flash_font_file_host.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/renderer/pepper/pepper_flash_font_file_host.cc
+@@ -14,7 +14,7 @@
+ #include "ppapi/proxy/ppapi_messages.h"
+ #include "ppapi/proxy/serialized_structs.h"
+ 
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "content/public/common/child_process_sandbox_support_linux.h"
+ #elif defined(OS_WIN)
+ #include "third_party/skia/include/ports/SkFontMgr.h"
+@@ -27,7 +27,7 @@ PepperFlashFontFileHost::PepperFlashFont
+     const ppapi::proxy::SerializedFontDescription& description,
+     PP_PrivateFontCharset charset)
+     : ResourceHost(host->GetPpapiHost(), instance, resource) {
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   fd_.reset(content::MatchFontWithFallback(
+       description.face,
+       description.weight >= PP_BROWSERFONT_TRUSTED_WEIGHT_BOLD,
+@@ -44,7 +44,7 @@ PepperFlashFontFileHost::PepperFlashFont
+   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)
+ }
+ 
+ PepperFlashFontFileHost::~PepperFlashFontFileHost() {}
+@@ -63,7 +63,7 @@ bool PepperFlashFontFileHost::GetFontDat
+                                           void* buffer,
+                                           size_t* length) {
+   bool result = false;
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   int fd = fd_.get();
+   if (fd != -1)
+     result = content::GetFontTable(fd, table, 0 /* offset */,
diff --git a/chromium/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h b/chromium/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h
new file mode 100644
index 0000000000..929ef50e2c
--- /dev/null
+++ b/chromium/patches/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/renderer/pepper/pepper_flash_font_file_host.h.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/renderer/pepper/pepper_flash_font_file_host.h
+@@ -14,7 +14,7 @@
+ #include "ppapi/c/private/pp_private_font_charset.h"
+ #include "ppapi/host/resource_host.h"
+ 
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/files/scoped_file.h"
+ #elif defined(OS_WIN)
+ #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);
+ 
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   base::ScopedFD fd_;
+ #elif defined(OS_WIN)
+   sk_sp<SkTypeface> typeface_;
diff --git a/chromium/patches/patch-chrome_test_BUILD.gn b/chromium/patches/patch-chrome_test_BUILD.gn
new file mode 100644
index 0000000000..b8e38657cb
--- /dev/null
+++ b/chromium/patches/patch-chrome_test_BUILD.gn
@@ -0,0 +1,169 @@
+$NetBSD$
+
+--- chrome/test/BUILD.gn.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/test/BUILD.gn
+@@ -186,7 +186,7 @@ static_library("test_support") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     public_deps += [ "//crypto:platform" ]
+   }
+   if (is_mac) {
+@@ -461,7 +461,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",
+@@ -470,7 +470,7 @@ if (!is_android) {
+         "$root_out_dir/resources.pak",
+       ]
+     }
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       data += [ "$root_out_dir/libppapi_tests.so" ]
+     }
+ 
+@@ -577,7 +577,7 @@ if (!is_android) {
+           "base/interactive_test_utils_views.cc",
+         ]
+       }
+-      if (is_linux) {
++      if (is_linux || is_bsd) {
+         if (!is_chromeos) {
+           # Desktop linux.
+           sources -= [
+@@ -2010,14 +2010,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" ]
+       }
+@@ -2029,7 +2029,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) {
+@@ -2136,7 +2136,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" ]
+     }
+@@ -2363,7 +2363,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" ]
+       }
+@@ -2558,7 +2558,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 += [
+         # Tests for non mobile and non CrOS (includes Linux, Win, Mac).
+         "../browser/metrics/desktop_session_duration/audible_contents_tracker_browsertest.cc",
+@@ -2746,7 +2746,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",
+@@ -3411,7 +3411,7 @@ test("unit_tests") {
+       "$root_out_dir/resources.pak",
+     ]
+   }
+-  if (is_linux || is_win) {
++  if (is_linux || is_bsd || is_win) {
+     data += [ "$root_out_dir/chrome_200_percent.pak" ]
+   }
+ 
+@@ -4111,7 +4111,7 @@ test("unit_tests") {
+       "//ui/wm",
+     ]
+   }
+-  if (!is_chromeos && is_linux) {
++  if (!is_chromeos && (is_linux || is_bsd)) {
+     sources += [
+       "../browser/password_manager/native_backend_kwallet_x_unittest.cc",
+       "../browser/shell_integration_linux_unittest.cc",
+@@ -4131,7 +4131,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)) {
+     if (use_gtk3) {
+       deps += [ "//chrome/browser/ui/libgtkui:libgtk3ui" ]
+     } else {
+@@ -4424,18 +4424,18 @@ test("unit_tests") {
+       "//components/os_crypt:gnome_keyring_direct",
+     ]
+   }
+-  if (is_linux && !is_chromeos && !use_ozone) {
++  if ((is_linux || is_bsd) && !is_chromeos && !use_ozone) {
+     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) {
+@@ -4941,7 +4941,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 = [
+@@ -4967,7 +4967,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 = [
+       "../app/chrome_version.rc.version",
diff --git a/chromium/patches/patch-chrome_test_base_in__process__browser__test.cc b/chromium/patches/patch-chrome_test_base_in__process__browser__test.cc
new file mode 100644
index 0000000000..7a35c5738b
--- /dev/null
+++ b/chromium/patches/patch-chrome_test_base_in__process__browser__test.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- chrome/test/base/in_process_browser_test.cc.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/test/base/in_process_browser_test.cc
+@@ -93,6 +93,10 @@
+ 
+ namespace {
+ 
++#if defined(OS_FREEBSD)
++#include <signal.h>
++#endif
++
+ // Passed as value of kTestType.
+ const char kBrowserTestType[] = "browser";
+ 
diff --git a/chromium/patches/patch-chrome_test_base_testing__browser__process.h b/chromium/patches/patch-chrome_test_base_testing__browser__process.h
new file mode 100644
index 0000000000..58fa557f12
--- /dev/null
+++ b/chromium/patches/patch-chrome_test_base_testing__browser__process.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- chrome/test/base/testing_browser_process.h.orig	2017-02-02 02:02:50.000000000 +0000
++++ chrome/test/base/testing_browser_process.h
+@@ -107,8 +107,8 @@ class TestingBrowserProcess : public Bro
+   DownloadStatusUpdater* download_status_updater() override;
+   DownloadRequestLimiter* download_request_limiter() override;
+ 
+-#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+-  void StartAutoupdateTimer() override {}
++#if (defined(OS_WIN) || defined(OS_LINUX) || defined(OS_FREEBSD)) && !defined(OS_CHROMEOS)
++  void StartAutoupdateTimer() /*override*/ {}
+ #endif
+ 
+   net_log::ChromeNetLog* net_log() override;
diff --git a/chromium/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc b/chromium/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
new file mode 100644
index 0000000000..684e56d5a8
--- /dev/null
+++ b/chromium/patches/patch-chrome_test_chromedriver_chrome_chrome__finder.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- chrome/test/chromedriver/chrome/chrome_finder.cc.orig	2017-02-02 02:02:50.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"));
+   }
+ }
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ void GetApplicationDirs(std::vector<base::FilePath>* locations) {
+   locations->push_back(base::FilePath("/opt/google/chrome"));
+   locations->push_back(base::FilePath("/usr/local/bin"));
+@@ -95,7 +95,7 @@ bool FindChrome(base::FilePath* browser_
+ #elif defined(OS_MACOSX)
+       base::FilePath("Google Chrome.app/Contents/MacOS/Google Chrome"),
+       base::FilePath("Chromium.app/Contents/MacOS/Chromium")
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+       base::FilePath("google-chrome"),
+       base::FilePath("chrome"),
+       base::FilePath("chromium"),
diff --git a/chromium/patches/patch-chromecast_BUILD.gn b/chromium/patches/patch-chromecast_BUILD.gn
new file mode 100644
index 0000000000..9c351414d3
--- /dev/null
+++ b/chromium/patches/patch-chromecast_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chromecast/BUILD.gn.orig	2017-02-02 02:02:51.000000000 +0000
++++ chromecast/BUILD.gn
+@@ -51,7 +51,7 @@ cast_test_group("cast_tests") {
+     tests += [ "//gpu:gpu_unittests" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     tests += [ "//chromecast/crash:cast_crash_unittests" ]
+   }
+ 
diff --git a/chromium/patches/patch-chromecast_browser_BUILD.gn b/chromium/patches/patch-chromecast_browser_BUILD.gn
new file mode 100644
index 0000000000..f6980a79de
--- /dev/null
+++ b/chromium/patches/patch-chromecast_browser_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chromecast/browser/BUILD.gn.orig	2017-02-02 02:02:51.000000000 +0000
++++ chromecast/browser/BUILD.gn
+@@ -120,7 +120,7 @@ source_set("browser") {
+     "//ui/gl",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [
+       "cast_memory_pressure_monitor.cc",
+       "cast_memory_pressure_monitor.h",
diff --git a/chromium/patches/patch-chromecast_browser_metrics_BUILD.gn b/chromium/patches/patch-chromecast_browser_metrics_BUILD.gn
new file mode 100644
index 0000000000..6bd99ea220
--- /dev/null
+++ b/chromium/patches/patch-chromecast_browser_metrics_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chromecast/browser/metrics/BUILD.gn.orig	2017-02-02 02:02:51.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/patches/patch-chromecast_crash_BUILD.gn b/chromium/patches/patch-chromecast_crash_BUILD.gn
new file mode 100644
index 0000000000..b99d7a19b3
--- /dev/null
+++ b/chromium/patches/patch-chromecast_crash_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- chromecast/crash/BUILD.gn.orig	2017-02-02 02:02:51.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/patches/patch-components_BUILD.gn b/chromium/patches/patch-components_BUILD.gn
new file mode 100644
index 0000000000..0f5b330a74
--- /dev/null
+++ b/chromium/patches/patch-components_BUILD.gn
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- components/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/BUILD.gn
+@@ -168,8 +168,8 @@ test("components_unittests") {
+       "//components/certificate_reporting:unit_tests",
+       "//components/certificate_transparency:unit_tests",
+       "//components/contextual_search: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_reduction_proxy/core/browser:unit_tests",
+       "//components/data_reduction_proxy/core/common:unit_tests",
diff --git a/chromium/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc b/chromium/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
new file mode 100644
index 0000000000..4dedd782c2
--- /dev/null
+++ b/chromium/patches/patch-components_autofill_content_renderer_password__form__conversion__utils.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/autofill/content/renderer/password_form_conversion_utils.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/autofill/content/renderer/password_form_conversion_utils.cc
+@@ -28,7 +28,11 @@
+ #include "third_party/WebKit/public/web/WebFormControlElement.h"
+ #include "third_party/WebKit/public/web/WebFrame.h"
+ #include "third_party/WebKit/public/web/WebInputElement.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ using blink::WebDocument;
+ using blink::WebFormControlElement;
diff --git a/chromium/patches/patch-components_content__settings_core_browser_website__settings__registry.cc b/chromium/patches/patch-components_content__settings_core_browser_website__settings__registry.cc
new file mode 100644
index 0000000000..493d9e04de
--- /dev/null
+++ b/chromium/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	2017-02-02 02:02:52.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/patches/patch-components_content__settings_core_browser_website__settings__registry.h b/chromium/patches/patch-components_content__settings_core_browser_website__settings__registry.h
new file mode 100644
index 0000000000..a403fd27f8
--- /dev/null
+++ b/chromium/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	2017-02-02 02:02:52.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/patches/patch-components_cookie__config_cookie__store__util.cc b/chromium/patches/patch-components_cookie__config_cookie__store__util.cc
new file mode 100644
index 0000000000..fa3fc7b5ff
--- /dev/null
+++ b/chromium/patches/patch-components_cookie__config_cookie__store__util.cc
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- components/cookie_config/cookie_store_util.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/cookie_config/cookie_store_util.cc
+@@ -11,7 +11,7 @@
+ 
+ namespace cookie_config {
+ 
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ namespace {
+ 
+ // Use the operating system's mechanisms to encrypt cookies before writing
+@@ -63,10 +63,10 @@ base::LazyInstance<CookieOSCryptoDelegat
+ net::CookieCryptoDelegate* GetCookieCryptoDelegate() {
+   return g_cookie_crypto_delegate.Pointer();
+ }
+-#else   // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#else   // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ net::CookieCryptoDelegate* GetCookieCryptoDelegate() {
+   return NULL;
+ }
+-#endif  // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif  // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ 
+ }  // namespace cookie_config
diff --git a/chromium/patches/patch-components_crash_content_app_BUILD.gn b/chromium/patches/patch-components_crash_content_app_BUILD.gn
new file mode 100644
index 0000000000..2bc22ee6ec
--- /dev/null
+++ b/chromium/patches/patch-components_crash_content_app_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- components/crash/content/app/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/crash/content/app/BUILD.gn
+@@ -145,7 +145,7 @@ source_set("app_non_mac_win") {
+       "//breakpad:breakpad_handler",
+       "//sandbox",
+     ]
+-  } else if (is_posix && !is_ios) {
++  } else if (is_posix && !is_ios && !is_bsd) {
+     deps += [ "//breakpad:client" ]
+   }
+ }
diff --git a/chromium/patches/patch-components_crash_content_browser_BUILD.gn b/chromium/patches/patch-components_crash_content_browser_BUILD.gn
new file mode 100644
index 0000000000..1b7636ac93
--- /dev/null
+++ b/chromium/patches/patch-components_crash_content_browser_BUILD.gn
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- components/crash/content/browser/BUILD.gn.orig	2017-02-02 02:02:52.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/patches/patch-components_drive_drive__api__util.cc b/chromium/patches/patch-components_drive_drive__api__util.cc
new file mode 100644
index 0000000000..22d2f6dca4
--- /dev/null
+++ b/chromium/patches/patch-components_drive_drive__api__util.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/drive/drive_api_util.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/drive/drive_api_util.cc
+@@ -22,7 +22,11 @@
+ #include "google_apis/drive/drive_api_parser.h"
+ #include "net/base/escape.h"
+ #include "net/base/net_errors.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ #include "url/gurl.h"
+ 
+ namespace drive {
diff --git a/chromium/patches/patch-components_feedback_anonymizer__tool.cc b/chromium/patches/patch-components_feedback_anonymizer__tool.cc
new file mode 100644
index 0000000000..87fe9a46de
--- /dev/null
+++ b/chromium/patches/patch-components_feedback_anonymizer__tool.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/feedback/anonymizer_tool.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/feedback/anonymizer_tool.cc
+@@ -10,7 +10,11 @@
+ #include "base/strings/string_number_conversions.h"
+ #include "base/strings/string_util.h"
+ #include "base/strings/stringprintf.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ using re2::RE2;
+ 
diff --git a/chromium/patches/patch-components_flags__ui_flags__state.cc b/chromium/patches/patch-components_flags__ui_flags__state.cc
new file mode 100644
index 0000000000..eef5a54df5
--- /dev/null
+++ b/chromium/patches/patch-components_flags__ui_flags__state.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- components/flags_ui/flags_state.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/flags_ui/flags_state.cc
+@@ -544,7 +544,7 @@ int FlagsState::GetCurrentPlatform() {
+   return kOsWin;
+ #elif defined(OS_CHROMEOS)  // Needs to be before the OS_LINUX check.
+   return kOsCrOS;
+-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
++#elif defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_FREEBSD) || defined(OS_NETBSD)
+   return kOsLinux;
+ #elif defined(OS_ANDROID)
+   return kOsAndroid;
diff --git a/chromium/patches/patch-components_gcm__driver_gcm__client.h b/chromium/patches/patch-components_gcm__driver_gcm__client.h
new file mode 100644
index 0000000000..55c6365890
--- /dev/null
+++ b/chromium/patches/patch-components_gcm__driver_gcm__client.h
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- components/gcm_driver/gcm_client.h.orig	2017-02-02 02:02:52.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/patches/patch-components_gcm__driver_gcm__client__impl.cc b/chromium/patches/patch-components_gcm__driver_gcm__client__impl.cc
new file mode 100644
index 0000000000..ba839c586a
--- /dev/null
+++ b/chromium/patches/patch-components_gcm__driver_gcm__client__impl.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- components/gcm_driver/gcm_client_impl.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/gcm_driver/gcm_client_impl.cc
+@@ -136,6 +136,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/patches/patch-components_json__schema_json__schema__validator.cc b/chromium/patches/patch-components_json__schema_json__schema__validator.cc
new file mode 100644
index 0000000000..bb071285fa
--- /dev/null
+++ b/chromium/patches/patch-components_json__schema_json__schema__validator.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/json_schema/json_schema_validator.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/json_schema/json_schema_validator.cc
+@@ -21,7 +21,11 @@
+ #include "base/strings/stringprintf.h"
+ #include "base/values.h"
+ #include "components/json_schema/json_schema_constants.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ namespace schema = json_schema_constants;
+ 
diff --git a/chromium/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc b/chromium/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc
new file mode 100644
index 0000000000..5593fa3fe7
--- /dev/null
+++ b/chromium/patches/patch-components_keyed__service_core_dependency__graph__unittest.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/keyed_service/core/dependency_graph_unittest.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/keyed_service/core/dependency_graph_unittest.cc
+@@ -9,7 +9,11 @@
+ #include "components/keyed_service/core/dependency_graph.h"
+ #include "components/keyed_service/core/dependency_node.h"
+ #include "testing/gtest/include/gtest/gtest.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ namespace {
+ 
diff --git a/chromium/patches/patch-components_metrics_BUILD.gn b/chromium/patches/patch-components_metrics_BUILD.gn
new file mode 100644
index 0000000000..f76883c395
--- /dev/null
+++ b/chromium/patches/patch-components_metrics_BUILD.gn
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- components/metrics/BUILD.gn.orig	2017-02-02 02:02:52.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) {
+@@ -282,7 +289,7 @@ static_library("test_support") {
+   ]
+ }
+ 
+-if (is_linux) {
++if (is_linux || is_bsd) {
+   static_library("serialization") {
+     sources = [
+       "serialization/metric_sample.cc",
+@@ -341,7 +348,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/patches/patch-components_metrics_drive__metrics__provider__linux.cc b/chromium/patches/patch-components_metrics_drive__metrics__provider__linux.cc
new file mode 100644
index 0000000000..2e6fd1058d
--- /dev/null
+++ b/chromium/patches/patch-components_metrics_drive__metrics__provider__linux.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- components/metrics/drive_metrics_provider_linux.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/metrics/drive_metrics_provider_linux.cc
+@@ -4,7 +4,13 @@
+ 
+ #include "components/metrics/drive_metrics_provider.h"
+ 
++#if defined(OS_BSD)
++#include <sys/types.h>
++#define MAJOR(dev) major(dev)
++#define MINOR(dev) minor(dev)
++#else
+ #include <linux/kdev_t.h>  // For MAJOR()/MINOR().
++#endif
+ #include <sys/stat.h>
+ #include <string>
+ 
diff --git a/chromium/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc b/chromium/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc
new file mode 100644
index 0000000000..53434a937b
--- /dev/null
+++ b/chromium/patches/patch-components_metrics_system__memory__stats__recorder__linux.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- components/metrics/system_memory_stats_recorder_linux.cc.orig	2017-02-02 02:02:52.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_BSD)
+   base::SystemMemoryInfoKB memory;
+   if (!base::GetSystemMemoryInfo(&memory))
+     return;
+@@ -93,6 +94,7 @@ void RecordMemoryStats(RecordMemoryStats
+       break;
+     }
+   }
++#endif // !defined(OS_BSD)
+ }
+ 
+ }  // namespace metrics
diff --git a/chromium/patches/patch-components_neterror_resources_neterror.js b/chromium/patches/patch-components_neterror_resources_neterror.js
new file mode 100644
index 0000000000..2fb83ce046
--- /dev/null
+++ b/chromium/patches/patch-components_neterror_resources_neterror.js
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- components/neterror/resources/neterror.js.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/neterror/resources/neterror.js
+@@ -150,7 +150,7 @@ function setUpCachedButton(buttonStrings
+ }
+ 
+ var primaryControlOnLeft = true;
+-<if expr="is_macosx or is_ios or is_linux or is_android">
++<if expr="is_macosx or is_ios or is_linux or is_android or is_bsd">
+ primaryControlOnLeft = false;
+ </if>
+ 
diff --git a/chromium/patches/patch-components_os__crypt_os__crypt.h b/chromium/patches/patch-components_os__crypt_os__crypt.h
new file mode 100644
index 0000000000..5546d28196
--- /dev/null
+++ b/chromium/patches/patch-components_os__crypt_os__crypt.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- components/os_crypt/os_crypt.h.orig	2017-02-02 02:02:52.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/patches/patch-components_password__manager_core_browser_import_csv__reader.cc b/chromium/patches/patch-components_password__manager_core_browser_import_csv__reader.cc
new file mode 100644
index 0000000000..757e113d97
--- /dev/null
+++ b/chromium/patches/patch-components_password__manager_core_browser_import_csv__reader.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/password_manager/core/browser/import/csv_reader.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/password_manager/core/browser/import/csv_reader.cc
+@@ -9,7 +9,11 @@
+ #include "base/logging.h"
+ #include "base/macros.h"
+ #include "base/strings/string_util.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ namespace {
+ 
diff --git a/chromium/patches/patch-components_plugins_renderer_BUILD.gn b/chromium/patches/patch-components_plugins_renderer_BUILD.gn
new file mode 100644
index 0000000000..23fcb9cd7d
--- /dev/null
+++ b/chromium/patches/patch-components_plugins_renderer_BUILD.gn
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- components/plugins/renderer/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/plugins/renderer/BUILD.gn
+@@ -19,6 +19,7 @@ static_library("renderer") {
+   }
+ 
+   deps = [
++    "//v8",
+     "//content/public/child",
+     "//content/public/common",
+     "//content/public/renderer",
+@@ -27,6 +28,5 @@ static_library("renderer") {
+     "//third_party/WebKit/public:blink",
+     "//third_party/re2",
+     "//ui/base",
+-    "//v8",
+   ]
+ }
diff --git a/chromium/patches/patch-components_plugins_renderer_plugin__placeholder.cc b/chromium/patches/patch-components_plugins_renderer_plugin__placeholder.cc
new file mode 100644
index 0000000000..a73c1a71e5
--- /dev/null
+++ b/chromium/patches/patch-components_plugins_renderer_plugin__placeholder.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/plugins/renderer/plugin_placeholder.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/plugins/renderer/plugin_placeholder.cc
+@@ -11,7 +11,11 @@
+ #include "gin/object_template_builder.h"
+ #include "third_party/WebKit/public/web/WebElement.h"
+ #include "third_party/WebKit/public/web/WebPluginContainer.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ namespace plugins {
+ 
diff --git a/chromium/patches/patch-components_policy_BUILD.gn b/chromium/patches/patch-components_policy_BUILD.gn
new file mode 100644
index 0000000000..993cfb9acc
--- /dev/null
+++ b/chromium/patches/patch-components_policy_BUILD.gn
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- components/policy/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/policy/BUILD.gn
+@@ -14,6 +14,7 @@ import("//tools/grit/grit_rule.gni")
+ gen_policy_templates_common = true
+ gen_policy_templates_win = is_win
+ gen_policy_templates_linux = is_linux
++gen_policy_templates_bsd = is_bsd
+ gen_policy_templates_android = is_android
+ gen_policy_templates_mac = is_mac
+ 
+@@ -126,7 +127,7 @@ if (enable_configuration_policy) {
+       outputs += policy_templates_android_outputs
+       defines += [ "gen_policy_templates_android" ]
+     }
+-    if (gen_policy_templates_linux) {
++    if (gen_policy_templates_linux || gen_policy_templates_bsd) {
+       outputs += policy_templates_linux_outputs
+       defines += [ "gen_policy_templates_linux" ]
+     }
diff --git a/chromium/patches/patch-components_policy_core_common_schema.cc b/chromium/patches/patch-components_policy_core_common_schema.cc
new file mode 100644
index 0000000000..112ed53bd2
--- /dev/null
+++ b/chromium/patches/patch-components_policy_core_common_schema.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/policy/core/common/schema.cc.orig	2017-02-02 02:02:52.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)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ namespace schema = json_schema_constants;
+ 
diff --git a/chromium/patches/patch-components_policy_resources_policy__templates.json b/chromium/patches/patch-components_policy_resources_policy__templates.json
new file mode 100644
index 0000000000..cb90fd92b9
--- /dev/null
+++ b/chromium/patches/patch-components_policy_resources_policy__templates.json
@@ -0,0 +1,49 @@
+$NetBSD$
+
+--- components/policy/resources/policy_templates.json.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/policy/resources/policy_templates.json
+@@ -932,7 +932,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,
+@@ -2065,7 +2065,7 @@
+           'name': 'GSSAPILibraryName',
+           'type': 'string',
+           'schema': { 'type': 'string' },
+-          'supported_on': ['chrome.linux:9-'],
++          'supported_on': ['chrome.linux:9-', 'chrome.freebsd:9-'],
+           'features': {
+             'dynamic_refresh': False,
+             'per_profile': False,
+@@ -4742,7 +4742,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-'],
+       'features': {
+         'dynamic_refresh': True,
+         'per_profile': False,
+@@ -5627,7 +5627,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-'],
+       'features': {
+         'can_be_recommended': True,
+         'dynamic_refresh': True,
+@@ -6156,7 +6156,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/patches/patch-components_policy_tools_generate__policy__source.py b/chromium/patches/patch-components_policy_tools_generate__policy__source.py
new file mode 100644
index 0000000000..4ee03a0ccb
--- /dev/null
+++ b/chromium/patches/patch-components_policy_tools_generate__policy__source.py
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- components/policy/tools/generate_policy_source.py.orig	2017-02-02 02:02:52.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', 'netbsd'])
+         else:
+           self.platforms.append(platform_sub)
+       else:
diff --git a/chromium/patches/patch-components_storage__monitor_BUILD.gn b/chromium/patches/patch-components_storage__monitor_BUILD.gn
new file mode 100644
index 0000000000..8538ef1f20
--- /dev/null
+++ b/chromium/patches/patch-components_storage__monitor_BUILD.gn
@@ -0,0 +1,34 @@
+$NetBSD$
+
+--- components/storage_monitor/BUILD.gn.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/storage_monitor/BUILD.gn
+@@ -65,6 +65,29 @@ static_library("storage_monitor") {
+     ]
+   }
+ 
++  if (is_bsd) {
++    sources -= [
++      "mtab_watcher_linux.cc",
++      "mtab_watcher_linux.h",
++      "storage_monitor_linux.cc",
++      "storage_monitor_linux.h",
++      "udev_util_linux.cc",
++      "udev_util_linux.h",
++    ]
++    if (is_freebsd) {
++      sources += [
++        "storage_monitor_freebsd.cc",
++        "storage_monitor_freebsd.h",
++      ]
++    }
++    if (is_netbsd) {
++      sources += [
++        "storage_monitor_netbsd.cc",
++        "storage_monitor_netbsd.h",
++      ]
++    }
++  }
++
+   if (use_udev) {
+     deps += [ "//device/udev_linux" ]
+   } else if (is_linux) {
diff --git a/chromium/patches/patch-components_storage__monitor_storage__monitor.cc b/chromium/patches/patch-components_storage__monitor_storage__monitor.cc
new file mode 100644
index 0000000000..0b7410219f
--- /dev/null
+++ b/chromium/patches/patch-components_storage__monitor_storage__monitor.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- components/storage_monitor/storage_monitor.cc.orig	2017-02-02 02:02:52.000000000 +0000
++++ components/storage_monitor/storage_monitor.cc
+@@ -85,6 +85,7 @@ std::vector<StorageInfo> StorageMonitor:
+ 
+ void StorageMonitor::EnsureInitialized(base::Closure callback) {
+   DCHECK(thread_checker_.CalledOnValidThread());
++//#if !defined(OS_BSD) //XXX(rene) why disabled?
+   if (initialized_) {
+     if (!callback.is_null())
+       callback.Run();
+@@ -100,6 +101,7 @@ void StorageMonitor::EnsureInitialized(b
+ 
+   initializing_ = true;
+   Init();
++//#endif
+ }
+ 
+ bool StorageMonitor::IsInitialized() const {
diff --git a/chromium/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc b/chromium/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc
new file mode 100644
index 0000000000..3eb57f5065
--- /dev/null
+++ b/chromium/patches/patch-components_storage__monitor_storage__monitor__freebsd.cc
@@ -0,0 +1,106 @@
+$NetBSD$
+
+--- components/storage_monitor/storage_monitor_freebsd.cc.orig	2017-02-14 09:15:22.293048520 +0000
++++ components/storage_monitor/storage_monitor_freebsd.cc
+@@ -0,0 +1,101 @@
++// 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.
++
++// StorageMonitorFreeBSD implementation.
++
++#include "components/storage_monitor/storage_monitor_freebsd.h"
++
++#include <stdio.h>
++
++#include <list>
++
++#include "base/bind.h"
++#include "base/metrics/histogram.h"
++#include "base/process/kill.h"
++#include "base/process/launch.h"
++#include "base/stl_util.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/strings/string_util.h"
++#include "base/strings/utf_string_conversions.h"
++#include "components/storage_monitor/media_storage_util.h"
++#include "components/storage_monitor/removable_device_constants.h"
++#include "components/storage_monitor/storage_info.h"
++
++using content::BrowserThread;
++
++namespace storage_monitor {
++
++namespace {
++
++// udev device property constants.
++const char kBlockSubsystemKey[] = "block";
++const char kDiskDeviceTypeKey[] = "disk";
++const char kFsUUID[] = "ID_FS_UUID";
++const char kLabel[] = "ID_FS_LABEL";
++const char kModel[] = "ID_MODEL";
++const char kModelID[] = "ID_MODEL_ID";
++const char kRemovableSysAttr[] = "removable";
++const char kSerialShort[] = "ID_SERIAL_SHORT";
++const char kSizeSysAttr[] = "size";
++const char kVendor[] = "ID_VENDOR";
++const char kVendorID[] = "ID_VENDOR_ID";
++
++StorageMonitor::EjectStatus EjectPathOnFileThread(
++    const base::FilePath& path,
++    const base::FilePath& device) {
++  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
++
++  static const char kUmountBinary[] = "/sbin/umount";
++  std::vector<std::string> command;
++  command.push_back(kUmountBinary);
++  command.push_back(path.value());
++
++  base::LaunchOptions options;
++  base::Process process = base::LaunchProcess(command, options);
++  if (!process.IsValid())
++    return StorageMonitor::EJECT_FAILURE;
++
++  int exit_code = -1;
++  if (!process.WaitForExitWithTimeout(base::TimeDelta::FromMilliseconds(3000),
++                                      &exit_code)) {
++    process.Terminate(-1, false);
++    base::EnsureProcessTerminated(std::move(process));
++    return StorageMonitor::EJECT_FAILURE;
++  }
++
++  // TODO(gbillock): Make sure this is found in documentation
++  // somewhere. Experimentally it seems to hold that exit code
++  // 1 means device is in use.
++  if (exit_code == 1)
++    return StorageMonitor::EJECT_IN_USE;
++  if (exit_code != 0)
++    return StorageMonitor::EJECT_FAILURE;
++
++  return StorageMonitor::EJECT_OK;
++}
++
++}  // namespace
++
++StorageMonitorFreeBSD::StorageMonitorFreeBSD() {
++  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
++}
++
++StorageMonitorFreeBSD::~StorageMonitorFreeBSD() {
++  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
++}
++
++void StorageMonitorFreeBSD::Init() {
++}
++
++bool StorageMonitorFreeBSD::GetStorageInfoForPath(
++    const base::FilePath& path,
++    StorageInfo* device_info) const {
++  return false; // TODO
++}
++
++StorageMonitor* StorageMonitor::CreateInternal() {
++  return new StorageMonitorFreeBSD();
++}
++
++} // namespace storage_monitor
diff --git a/chromium/patches/patch-components_storage__monitor_storage__monitor__freebsd.h b/chromium/patches/patch-components_storage__monitor_storage__monitor__freebsd.h
new file mode 100644
index 0000000000..63f5451196
--- /dev/null
+++ b/chromium/patches/patch-components_storage__monitor_storage__monitor__freebsd.h
@@ -0,0 +1,50 @@
+$NetBSD$
+
+--- components/storage_monitor/storage_monitor_freebsd.h.orig	2017-02-14 09:15:22.293265649 +0000
++++ components/storage_monitor/storage_monitor_freebsd.h
+@@ -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.
++
++// StorageMonitorFreeBSD processes mount point change events, notifies listeners
++// about the addition and deletion of media devices, and answers queries about
++// mounted devices.
++// StorageMonitorFreeBSD lives on the UI thread, and uses ???
++// the FILE thread to get mount point change events.
++
++#ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_
++#define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_
++
++#include <map>
++#include <string>
++
++#include "base/compiler_specific.h"
++#include "base/files/file_path.h"
++#include "base/files/file_path_watcher.h"
++#include "base/memory/weak_ptr.h"
++#include "components/storage_monitor/storage_monitor.h"
++#include "content/public/browser/browser_thread.h"
++
++namespace storage_monitor {
++
++class StorageMonitorFreeBSD : public StorageMonitor {
++ public:
++  // Should only be called by browser start up code.
++  // Use StorageMonitor::GetInstance() instead.
++  explicit StorageMonitorFreeBSD();
++  virtual ~StorageMonitorFreeBSD();
++
++  // Must be called for StorageMonitorFreeBSD to work.
++  virtual void Init() override;
++ private:
++  // StorageMonitor implementation.
++  virtual bool GetStorageInfoForPath(const base::FilePath& path,
++                                     StorageInfo* device_info) const override;
++
++  DISALLOW_COPY_AND_ASSIGN(StorageMonitorFreeBSD);
++};
++
++} // namespace storage_monitor
++
++#endif  // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_FREEBSD_H_
diff --git a/chromium/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc b/chromium/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc
new file mode 100644
index 0000000000..ea9e4ab41e
--- /dev/null
+++ b/chromium/patches/patch-components_storage__monitor_storage__monitor__netbsd.cc
@@ -0,0 +1,59 @@
+$NetBSD$
+
+--- 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.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++// StorageMonitorNetBSD implementation.
++
++#include "components/storage_monitor/storage_monitor_netbsd.h"
++
++#include <stdio.h>
++
++#include <list>
++
++#include "base/bind.h"
++#include "base/metrics/histogram.h"
++#include "base/process/kill.h"
++#include "base/process/launch.h"
++#include "base/stl_util.h"
++#include "base/strings/string_number_conversions.h"
++#include "base/strings/string_util.h"
++#include "base/strings/utf_string_conversions.h"
++#include "components/storage_monitor/media_storage_util.h"
++#include "components/storage_monitor/removable_device_constants.h"
++#include "components/storage_monitor/storage_info.h"
++
++using content::BrowserThread;
++
++namespace storage_monitor {
++
++namespace {
++
++}  // namespace
++
++StorageMonitorNetBSD::StorageMonitorNetBSD() {
++  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
++}
++
++StorageMonitorNetBSD::~StorageMonitorNetBSD() {
++  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
++}
++
++void StorageMonitorNetBSD::Init() {
++}
++
++bool StorageMonitorNetBSD::GetStorageInfoForPath(
++    const base::FilePath& path,
++    StorageInfo* device_info) const {
++  return false; // TODO
++}
++
++StorageMonitor* StorageMonitor::CreateInternal() {
++  return new StorageMonitorNetBSD();
++}
++
++} // namespace storage_monitor
diff --git a/chromium/patches/patch-components_storage__monitor_storage__monitor__netbsd.h b/chromium/patches/patch-components_storage__monitor_storage__monitor__netbsd.h
new file mode 100644
index 0000000000..95e737894a
--- /dev/null
+++ b/chromium/patches/patch-components_storage__monitor_storage__monitor__netbsd.h
@@ -0,0 +1,50 @@
+$NetBSD$
+
+--- components/storage_monitor/storage_monitor_netbsd.h.orig	2017-02-15 20:24:30.383612419 +0000
++++ components/storage_monitor/storage_monitor_netbsd.h
+@@ -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.
++
++// StorageMonitorNetBSD processes mount point change events, notifies listeners
++// about the addition and deletion of media devices, and answers queries about
++// mounted devices.
++// StorageMonitorFreeBSD lives on the UI thread, and uses ???
++// the FILE thread to get mount point change events.
++
++#ifndef COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_NETBSD_H_
++#define COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_NETBSD_H_
++
++#include <map>
++#include <string>
++
++#include "base/compiler_specific.h"
++#include "base/files/file_path.h"
++#include "base/files/file_path_watcher.h"
++#include "base/memory/weak_ptr.h"
++#include "components/storage_monitor/storage_monitor.h"
++#include "content/public/browser/browser_thread.h"
++
++namespace storage_monitor {
++
++class StorageMonitorNetBSD : public StorageMonitor {
++ public:
++  // Should only be called by browser start up code.
++  // Use StorageMonitor::GetInstance() instead.
++  explicit StorageMonitorNetBSD();
++  virtual ~StorageMonitorNetBSD();
++
++  // Must be called for StorageMonitorFreeBSD to work.
++  virtual void Init() override;
++ private:
++  // StorageMonitor implementation.
++  virtual bool GetStorageInfoForPath(const base::FilePath& path,
++                                     StorageInfo* device_info) const override;
++
++  DISALLOW_COPY_AND_ASSIGN(StorageMonitorNetBSD);
++};
++
++} // namespace storage_monitor
++
++#endif  // COMPONENTS_STORAGE_MONITOR_STORAGE_MONITOR_NETBSD_H_
diff --git a/chromium/patches/patch-components_sync_base_get__session__name__linux.cc b/chromium/patches/patch-components_sync_base_get__session__name__linux.cc
new file mode 100644
index 0000000000..ddfbbc220f
--- /dev/null
+++ b/chromium/patches/patch-components_sync_base_get__session__name__linux.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- components/sync/base/get_session_name_linux.cc.orig	2017-02-02 02:02:53.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/patches/patch-components_update__client_update__query__params.cc b/chromium/patches/patch-components_update__client_update__query__params.cc
new file mode 100644
index 0000000000..fe93d08d76
--- /dev/null
+++ b/chromium/patches/patch-components_update__client_update__query__params.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- components/update_client/update_query_params.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ components/update_client/update_query_params.cc
+@@ -31,6 +31,10 @@ const char kOs[] =
+     "linux";
+ #elif defined(OS_OPENBSD)
+     "openbsd";
++#elif defined(OS_FREEBSD)
++    "freebsd";
++#elif defined(OS_NETBSD)
++    "netbsd";
+ #else
+ #error "unknown os"
+ #endif
diff --git a/chromium/patches/patch-components_url__matcher_regex__set__matcher.cc b/chromium/patches/patch-components_url__matcher_regex__set__matcher.cc
new file mode 100644
index 0000000000..d0c8af1c7e
--- /dev/null
+++ b/chromium/patches/patch-components_url__matcher_regex__set__matcher.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- components/url_matcher/regex_set_matcher.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ components/url_matcher/regex_set_matcher.cc
+@@ -10,8 +10,13 @@
+ #include "base/memory/ptr_util.h"
+ #include "base/strings/string_util.h"
+ #include "components/url_matcher/substring_set_matcher.h"
++#if defined(OS_BSD)
++#include <re2/filtered_re2.h>
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/filtered_re2.h"
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ namespace url_matcher {
+ 
diff --git a/chromium/patches/patch-components_url__matcher_url__matcher__factory.cc b/chromium/patches/patch-components_url__matcher_url__matcher__factory.cc
new file mode 100644
index 0000000000..eddae65bc4
--- /dev/null
+++ b/chromium/patches/patch-components_url__matcher_url__matcher__factory.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/url_matcher/url_matcher_factory.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ components/url_matcher/url_matcher_factory.cc
+@@ -16,7 +16,11 @@
+ #include "base/values.h"
+ #include "components/url_matcher/url_matcher_constants.h"
+ #include "components/url_matcher/url_matcher_helpers.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ namespace url_matcher {
+ 
diff --git a/chromium/patches/patch-components_variations_proto_study.proto b/chromium/patches/patch-components_variations_proto_study.proto
new file mode 100644
index 0000000000..0d27a2aba2
--- /dev/null
+++ b/chromium/patches/patch-components_variations_proto_study.proto
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- components/variations/proto/study.proto.orig	2017-02-02 02:02:53.000000000 +0000
++++ components/variations/proto/study.proto
+@@ -186,6 +186,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/patches/patch-components_webcrypto_algorithms_test__helpers.cc b/chromium/patches/patch-components_webcrypto_algorithms_test__helpers.cc
new file mode 100644
index 0000000000..feb9242ed1
--- /dev/null
+++ b/chromium/patches/patch-components_webcrypto_algorithms_test__helpers.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- components/webcrypto/algorithms/test_helpers.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ components/webcrypto/algorithms/test_helpers.cc
+@@ -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"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ namespace webcrypto {
+ 
diff --git a/chromium/patches/patch-content_app_BUILD.gn b/chromium/patches/patch-content_app_BUILD.gn
new file mode 100644
index 0000000000..a9ad02d395
--- /dev/null
+++ b/chromium/patches/patch-content_app_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/app/BUILD.gn.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/app/BUILD.gn
+@@ -68,7 +68,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/patches/patch-content_app_content__main__runner.cc b/chromium/patches/patch-content_app_content__main__runner.cc
new file mode 100644
index 0000000000..5a7847ad6b
--- /dev/null
+++ b/chromium/patches/patch-content_app_content__main__runner.cc
@@ -0,0 +1,44 @@
+$NetBSD$
+
+--- content/app/content_main_runner.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/app/content_main_runner.cc
+@@ -97,10 +97,10 @@
+ #include "base/posix/global_descriptors.h"
+ #include "content/public/common/content_descriptors.h"
+ 
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+ #include "content/public/common/zygote_fork_delegate_linux.h"
+ #endif
+-#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+ #include "content/zygote/zygote_main.h"
+ #endif
+ 
+@@ -290,7 +290,7 @@ struct MainFunction {
+   int (*function)(const MainFunctionParams&);
+ };
+ 
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+ // 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().
+@@ -342,7 +342,7 @@ int RunZygote(const MainFunctionParams& 
+   NOTREACHED() << "Unknown zygote process type: " << process_type;
+   return 1;
+ }
+-#endif  // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#endif  // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+ 
+ static void RegisterMainThreadFactories() {
+ #if !defined(CHROME_MULTIPLE_DLL_BROWSER) && !defined(CHROME_MULTIPLE_DLL_CHILD)
+@@ -409,7 +409,7 @@ int RunNamedProcessTypeMain(
+     }
+   }
+ 
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+   // Zygote startup is special -- see RunZygote comments above
+   // for why we don't use ZygoteMain directly.
+   if (process_type == switches::kZygoteProcess)
diff --git a/chromium/patches/patch-content_browser_BUILD.gn b/chromium/patches/patch-content_browser_BUILD.gn
new file mode 100644
index 0000000000..f1419185b6
--- /dev/null
+++ b/chromium/patches/patch-content_browser_BUILD.gn
@@ -0,0 +1,70 @@
+$NetBSD$
+
+--- content/browser/BUILD.gn.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/BUILD.gn
+@@ -1421,10 +1421,11 @@ source_set("browser") {
+       "memory/memory_monitor_chromeos.cc",
+       "memory/memory_monitor_chromeos.h",
+     ]
+-  } else {
+-    sources += [
+-      "memory/memory_monitor_linux.cc",
+-      "memory/memory_monitor_linux.h",
++  }
++
++  if (is_bsd) {
++    sources -= [
++      "download/quarantine_linux.cc",
+     ]
+   }
+ 
+@@ -1490,7 +1491,7 @@ source_set("browser") {
+     if (!is_ios) {
+       defines += [ "ENABLE_SCREEN_CAPTURE=1" ]
+     }
+-    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",
+@@ -1657,7 +1658,7 @@ source_set("browser") {
+     }
+   }
+ 
+-  if (is_linux && use_aura) {
++  if ((is_linux || is_bsd) && use_aura) {
+     deps += [ "//build/linux:fontconfig" ]
+   }
+ 
+@@ -1807,6 +1808,17 @@ 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",
++    ]
+   }
+ 
+   if (enable_mojo_media) {
+@@ -1930,11 +1942,11 @@ source_set("browser") {
+     deps += [ "//third_party/flac" ]
+   }
+ 
+-  if (is_linux && use_dbus) {
++  if ((is_linux || is_bsd) && use_dbus) {
+     deps += [ "//dbus" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//third_party/boringssl" ]
+   }
+ 
diff --git a/chromium/patches/patch-content_browser_accessibility_browser__accessibility.h b/chromium/patches/patch-content_browser_accessibility_browser__accessibility.h
new file mode 100644
index 0000000000..3ac5d5cf79
--- /dev/null
+++ b/chromium/patches/patch-content_browser_accessibility_browser__accessibility.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/accessibility/browser_accessibility.h.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/accessibility/browser_accessibility.h
+@@ -38,7 +38,7 @@
+ #define PLATFORM_HAS_NATIVE_ACCESSIBILITY_IMPL 1
+ #endif
+ 
+-#if defined(OS_LINUX) && defined(USE_X11) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && defined(USE_X11) && !defined(OS_CHROMEOS)
+ #define PLATFORM_HAS_NATIVE_ACCESSIBILITY_IMPL 1
+ #endif
+ 
diff --git a/chromium/patches/patch-content_browser_accessibility_browser__accessibility__manager.h b/chromium/patches/patch-content_browser_accessibility_browser__accessibility__manager.h
new file mode 100644
index 0000000000..28997af2a9
--- /dev/null
+++ b/chromium/patches/patch-content_browser_accessibility_browser__accessibility__manager.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- content/browser/accessibility/browser_accessibility_manager.h.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/accessibility/browser_accessibility_manager.h
+@@ -34,7 +34,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;
+ #elif defined(OS_MACOSX)
+ class BrowserAccessibilityManagerMac;
+@@ -244,7 +244,7 @@ class CONTENT_EXPORT BrowserAccessibilit
+   BrowserAccessibilityManagerAndroid* ToBrowserAccessibilityManagerAndroid();
+ #endif
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(USE_X11)
+   BrowserAccessibilityManagerAuraLinux*
+       ToBrowserAccessibilityManagerAuraLinux();
+ #endif
diff --git a/chromium/patches/patch-content_browser_browser__main__loop.cc b/chromium/patches/patch-content_browser_browser__main__loop.cc
new file mode 100644
index 0000000000..0ef0db0e96
--- /dev/null
+++ b/chromium/patches/patch-content_browser_browser__main__loop.cc
@@ -0,0 +1,41 @@
+$NetBSD$
+
+--- content/browser/browser_main_loop.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/browser_main_loop.cc
+@@ -203,6 +203,10 @@
+ #include "gpu/vulkan/vulkan_implementation.h"
+ #endif
+ 
++#if defined(OS_BSD)
++#include "content/common/child_process_sandbox_support_impl_linux.h"
++#endif
++
+ // One of the linux specific headers defines this as a macro.
+ #ifdef DestroyAll
+ #undef DestroyAll
+@@ -211,7 +215,7 @@
+ namespace content {
+ namespace {
+ 
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#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");
+   if (parsed_command_line.HasSwitch(switches::kNoZygote)) {
+@@ -482,10 +486,15 @@ void BrowserMainLoop::Init() {
+ void BrowserMainLoop::EarlyInitialization() {
+   TRACE_EVENT0("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_);
++#elif defined(OS_BSD)
++  RenderSandboxHostLinux::GetInstance()->Init();
++  base::FileHandleMappingVector fds_to_map;
++  const int sfd = RenderSandboxHostLinux::GetInstance()->GetRendererSocket();
++  fds_to_map.push_back(std::make_pair(sfd, GetSandboxFD()));
+ #endif
+ 
+ #if defined(USE_X11)
diff --git a/chromium/patches/patch-content_browser_child__process__launcher.cc b/chromium/patches/patch-content_browser_child__process__launcher.cc
new file mode 100644
index 0000000000..b42518d8a7
--- /dev/null
+++ b/chromium/patches/patch-content_browser_child__process__launcher.cc
@@ -0,0 +1,49 @@
+$NetBSD$
+
+--- content/browser/child_process_launcher.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/child_process_launcher.cc
+@@ -249,7 +249,7 @@ void LaunchOnLauncherThread(const Notify
+   // We need to close the client end of the IPC channel to reliably detect
+   // child termination.
+ 
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+   ZygoteHandle* zygote_handle =
+       !base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoZygote)
+           ? delegate->GetZygote()
+@@ -267,7 +267,7 @@ void LaunchOnLauncherThread(const Notify
+     process = base::Process(handle);
+   } else
+   // Fall through to the normal posix case below when we're not zygoting.
+-#endif  // !defined(OS_MACOSX)
++#endif  // !defined(OS_MACOSX) && !defined(OS_BSD)
+   {
+     // Convert FD mapping to FileHandleMappingVector
+     base::FileHandleMappingVector fds_to_map =
+@@ -358,7 +358,7 @@ void TerminateOnLauncherThread(ZygoteHan
+   process.Terminate(RESULT_CODE_NORMAL_EXIT, false);
+   // On POSIX, we must additionally reap the child.
+ #if defined(OS_POSIX)
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+   if (zygote) {
+     // If the renderer was created via a zygote, we have to proxy the reaping
+     // through the zygote process.
+@@ -475,7 +475,7 @@ void ChildProcessLauncher::Launch(Sandbo
+ 
+ void ChildProcessLauncher::UpdateTerminationStatus(bool known_dead) {
+   DCHECK(CalledOnValidThread());
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+   if (zygote_) {
+     termination_status_ = zygote_->GetTerminationStatus(
+         process_.Handle(), known_dead, &exit_code_);
+@@ -549,7 +549,7 @@ void ChildProcessLauncher::Notify(Zygote
+                                     mojo_child_token_, process_error_callback_);
+   }
+ 
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+   zygote_ = zygote;
+ #endif
+   if (process_.IsValid()) {
diff --git a/chromium/patches/patch-content_browser_device__sensors_data__fetcher__shared__memory.h b/chromium/patches/patch-content_browser_device__sensors_data__fetcher__shared__memory.h
new file mode 100644
index 0000000000..be4cd025f9
--- /dev/null
+++ b/chromium/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	2017-02-02 02:02:53.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/patches/patch-content_browser_devtools_protocol_color__picker.cc b/chromium/patches/patch-content_browser_devtools_protocol_color__picker.cc
new file mode 100644
index 0000000000..8a2ec8f966
--- /dev/null
+++ b/chromium/patches/patch-content_browser_devtools_protocol_color__picker.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/devtools/protocol/color_picker.cc.orig	2017-02-02 02:02:53.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/patches/patch-content_browser_download_base__file.cc b/chromium/patches/patch-content_browser_download_base__file.cc
new file mode 100644
index 0000000000..7765bda2e5
--- /dev/null
+++ b/chromium/patches/patch-content_browser_download_base__file.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- content/browser/download/base_file.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/download/base_file.cc
+@@ -373,7 +373,7 @@ DownloadInterruptReason BaseFile::LogInt
+   return reason;
+ }
+ 
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ 
+ namespace {
+ 
+@@ -456,7 +456,7 @@ DownloadInterruptReason BaseFile::Annota
+   }
+   return DOWNLOAD_INTERRUPT_REASON_FILE_FAILED;
+ }
+-#else  // !OS_WIN && !OS_MACOSX && !OS_LINUX
++#else  // !OS_WIN && !OS_MACOSX && !OS_LINUX && !OS_BSD
+ DownloadInterruptReason BaseFile::AnnotateWithSourceInformation(
+     const std::string& client_guid,
+     const GURL& source_url,
diff --git a/chromium/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc b/chromium/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
new file mode 100644
index 0000000000..99b1e76b6b
--- /dev/null
+++ b/chromium/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.cc
@@ -0,0 +1,47 @@
+$NetBSD$
+
+--- content/browser/gpu/gpu_data_manager_impl_private.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/gpu/gpu_data_manager_impl_private.cc
+@@ -376,7 +376,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.";
+     }
+@@ -493,8 +493,10 @@ void GpuDataManagerImplPrivate::SetGLStr
+   gpu_info.gl_renderer = gl_renderer;
+   gpu_info.gl_version = gl_version;
+ 
++#if !defined(OS_BSD)
+   gpu::IdentifyActiveGPU(&gpu_info);
+   gpu::CollectDriverInfoGL(&gpu_info);
++#endif
+ 
+   UpdateGpuInfo(gpu_info);
+   UpdateGpuSwitchingManager(gpu_info);
+@@ -549,10 +551,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) &&
+@@ -664,7 +668,9 @@ void GpuDataManagerImplPrivate::UpdateGp
+     return;
+ 
+   bool was_info_available = IsCompleteGpuInfoAvailable();
++#ifndef OS_BSD
+   gpu::MergeGPUInfo(&gpu_info_, gpu_info);
++#endif
+   if (IsCompleteGpuInfoAvailable()) {
+     complete_gpu_info_already_requested_ = true;
+   } else if (was_info_available) {
diff --git a/chromium/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h b/chromium/patches/patch-content_browser_gpu_gpu__data__manager__impl__private.h
new file mode 100644
index 0000000000..4fb64f42c5
--- /dev/null
+++ b/chromium/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	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/gpu/gpu_data_manager_impl_private.h
+@@ -154,7 +154,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/patches/patch-content_browser_gpu_gpu__internals__ui.cc b/chromium/patches/patch-content_browser_gpu_gpu__internals__ui.cc
new file mode 100644
index 0000000000..00f9193701
--- /dev/null
+++ b/chromium/patches/patch-content_browser_gpu_gpu__internals__ui.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- content/browser/gpu/gpu_internals_ui.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/gpu/gpu_internals_ui.cc
+@@ -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)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(USE_X11)
+ #include <X11/Xlib.h>
+ #endif
+ #if defined(OS_WIN)
+@@ -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"       // nogncheck
+ #include "ui/gfx/x/x11_atom_cache.h"  // nogncheck
+ #endif
+@@ -206,7 +206,7 @@ base::DictionaryValue* GpuInfoAsDictiona
+                                              gpu_info.gl_ws_version));
+   basic_info->Append(NewDescriptionValuePair("Window system binding extensions",
+                                              gpu_info.gl_ws_extensions));
+-#if defined(OS_LINUX) && defined(USE_X11)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(USE_X11)
+   basic_info->Append(NewDescriptionValuePair("Window manager",
+                                              ui::GuessWindowManagerName()));
+   {
diff --git a/chromium/patches/patch-content_browser_gpu_gpu__process__host.cc b/chromium/patches/patch-content_browser_gpu_gpu__process__host.cc
new file mode 100644
index 0000000000..cd932853de
--- /dev/null
+++ b/chromium/patches/patch-content_browser_gpu_gpu__process__host.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/gpu/gpu_process_host.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/gpu/gpu_process_host.cc
+@@ -984,7 +984,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/patches/patch-content_browser_media_media__internals.cc b/chromium/patches/patch-content_browser_media_media__internals.cc
new file mode 100644
index 0000000000..542e499e9f
--- /dev/null
+++ b/chromium/patches/patch-content_browser_media_media__internals.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/media/media_internals.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/media/media_internals.cc
+@@ -755,7 +755,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/patches/patch-content_browser_memory_memory__coordinator__impl.cc b/chromium/patches/patch-content_browser_memory_memory__coordinator__impl.cc
new file mode 100644
index 0000000000..6ad3a3d906
--- /dev/null
+++ b/chromium/patches/patch-content_browser_memory_memory__coordinator__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- content/browser/memory/memory_coordinator_impl.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/memory/memory_coordinator_impl.cc
+@@ -116,8 +116,12 @@ void RecordMetricsOnStateChange(base::Me
+ struct MemoryCoordinatorSingletonTraits
+     : public base::LeakySingletonTraits<MemoryCoordinator> {
+   static MemoryCoordinator* New() {
++#if defined(OS_BSD)
++    return nullptr;
++#else
+     return new MemoryCoordinatorImpl(base::ThreadTaskRunnerHandle::Get(),
+                                      CreateMemoryMonitor());
++#endif
+   }
+ };
+ 
diff --git a/chromium/patches/patch-content_browser_memory_memory__monitor.cc b/chromium/patches/patch-content_browser_memory_memory__monitor.cc
new file mode 100644
index 0000000000..0363a8e5e0
--- /dev/null
+++ b/chromium/patches/patch-content_browser_memory_memory__monitor.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- content/browser/memory/memory_monitor.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/memory/memory_monitor.cc
+@@ -8,6 +8,7 @@
+ 
+ namespace content {
+ 
++#if !defined(OS_BSD)
+ // static
+ MemoryMonitorDelegate* MemoryMonitorDelegate::GetInstance() {
+   return base::Singleton<
+@@ -21,8 +22,9 @@ void MemoryMonitorDelegate::GetSystemMem
+     base::SystemMemoryInfoKB* mem_info) {
+   base::GetSystemMemoryInfo(mem_info);
+ }
++#endif // !defined(OS_BSD)
+ 
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) && !defined(OS_BSD)
+ // TODO(bashi,bcwhite): Remove when memory monitor for mac is available.
+ std::unique_ptr<MemoryMonitor> CreateMemoryMonitor() {
+   NOTREACHED();
diff --git a/chromium/patches/patch-content_browser_ppapi__plugin__process__host.cc b/chromium/patches/patch-content_browser_ppapi__plugin__process__host.cc
new file mode 100644
index 0000000000..e41e141c47
--- /dev/null
+++ b/chromium/patches/patch-content_browser_ppapi__plugin__process__host.cc
@@ -0,0 +1,50 @@
+$NetBSD$
+
+--- content/browser/ppapi_plugin_process_host.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/ppapi_plugin_process_host.cc
+@@ -53,9 +53,9 @@
+ 
+ namespace content {
+ 
+-#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ ZygoteHandle g_ppapi_zygote;
+-#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ 
+ // NOTE: changes to this class need to be reviewed by the security team.
+ class PpapiPluginSandboxedProcessLauncherDelegate
+@@ -109,7 +109,7 @@ class PpapiPluginSandboxedProcessLaunche
+     return true;
+   }
+ 
+-#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+   ZygoteHandle* GetZygote() override {
+     const base::CommandLine& browser_command_line =
+         *base::CommandLine::ForCurrentProcess();
+@@ -203,13 +203,13 @@ PpapiPluginProcessHost* PpapiPluginProce
+   return NULL;
+ }
+ 
+-#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ // static
+ void PpapiPluginProcessHost::EarlyZygoteLaunch() {
+   DCHECK(!g_ppapi_zygote);
+   g_ppapi_zygote = CreateZygote();
+ }
+-#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ 
+ // static
+ void PpapiPluginProcessHost::DidCreateOutOfProcessInstance(
+@@ -361,7 +361,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/patches/patch-content_browser_renderer__host_render__process__host__impl.cc b/chromium/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
new file mode 100644
index 0000000000..3f743cae88
--- /dev/null
+++ b/chromium/patches/patch-content_browser_renderer__host_render__process__host__impl.cc
@@ -0,0 +1,54 @@
+$NetBSD$
+
+--- content/browser/renderer_host/render_process_host_impl.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/renderer_host/render_process_host_impl.cc
+@@ -368,11 +368,11 @@ SiteProcessMap* GetSiteProcessMapForBrow
+   return map;
+ }
+ 
+-#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ // This static member variable holds the zygote communication information for
+ // the renderer.
+ ZygoteHandle g_render_zygote;
+-#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ 
+ // NOTE: changes to this class need to be reviewed by the security team.
+ class RendererSandboxedProcessLauncherDelegate
+@@ -395,7 +395,7 @@ class RendererSandboxedProcessLauncherDe
+     return GetContentClient()->browser()->PreSpawnRenderer(policy);
+   }
+ 
+-#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#elif defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+   ZygoteHandle* GetZygote() override {
+     const base::CommandLine& browser_command_line =
+         *base::CommandLine::ForCurrentProcess();
+@@ -635,7 +635,7 @@ void RenderProcessHost::SetMaxRendererPr
+   g_max_renderer_count_override = count;
+ }
+ 
+-#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ // static
+ void RenderProcessHostImpl::EarlyZygoteLaunch() {
+   DCHECK(!g_render_zygote);
+@@ -645,7 +645,7 @@ void RenderProcessHostImpl::EarlyZygoteL
+   ZygoteHostImpl::GetInstance()->SetRendererSandboxStatus(
+       (*GetGenericZygote())->GetSandboxStatus());
+ }
+-#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ 
+ RenderProcessHostImpl::RenderProcessHostImpl(
+     BrowserContext* browser_context,
+@@ -788,7 +788,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/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc b/chromium/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
new file mode 100644
index 0000000000..e2a9f598fb
--- /dev/null
+++ b/chromium/patches/patch-content_browser_renderer__host_render__widget__host__view__aura.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- content/browser/renderer_host/render_widget_host_view_aura.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/renderer_host/render_widget_host_view_aura.cc
+@@ -107,7 +107,7 @@
+ #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 "ui/base/ime/linux/text_edit_command_auralinux.h"
+ #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
+ #endif
+@@ -1961,7 +1961,7 @@ bool RenderWidgetHostViewAura::NeedsInpu
+ }
+ 
+ bool RenderWidgetHostViewAura::NeedsMouseCapture() {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
+   return NeedsInputGrab();
+ #endif
+   return false;
+@@ -2158,7 +2158,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)
+   ui::TextEditKeyBindingsDelegateAuraLinux* keybinding_delegate =
+       ui::GetTextEditKeyBindingsDelegate();
+   std::vector<ui::TextEditCommandAuraLinux> commands;
diff --git a/chromium/patches/patch-content_browser_tracing_tracing__controller__impl.cc b/chromium/patches/patch-content_browser_tracing_tracing__controller__impl.cc
new file mode 100644
index 0000000000..b1abe73e93
--- /dev/null
+++ b/chromium/patches/patch-content_browser_tracing_tracing__controller__impl.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/browser/tracing/tracing_controller_impl.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/tracing/tracing_controller_impl.cc
+@@ -475,7 +475,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/patches/patch-content_browser_utility__process__host__impl.cc b/chromium/patches/patch-content_browser_utility__process__host__impl.cc
new file mode 100644
index 0000000000..9df05d5f6b
--- /dev/null
+++ b/chromium/patches/patch-content_browser_utility__process__host__impl.cc
@@ -0,0 +1,96 @@
+$NetBSD$
+
+--- content/browser/utility_process_host_impl.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/browser/utility_process_host_impl.cc
+@@ -43,9 +43,9 @@
+ #include "services/service_manager/public/cpp/interface_provider.h"
+ #include "ui/base/ui_base_switches.h"
+ 
+-#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ #include "content/public/browser/zygote_handle_linux.h"
+-#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ 
+ #if defined(OS_WIN)
+ #include "sandbox/win/src/sandbox_policy.h"
+@@ -54,11 +54,11 @@
+ 
+ namespace content {
+ 
+-#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ namespace {
+ ZygoteHandle g_utility_zygote;
+ }  // namespace
+-#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ 
+ // NOTE: changes to this class need to be reviewed by the security team.
+ class UtilitySandboxedProcessLauncherDelegate
+@@ -73,10 +73,10 @@ class UtilitySandboxedProcessLauncherDel
+         launch_elevated_(launch_elevated)
+ #elif defined(OS_POSIX)
+         env_(env)
+-#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+         ,
+         no_sandbox_(no_sandbox)
+-#endif  // !defined(OS_MACOSX)  && !defined(OS_ANDROID)
++#endif  // !defined(OS_MACOSX)  && !defined(OS_ANDROID) && !defined(OS_BSD)
+ #endif  // OS_WIN
+   {}
+ 
+@@ -105,13 +105,13 @@ class UtilitySandboxedProcessLauncherDel
+ 
+ #elif defined(OS_POSIX)
+ 
+-#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+   ZygoteHandle* GetZygote() override {
+     if (no_sandbox_ || !exposed_dir_.empty())
+       return nullptr;
+     return GetGenericZygote();
+   }
+-#endif  // !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#endif  // !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+   base::EnvironmentMap GetEnvironment() override { return env_; }
+ #endif  // OS_WIN
+ 
+@@ -126,9 +126,9 @@ class UtilitySandboxedProcessLauncherDel
+   bool launch_elevated_;
+ #elif defined(OS_POSIX)
+   base::EnvironmentMap env_;
+-#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+   bool no_sandbox_;
+-#endif  // !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#endif  // !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+ #endif  // OS_WIN
+ };
+ 
+@@ -153,7 +153,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),
+@@ -235,13 +235,13 @@ void UtilityProcessHostImpl::SetName(con
+   name_ = name;
+ }
+ 
+-#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ // static
+ void UtilityProcessHostImpl::EarlyZygoteLaunch() {
+   DCHECK(!g_utility_zygote);
+   g_utility_zygote = CreateZygote();
+ }
+-#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX)
++#endif  // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ 
+ bool UtilityProcessHostImpl::StartProcess() {
+   if (started_)
diff --git a/chromium/patches/patch-content_common_BUILD.gn b/chromium/patches/patch-content_common_BUILD.gn
new file mode 100644
index 0000000000..090a98a664
--- /dev/null
+++ b/chromium/patches/patch-content_common_BUILD.gn
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- content/common/BUILD.gn.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/common/BUILD.gn
+@@ -500,7 +500,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",
+@@ -514,6 +514,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/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc b/chromium/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc
new file mode 100644
index 0000000000..186bf4a005
--- /dev/null
+++ b/chromium/patches/patch-content_common_sandbox__linux_sandbox__debug__handling__linux.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- content/common/sandbox_linux/sandbox_debug_handling_linux.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/common/sandbox_linux/sandbox_debug_handling_linux.cc
+@@ -7,7 +7,9 @@
+ #include <errno.h>
+ #include <signal.h>
+ #include <stddef.h>
++#if 0 // no OS_FREEBSD here?
+ #include <sys/prctl.h>
++#endif
+ #include <unistd.h>
+ 
+ #include "base/command_line.h"
+@@ -69,12 +71,16 @@ bool SandboxDebugHandling::SetDumpableSt
+     return true;
+   }
+ 
++#if 0 // no OS_FREEBSD here?
+   if (prctl(PR_SET_DUMPABLE, 0) != 0) {
+     PLOG(ERROR) << "Failed to set non-dumpable flag";
+     return false;
+   }
+ 
+   return prctl(PR_GET_DUMPABLE) == 0;
++#else
++  return false;
++#endif
+ }
+ 
+ }  // namespace content
diff --git a/chromium/patches/patch-content_common_set__process__title__linux.cc b/chromium/patches/patch-content_common_set__process__title__linux.cc
new file mode 100644
index 0000000000..efa1fef560
--- /dev/null
+++ b/chromium/patches/patch-content_common_set__process__title__linux.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- content/common/set_process_title_linux.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/common/set_process_title_linux.cc
+@@ -49,6 +49,8 @@
+ extern char** environ;
+ 
+ static char** g_main_argv = NULL;
++
++#if !defined(OS_BSD)
+ static char* g_orig_argv0 = NULL;
+ 
+ void setproctitle(const char* fmt, ...) {
+@@ -101,6 +103,7 @@ void setproctitle(const char* fmt, ...) 
+   va_end(ap);
+   g_main_argv[1] = NULL;
+ }
++#endif
+ 
+ // A version of this built into glibc would not need this function, since
+ // it could stash the argv pointer in __libc_start_main(). But we need it.
diff --git a/chromium/patches/patch-content_common_set__process__title__linux.h b/chromium/patches/patch-content_common_set__process__title__linux.h
new file mode 100644
index 0000000000..329c281812
--- /dev/null
+++ b/chromium/patches/patch-content_common_set__process__title__linux.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- content/common/set_process_title_linux.h.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/common/set_process_title_linux.h
+@@ -5,6 +5,9 @@
+ #ifndef CONTENT_COMMON_SET_PROCESS_TITLE_LINUX_H_
+ #define CONTENT_COMMON_SET_PROCESS_TITLE_LINUX_H_
+ 
++#include "build/build_config.h"
++
++#if !defined(OS_BSD)
+ // Set the process title that will show in "ps" and similar tools. Takes
+ // printf-style format string and arguments. After calling setproctitle()
+ // the original main() argv[] array should not be used. By default, the
+@@ -14,6 +17,7 @@
+ // This signature and naming is to be compatible with most other Unix
+ // implementations of setproctitle().
+ void setproctitle(const char* fmt, ...);
++#endif
+ 
+ // Initialize state needed for setproctitle() on Linux. Pass the argv pointer
+ // from main() to setproctitle_init() before calling setproctitle().
diff --git a/chromium/patches/patch-content_gpu_BUILD.gn b/chromium/patches/patch-content_gpu_BUILD.gn
new file mode 100644
index 0000000000..d409cccca1
--- /dev/null
+++ b/chromium/patches/patch-content_gpu_BUILD.gn
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- content/gpu/BUILD.gn.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/gpu/BUILD.gn
+@@ -96,6 +96,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/patches/patch-content_gpu_gpu__child__thread.cc b/chromium/patches/patch-content_gpu_gpu__child__thread.cc
new file mode 100644
index 0000000000..05d50a9340
--- /dev/null
+++ b/chromium/patches/patch-content_gpu_gpu__child__thread.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- content/gpu/gpu_child_thread.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/gpu/gpu_child_thread.cc
+@@ -383,6 +383,7 @@ void GpuChildThread::OnCollectGraphicsIn
+   if (dead_on_arrival_)
+     return;
+ 
++#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.
+@@ -434,6 +435,7 @@ void GpuChildThread::OnCollectGraphicsIn
+     base::MessageLoop::current()->QuitWhenIdle();
+   }
+ #endif  // OS_WIN
++#endif  // XXX(rene) !FreeBSD
+ }
+ 
+ void GpuChildThread::OnGetVideoMemoryUsageStats() {
diff --git a/chromium/patches/patch-content_gpu_gpu__main.cc b/chromium/patches/patch-content_gpu_gpu__main.cc
new file mode 100644
index 0000000000..4d3f28171a
--- /dev/null
+++ b/chromium/patches/patch-content_gpu_gpu__main.cc
@@ -0,0 +1,45 @@
+$NetBSD$
+
+--- content/gpu/gpu_main.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/gpu/gpu_main.cc
+@@ -92,7 +92,7 @@ namespace content {
+ 
+ namespace {
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ bool StartSandboxLinux(gpu::GpuWatchdogThread*);
+ #elif defined(OS_WIN)
+ bool StartSandboxWindows(const sandbox::SandboxInterfaceInfo*);
+@@ -145,7 +145,7 @@ class ContentSandboxHelper : public gpu:
+ 
+   bool EnsureSandboxInitialized(
+       gpu::GpuWatchdogThread* watchdog_thread) override {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+     return StartSandboxLinux(watchdog_thread);
+ #elif defined(OS_WIN)
+     return StartSandboxWindows(sandbox_info_);
+@@ -292,12 +292,13 @@ int GpuMain(const MainFunctionParams& pa
+ 
+ namespace {
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ bool StartSandboxLinux(gpu::GpuWatchdogThread* watchdog_thread) {
+   TRACE_EVENT0("gpu,startup", "Initialize sandbox");
+ 
+   bool res = false;
+ 
++#if !defined(OS_BSD)
+   if (watchdog_thread) {
+     // LinuxSandbox needs to be able to ensure that the thread
+     // has really been stopped.
+@@ -322,6 +323,7 @@ bool StartSandboxLinux(gpu::GpuWatchdogT
+     options.timer_slack = base::TIMER_SLACK_MAXIMUM;
+     watchdog_thread->StartWithOptions(options);
+   }
++#endif
+ 
+   return res;
+ }
diff --git a/chromium/patches/patch-content_gpu_in__process__gpu__thread.cc b/chromium/patches/patch-content_gpu_in__process__gpu__thread.cc
new file mode 100644
index 0000000000..dfb6ab56c0
--- /dev/null
+++ b/chromium/patches/patch-content_gpu_in__process__gpu__thread.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/gpu/in_process_gpu_thread.cc.orig	2017-02-02 02:02:53.000000000 +0000
++++ content/gpu/in_process_gpu_thread.cc
+@@ -53,8 +53,6 @@ void InProcessGpuThread::Init() {
+   gpu::GPUInfo gpu_info;
+   if (!gl::init::InitializeGLOneOff())
+     VLOG(1) << "gl::init::InitializeGLOneOff failed";
+-  else
+-    gpu::CollectContextGraphicsInfo(&gpu_info);
+ 
+   // The process object takes ownership of the thread object, so do not
+   // save and delete the pointer.
diff --git a/chromium/patches/patch-content_public_common_child__process__host.h b/chromium/patches/patch-content_public_common_child__process__host.h
new file mode 100644
index 0000000000..c4820007cd
--- /dev/null
+++ b/chromium/patches/patch-content_public_common_child__process__host.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- content/public/common/child_process_host.h.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/public/common/child_process_host.h
+@@ -53,7 +53,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.
+@@ -62,7 +62,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/patches/patch-content_public_common_content__switches.cc b/chromium/patches/patch-content_public_common_content__switches.cc
new file mode 100644
index 0000000000..dea65a44dd
--- /dev/null
+++ b/chromium/patches/patch-content_public_common_content__switches.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/public/common/content_switches.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/public/common/content_switches.cc
+@@ -992,7 +992,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_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/patches/patch-content_public_common_content__switches.h b/chromium/patches/patch-content_public_common_content__switches.h
new file mode 100644
index 0000000000..48c5a9fe03
--- /dev/null
+++ b/chromium/patches/patch-content_public_common_content__switches.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/public/common/content_switches.h.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/public/common/content_switches.h
+@@ -293,7 +293,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_BSD)
+ CONTENT_EXPORT extern const char kEnableSpeechDispatcher[];
+ #endif
+ 
diff --git a/chromium/patches/patch-content_public_common_renderer__preferences.h b/chromium/patches/patch-content_public_common_renderer__preferences.h
new file mode 100644
index 0000000000..4f4dc486d4
--- /dev/null
+++ b/chromium/patches/patch-content_public_common_renderer__preferences.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/public/common/renderer_preferences.h.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/public/common/renderer_preferences.h
+@@ -139,7 +139,7 @@ struct CONTENT_EXPORT RendererPreference
+   // Country iso of the mobile network for content detection purpose.
+   std::string network_contry_iso;
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   std::string system_font_family_name;
+ #endif
+ 
diff --git a/chromium/patches/patch-content_public_test_browser__test__base.cc b/chromium/patches/patch-content_public_test_browser__test__base.cc
new file mode 100644
index 0000000000..647287628b
--- /dev/null
+++ b/chromium/patches/patch-content_public_test_browser__test__base.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- content/public/test/browser_test_base.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/public/test/browser_test_base.cc
+@@ -6,6 +6,10 @@
+ 
+ #include <stddef.h>
+ 
++#if defined(OS_FREEBSD)
++#include <sys/signal.h>
++#endif
++
+ #include "base/bind.h"
+ #include "base/command_line.h"
+ #include "base/debug/stack_trace.h"
diff --git a/chromium/patches/patch-content_renderer_media_webrtc_processed__local__audio__source.cc b/chromium/patches/patch-content_renderer_media_webrtc_processed__local__audio__source.cc
new file mode 100644
index 0000000000..dde425fb9c
--- /dev/null
+++ b/chromium/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	2017-02-02 02:02:54.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/patches/patch-content_renderer_pepper_pepper__media__device__manager.cc b/chromium/patches/patch-content_renderer_pepper_pepper__media__device__manager.cc
new file mode 100644
index 0000000000..f857902ba0
--- /dev/null
+++ b/chromium/patches/patch-content_renderer_pepper_pepper__media__device__manager.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- content/renderer/pepper/pepper_media_device_manager.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/renderer/pepper/pepper_media_device_manager.cc
+@@ -89,9 +89,10 @@ void PepperMediaDeviceManager::Enumerate
+                  callback, ToMediaDeviceType(type)));
+ #else
+   base::ThreadTaskRunnerHandle::Get()->PostTask(
+-      FROM_HERE,
+-      base::Bind(&PepperMediaDeviceManager::DevicesEnumerated, AsWeakPtr(),
+-                 callback, ToMediaDeviceType(type), MediaDeviceInfoArray()));
++      FROM_HERE, base::Bind(&PepperMediaDeviceManager::DevicesEnumerated,
++                            AsWeakPtr(), callback, ToMediaDeviceType(type),
++                            std::vector<MediaDeviceInfoArray>()));
++
+ #endif
+ }
+ 
diff --git a/chromium/patches/patch-content_renderer_render__thread__impl.cc b/chromium/patches/patch-content_renderer_render__thread__impl.cc
new file mode 100644
index 0000000000..49de67415a
--- /dev/null
+++ b/chromium/patches/patch-content_renderer_render__thread__impl.cc
@@ -0,0 +1,36 @@
+$NetBSD$
+
+--- content/renderer/render_thread_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/renderer/render_thread_impl.cc
+@@ -206,11 +206,13 @@
+ #include "content/common/external_ipc_dumper.h"
+ #endif
+ 
++#if !defined(OS_BSD)
+ #if defined(OS_MACOSX)
+ #include <malloc/malloc.h>
+ #else
+ #include <malloc.h>
+ #endif
++#endif
+ 
+ using base::ThreadRestrictions;
+ using blink::WebDocument;
+@@ -1488,7 +1490,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;
+@@ -1846,6 +1848,8 @@ void RenderThreadImpl::RecordPurgeAndSus
+ #else
+   size_t malloc_usage = minfo.hblkhd + minfo.arena;
+ #endif
++#elif defined(OS_BSD)
++  size_t malloc_usage = 0;
+ #else
+   size_t malloc_usage = GetMallocUsage();
+ #endif
diff --git a/chromium/patches/patch-content_renderer_renderer__blink__platform__impl.cc b/chromium/patches/patch-content_renderer_renderer__blink__platform__impl.cc
new file mode 100644
index 0000000000..cb91e58fc4
--- /dev/null
+++ b/chromium/patches/patch-content_renderer_renderer__blink__platform__impl.cc
@@ -0,0 +1,58 @@
+$NetBSD$
+
+--- content/renderer/renderer_blink_platform_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/renderer/renderer_blink_platform_impl.cc
+@@ -111,7 +111,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_BSD)
+ #include <map>
+ #include <string>
+ 
+@@ -201,7 +201,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_BSD)
+ class RendererBlinkPlatformImpl::SandboxSupport
+     : public blink::WebSandboxSupport {
+  public:
+@@ -247,7 +247,7 @@ RendererBlinkPlatformImpl::RendererBlink
+       renderer_scheduler_(renderer_scheduler),
+       blink_interface_provider_(
+           new BlinkInterfaceProviderImpl(remote_interfaces)) {
+-#if !defined(OS_ANDROID) && !defined(OS_WIN)
++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD)
+   if (g_sandbox_enabled && sandboxEnabled()) {
+     sandbox_support_.reset(new RendererBlinkPlatformImpl::SandboxSupport);
+   } else {
+@@ -283,7 +283,7 @@ RendererBlinkPlatformImpl::~RendererBlin
+ }
+ 
+ void RendererBlinkPlatformImpl::Shutdown() {
+-#if !defined(OS_ANDROID) && !defined(OS_WIN)
++#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.
+@@ -331,7 +331,7 @@ blink::WebFileUtilities* RendererBlinkPl
+ }
+ 
+ blink::WebSandboxSupport* RendererBlinkPlatformImpl::sandboxSupport() {
+-#if defined(OS_ANDROID) || defined(OS_WIN)
++#if defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_BSD)
+   // These platforms do not require sandbox support.
+   return NULL;
+ #else
+@@ -539,7 +539,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_BSD)
+ 
+ void RendererBlinkPlatformImpl::SandboxSupport::getFallbackFontForCharacter(
+     blink::WebUChar32 character,
diff --git a/chromium/patches/patch-content_renderer_renderer__blink__platform__impl.h b/chromium/patches/patch-content_renderer_renderer__blink__platform__impl.h
new file mode 100644
index 0000000000..d9d3cd3623
--- /dev/null
+++ b/chromium/patches/patch-content_renderer_renderer__blink__platform__impl.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- content/renderer/renderer_blink_platform_impl.h.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/renderer/renderer_blink_platform_impl.h
+@@ -256,7 +256,7 @@ class CONTENT_EXPORT RendererBlinkPlatfo
+   class FileUtilities;
+   std::unique_ptr<FileUtilities> file_utilities_;
+ 
+-#if !defined(OS_ANDROID) && !defined(OS_WIN)
++#if !defined(OS_ANDROID) && !defined(OS_WIN) && !defined(OS_BSD)
+   class SandboxSupport;
+   std::unique_ptr<SandboxSupport> sandbox_support_;
+ #endif
diff --git a/chromium/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc b/chromium/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
new file mode 100644
index 0000000000..2604fd4bc1
--- /dev/null
+++ b/chromium/patches/patch-content_renderer_renderer__main__platform__delegate__linux.cc
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- content/renderer/renderer_main_platform_delegate_linux.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/renderer/renderer_main_platform_delegate_linux.cc
+@@ -29,6 +29,7 @@ void RendererMainPlatformDelegate::Platf
+ }
+ 
+ bool RendererMainPlatformDelegate::EnableSandbox() {
++#if !defined(OS_BSD)
+   // The setuid sandbox is started in the zygote process: zygote_main_linux.cc
+   // https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox.md
+   //
+@@ -59,7 +60,7 @@ bool RendererMainPlatformDelegate::Enabl
+     CHECK_EQ(errno, EPERM);
+   }
+ #endif  // __x86_64__
+-
++#endif  // ! OS_BSD
+   return true;
+ }
+ 
diff --git a/chromium/patches/patch-content_renderer_webscrollbarbehavior__impl__aura.cc b/chromium/patches/patch-content_renderer_webscrollbarbehavior__impl__aura.cc
new file mode 100644
index 0000000000..cde1a9d2f9
--- /dev/null
+++ b/chromium/patches/patch-content_renderer_webscrollbarbehavior__impl__aura.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- content/renderer/webscrollbarbehavior_impl_aura.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/renderer/webscrollbarbehavior_impl_aura.cc
+@@ -14,7 +14,7 @@ bool WebScrollbarBehaviorImpl::shouldCen
+       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::WebPointerProperties::Button::Middle)
+     return true;
+ #endif
+@@ -29,7 +29,7 @@ bool WebScrollbarBehaviorImpl::shouldSna
+ // Disable snapback on desktop Linux to better integrate with the desktop
+ // behavior.  Typically, Linux apps do not implement scrollbar snapback (this is
+ // true for at least GTK and QT apps).
+-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   return false;
+ #endif
+ 
diff --git a/chromium/patches/patch-content_shell_BUILD.gn b/chromium/patches/patch-content_shell_BUILD.gn
new file mode 100644
index 0000000000..6dd4f15c92
--- /dev/null
+++ b/chromium/patches/patch-content_shell_BUILD.gn
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- content/shell/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/shell/BUILD.gn
+@@ -296,7 +296,7 @@ static_library("content_shell_lib") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [
+       "//build/linux:fontconfig",
+       "//ui/gfx:test_support",
+@@ -317,7 +317,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",
+@@ -366,7 +366,7 @@ static_library("content_shell_lib") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//third_party/freetype2" ]
+   }
+ 
+@@ -532,7 +532,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/patches/patch-content_shell_browser_shell__browser__context.cc b/chromium/patches/patch-content_shell_browser_shell__browser__context.cc
new file mode 100644
index 0000000000..fe787d27e0
--- /dev/null
+++ b/chromium/patches/patch-content_shell_browser_shell__browser__context.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- content/shell/browser/shell_browser_context.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/shell/browser/shell_browser_context.cc
+@@ -25,7 +25,7 @@
+ 
+ #if defined(OS_WIN)
+ #include "base/base_paths_win.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/nix/xdg_util.h"
+ #elif defined(OS_MACOSX)
+ #include "base/base_paths_mac.h"
+@@ -97,7 +97,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)
+   std::unique_ptr<base::Environment> env(base::Environment::Create());
+   base::FilePath config_dir(
+       base::nix::GetXDGDirectory(env.get(),
diff --git a/chromium/patches/patch-content_shell_browser_shell__browser__main__parts.cc b/chromium/patches/patch-content_shell_browser_shell__browser__main__parts.cc
new file mode 100644
index 0000000000..bcccbbbcf1
--- /dev/null
+++ b/chromium/patches/patch-content_shell_browser_shell__browser__main__parts.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- content/shell/browser/shell_browser_main_parts.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/shell/browser/shell_browser_main_parts.cc
+@@ -44,7 +44,7 @@
+ #if defined(USE_AURA) && defined(USE_X11)
+ #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)
+@@ -140,7 +140,7 @@ void ShellBrowserMainParts::PostMainMess
+ }
+ 
+ void ShellBrowserMainParts::PreEarlyInitialization() {
+-#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
++#if !defined(OS_CHROMEOS) && defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX))
+   ui::InitializeInputMethodForTesting();
+ #endif
+ #if defined(OS_ANDROID)
diff --git a/chromium/patches/patch-content_test_BUILD.gn b/chromium/patches/patch-content_test_BUILD.gn
new file mode 100644
index 0000000000..62e06e04b3
--- /dev/null
+++ b/chromium/patches/patch-content_test_BUILD.gn
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- content/test/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
++++ content/test/BUILD.gn
+@@ -748,7 +748,7 @@ test("content_browsertests") {
+     }
+   }
+ 
+-  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/",
+@@ -1350,7 +1350,7 @@ test("content_unittests") {
+     sources += [ "../browser/memory/memory_monitor_linux_unittest.cc" ]
+   }
+ 
+-  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/",
+@@ -1540,7 +1540,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" ]
+@@ -1576,7 +1576,7 @@ test("content_unittests") {
+     ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     if (use_dbus) {
+       deps += [ "//dbus:test_support" ]
+     }
diff --git a/chromium/patches/patch-crypto_nss__util.cc b/chromium/patches/patch-crypto_nss__util.cc
new file mode 100644
index 0000000000..65c59b597d
--- /dev/null
+++ b/chromium/patches/patch-crypto_nss__util.cc
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- crypto/nss_util.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ crypto/nss_util.cc
+@@ -20,7 +20,7 @@
+ #include "base/threading/thread_task_runner_handle.h"
+ #include "crypto/nss_util_internal.h"
+ 
+-#if defined(OS_OPENBSD)
++#if defined(OS_BSD)
+ #include <sys/mount.h>
+ #include <sys/param.h>
+ #endif
+@@ -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);
+-#elif defined(OS_OPENBSD)
++#elif defined(OS_NETBSD)
++  struct statvfs buf;
++  if (statvfs(database_dir.value().c_str(), &buf) == 0)
++    db_on_nfs = (strcmp(buf.f_fstypename, "nfs") == 0);
++#elif defined(OS_BSD)
+   struct statfs buf;
+   if (statfs(database_dir.value().c_str(), &buf) == 0)
+-    db_on_nfs = (strcmp(buf.f_fstypename, MOUNT_NFS) == 0);
++    db_on_nfs = (strcmp(buf.f_fstypename, "nfs") == 0);
+ #else
+   NOTIMPLEMENTED();
+ #endif
diff --git a/chromium/patches/patch-device_BUILD.gn b/chromium/patches/patch-device_BUILD.gn
new file mode 100644
index 0000000000..016c885025
--- /dev/null
+++ b/chromium/patches/patch-device_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/BUILD.gn
+@@ -184,7 +184,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/patches/patch-device_battery_BUILD.gn b/chromium/patches/patch-device_battery_BUILD.gn
new file mode 100644
index 0000000000..760254dd56
--- /dev/null
+++ b/chromium/patches/patch-device_battery_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/battery/BUILD.gn.orig	2017-02-02 02:02:54.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/patches/patch-device_bluetooth_BUILD.gn b/chromium/patches/patch-device_bluetooth_BUILD.gn
new file mode 100644
index 0000000000..d7fb05ec8c
--- /dev/null
+++ b/chromium/patches/patch-device_bluetooth_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/bluetooth/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/bluetooth/BUILD.gn
+@@ -193,7 +193,7 @@ component("bluetooth") {
+     ]
+   }
+ 
+-  if (is_chromeos || is_linux) {
++  if (is_chromeos || (is_linux && !is_bsd)) {
+     if (use_dbus) {
+       sources += [
+         "bluez/bluetooth_adapter_bluez.cc",
diff --git a/chromium/patches/patch-device_gamepad_gamepad__provider.cc b/chromium/patches/patch-device_gamepad_gamepad__provider.cc
new file mode 100644
index 0000000000..daaed81e52
--- /dev/null
+++ b/chromium/patches/patch-device_gamepad_gamepad__provider.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/gamepad/gamepad_provider.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/gamepad/gamepad_provider.cc
+@@ -145,7 +145,7 @@ void GamepadProvider::Initialize(std::un
+     monitor->AddDevicesChangedObserver(this);
+ 
+   polling_thread_.reset(new base::Thread("Gamepad polling thread"));
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // On Linux, the data fetcher needs to watch file descriptors, so the message
+   // loop needs to be a libevent loop.
+   const base::MessageLoop::Type kMessageLoopType = base::MessageLoop::TYPE_IO;
diff --git a/chromium/patches/patch-device_geolocation_BUILD.gn b/chromium/patches/patch-device_geolocation_BUILD.gn
new file mode 100644
index 0000000000..88184c4d72
--- /dev/null
+++ b/chromium/patches/patch-device_geolocation_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/geolocation/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/geolocation/BUILD.gn
+@@ -89,7 +89,7 @@ component("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/patches/patch-device_geolocation_location__arbitrator.cc b/chromium/patches/patch-device_geolocation_location__arbitrator.cc
new file mode 100644
index 0000000000..6965052941
--- /dev/null
+++ b/chromium/patches/patch-device_geolocation_location__arbitrator.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/geolocation/location_arbitrator.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/geolocation/location_arbitrator.cc
+@@ -182,7 +182,7 @@ LocationArbitrator::NewNetworkLocationPr
+ 
+ std::unique_ptr<LocationProvider>
+ LocationArbitrator::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/patches/patch-device_hid_BUILD.gn b/chromium/patches/patch-device_hid_BUILD.gn
new file mode 100644
index 0000000000..f248371f47
--- /dev/null
+++ b/chromium/patches/patch-device_hid_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- device/hid/BUILD.gn.orig	2017-02-02 02:02:54.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/patches/patch-device_media__transfer__protocol_media__transfer__protocol__daemon__client.h b/chromium/patches/patch-device_media__transfer__protocol_media__transfer__protocol__daemon__client.h
new file mode 100644
index 0000000000..37a6c8f208
--- /dev/null
+++ b/chromium/patches/patch-device_media__transfer__protocol_media__transfer__protocol__daemon__client.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/media_transfer_protocol/media_transfer_protocol_daemon_client.h.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
+@@ -19,7 +19,7 @@
+ #include "base/macros.h"
+ #include "build/build_config.h"
+ 
+-#if !defined(OS_LINUX)
++#if !defined(OS_LINUX) && !defined(OS_BSD)
+ #error "Only used on Linux and ChromeOS"
+ #endif
+ 
diff --git a/chromium/patches/patch-device_media__transfer__protocol_media__transfer__protocol__manager.h b/chromium/patches/patch-device_media__transfer__protocol_media__transfer__protocol__manager.h
new file mode 100644
index 0000000000..38707a7eb8
--- /dev/null
+++ b/chromium/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	2017-02-02 02:02:54.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_BSD)
+ #error "Only used on Linux and ChromeOS"
+ #endif
+ 
diff --git a/chromium/patches/patch-device_serial_BUILD.gn b/chromium/patches/patch-device_serial_BUILD.gn
new file mode 100644
index 0000000000..983efbf357
--- /dev/null
+++ b/chromium/patches/patch-device_serial_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- device/serial/BUILD.gn.orig	2017-02-02 02:02:54.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" ]
+@@ -55,6 +55,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/patches/patch-device_serial_serial__io__handler__posix.cc b/chromium/patches/patch-device_serial_serial__io__handler__posix.cc
new file mode 100644
index 0000000000..d9c4488395
--- /dev/null
+++ b/chromium/patches/patch-device_serial_serial__io__handler__posix.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/serial/serial_io_handler_posix.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/serial/serial_io_handler_posix.cc
+@@ -61,7 +61,7 @@ bool BitrateToSpeedConstant(int bitrate,
+     BITRATE_TO_SPEED_CASE(9600)
+     BITRATE_TO_SPEED_CASE(19200)
+     BITRATE_TO_SPEED_CASE(38400)
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+     BITRATE_TO_SPEED_CASE(57600)
+     BITRATE_TO_SPEED_CASE(115200)
+     BITRATE_TO_SPEED_CASE(230400)
diff --git a/chromium/patches/patch-device_time__zone__monitor_time__zone__monitor.cc b/chromium/patches/patch-device_time__zone__monitor_time__zone__monitor.cc
new file mode 100644
index 0000000000..533d0fd6f6
--- /dev/null
+++ b/chromium/patches/patch-device_time__zone__monitor_time__zone__monitor.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- device/time_zone_monitor/time_zone_monitor.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/time_zone_monitor/time_zone_monitor.cc
+@@ -31,7 +31,7 @@ void TimeZoneMonitor::NotifyClients() {
+   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.
+   std::unique_ptr<icu::TimeZone> current_zone(icu::TimeZone::createDefault());
diff --git a/chromium/patches/patch-device_time__zone__monitor_time__zone__monitor__linux.cc b/chromium/patches/patch-device_time__zone__monitor_time__zone__monitor__linux.cc
new file mode 100644
index 0000000000..f721489942
--- /dev/null
+++ b/chromium/patches/patch-device_time__zone__monitor_time__zone__monitor__linux.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- device/time_zone_monitor/time_zone_monitor_linux.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/time_zone_monitor/time_zone_monitor_linux.cc
+@@ -59,6 +59,9 @@ class TimeZoneMonitorLinuxImpl
+         main_task_runner_(base::ThreadTaskRunnerHandle::Get()),
+         file_task_runner_(file_task_runner),
+         owner_(owner) {
++ }
++
++ void StartWatching() {
+     DCHECK(main_task_runner_->RunsTasksOnCurrentThread());
+     file_task_runner_->PostTask(
+         FROM_HERE,
+@@ -152,6 +155,9 @@ TimeZoneMonitorLinux::TimeZoneMonitorLin
+   // changed.
+   if (!getenv("TZ")) {
+     impl_ = new TimeZoneMonitorLinuxImpl(this, file_task_runner);
++    if (impl_.get()) {
++      impl_->StartWatching();
++    }
+   }
+ }
+ 
diff --git a/chromium/patches/patch-device_usb_usb__context.cc b/chromium/patches/patch-device_usb_usb__context.cc
new file mode 100644
index 0000000000..b9ec7b7aee
--- /dev/null
+++ b/chromium/patches/patch-device_usb_usb__context.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- device/usb/usb_context.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/usb/usb_context.cc
+@@ -9,8 +9,13 @@
+ #include "base/macros.h"
+ #include "base/threading/simple_thread.h"
+ #include "device/usb/usb_error.h"
++#if defined(OS_FREEBSD)
++#include "libusb.h"
++#define LIBUSB_CALL
++#else
+ #include "third_party/libusb/src/libusb/interrupt.h"
+ #include "third_party/libusb/src/libusb/libusb.h"
++#endif
+ 
+ namespace device {
+ 
+@@ -58,7 +63,9 @@ void UsbContext::UsbEventHandler::Run() 
+ 
+ void UsbContext::UsbEventHandler::Stop() {
+   base::subtle::Release_Store(&running_, 0);
++#if !defined(OS_FREEBSD) // XXX(rene) not available in base version
+   libusb_interrupt_handle_event(context_);
++#endif
+ }
+ 
+ UsbContext::UsbContext(PlatformUsbContext context) : context_(context) {
diff --git a/chromium/patches/patch-device_usb_usb__context__unittest.cc b/chromium/patches/patch-device_usb_usb__context__unittest.cc
new file mode 100644
index 0000000000..e7d5b3f827
--- /dev/null
+++ b/chromium/patches/patch-device_usb_usb__context__unittest.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- device/usb/usb_context_unittest.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/usb/usb_context_unittest.cc
+@@ -7,7 +7,11 @@
+ #include "build/build_config.h"
+ #include "device/usb/usb_context.h"
+ #include "testing/gtest/include/gtest/gtest.h"
++#if defined(OS_FREEBSD)
++#include "libusb.h"
++#else
+ #include "third_party/libusb/src/libusb/libusb.h"
++#endif
+ 
+ namespace device {
+ 
diff --git a/chromium/patches/patch-device_usb_usb__device__handle__impl.cc b/chromium/patches/patch-device_usb_usb__device__handle__impl.cc
new file mode 100644
index 0000000000..240997b459
--- /dev/null
+++ b/chromium/patches/patch-device_usb_usb__device__handle__impl.cc
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- device/usb/usb_device_handle_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/usb/usb_device_handle_impl.cc
+@@ -25,7 +25,11 @@
+ #include "device/usb/usb_error.h"
+ #include "device/usb/usb_service.h"
+ #include "net/base/io_buffer.h"
+-#include "third_party/libusb/src/libusb/libusb.h"
++#if defined(OS_FREEBSD)
++#  include "libusb.h"
++#else
++#  include "third_party/libusb/src/libusb/libusb.h"
++#endif
+ 
+ namespace device {
+ 
diff --git a/chromium/patches/patch-device_usb_usb__device__handle__impl.h b/chromium/patches/patch-device_usb_usb__device__handle__impl.h
new file mode 100644
index 0000000000..cbceca4934
--- /dev/null
+++ b/chromium/patches/patch-device_usb_usb__device__handle__impl.h
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- device/usb/usb_device_handle_impl.h.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/usb/usb_device_handle_impl.h
+@@ -18,7 +18,12 @@
+ #include "base/memory/ref_counted.h"
+ #include "base/threading/thread_checker.h"
+ #include "device/usb/usb_device_handle.h"
++#if defined(OS_FREEBSD)
++#include "libusb.h"
++#define LIBUSB_CALL
++#else
+ #include "third_party/libusb/src/libusb/libusb.h"
++#endif
+ 
+ namespace base {
+ class SequencedTaskRunner;
diff --git a/chromium/patches/patch-device_usb_usb__device__impl.cc b/chromium/patches/patch-device_usb_usb__device__impl.cc
new file mode 100644
index 0000000000..145b9f6ca2
--- /dev/null
+++ b/chromium/patches/patch-device_usb_usb__device__impl.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- device/usb/usb_device_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/usb/usb_device_impl.cc
+@@ -22,7 +22,11 @@
+ #include "device/usb/usb_descriptors.h"
+ #include "device/usb/usb_device_handle_impl.h"
+ #include "device/usb/usb_error.h"
++#if defined(OS_FREEBSD)
++#include "libusb.h"
++#else
+ #include "third_party/libusb/src/libusb/libusb.h"
++#endif
+ 
+ namespace device {
+ 
diff --git a/chromium/patches/patch-device_usb_usb__error.cc b/chromium/patches/patch-device_usb_usb__error.cc
new file mode 100644
index 0000000000..60919bb226
--- /dev/null
+++ b/chromium/patches/patch-device_usb_usb__error.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- device/usb/usb_error.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/usb/usb_error.cc
+@@ -4,7 +4,11 @@
+ 
+ #include "device/usb/usb_error.h"
+ 
++#if defined(__FreeBSD__)
++#include "libusb.h"
++#else
+ #include "third_party/libusb/src/libusb/libusb.h"
++#endif
+ 
+ namespace device {
+ 
diff --git a/chromium/patches/patch-device_usb_usb__service__impl.cc b/chromium/patches/patch-device_usb_usb__service__impl.cc
new file mode 100644
index 0000000000..c469270186
--- /dev/null
+++ b/chromium/patches/patch-device_usb_usb__service__impl.cc
@@ -0,0 +1,61 @@
+$NetBSD$
+
+--- device/usb/usb_service_impl.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/usb/usb_service_impl.cc
+@@ -26,7 +26,11 @@
+ #include "device/usb/usb_error.h"
+ #include "device/usb/webusb_descriptors.h"
+ #include "net/base/io_buffer.h"
+-#include "third_party/libusb/src/libusb/libusb.h"
++#if defined(OS_FREEBSD)
++#  include <libusb.h>
++#else
++#  include "third_party/libusb/src/libusb/libusb.h"
++#endif
+ 
+ #if defined(OS_WIN)
+ #include <setupapi.h>
+@@ -213,6 +217,7 @@ UsbServiceImpl::UsbServiceImpl(
+   }
+   context_ = new UsbContext(platform_context);
+ 
++#if !defined(OS_FREEBSD)
+   rv = libusb_hotplug_register_callback(
+       context_->context(),
+       static_cast<libusb_hotplug_event>(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED |
+@@ -225,6 +230,8 @@ UsbServiceImpl::UsbServiceImpl(
+   }
+ 
+   RefreshDevices();
++#endif // !defined(OS_FREEBSD)
++
+ #if defined(OS_WIN)
+   DeviceMonitorWin* device_monitor = DeviceMonitorWin::GetForAllInterfaces();
+   if (device_monitor) {
+@@ -234,8 +241,10 @@ UsbServiceImpl::UsbServiceImpl(
+ }
+ 
+ UsbServiceImpl::~UsbServiceImpl() {
++#if !defined(OS_FREEBSD)
+   if (hotplug_enabled_)
+     libusb_hotplug_deregister_callback(context_->context(), hotplug_handle_);
++#endif // !defined(OS_FREEBSD)
+   for (auto* platform_device : ignored_devices_)
+     libusb_unref_device(platform_device);
+ }
+@@ -477,6 +486,7 @@ void UsbServiceImpl::RemoveDevice(scoped
+   device->OnDisconnect();
+ }
+ 
++#if !defined(OS_FREEBSD)
+ // static
+ int LIBUSB_CALL UsbServiceImpl::HotplugCallback(libusb_context* context,
+                                                 PlatformUsbDevice device,
+@@ -514,6 +524,7 @@ int LIBUSB_CALL UsbServiceImpl::HotplugC
+ 
+   return 0;
+ }
++#endif // !defined(OS_FREEBSD)
+ 
+ void UsbServiceImpl::OnPlatformDeviceAdded(PlatformUsbDevice platform_device) {
+   DCHECK(CalledOnValidThread());
diff --git a/chromium/patches/patch-device_usb_usb__service__impl.h b/chromium/patches/patch-device_usb_usb__service__impl.h
new file mode 100644
index 0000000000..20511883bf
--- /dev/null
+++ b/chromium/patches/patch-device_usb_usb__service__impl.h
@@ -0,0 +1,42 @@
+$NetBSD$
+
+--- device/usb/usb_service_impl.h.orig	2017-02-02 02:02:54.000000000 +0000
++++ device/usb/usb_service_impl.h
+@@ -15,7 +15,13 @@
+ #include "build/build_config.h"
+ #include "device/usb/usb_context.h"
+ #include "device/usb/usb_device_impl.h"
++#if defined(OS_FREEBSD)
++#include "libusb.h"
++#define LIBUSB_CALL
++#else
+ #include "third_party/libusb/src/libusb/libusb.h"
++#endif
++
+ 
+ #if defined(OS_WIN)
+ #include "base/scoped_observer.h"
+@@ -70,11 +76,13 @@ class UsbServiceImpl :
+                  scoped_refptr<UsbDeviceImpl> device);
+   void RemoveDevice(scoped_refptr<UsbDeviceImpl> device);
+ 
++#if !defined(OS_FREEBSD)
+   // Handle hotplug events from libusb.
+   static int LIBUSB_CALL HotplugCallback(libusb_context* context,
+                                          PlatformUsbDevice device,
+                                          libusb_hotplug_event event,
+                                          void* user_data);
++#endif
+   // These functions release a reference to the provided platform device.
+   void OnPlatformDeviceAdded(PlatformUsbDevice platform_device);
+   void OnPlatformDeviceRemoved(PlatformUsbDevice platform_device);
+@@ -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;
++#if !defined(OS_FREEBSD)
+   libusb_hotplug_callback_handle hotplug_handle_;
++#endif
+ 
+   // Enumeration callbacks are queued until an enumeration completes.
+   bool enumeration_ready_ = false;
diff --git a/chromium/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc b/chromium/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc
new file mode 100644
index 0000000000..19aa4789bd
--- /dev/null
+++ b/chromium/patches/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- extensions/browser/api/declarative_webrequest/webrequest_action.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ extensions/browser/api/declarative_webrequest/webrequest_action.cc
+@@ -29,7 +29,11 @@
+ #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
+ #include "net/http/http_util.h"
+ #include "net/url_request/url_request.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ using content::ResourceRequestInfo;
+ 
diff --git a/chromium/patches/patch-extensions_browser_api_networking__private_networking__private__event__router__factory.cc b/chromium/patches/patch-extensions_browser_api_networking__private_networking__private__event__router__factory.cc
new file mode 100644
index 0000000000..1f9d331bf2
--- /dev/null
+++ b/chromium/patches/patch-extensions_browser_api_networking__private_networking__private__event__router__factory.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- extensions/browser/api/networking_private/networking_private_event_router_factory.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ extensions/browser/api/networking_private/networking_private_event_router_factory.cc
+@@ -13,6 +13,7 @@
+ 
+ namespace extensions {
+ 
++#if !defined(OS_BSD)
+ // static
+ NetworkingPrivateEventRouter*
+ NetworkingPrivateEventRouterFactory::GetForProfile(
+@@ -57,5 +58,6 @@ bool NetworkingPrivateEventRouterFactory
+ bool NetworkingPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const {
+   return true;
+ }
++#endif
+ 
+ }  // namespace extensions
diff --git a/chromium/patches/patch-extensions_browser_api_serial_serial__api.cc b/chromium/patches/patch-extensions_browser_api_serial_serial__api.cc
new file mode 100644
index 0000000000..855928dd60
--- /dev/null
+++ b/chromium/patches/patch-extensions_browser_api_serial_serial__api.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- extensions/browser/api/serial/serial_api.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ extensions/browser/api/serial/serial_api.cc
+@@ -85,12 +85,13 @@ bool SerialGetDevicesFunction::Prepare()
+ 
+ void SerialGetDevicesFunction::Work() {
+   DCHECK_CURRENTLY_ON(BrowserThread::FILE);
+-
++#if !defined(OS_BSD)
+   std::unique_ptr<device::SerialDeviceEnumerator> enumerator =
+       device::SerialDeviceEnumerator::Create();
+   mojo::Array<device::serial::DeviceInfoPtr> devices = enumerator->GetDevices();
+   results_ = serial::GetDevices::Results::Create(
+       devices.To<std::vector<serial::DeviceInfo>>());
++#endif
+ }
+ 
+ SerialConnectFunction::SerialConnectFunction() {
diff --git a/chromium/patches/patch-extensions_browser_api_web__request_form__data__parser.cc b/chromium/patches/patch-extensions_browser_api_web__request_form__data__parser.cc
new file mode 100644
index 0000000000..1a9f2183b8
--- /dev/null
+++ b/chromium/patches/patch-extensions_browser_api_web__request_form__data__parser.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- extensions/browser/api/web_request/form_data_parser.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ extensions/browser/api/web_request/form_data_parser.cc
+@@ -15,7 +15,11 @@
+ #include "base/values.h"
+ #include "net/base/escape.h"
+ #include "net/url_request/url_request.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ using base::DictionaryValue;
+ using base::ListValue;
diff --git a/chromium/patches/patch-extensions_common_image__util.cc b/chromium/patches/patch-extensions_common_image__util.cc
new file mode 100644
index 0000000000..1026a11083
--- /dev/null
+++ b/chromium/patches/patch-extensions_common_image__util.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- extensions/common/image_util.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ extensions/common/image_util.cc
+@@ -11,7 +11,11 @@
+ #include "base/strings/string_number_conversions.h"
+ #include "base/strings/string_util.h"
+ #include "base/strings/stringprintf.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ #include "third_party/skia/include/core/SkColor.h"
+ #include "third_party/skia/include/utils/SkParse.h"
+ #include "ui/gfx/color_utils.h"
diff --git a/chromium/patches/patch-extensions_common_stack__frame.cc b/chromium/patches/patch-extensions_common_stack__frame.cc
new file mode 100644
index 0000000000..85d937d728
--- /dev/null
+++ b/chromium/patches/patch-extensions_common_stack__frame.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- extensions/common/stack_frame.cc.orig	2017-02-02 02:02:54.000000000 +0000
++++ extensions/common/stack_frame.cc
+@@ -7,7 +7,11 @@
+ #include <string>
+ 
+ #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 extensions {
+ 
diff --git a/chromium/patches/patch-gpu_BUILD.gn b/chromium/patches/patch-gpu_BUILD.gn
new file mode 100644
index 0000000000..bc4e40e5e6
--- /dev/null
+++ b/chromium/patches/patch-gpu_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- gpu/BUILD.gn.orig	2017-02-02 02:02:54.000000000 +0000
++++ gpu/BUILD.gn
+@@ -93,7 +93,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/patches/patch-gpu_command__buffer_service_program__manager.cc b/chromium/patches/patch-gpu_command__buffer_service_program__manager.cc
new file mode 100644
index 0000000000..e114fe2d57
--- /dev/null
+++ b/chromium/patches/patch-gpu_command__buffer_service_program__manager.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- gpu/command_buffer/service/program_manager.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/command_buffer/service/program_manager.cc
+@@ -31,7 +31,11 @@
+ #include "gpu/command_buffer/service/program_cache.h"
+ #include "gpu/command_buffer/service/progress_reporter.h"
+ #include "gpu/command_buffer/service/shader_manager.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ #include "ui/gl/gl_version_info.h"
+ 
+ using base::TimeDelta;
diff --git a/chromium/patches/patch-gpu_config_BUILD.gn b/chromium/patches/patch-gpu_config_BUILD.gn
new file mode 100644
index 0000000000..8e6cc59783
--- /dev/null
+++ b/chromium/patches/patch-gpu_config_BUILD.gn
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- gpu/config/BUILD.gn.orig	2017-02-02 02:02:55.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/patches/patch-gpu_config_gpu__control__list.cc b/chromium/patches/patch-gpu_config_gpu__control__list.cc
new file mode 100644
index 0000000000..0c239a3a6c
--- /dev/null
+++ b/chromium/patches/patch-gpu_config_gpu__control__list.cc
@@ -0,0 +1,34 @@
+$NetBSD$
+
+--- gpu/config/gpu_control_list.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/config/gpu_control_list.cc
+@@ -19,7 +19,11 @@
+ #include "base/sys_info.h"
+ #include "gpu/config/gpu_info.h"
+ #include "gpu/config/gpu_util.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ 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;
+@@ -1606,7 +1610,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/patches/patch-gpu_config_gpu__control__list__unittest.cc b/chromium/patches/patch-gpu_config_gpu__control__list__unittest.cc
new file mode 100644
index 0000000000..408853cdc7
--- /dev/null
+++ b/chromium/patches/patch-gpu_config_gpu__control__list__unittest.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- gpu/config/gpu_control_list_unittest.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/config/gpu_control_list_unittest.cc
+@@ -175,8 +175,7 @@ TEST_F(GpuControlListTest, VendorOnAllOs
+   features = control_list->MakeDecision(
+       GpuControlList::kOsLinux, kOsVersion, gpu_info());
+   EXPECT_SINGLE_FEATURE(features, TEST_FEATURE_0);
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || \
+-    defined(OS_OPENBSD)
++#if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_ANDROID))
+   // ControlList entries will be filtered to the current OS only upon loading.
+   EXPECT_TRUE(control_list->LoadList(
+       vendor_json, GpuControlList::kCurrentOsOnly));
diff --git a/chromium/patches/patch-gpu_config_gpu__info__collector.cc b/chromium/patches/patch-gpu_config_gpu__info__collector.cc
new file mode 100644
index 0000000000..5473f65956
--- /dev/null
+++ b/chromium/patches/patch-gpu_config_gpu__info__collector.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- gpu/config/gpu_info_collector.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/config/gpu_info_collector.cc
+@@ -193,8 +193,10 @@ CollectInfoResult CollectGraphicsInfoGL(
+   gpu_info->pixel_shader_version = glsl_version;
+   gpu_info->vertex_shader_version = glsl_version;
+ 
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+   IdentifyActiveGPU(gpu_info);
+   return CollectDriverInfoGL(gpu_info);
++#endif
+ }
+ 
+ void MergeGPUInfoGL(GPUInfo* basic_gpu_info,
diff --git a/chromium/patches/patch-gpu_config_gpu__test__config.cc b/chromium/patches/patch-gpu_config_gpu__test__config.cc
new file mode 100644
index 0000000000..77f7ac1e96
--- /dev/null
+++ b/chromium/patches/patch-gpu_config_gpu__test__config.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+--- gpu/config/gpu_test_config.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/config/gpu_test_config.cc
+@@ -24,7 +24,7 @@ namespace {
+ GPUTestConfig::OS GetCurrentOS() {
+ #if defined(OS_CHROMEOS)
+   return GPUTestConfig::kOsChromeOS;
+-#elif defined(OS_LINUX) || defined(OS_OPENBSD)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   return GPUTestConfig::kOsLinux;
+ #elif defined(OS_WIN)
+   int32_t major_version = 0;
+@@ -255,6 +255,10 @@ bool GPUTestBotConfig::LoadCurrentConfig
+   bool rt;
+   if (gpu_info == NULL) {
+     GPUInfo my_gpu_info;
++#if defined(OS_BSD)
++    rt = false;
++    LOG(WARNING) << "CollectGpuID not present on BSD";
++#else
+     CollectInfoResult result = CollectGpuID(
+         &my_gpu_info.gpu.vendor_id, &my_gpu_info.gpu.device_id);
+     if (result != kCollectInfoSuccess) {
+@@ -264,6 +268,7 @@ bool GPUTestBotConfig::LoadCurrentConfig
+     } else {
+       rt = SetGPUInfo(my_gpu_info);
+     }
++#endif
+   } else {
+     rt = SetGPUInfo(*gpu_info);
+   }
diff --git a/chromium/patches/patch-gpu_gles2__conform__support_BUILD.gn b/chromium/patches/patch-gpu_gles2__conform__support_BUILD.gn
new file mode 100644
index 0000000000..da715cb03b
--- /dev/null
+++ b/chromium/patches/patch-gpu_gles2__conform__support_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- gpu/gles2_conform_support/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/gles2_conform_support/BUILD.gn
+@@ -60,7 +60,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",
+@@ -413,7 +413,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/patches/patch-gpu_gles2__conform__support_native_BUILD.gn b/chromium/patches/patch-gpu_gles2__conform__support_native_BUILD.gn
new file mode 100644
index 0000000000..0a8963f1e8
--- /dev/null
+++ b/chromium/patches/patch-gpu_gles2__conform__support_native_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- gpu/gles2_conform_support/native/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/gles2_conform_support/native/BUILD.gn
+@@ -20,7 +20,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/patches/patch-gpu_ipc_client_BUILD.gn b/chromium/patches/patch-gpu_ipc_client_BUILD.gn
new file mode 100644
index 0000000000..76d136193c
--- /dev/null
+++ b/chromium/patches/patch-gpu_ipc_client_BUILD.gn
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- gpu/ipc/client/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/ipc/client/BUILD.gn
+@@ -51,6 +51,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/patches/patch-gpu_ipc_service_BUILD.gn b/chromium/patches/patch-gpu_ipc_service_BUILD.gn
new file mode 100644
index 0000000000..2bfede58dc
--- /dev/null
+++ b/chromium/patches/patch-gpu_ipc_service_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- gpu/ipc/service/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/ipc/service/BUILD.gn
+@@ -104,11 +104,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/patches/patch-gpu_ipc_service_gpu__init.cc b/chromium/patches/patch-gpu_ipc_service_gpu__init.cc
new file mode 100644
index 0000000000..87b416e960
--- /dev/null
+++ b/chromium/patches/patch-gpu_ipc_service_gpu__init.cc
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- gpu/ipc/service/gpu_init.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/ipc/service/gpu_init.cc
+@@ -75,7 +75,7 @@ void GetGpuInfoFromCommandLine(gpu::GPUI
+   }
+ }
+ 
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+ void CollectGraphicsInfo(gpu::GPUInfo& gpu_info) {
+   TRACE_EVENT0("gpu,startup", "Collect Graphics Info");
+ 
+@@ -94,7 +94,7 @@ void CollectGraphicsInfo(gpu::GPUInfo& g
+       break;
+   }
+ }
+-#endif  // defined(OS_MACOSX)
++#endif  // defined(OS_MACOSX) && defined(OS_BSD)
+ 
+ #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ bool CanAccessNvidiaDeviceFile() {
+@@ -189,7 +189,7 @@ bool GpuInit::InitializeAndStartSandbox(
+   // By skipping the following code on Mac, we don't really lose anything,
+   // because the basic GPU information is passed down from the host process.
+   base::TimeTicks before_collect_context_graphics_info = base::TimeTicks::Now();
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+   CollectGraphicsInfo(gpu_info_);
+   if (gpu_info_.context_info_state == gpu::kCollectInfoFatalFailure)
+     return false;
+@@ -206,7 +206,7 @@ bool GpuInit::InitializeAndStartSandbox(
+     gpu::ApplyGpuDriverBugWorkarounds(
+         gpu_info_, const_cast<base::CommandLine*>(&command_line));
+   }
+-#endif  // !defined(OS_MACOSX)
++#endif  // !defined(OS_MACOSX) && !defined(OS_BSD)
+ 
+   base::TimeDelta collect_context_time =
+       base::TimeTicks::Now() - before_collect_context_graphics_info;
diff --git a/chromium/patches/patch-gpu_tools_compositor__model__bench_BUILD.gn b/chromium/patches/patch-gpu_tools_compositor__model__bench_BUILD.gn
new file mode 100644
index 0000000000..dcf37c3c09
--- /dev/null
+++ b/chromium/patches/patch-gpu_tools_compositor__model__bench_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- gpu/tools/compositor_model_bench/BUILD.gn.orig	2017-02-02 02:02:55.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) {
+   executable("compositor_model_bench") {
+     sources = [
+       "compositor_model_bench.cc",
diff --git a/chromium/patches/patch-gpu_vulkan_BUILD.gn b/chromium/patches/patch-gpu_vulkan_BUILD.gn
new file mode 100644
index 0000000000..f3b3b28b45
--- /dev/null
+++ b/chromium/patches/patch-gpu_vulkan_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- gpu/vulkan/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
++++ gpu/vulkan/BUILD.gn
+@@ -14,7 +14,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/patches/patch-ipc_ipc__channel.h b/chromium/patches/patch-ipc_ipc__channel.h
new file mode 100644
index 0000000000..94dc744885
--- /dev/null
+++ b/chromium/patches/patch-ipc_ipc__channel.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ipc/ipc_channel.h.orig	2017-02-02 02:02:55.000000000 +0000
++++ ipc/ipc_channel.h
+@@ -245,7 +245,7 @@ class IPC_EXPORT Channel : public Sender
+   static std::string GenerateUniqueRandomChannelID();
+ #endif
+ 
+-#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/patches/patch-ipc_ipc__channel__common.cc b/chromium/patches/patch-ipc_ipc__channel__common.cc
new file mode 100644
index 0000000000..11318e7210
--- /dev/null
+++ b/chromium/patches/patch-ipc_ipc__channel__common.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ipc/ipc_channel_common.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ ipc/ipc_channel_common.cc
+@@ -9,7 +9,7 @@
+ 
+ namespace IPC {
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ 
+ namespace {
+ int g_global_pid = 0;
diff --git a/chromium/patches/patch-ipc_ipc__message__utils.cc b/chromium/patches/patch-ipc_ipc__message__utils.cc
new file mode 100644
index 0000000000..4bede79b23
--- /dev/null
+++ b/chromium/patches/patch-ipc_ipc__message__utils.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ipc/ipc_message_utils.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ ipc/ipc_message_utils.cc
+@@ -425,7 +425,7 @@ void ParamTraits<unsigned int>::Log(cons
+   l->append(base::UintToString(p));
+ }
+ 
+-#if defined(OS_WIN) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || \
+     (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS))
+ void ParamTraits<long>::Log(const param_type& p, std::string* l) {
+   l->append(base::Int64ToString(static_cast<int64_t>(p)));
diff --git a/chromium/patches/patch-ipc_ipc__message__utils.h b/chromium/patches/patch-ipc_ipc__message__utils.h
new file mode 100644
index 0000000000..2325ed535a
--- /dev/null
+++ b/chromium/patches/patch-ipc_ipc__message__utils.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ipc/ipc_message_utils.h.orig	2017-02-02 02:02:55.000000000 +0000
++++ ipc/ipc_message_utils.h
+@@ -210,7 +210,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.
+-#if defined(OS_WIN) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD) || \
+     (defined(OS_ANDROID) && defined(ARCH_CPU_64_BITS))
+ template <>
+ struct ParamTraits<long> {
diff --git a/chromium/patches/patch-ipc_unix__domain__socket__util.cc b/chromium/patches/patch-ipc_unix__domain__socket__util.cc
new file mode 100644
index 0000000000..7b8f925fbe
--- /dev/null
+++ b/chromium/patches/patch-ipc_unix__domain__socket__util.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ipc/unix_domain_socket_util.cc.orig	2017-02-02 02:02:55.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)
+   uid_t socket_euid;
+   gid_t socket_gid;
+   if (getpeereid(fd, &socket_euid, &socket_gid) < 0) {
diff --git a/chromium/patches/patch-media_audio_BUILD.gn b/chromium/patches/patch-media_audio_BUILD.gn
new file mode 100644
index 0000000000..7c90e0b14e
--- /dev/null
+++ b/chromium/patches/patch-media_audio_BUILD.gn
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- media/audio/BUILD.gn.orig	2017-02-02 02:02:55.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/patches/patch-media_audio_alsa_audio__manager__alsa.cc b/chromium/patches/patch-media_audio_alsa_audio__manager__alsa.cc
new file mode 100644
index 0000000000..d58f5e4cc7
--- /dev/null
+++ b/chromium/patches/patch-media_audio_alsa_audio__manager__alsa.cc
@@ -0,0 +1,56 @@
+$NetBSD$
+
+--- media/audio/alsa/audio_manager_alsa.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/audio/alsa/audio_manager_alsa.cc
+@@ -135,7 +135,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+   int card = -1;
+ 
+   // Loop through the sound cards to get ALSA device hints.
++#ifdef OS_LINUX
+   while (!wrapper_->CardNext(&card) && card >= 0) {
++#endif
+     void** hints = NULL;
+     int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
+     if (!error) {
+@@ -147,7 +149,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+       DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: "
+                     << wrapper_->StrError(error);
+     }
++#ifdef OS_LINUX
+   }
++#endif
+ }
+ 
+ void AudioManagerAlsa::GetAlsaDevicesInfo(
+@@ -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?
++#ifdef OS_LINUX
+     static const char kDeviceTypeDesired[] = "plughw";
++#else
++    static const char kDeviceTypeDesired[] = "plug";
++#endif
+     return strncmp(kDeviceTypeDesired,
+                    device_name,
+                    arraysize(kDeviceTypeDesired) - 1) == 0;
+@@ -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.
++#ifdef OS_LINUX
+   while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) {
++#endif
+     int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
+     if (!error) {
+       for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) {
+@@ -278,7 +288,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
+       DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: "
+                     << wrapper_->StrError(error);
+     }
++#ifdef OS_LINUX
+   }
++#endif
+ 
+   return has_device;
+ }
diff --git a/chromium/patches/patch-media_audio_audio__manager.cc b/chromium/patches/patch-media_audio_audio__manager.cc
new file mode 100644
index 0000000000..725f33e339
--- /dev/null
+++ b/chromium/patches/patch-media_audio_audio__manager.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- media/audio/audio_manager.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/audio/audio_manager.cc
+@@ -95,7 +95,7 @@ class AudioManagerHelper : public base::
+   }
+ #endif
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   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)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   std::string app_name_;
+ #endif
+ 
+@@ -365,7 +365,7 @@ void AudioManager::EnableCrashKeyLogging
+   g_helper.Pointer()->enable_crash_key_logging();
+ }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // static
+ void AudioManager::SetGlobalAppName(const std::string& app_name) {
+   g_helper.Pointer()->set_app_name(app_name);
diff --git a/chromium/patches/patch-media_audio_audio__manager.h b/chromium/patches/patch-media_audio_audio__manager.h
new file mode 100644
index 0000000000..58803515d6
--- /dev/null
+++ b/chromium/patches/patch-media_audio_audio__manager.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- media/audio/audio_manager.h.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/audio/audio_manager.h
+@@ -84,7 +84,7 @@ class MEDIA_EXPORT AudioManager {
+   // See http://crbug.com/422522
+   static void EnableCrashKeyLoggingForAudioThreadHangs();
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // Sets the name of the audio source as seen by external apps. Only actually
+   // used with PulseAudio as of this writing.
+   static void SetGlobalAppName(const std::string& app_name);
diff --git a/chromium/patches/patch-media_base_BUILD.gn b/chromium/patches/patch-media_base_BUILD.gn
new file mode 100644
index 0000000000..8f87b17082
--- /dev/null
+++ b/chromium/patches/patch-media_base_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- media/base/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/base/BUILD.gn
+@@ -309,7 +309,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",
+@@ -345,7 +345,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/patches/patch-media_capture_BUILD.gn b/chromium/patches/patch-media_capture_BUILD.gn
new file mode 100644
index 0000000000..8c0bb5670e
--- /dev/null
+++ b/chromium/patches/patch-media_capture_BUILD.gn
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- media/capture/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/capture/BUILD.gn
+@@ -127,6 +127,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/patches/patch-media_capture_video_fake__video__capture__device__factory.cc b/chromium/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
new file mode 100644
index 0000000000..a03d592ef4
--- /dev/null
+++ b/chromium/patches/patch-media_capture_video_fake__video__capture__device__factory.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- media/capture/video/fake_video_capture_device_factory.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/capture/video/fake_video_capture_device_factory.cc
+@@ -71,7 +71,7 @@ void FakeVideoCaptureDeviceFactory::GetD
+   for (int n = 0; n < number_of_devices_; ++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)
+                                      VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE
+ #elif defined(OS_MACOSX)
+                                      VideoCaptureApi::MACOSX_AVFOUNDATION
diff --git a/chromium/patches/patch-media_capture_video_file__video__capture__device__factory.cc b/chromium/patches/patch-media_capture_video_file__video__capture__device__factory.cc
new file mode 100644
index 0000000000..6e6ebd1e95
--- /dev/null
+++ b/chromium/patches/patch-media_capture_video_file__video__capture__device__factory.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- media/capture/video/file_video_capture_device_factory.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/capture/video/file_video_capture_device_factory.cc
+@@ -53,7 +53,7 @@ void FileVideoCaptureDeviceFactory::GetD
+ #elif defined(OS_MACOSX)
+       command_line_file_path.value(), kFileVideoCaptureDeviceName,
+       VideoCaptureApi::MACOSX_AVFOUNDATION
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+       command_line_file_path.value(), kFileVideoCaptureDeviceName,
+       VideoCaptureApi::LINUX_V4L2_SINGLE_PLANE
+ #else
diff --git a/chromium/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc b/chromium/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
new file mode 100644
index 0000000000..55b0144bff
--- /dev/null
+++ b/chromium/patches/patch-media_capture_video_linux_v4l2__capture__delegate.cc
@@ -0,0 +1,27 @@
+$NetBSD$
+
+--- media/capture/video/linux/v4l2_capture_delegate.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/capture/video/linux/v4l2_capture_delegate.cc
+@@ -4,7 +4,9 @@
+ 
+ #include "media/capture/video/linux/v4l2_capture_delegate.h"
+ 
++#if !defined(OS_BSD)
+ #include <linux/version.h>
++#endif
+ #include <poll.h>
+ #include <sys/fcntl.h>
+ #include <sys/ioctl.h>
+@@ -20,10 +22,10 @@
+ #include "media/capture/video/blob_utils.h"
+ #include "media/capture/video/linux/video_capture_device_linux.h"
+ 
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
++// #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+ // 16 bit depth, Realsense F200.
+ #define V4L2_PIX_FMT_Z16 v4l2_fourcc('Z', '1', '6', ' ')
+-#endif
++// #endif
+ 
+ // TODO(aleksandar.stojiljkovic): Wrap this with kernel version check once the
+ // format is introduced to kernel.
diff --git a/chromium/patches/patch-media_capture_video_linux_video__capture__device__linux.cc b/chromium/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
new file mode 100644
index 0000000000..e5574a7e03
--- /dev/null
+++ b/chromium/patches/patch-media_capture_video_linux_video__capture__device__linux.cc
@@ -0,0 +1,64 @@
+$NetBSD$
+
+--- media/capture/video/linux/video_capture_device_linux.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/capture/video/linux/video_capture_device_linux.cc
+@@ -21,6 +21,7 @@
+ 
+ namespace media {
+ 
++#if !defined(OS_FREEBSD)
+ // Translates Video4Linux pixel formats to Chromium pixel formats.
+ // static
+ VideoPixelFormat VideoCaptureDeviceLinux::V4l2FourCcToChromiumPixelFormat(
+@@ -34,6 +35,7 @@ std::list<uint32_t> VideoCaptureDeviceLi
+     bool favour_mjpeg) {
+   return V4L2CaptureDelegate::GetListOfUsableFourCcs(favour_mjpeg);
+ }
++#endif // !defined(OS_FREEBSD)
+ 
+ VideoCaptureDeviceLinux::VideoCaptureDeviceLinux(
+     const VideoCaptureDeviceDescriptor& device_descriptor)
+@@ -47,6 +49,7 @@ VideoCaptureDeviceLinux::~VideoCaptureDe
+   v4l2_thread_.Stop();
+ }
+ 
++#if !defined(OS_FREEBSD)
+ void VideoCaptureDeviceLinux::AllocateAndStart(
+     const VideoCaptureParams& params,
+     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)
++void VideoCaptureDeviceLinux::AllocateAndStart(
++    const VideoCaptureParams& params,
++    std::unique_ptr<VideoCaptureDevice::Client> client) {}
++#endif // !defined(OS_FREEBSD)
+ 
++#if !defined(OS_FREEBSD)
+ void VideoCaptureDeviceLinux::StopAndDeAllocate() {
+   if (!v4l2_thread_.IsRunning())
+     return;  // Wrong state.
+@@ -110,7 +119,11 @@ void VideoCaptureDeviceLinux::SetPhotoOp
+       base::Bind(&V4L2CaptureDelegate::SetPhotoOptions, capture_impl_,
+                  base::Passed(&settings), base::Passed(&callback)));
+ }
++#else // !defined(OS_FREEBSD)
++void VideoCaptureDeviceLinux::StopAndDeAllocate() {}
++#endif // !defined(OS_FREEBSD)
+ 
++#if !defined(OS_FREEBSD)
+ void VideoCaptureDeviceLinux::SetRotation(int rotation) {
+   if (v4l2_thread_.IsRunning()) {
+     v4l2_thread_.task_runner()->PostTask(
+@@ -118,6 +131,9 @@ void VideoCaptureDeviceLinux::SetRotatio
+         base::Bind(&V4L2CaptureDelegate::SetRotation, capture_impl_, rotation));
+   }
+ }
++#else // !defined(OS_FREEBSD)
++void VideoCaptureDeviceLinux::SetRotation(int rotation) {}
++#endif // !defined(OS_FREEBSD)
+ 
+ // static
+ int VideoCaptureDeviceLinux::TranslatePowerLineFrequencyToV4L2(
diff --git a/chromium/patches/patch-media_capture_video_video__capture__device__client.cc b/chromium/patches/patch-media_capture_video_video__capture__device__client.cc
new file mode 100644
index 0000000000..78e7fffb91
--- /dev/null
+++ b/chromium/patches/patch-media_capture_video_video__capture__device__client.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- media/capture/video/video_capture_device_client.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/capture/video/video_capture_device_client.cc
+@@ -193,7 +193,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/patches/patch-media_capture_video_video__capture__device__factory.cc b/chromium/patches/patch-media_capture_video_video__capture__device__factory.cc
new file mode 100644
index 0000000000..c778d565b9
--- /dev/null
+++ b/chromium/patches/patch-media_capture_video_video__capture__device__factory.cc
@@ -0,0 +1,32 @@
+$NetBSD$
+
+--- media/capture/video/video_capture_device_factory.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/capture/video/video_capture_device_factory.cc
+@@ -18,6 +18,10 @@ namespace media {
+ std::unique_ptr<VideoCaptureDeviceFactory>
+ VideoCaptureDeviceFactory::CreateFactory(
+     scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
++#if defined(OS_BSD)
++  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
+@@ -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/patches/patch-media_cast_BUILD.gn b/chromium/patches/patch-media_cast_BUILD.gn
new file mode 100644
index 0000000000..0182280629
--- /dev/null
+++ b/chromium/patches/patch-media_cast_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- media/cast/BUILD.gn.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/cast/BUILD.gn
+@@ -356,7 +356,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") {
+@@ -410,7 +410,7 @@ if (is_win || is_mac || (is_linux && !is
+       "//ui/gfx/geometry",
+     ]
+ 
+-    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",
+@@ -513,7 +513,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/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni b/chromium/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni
new file mode 100644
index 0000000000..5c1ad23b20
--- /dev/null
+++ b/chromium/patches/patch-media_cdm_ppapi_ppapi__cdm__adapter.gni
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- media/cdm/ppapi/ppapi_cdm_adapter.gni.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/cdm/ppapi/ppapi_cdm_adapter.gni
+@@ -5,7 +5,7 @@
+ # This template defines a CDM adapter target. Just use this as you would a
+ # normal target and everything should work correctly.
+ 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"
+@@ -57,7 +57,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/patches/patch-media_ffmpeg_ffmpeg__common.h b/chromium/patches/patch-media_ffmpeg_ffmpeg__common.h
new file mode 100644
index 0000000000..6aeec36fed
--- /dev/null
+++ b/chromium/patches/patch-media_ffmpeg_ffmpeg__common.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- media/ffmpeg/ffmpeg_common.h.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/ffmpeg/ffmpeg_common.h
+@@ -25,7 +25,7 @@ extern "C" {
+ // Disable deprecated features which result in spammy compile warnings.  This
+ // list of defines must mirror those in the 'defines' section of FFmpeg's
+ // BUILD.gn file or the headers below will generate different structures!
+-#define FF_API_CONVERGENCE_DURATION 0
++//#define FF_API_CONVERGENCE_DURATION 0
+ // Upstream libavcodec/utils.c still uses the deprecated
+ // av_dup_packet(), causing deprecation warnings.
+ // The normal fix for such things is to disable the feature as below,
+@@ -39,7 +39,6 @@ extern "C" {
+ MSVC_PUSH_DISABLE_WARNING(4244);
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+-#include <libavformat/internal.h>
+ #include <libavformat/avio.h>
+ #include <libavutil/avutil.h>
+ #include <libavutil/imgutils.h>
diff --git a/chromium/patches/patch-media_filters_ffmpeg__demuxer.cc b/chromium/patches/patch-media_filters_ffmpeg__demuxer.cc
new file mode 100644
index 0000000000..58b42d35be
--- /dev/null
+++ b/chromium/patches/patch-media_filters_ffmpeg__demuxer.cc
@@ -0,0 +1,29 @@
+$NetBSD$
+
+--- media/filters/ffmpeg_demuxer.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/filters/ffmpeg_demuxer.cc
+@@ -1198,24 +1198,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone
+   // If no estimate is found, the stream entry will be kInfiniteDuration.
+   std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
+                                                     kInfiniteDuration);
+-  const AVFormatInternal* internal = format_context->internal;
+-  if (internal && internal->packet_buffer &&
+-      format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
+-    struct AVPacketList* packet_buffer = internal->packet_buffer;
+-    while (packet_buffer != internal->packet_buffer_end) {
+-      DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
+-                start_time_estimates.size());
+-      const AVStream* stream =
+-          format_context->streams[packet_buffer->pkt.stream_index];
+-      if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
+-        const base::TimeDelta packet_pts =
+-            ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
+-        if (packet_pts < start_time_estimates[stream->index])
+-          start_time_estimates[stream->index] = packet_pts;
+-      }
+-      packet_buffer = packet_buffer->next;
+-    }
+-  }
+ 
+   std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
+ 
diff --git a/chromium/patches/patch-media_filters_vp9__parser.h b/chromium/patches/patch-media_filters_vp9__parser.h
new file mode 100644
index 0000000000..fb496a9b65
--- /dev/null
+++ b/chromium/patches/patch-media_filters_vp9__parser.h
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- media/filters/vp9_parser.h.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/filters/vp9_parser.h
+@@ -14,6 +14,7 @@
+ 
+ #include <stddef.h>
+ #include <stdint.h>
++#include <unistd.h>
+ #include <sys/types.h>
+ 
+ #include <deque>
diff --git a/chromium/patches/patch-media_formats_common_offset__byte__queue.cc b/chromium/patches/patch-media_formats_common_offset__byte__queue.cc
new file mode 100644
index 0000000000..c5daf371fe
--- /dev/null
+++ b/chromium/patches/patch-media_formats_common_offset__byte__queue.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- media/formats/common/offset_byte_queue.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/formats/common/offset_byte_queue.cc
+@@ -46,13 +46,13 @@ void OffsetByteQueue::PeekAt(int64_t off
+   *size = tail() - offset;
+ }
+ 
+-bool OffsetByteQueue::Trim(int64_t max_offset) {
+-  if (max_offset < head_) return true;
+-  if (max_offset > tail()) {
++bool OffsetByteQueue::Trim(int64_t _max_offset) {
++  if (_max_offset < head_) return true;
++  if (_max_offset > tail()) {
+     Pop(size_);
+     return false;
+   }
+-  Pop(max_offset - head_);
++  Pop(_max_offset - head_);
+   return true;
+ }
+ 
diff --git a/chromium/patches/patch-media_formats_common_offset__byte__queue.h b/chromium/patches/patch-media_formats_common_offset__byte__queue.h
new file mode 100644
index 0000000000..f0f70ff6b3
--- /dev/null
+++ b/chromium/patches/patch-media_formats_common_offset__byte__queue.h
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- media/formats/common/offset_byte_queue.h.orig	2017-02-02 02:02:55.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.
+   void PeekAt(int64_t offset, const uint8_t** buf, int* size);
+ 
+-  // Marks the bytes up to (but not including) |max_offset| as ready for
++  // Marks the bytes up to (but not including) |_max_offset| as ready for
+   // deletion. This is relatively inexpensive, but will not necessarily reduce
+   // the resident buffer size right away (or ever).
+   //
+   // Returns true if the full range of bytes were successfully trimmed,
+-  // including the case where |max_offset| is less than the current head.
+-  // Returns false if |max_offset| > tail() (although all bytes currently
++  // including the case where |_max_offset| is less than the current head.
++  // Returns false if |_max_offset| > tail() (although all bytes currently
+   // buffered are still cleared).
+-  bool Trim(int64_t max_offset);
++  bool Trim(int64_t _max_offset);
+ 
+   // The head and tail positions, in terms of the file's absolute offsets.
+   // tail() is an exclusive bound.
diff --git a/chromium/patches/patch-media_formats_mp2t_es__parser__adts.cc b/chromium/patches/patch-media_formats_mp2t_es__parser__adts.cc
new file mode 100644
index 0000000000..c5920e8785
--- /dev/null
+++ b/chromium/patches/patch-media_formats_mp2t_es__parser__adts.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- media/formats/mp2t/es_parser_adts.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/formats/mp2t/es_parser_adts.cc
+@@ -54,11 +54,11 @@ bool EsParserAdts::LookForAdtsFrame(Adts
+   const uint8_t* es;
+   es_queue_->Peek(&es, &es_size);
+ 
+-  int max_offset = es_size - kADTSHeaderMinSize;
+-  if (max_offset <= 0)
++  int _max_offset = es_size - kADTSHeaderMinSize;
++  if (_max_offset <= 0)
+     return false;
+ 
+-  for (int offset = 0; offset < max_offset; offset++) {
++  for (int offset = 0; offset < _max_offset; offset++) {
+     const uint8_t* cur_buf = &es[offset];
+     if (!isAdtsSyncWord(cur_buf))
+       continue;
+@@ -96,7 +96,7 @@ bool EsParserAdts::LookForAdtsFrame(Adts
+     return true;
+   }
+ 
+-  es_queue_->Pop(max_offset);
++  es_queue_->Pop(_max_offset);
+   return false;
+ }
+ 
diff --git a/chromium/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc b/chromium/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc
new file mode 100644
index 0000000000..c0cce624c1
--- /dev/null
+++ b/chromium/patches/patch-media_formats_mp2t_es__parser__mpeg1audio.cc
@@ -0,0 +1,28 @@
+$NetBSD$
+
+--- media/formats/mp2t/es_parser_mpeg1audio.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ media/formats/mp2t/es_parser_mpeg1audio.cc
+@@ -109,11 +109,11 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud
+   const uint8_t* es;
+   es_queue_->Peek(&es, &es_size);
+ 
+-  int max_offset = es_size - MPEG1AudioStreamParser::kHeaderSize;
+-  if (max_offset <= 0)
++  int _max_offset = es_size - MPEG1AudioStreamParser::kHeaderSize;
++  if (_max_offset <= 0)
+     return false;
+ 
+-  for (int offset = 0; offset < max_offset; offset++) {
++  for (int offset = 0; offset < _max_offset; offset++) {
+     const uint8_t* cur_buf = &es[offset];
+     if (cur_buf[0] != 0xff)
+       continue;
+@@ -154,7 +154,7 @@ bool EsParserMpeg1Audio::LookForMpeg1Aud
+     return true;
+   }
+ 
+-  es_queue_->Pop(max_offset);
++  es_queue_->Pop(_max_offset);
+   return false;
+ }
+ 
diff --git a/chromium/patches/patch-mojo_BUILD.gn b/chromium/patches/patch-mojo_BUILD.gn
new file mode 100644
index 0000000000..6a0ee91061
--- /dev/null
+++ b/chromium/patches/patch-mojo_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- mojo/BUILD.gn.orig	2017-02-02 02:02:55.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")) {
+     deps += [ "//mojo/public" ]
+   }
+ 
diff --git a/chromium/patches/patch-mojo_edk_embedder_platform__channel__utils__posix.cc b/chromium/patches/patch-mojo_edk_embedder_platform__channel__utils__posix.cc
new file mode 100644
index 0000000000..989949ecda
--- /dev/null
+++ b/chromium/patches/patch-mojo_edk_embedder_platform__channel__utils__posix.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- mojo/edk/embedder/platform_channel_utils_posix.cc.orig	2017-02-02 02:02:55.000000000 +0000
++++ mojo/edk/embedder/platform_channel_utils_posix.cc
+@@ -36,7 +36,7 @@ bool IsRecoverableError() {
+ 
+ bool GetPeerEuid(PlatformHandle handle, 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)
+   uid_t socket_euid;
+   gid_t socket_gid;
+   if (getpeereid(handle.handle, &socket_euid, &socket_gid) < 0) {
diff --git a/chromium/patches/patch-mojo_edk_test_BUILD.gn b/chromium/patches/patch-mojo_edk_test_BUILD.gn
new file mode 100644
index 0000000000..9e12968d04
--- /dev/null
+++ b/chromium/patches/patch-mojo_edk_test_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- mojo/edk/test/BUILD.gn.orig	2017-02-02 02:02:55.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/patches/patch-native__client__sdk_src_BUILD.gn b/chromium/patches/patch-native__client__sdk_src_BUILD.gn
new file mode 100644
index 0000000000..294e520f75
--- /dev/null
+++ b/chromium/patches/patch-native__client__sdk_src_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- native_client_sdk/src/BUILD.gn.orig	2017-02-02 02:02:56.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/patches/patch-net_BUILD.gn b/chromium/patches/patch-net_BUILD.gn
new file mode 100644
index 0000000000..73e10240d5
--- /dev/null
+++ b/chromium/patches/patch-net_BUILD.gn
@@ -0,0 +1,88 @@
+$NetBSD$
+
+--- net/BUILD.gn.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/BUILD.gn
+@@ -153,6 +153,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) {
+@@ -278,6 +283,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
+     }
+@@ -966,7 +978,7 @@ if (!is_ios && !is_android) {
+   }
+ }
+ 
+-if (is_linux || is_mac) {
++if (is_linux || is_bsd || is_mac) {
+   executable("cachetool") {
+     testonly = true
+     sources = [
+@@ -995,7 +1007,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",
+@@ -1098,7 +1110,7 @@ if (is_android) {
+   }
+ }
+ 
+-if (is_android || is_linux) {
++if (is_android || is_linux || is_bsd) {
+   executable("disk_cache_memory_test") {
+     testonly = true
+     sources = [
+@@ -1276,7 +1288,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/",
+@@ -1299,7 +1311,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",
+@@ -1319,6 +1331,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/patches/patch-net_base_address__tracker__linux.h b/chromium/patches/patch-net_base_address__tracker__linux.h
new file mode 100644
index 0000000000..b7b57c02ea
--- /dev/null
+++ b/chromium/patches/patch-net_base_address__tracker__linux.h
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- net/base/address_tracker_linux.h.orig	2017-02-02 02:02:56.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(__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>
+ #undef net
++#endif
+ #include <stddef.h>
+ 
+ #include <map>
+@@ -34,8 +36,11 @@ namespace internal {
+ class NET_EXPORT_PRIVATE AddressTrackerLinux :
+     public base::MessageLoopForIO::Watcher {
+  public:
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+   typedef std::map<IPAddress, struct ifaddrmsg> AddressMap;
+-
++#else
++  typedef void* AddressMap;
++#endif
+   // Non-tracking version constructor: it takes a snapshot of the
+   // current system configuration. Once Init() returns, the
+   // configuration is available through GetOnlineLinks() and
diff --git a/chromium/patches/patch-net_base_address__tracker__linux__unittest.cc b/chromium/patches/patch-net_base_address__tracker__linux__unittest.cc
new file mode 100644
index 0000000000..fba97b3981
--- /dev/null
+++ b/chromium/patches/patch-net_base_address__tracker__linux__unittest.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- net/base/address_tracker_linux_unittest.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/base/address_tracker_linux_unittest.cc
+@@ -4,7 +4,11 @@
+ 
+ #include "net/base/address_tracker_linux.h"
+ 
++#if defined(__linux__)
+ #include <linux/if.h>
++#else
++#include <net/if.h>
++#endif
+ 
+ #include <memory>
+ #include <unordered_set>
diff --git a/chromium/patches/patch-net_base_mime__util__unittest.cc b/chromium/patches/patch-net_base_mime__util__unittest.cc
new file mode 100644
index 0000000000..6c5c6b62ce
--- /dev/null
+++ b/chromium/patches/patch-net_base_mime__util__unittest.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- net/base/mime_util_unittest.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/base/mime_util_unittest.cc
+@@ -243,7 +243,7 @@ TEST(MimeUtilTest, TestGetExtensionsForM
+     { "MeSsAge/*",  1, "eml" },
+     { "image/bmp",  1, "bmp" },
+     { "video/*",    6, "mp4" },
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_IOS)
++#if (defined(OS_POSIX) && !defined(OS_MACOSX)) || defined(OS_IOS)
+     { "video/*",    6, "mpg" },
+ #else
+     { "video/*",    6, "mpeg" },
diff --git a/chromium/patches/patch-net_base_network__change__notifier.cc b/chromium/patches/patch-net_base_network__change__notifier.cc
new file mode 100644
index 0000000000..c23b890961
--- /dev/null
+++ b/chromium/patches/patch-net_base_network__change__notifier.cc
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- net/base/network_change_notifier.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/base/network_change_notifier.cc
+@@ -533,7 +533,6 @@ NetworkChangeNotifier* NetworkChangeNoti
+ #elif defined(OS_MACOSX)
+   return new NetworkChangeNotifierMac();
+ #else
+-  NOTIMPLEMENTED();
+   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/patches/patch-net_base_network__change__notifier.h b/chromium/patches/patch-net_base_network__change__notifier.h
new file mode 100644
index 0000000000..2153f82594
--- /dev/null
+++ b/chromium/patches/patch-net_base_network__change__notifier.h
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- net/base/network_change_notifier.h.orig	2017-02-02 02:02:56.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/patches/patch-net_base_network__interfaces__linux.cc b/chromium/patches/patch-net_base_network__interfaces__linux.cc
new file mode 100644
index 0000000000..f236949846
--- /dev/null
+++ b/chromium/patches/patch-net_base_network__interfaces__linux.cc
@@ -0,0 +1,107 @@
+$NetBSD$
+
+--- net/base/network_interfaces_linux.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/base/network_interfaces_linux.cc
+@@ -6,12 +6,14 @@
+ 
+ #include <memory>
+ 
++#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+ #if !defined(OS_ANDROID)
+ #include <linux/ethtool.h>
+ #endif  // !defined(OS_ANDROID)
+ #include <linux/if.h>
+ #include <linux/sockios.h>
+ #include <linux/wireless.h>
++#endif  // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+ #include <set>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+@@ -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.
++#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+   if (native_attributes & (
+ #if !defined(OS_ANDROID)
+                               IFA_F_OPTIMISTIC | IFA_F_DADFAILED |
+@@ -66,6 +69,10 @@ bool TryConvertNativeToNetIPAttributes(i
+   }
+ 
+   return true;
++#else
++  // the flags tested above are not present on FreeBSD
++  return false;
++#endif  // !OS_FREEBSD && !OS_NETBSD
+ }
+ 
+ }  // namespace
+@@ -80,13 +87,15 @@ NetworkChangeNotifier::ConnectionType Ge
+   if (!s.is_valid())
+     return NetworkChangeNotifier::CONNECTION_UNKNOWN;
+ 
++#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+   // Test wireless extensions for CONNECTION_WIFI
+   struct iwreq pwrq = {};
+   strncpy(pwrq.ifr_name, ifname.c_str(), IFNAMSIZ - 1);
+   if (ioctl(s.get(), SIOCGIWNAME, &pwrq) != -1)
+     return NetworkChangeNotifier::CONNECTION_WIFI;
++#endif  // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+ 
+-#if !defined(OS_ANDROID)
++#if !defined(OS_ANDROID) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+   // Test ethtool for CONNECTION_ETHERNET
+   struct ethtool_cmd ecmd = {};
+   ecmd.cmd = ETHTOOL_GSET;
+@@ -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;
+-#endif  // !defined(OS_ANDROID)
++#endif  // !defined(OS_ANDROID) && !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+ 
+   return NetworkChangeNotifier::CONNECTION_UNKNOWN;
+ }
+ 
+ std::string GetInterfaceSSID(const std::string& ifname) {
++#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+   base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0));
+   if (!ioctl_socket.is_valid())
+     return "";
+@@ -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;
++#endif  // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+   return "";
+ }
+ 
++#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+ bool GetNetworkListImpl(
+     NetworkInterfaceList* networks,
+     int policy,
+@@ -183,6 +195,7 @@ bool GetNetworkListImpl(
+ 
+   return true;
+ }
++#endif  // !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+ 
+ std::string GetWifiSSIDFromInterfaceListInternal(
+     const NetworkInterfaceList& interfaces,
+@@ -207,12 +220,16 @@ bool GetNetworkList(NetworkInterfaceList
+   if (networks == NULL)
+     return false;
+ 
++#if !defined(OS_FREEBSD) && !defined(OS_NETBSD)
+   internal::AddressTrackerLinux tracker;
+   tracker.Init();
+ 
+   return internal::GetNetworkListImpl(
+       networks, policy, tracker.GetOnlineLinks(), tracker.GetAddressMap(),
+       &internal::AddressTrackerLinux::GetInterfaceName);
++#else
++  return false;
++#endif
+ }
+ 
+ std::string GetWifiSSID() {
diff --git a/chromium/patches/patch-net_base_network__interfaces__posix.cc b/chromium/patches/patch-net_base_network__interfaces__posix.cc
new file mode 100644
index 0000000000..4c49b40155
--- /dev/null
+++ b/chromium/patches/patch-net_base_network__interfaces__posix.cc
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- net/base/network_interfaces_posix.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/base/network_interfaces_posix.cc
+@@ -20,6 +20,7 @@ namespace net {
+ #if !defined(OS_NACL)
+ namespace internal {
+ 
++#if !defined(OS_BSD)
+ // The application layer can pass |policy| defined in net_util.h to
+ // request filtering out certain type of interfaces.
+ bool ShouldIgnoreInterface(const std::string& name, int policy) {
+@@ -33,6 +34,7 @@ bool ShouldIgnoreInterface(const std::st
+ 
+   return false;
+ }
++#endif
+ 
+ // Check if the address is unspecified (i.e. made of zeroes) or loopback.
+ bool IsLoopbackOrUnspecifiedAddress(const sockaddr* addr) {
diff --git a/chromium/patches/patch-net_dns_address__sorter__posix.cc b/chromium/patches/patch-net_dns_address__sorter__posix.cc
new file mode 100644
index 0000000000..e7552ee5d4
--- /dev/null
+++ b/chromium/patches/patch-net_dns_address__sorter__posix.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- net/dns/address_sorter_posix.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/dns/address_sorter_posix.cc
+@@ -13,6 +13,9 @@
+ #include <sys/socket.h>  // Must be included before ifaddrs.h.
+ #include <ifaddrs.h>
+ #include <net/if.h>
++#if defined(OS_FREEBSD)
++#include <net/if_var.h>
++#endif
+ #include <netinet/in_var.h>
+ #include <string.h>
+ #include <sys/ioctl.h>
diff --git a/chromium/patches/patch-net_dns_dns__config__service__posix__unittest.cc b/chromium/patches/patch-net_dns_dns__config__service__posix__unittest.cc
new file mode 100644
index 0000000000..d041d6f69e
--- /dev/null
+++ b/chromium/patches/patch-net_dns_dns__config__service__posix__unittest.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- net/dns/dns_config_service_posix_unittest.cc.orig	2017-02-02 02:02:56.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
+ // found in the LICENSE file.
+ 
+-#include <resolv.h>
+-
+ #include <memory>
+ 
+ #include "base/cancelable_callback.h"
diff --git a/chromium/patches/patch-net_dns_dns__reloader.cc b/chromium/patches/patch-net_dns_dns__reloader.cc
new file mode 100644
index 0000000000..5329b85abf
--- /dev/null
+++ b/chromium/patches/patch-net_dns_dns__reloader.cc
@@ -0,0 +1,51 @@
+$NetBSD$
+
+--- net/dns/dns_reloader.cc.orig	2016-11-10 20:02:16.000000000 +0000
++++ net/dns/dns_reloader.cc
+@@ -7,6 +7,10 @@
+ #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
+     !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/patches/patch-net_http_http__auth__gssapi__posix.cc b/chromium/patches/patch-net_http_http__auth__gssapi__posix.cc
new file mode 100644
index 0000000000..9d759206b9
--- /dev/null
+++ b/chromium/patches/patch-net_http_http__auth__gssapi__posix.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- net/http/http_auth_gssapi_posix.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/http/http_auth_gssapi_posix.cc
+@@ -431,8 +431,8 @@ base::NativeLibrary GSSAPISharedLibrary:
+     static const char* const kDefaultLibraryNames[] = {
+ #if defined(OS_MACOSX)
+       "/System/Library/Frameworks/Kerberos.framework/Kerberos"
+-#elif defined(OS_OPENBSD)
+-      "libgssapi.so"          // Heimdal - OpenBSD
++#elif defined(OS_BSD)
++      "libgssapi.so"          // Heimdal - OpenBSD / FreeBSD
+ #else
+       "libgssapi_krb5.so.2",  // MIT Kerberos - FC, Suse10, Debian
+       "libgssapi.so.4",       // Heimdal - Suse10, MDK
diff --git a/chromium/patches/patch-net_http_http__network__session.cc b/chromium/patches/patch-net_http_http__network__session.cc
new file mode 100644
index 0000000000..25bb8a9d4f
--- /dev/null
+++ b/chromium/patches/patch-net_http_http__network__session.cc
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- net/http/http_network_session.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/http/http_network_session.cc
+@@ -17,7 +17,9 @@
+ #include "base/strings/string_util.h"
+ #include "base/values.h"
+ #include "net/base/network_throttle_manager.h"
++#if defined(USE_KERBEROS)
+ #include "net/http/http_auth_handler_factory.h"
++#endif
+ #include "net/http/http_response_body_drainer.h"
+ #include "net/http/http_stream_factory_impl.h"
+ #include "net/http/url_security_manager.h"
diff --git a/chromium/patches/patch-net_proxy_proxy__config__service__linux.cc b/chromium/patches/patch-net_proxy_proxy__config__service__linux.cc
new file mode 100644
index 0000000000..1701f1abff
--- /dev/null
+++ b/chromium/patches/patch-net_proxy_proxy__config__service__linux.cc
@@ -0,0 +1,147 @@
+$NetBSD$
+
+--- net/proxy/proxy_config_service_linux.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/proxy/proxy_config_service_linux.cc
+@@ -11,7 +11,14 @@
+ #include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#if defined(OS_FREEBSD) || defined(OS_NETBSD)
++#include <fcntl.h>
++#include <sys/types.h>
++#include <sys/event.h>
++#include <sys/time.h>
++#else
+ #include <sys/inotify.h>
++#endif
+ #include <unistd.h>
+ 
+ #include <map>
+@@ -863,6 +870,7 @@ class SettingGetterImplKDE : public Prox
+  public:
+   explicit SettingGetterImplKDE(base::Environment* env_var_getter)
+       : inotify_fd_(-1),
++        config_fd_(-1),
+         notify_delegate_(nullptr),
+         debounce_timer_(new base::OneShotTimer()),
+         indirect_manual_(false),
+@@ -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_LT(inotify_fd_, 0);
++    DCHECK_LT(config_fd_, 0);
+   }
+ 
+   bool Init(const scoped_refptr<base::SingleThreadTaskRunner>& glib_task_runner,
+@@ -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_LT(inotify_fd_, 0);
++#if defined(OS_BSD)
++    inotify_fd_ = kqueue();
++#else
+     inotify_fd_ = inotify_init();
++#endif
+     if (inotify_fd_ < 0) {
++#if defined(OS_BSD)
++      PLOG(ERROR) << "kqueue failed";
++#else
+       PLOG(ERROR) << "inotify_init failed";
++#endif
+       return false;
+     }
+     if (!base::SetNonBlocking(inotify_fd_)) {
+@@ -974,22 +991,40 @@ class SettingGetterImplKDE : public Prox
+       close(inotify_fd_);
+       inotify_fd_ = -1;
+     }
++    if (config_fd_ >= 0) {
++      close(config_fd_);
++      config_fd_ = -1;
++    }
+     debounce_timer_.reset();
+   }
+ 
+   bool SetUpNotifications(
+       ProxyConfigServiceLinux::Delegate* delegate) override {
+     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_BSD)
++    config_fd_ = HANDLE_EINTR(open(kde_config_dir_.value().c_str(), O_RDONLY));
++
++    if (config_fd_ == -1)
++      return false;
++
++    struct kevent ev;
++    EV_SET(&ev, config_fd_, EVFILT_VNODE, EV_ADD | EV_CLEAR, NOTE_WRITE,
++            0, NULL);
++    if (kevent(inotify_fd_, &ev, 1, NULL, 0, NULL) == -1)
++      return false;
++#else
+     if (inotify_add_watch(inotify_fd_, kde_config_dir_.value().c_str(),
+                           IN_MODIFY | IN_MOVED_TO) < 0) {
+       return false;
+     }
++#endif
+     notify_delegate_ = delegate;
+     if (!base::MessageLoopForIO::current()->WatchFileDescriptor(
+             inotify_fd_, true, base::MessageLoopForIO::WATCH_READ,
+@@ -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_BSD)
++    struct kevent ev;
++    int rv = kevent(inotify_fd_, NULL, 0, &ev, 1, NULL);
++
++    if (rv != -1 && (ev.flags & EV_ERROR) == 0) {
++      OnChangeNotification();
++    } else {
++      LOG(ERROR) << "kevent() failure; no longer watching kioslaverc!";
++      ShutDown();
++    }
++#else
+     OnChangeNotification();
++#endif
+   }
+   void OnFileCanWriteWithoutBlocking(int fd) override { NOTREACHED(); }
+ 
+@@ -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_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
+@@ -1321,6 +1371,7 @@ class SettingGetterImplKDE : public Prox
+         inotify_fd_ = -1;
+       }
+     }
++#endif
+     if (kioslaverc_touched) {
+       // We don't use Reset() because the timer may not yet be running.
+       // (In that case Stop() is a no-op.)
+@@ -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_;
+   std::unique_ptr<base::OneShotTimer> debounce_timer_;
diff --git a/chromium/patches/patch-net_proxy_proxy__service.cc b/chromium/patches/patch-net_proxy_proxy__service.cc
new file mode 100644
index 0000000000..a4a45158b2
--- /dev/null
+++ b/chromium/patches/patch-net_proxy_proxy__service.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- net/proxy/proxy_service.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/proxy/proxy_service.cc
+@@ -49,7 +49,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) || defined(OS_NETBSD)
+ #include "net/proxy/proxy_config_service_linux.h"
+ #elif defined(OS_ANDROID)
+ #include "net/proxy/proxy_config_service_android.h"
+@@ -1520,7 +1520,7 @@ ProxyService::CreateSystemProxyConfigSer
+              << "profile_io_data.cc::CreateProxyConfigService and this should "
+              << "be used only for examples.";
+   return base::WrapUnique(new UnsetProxyConfigService);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+   std::unique_ptr<ProxyConfigServiceLinux> linux_config_service(
+       new ProxyConfigServiceLinux());
+ 
diff --git a/chromium/patches/patch-net_socket_socks5__client__socket.cc b/chromium/patches/patch-net_socket_socks5__client__socket.cc
new file mode 100644
index 0000000000..f01ac2cf79
--- /dev/null
+++ b/chromium/patches/patch-net_socket_socks5__client__socket.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- net/socket/socks5_client_socket.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/socket/socks5_client_socket.cc
+@@ -4,6 +4,10 @@
+ 
+ #include "net/socket/socks5_client_socket.h"
+ 
++#if defined(OS_BSD)
++#include <netinet/in.h>
++#endif
++
+ #include <utility>
+ 
+ #include "base/callback_helpers.h"
diff --git a/chromium/patches/patch-net_socket_udp__socket__posix.cc b/chromium/patches/patch-net_socket_udp__socket__posix.cc
new file mode 100644
index 0000000000..88b214fc9a
--- /dev/null
+++ b/chromium/patches/patch-net_socket_udp__socket__posix.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- net/socket/udp_socket_posix.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/socket/udp_socket_posix.cc
+@@ -58,7 +58,7 @@ const int kBindRetries = 10;
+ const int kPortStart = 1024;
+ const int kPortEnd = 65535;
+ 
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+ 
+ // Returns IPv4 address in network order.
+ int GetIPv4AddressFromIndex(int socket, uint32_t index, uint32_t* address) {
+@@ -762,7 +762,7 @@ int UDPSocketPosix::SetMulticastOptions(
+   if (multicast_interface_ != 0) {
+     switch (addr_family_) {
+       case AF_INET: {
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+         ip_mreqn mreq;
+         mreq.imr_ifindex = multicast_interface_;
+         mreq.imr_address.s_addr = htonl(INADDR_ANY);
+@@ -837,7 +837,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_BSD)
+       ip_mreqn mreq;
+       mreq.imr_ifindex = multicast_interface_;
+       mreq.imr_address.s_addr = htonl(INADDR_ANY);
diff --git a/chromium/patches/patch-net_tools_get__server__time_get__server__time.cc b/chromium/patches/patch-net_tools_get__server__time_get__server__time.cc
new file mode 100644
index 0000000000..8790b69b66
--- /dev/null
+++ b/chromium/patches/patch-net_tools_get__server__time_get__server__time.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- net/tools/get_server_time/get_server_time.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/tools/get_server_time/get_server_time.cc
+@@ -46,7 +46,7 @@
+ 
+ #if defined(OS_MACOSX)
+ #include "base/mac/scoped_nsautorelease_pool.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ #include "net/proxy/proxy_config.h"
+ #include "net/proxy/proxy_config_service_fixed.h"
+ #endif
+@@ -142,7 +142,7 @@ class PrintingLogObserver : public net::
+ std::unique_ptr<net::URLRequestContext> BuildURLRequestContext(
+     net::NetLog* net_log) {
+   net::URLRequestContextBuilder builder;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // On Linux, use a fixed ProxyConfigService, since the default one
+   // depends on glib.
+   //
diff --git a/chromium/patches/patch-net_url__request_url__request__context__builder.cc b/chromium/patches/patch-net_url__request_url__request__context__builder.cc
new file mode 100644
index 0000000000..68cd090276
--- /dev/null
+++ b/chromium/patches/patch-net_url__request_url__request__context__builder.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- net/url_request/url_request_context_builder.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ net/url_request/url_request_context_builder.cc
+@@ -327,7 +327,7 @@ std::unique_ptr<URLRequestContext> URLRe
+   if (!proxy_service_) {
+     // TODO(willchan): Switch to using this code when
+     // ProxyService::CreateSystemProxyConfigService()'s signature doesn't suck.
+-#if !defined(OS_LINUX) && !defined(OS_ANDROID)
++#if !defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+     if (!proxy_config_service_) {
+       proxy_config_service_ = ProxyService::CreateSystemProxyConfigService(
+           base::ThreadTaskRunnerHandle::Get().get(),
diff --git a/chromium/patches/patch-pdf_pdfium_pdfium__engine.cc b/chromium/patches/patch-pdf_pdfium_pdfium__engine.cc
new file mode 100644
index 0000000000..7a0896afeb
--- /dev/null
+++ b/chromium/patches/patch-pdf_pdfium_pdfium__engine.cc
@@ -0,0 +1,67 @@
+$NetBSD$
+
+--- pdf/pdfium/pdfium_engine.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ pdf/pdfium/pdfium_engine.cc
+@@ -127,7 +127,7 @@ std::vector<uint32_t> GetPageNumbersFrom
+   return page_numbers;
+ }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ 
+ PP_Instance g_last_instance_id;
+ 
+@@ -629,7 +629,7 @@ bool InitializeSDK() {
+   config.m_v8EmbedderSlot = gin::kEmbedderPDFium;
+   FPDF_InitLibraryWithConfig(&config);
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // Font loading doesn't work in the renderer sandbox in Linux.
+   FPDF_SetSystemFontInfo(&g_font_info);
+ #else
+@@ -654,7 +654,7 @@ bool InitializeSDK() {
+ 
+ void ShutdownSDK() {
+   FPDF_DestroyLibrary();
+-#if !defined(OS_LINUX)
++#if !defined(OS_LINUX) && !defined(OS_BSD)
+   delete g_font_info;
+ #endif
+   TearDownV8();
+@@ -758,7 +758,7 @@ PDFiumEngine::PDFiumEngine(PDFEngine::Cl
+   IFSDK_PAUSE::user = nullptr;
+   IFSDK_PAUSE::NeedToPauseNow = Pause_NeedToPauseNow;
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // PreviewModeClient does not know its pp::Instance.
+   pp::Instance* instance = client_->GetPluginInstance();
+   if (instance)
+@@ -1510,7 +1510,7 @@ pp::Buffer_Dev PDFiumEngine::PrintPagesA
+     FPDF_ClosePage(pdf_page);
+   }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   g_last_instance_id = client_->GetPluginInstance()->pp_instance();
+ #endif
+ 
+@@ -2919,7 +2919,7 @@ bool PDFiumEngine::ContinuePaint(int pro
+   DCHECK_LT(static_cast<size_t>(progressive_index), progressive_paints_.size());
+   DCHECK(image_data);
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   g_last_instance_id = client_->GetPluginInstance()->pp_instance();
+ #endif
+ 
+@@ -3377,7 +3377,7 @@ void PDFiumEngine::SetCurrentPage(int in
+     FORM_DoPageAAction(old_page, form_, FPDFPAGE_AACTION_CLOSE);
+   }
+   most_visible_page_ = index;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+     g_last_instance_id = client_->GetPluginInstance()->pp_instance();
+ #endif
+   if (most_visible_page_ != -1 && called_do_document_action_) {
diff --git a/chromium/patches/patch-ppapi_proxy_file__io__resource.cc b/chromium/patches/patch-ppapi_proxy_file__io__resource.cc
new file mode 100644
index 0000000000..bcaf478525
--- /dev/null
+++ b/chromium/patches/patch-ppapi_proxy_file__io__resource.cc
@@ -0,0 +1,50 @@
+$NetBSD$
+
+--- ppapi/proxy/file_io_resource.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ ppapi/proxy/file_io_resource.cc
+@@ -285,17 +285,19 @@ int32_t FileIOResource::Write(int64_t of
+ 
+   if (check_quota_) {
+     int64_t increase = 0;
+-    uint64_t max_offset = 0;
++    uint64_t _max_offset = 0;
++    // (rene) avoid name collission with /usr/include/vm/vm_map.h on FreeBSD
++    // which also defines max_offset
+     bool append = (open_flags_ & PP_FILEOPENFLAG_APPEND) != 0;
+     if (append) {
+       increase = bytes_to_write;
+     } else {
+-      uint64_t max_offset = offset + bytes_to_write;
+-      if (max_offset >
++      uint64_t _max_offset = offset + bytes_to_write;
++      if (_max_offset >
+           static_cast<uint64_t>(std::numeric_limits<int64_t>::max())) {
+         return PP_ERROR_FAILED;  // amount calculation would overflow.
+       }
+-      increase = static_cast<int64_t>(max_offset) - max_written_offset_;
++      increase = static_cast<int64_t>(_max_offset) - max_written_offset_;
+     }
+ 
+     if (increase > 0) {
+@@ -319,7 +321,7 @@ int32_t FileIOResource::Write(int64_t of
+       if (append)
+         append_mode_write_amount_ += bytes_to_write;
+       else
+-        max_written_offset_ = max_offset;
++        max_written_offset_ = _max_offset;
+     }
+   }
+   return WriteValidated(offset, buffer, bytes_to_write, callback);
+@@ -597,9 +599,9 @@ void FileIOResource::OnRequestWriteQuota
+   } else {
+     DCHECK_LE(offset + bytes_to_write - max_written_offset_, granted);
+ 
+-    int64_t max_offset = offset + bytes_to_write;
+-    if (max_written_offset_ < max_offset)
+-      max_written_offset_ = max_offset;
++    int64_t _max_offset = offset + bytes_to_write;
++    if (max_written_offset_ < _max_offset)
++      max_written_offset_ = _max_offset;
+   }
+ 
+   if (callback->is_blocking()) {
diff --git a/chromium/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc b/chromium/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc
new file mode 100644
index 0000000000..2c07f1e1a7
--- /dev/null
+++ b/chromium/patches/patch-ppapi_shared__impl_private_net__address__private__impl.cc
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- ppapi/shared_impl/private/net_address_private_impl.cc.orig	2017-02-02 02:02:56.000000000 +0000
++++ ppapi/shared_impl/private/net_address_private_impl.cc
+@@ -26,9 +26,12 @@
+ #include <arpa/inet.h>
+ #include <sys/socket.h>
+ #include <sys/types.h>
++#if defined(OS_BSD)
++#include <netinet/in.h>
++#endif
+ #endif
+ 
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+ // This is a bit evil, but it's standard operating procedure for |s6_addr|....
+ #define s6_addr16 __u6_addr.__u6_addr16
+ #endif
diff --git a/chromium/patches/patch-ppapi_tests_extensions_BUILD.gn b/chromium/patches/patch-ppapi_tests_extensions_BUILD.gn
new file mode 100644
index 0000000000..b1c806835c
--- /dev/null
+++ b/chromium/patches/patch-ppapi_tests_extensions_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ppapi/tests/extensions/BUILD.gn.orig	2017-02-02 02:02:56.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/patches/patch-printing_BUILD.gn b/chromium/patches/patch-printing_BUILD.gn
new file mode 100644
index 0000000000..d8ca55ed2c
--- /dev/null
+++ b/chromium/patches/patch-printing_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- printing/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
++++ printing/BUILD.gn
+@@ -129,7 +129,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)
+@@ -206,7 +206,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/patches/patch-printing_cups__config__helper.py b/chromium/patches/patch-printing_cups__config__helper.py
new file mode 100644
index 0000000000..c679054a00
--- /dev/null
+++ b/chromium/patches/patch-printing_cups__config__helper.py
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- printing/cups_config_helper.py.orig	2017-02-02 02:02:57.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/patches/patch-remoting_host_BUILD.gn b/chromium/patches/patch-remoting_host_BUILD.gn
new file mode 100644
index 0000000000..d0bb541ade
--- /dev/null
+++ b/chromium/patches/patch-remoting_host_BUILD.gn
@@ -0,0 +1,49 @@
+$NetBSD$
+
+--- remoting/host/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
++++ remoting/host/BUILD.gn
+@@ -326,7 +326,7 @@ static_library("host") {
+     deps += [ "//components/policy:generated" ]
+   }
+ 
+-  if (is_linux && !is_chromeos) {
++  if ((is_linux || is_bsd) && !is_chromeos) {
+     libs += [ "pam" ]
+   }
+ 
+@@ -349,7 +349,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",
+@@ -538,7 +538,7 @@ source_set("unit_tests") {
+     "touch_injector_win_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) {
+@@ -755,7 +755,7 @@ if (enable_me2me_host) {
+         deps += [ "//build/config/linux/gtk2" ]
+       }
+     }
+-    if ((is_linux && !is_chromeos) || is_mac) {
++    if ((is_linux && !is_chromeos) || is_mac || is_bsd) {
+       libs = [ "pam" ]
+     }
+ 
+@@ -825,7 +825,7 @@ if (enable_me2me_host) {
+       }
+     }
+   }
+-  if (is_chrome_branded && enable_me2me_host && is_linux && !is_chromeos) {
++  if (is_chrome_branded && enable_me2me_host && is_linux && is_bsd && !is_chromeos) {
+     group("remoting_me2me_host_archive") {
+       deps = [
+         "//remoting/host/installer/linux:remoting_me2me_host_archive",
diff --git a/chromium/patches/patch-sdch_BUILD.gn b/chromium/patches/patch-sdch_BUILD.gn
new file mode 100644
index 0000000000..3a5a253132
--- /dev/null
+++ b/chromium/patches/patch-sdch_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- sdch/BUILD.gn.orig	2017-02-02 02:02:57.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/patches/patch-services_service__manager_runner_host_BUILD.gn b/chromium/patches/patch-services_service__manager_runner_host_BUILD.gn
new file mode 100644
index 0000000000..b19a514491
--- /dev/null
+++ b/chromium/patches/patch-services_service__manager_runner_host_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- services/service_manager/runner/host/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
++++ services/service_manager/runner/host/BUILD.gn
+@@ -51,7 +51,7 @@ source_set("child_process_base") {
+     "//services/service_manager/runner/common",
+   ]
+ 
+-  if (is_linux && !is_android) {
++  if (is_linux && !is_android && !is_bsd) {
+     sources += [
+       "linux_sandbox.cc",
+       "linux_sandbox.h",
diff --git a/chromium/patches/patch-services_service__manager_standalone_context.cc b/chromium/patches/patch-services_service__manager_standalone_context.cc
new file mode 100644
index 0000000000..7e7f52a93a
--- /dev/null
+++ b/chromium/patches/patch-services_service__manager_standalone_context.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- services/service_manager/standalone/context.cc.orig	2017-02-02 02:02:57.000000000 +0000
++++ services/service_manager/standalone/context.cc
+@@ -208,7 +208,7 @@ void Context::Init(std::unique_ptr<InitP
+       tracing::mojom::StartupPerformanceDataCollectorPtr collector;
+       ConnectToInterface(service_manager(), source_identity, tracing_identity,
+                          &collector);
+-#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->SetServiceManagerProcessCreationTime(
diff --git a/chromium/patches/patch-services_ui_BUILD.gn b/chromium/patches/patch-services_ui_BUILD.gn
new file mode 100644
index 0000000000..4e891485c3
--- /dev/null
+++ b/chromium/patches/patch-services_ui_BUILD.gn
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- services/ui/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
++++ services/ui/BUILD.gn
+@@ -13,7 +13,6 @@ group("all") {
+   testonly = true
+   deps = [
+     ":ui",
+-    "//services/ui/ime/test_ime_driver",
+     "//services/ui/test_wm",
+   ]
+ }
+@@ -38,7 +37,6 @@ service("ui") {
+ 
+   data_deps = [
+     ":manifest",
+-    "//services/ui/ime/test_ime_driver",
+   ]
+ 
+   resources = [
diff --git a/chromium/patches/patch-services_ui_ime_BUILD.gn b/chromium/patches/patch-services_ui_ime_BUILD.gn
new file mode 100644
index 0000000000..7f9d771fde
--- /dev/null
+++ b/chromium/patches/patch-services_ui_ime_BUILD.gn
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- services/ui/ime/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
++++ services/ui/ime/BUILD.gn
+@@ -50,7 +50,6 @@ test("mus_ime_unittests") {
+     ":test_manifest",
+     ":lib",
+     "//services/ui",
+-    "//services/ui/ime/test_ime_driver",
+   ]
+ }
+ 
diff --git a/chromium/patches/patch-services_ui_public_cpp_gles2__context.cc b/chromium/patches/patch-services_ui_public_cpp_gles2__context.cc
new file mode 100644
index 0000000000..3a6c476dec
--- /dev/null
+++ b/chromium/patches/patch-services_ui_public_cpp_gles2__context.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- services/ui/public/cpp/gles2_context.cc.orig	2017-02-02 02:02:57.000000000 +0000
++++ services/ui/public/cpp/gles2_context.cc
+@@ -46,7 +46,7 @@ bool GLES2Context::Initialize(
+   gpu::CommandBuffer* command_buffer = command_buffer_proxy_impl_.get();
+   gpu::GpuControl* gpu_control = command_buffer_proxy_impl_.get();
+ 
+-  constexpr gpu::SharedMemoryLimits default_limits;
++  constexpr gpu::SharedMemoryLimits default_limits = gpu::SharedMemoryLimits();
+   gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer));
+   if (!gles2_helper_->Initialize(default_limits.command_buffer_size))
+     return false;
diff --git a/chromium/patches/patch-services_ui_surfaces_surfaces__context__provider.cc b/chromium/patches/patch-services_ui_surfaces_surfaces__context__provider.cc
new file mode 100644
index 0000000000..35a5252116
--- /dev/null
+++ b/chromium/patches/patch-services_ui_surfaces_surfaces__context__provider.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- services/ui/surfaces/surfaces_context_provider.cc.orig	2017-02-02 02:02:57.000000000 +0000
++++ services/ui/surfaces/surfaces_context_provider.cc
+@@ -78,7 +78,7 @@ bool SurfacesContextProvider::BindToCurr
+   gpu::CommandBuffer* command_buffer = command_buffer_proxy_impl_.get();
+ 
+   gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer));
+-  constexpr gpu::SharedMemoryLimits default_limits;
++  constexpr gpu::SharedMemoryLimits default_limits = gpu::SharedMemoryLimits();
+   if (!gles2_helper_->Initialize(default_limits.command_buffer_size))
+     return false;
+   gles2_helper_->SetAutomaticFlushes(false);
diff --git a/chromium/patches/patch-skia_BUILD.gn b/chromium/patches/patch-skia_BUILD.gn
new file mode 100644
index 0000000000..3bc005d871
--- /dev/null
+++ b/chromium/patches/patch-skia_BUILD.gn
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- skia/BUILD.gn.orig	2017-02-02 02:02:57.000000000 +0000
++++ skia/BUILD.gn
+@@ -135,7 +135,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",
+@@ -363,7 +363,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.cpp",
+       "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp",
+@@ -375,14 +375,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",
+@@ -421,7 +421,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/patches/patch-skia_ext_SkMemory__new__handler.cpp b/chromium/patches/patch-skia_ext_SkMemory__new__handler.cpp
new file mode 100644
index 0000000000..e2bcf9438d
--- /dev/null
+++ b/chromium/patches/patch-skia_ext_SkMemory__new__handler.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- skia/ext/SkMemory_new_handler.cpp.orig	2017-02-02 02:02:57.000000000 +0000
++++ skia/ext/SkMemory_new_handler.cpp
+@@ -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;
+-#if  defined(OS_IOS)
++#if  defined(OS_IOS) || defined(OS_BSD)
+     result = malloc(size);
+ #else
+     // It's the responsibility of the caller to check the return value.
+@@ -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;
+-#if  defined(OS_IOS)
++#if  defined(OS_IOS) || defined(OS_BSD)
+     result = calloc(1, size);
+ #else
+     // It's the responsibility of the caller to check the return value.
diff --git a/chromium/patches/patch-skia_ext_platform__canvas.h b/chromium/patches/patch-skia_ext_platform__canvas.h
new file mode 100644
index 0000000000..f790a468a1
--- /dev/null
+++ b/chromium/patches/patch-skia_ext_platform__canvas.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- skia/ext/platform_canvas.h.orig	2017-02-02 02:02:57.000000000 +0000
++++ skia/ext/platform_canvas.h
+@@ -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(__NetBSD__)
+   // Linux ---------------------------------------------------------------------
+ 
+   // Construct a canvas from the given memory region. The memory is not cleared
diff --git a/chromium/patches/patch-testing_gtest_src_gtest.cc b/chromium/patches/patch-testing_gtest_src_gtest.cc
new file mode 100644
index 0000000000..25466f49ce
--- /dev/null
+++ b/chromium/patches/patch-testing_gtest_src_gtest.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- testing/gtest/src/gtest.cc.orig	2017-02-02 02:03:46.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/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp b/chromium/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
new file mode 100644
index 0000000000..42b41ba982
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_bindings_core_v8_V8ScriptRunner.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp.orig	2017-02-02 02:03:08.000000000 +0000
++++ third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
+@@ -46,6 +46,8 @@
+ 
+ #if OS(WIN)
+ #include <malloc.h>
++#elif OS(FREEBSD) || OS(NETBSD)
++#include <stdlib.h>
+ #else
+ #include <alloca.h>
+ #endif
diff --git a/chromium/patches/patch-third__party_WebKit_Source_core_layout_BUILD.gn b/chromium/patches/patch-third__party_WebKit_Source_core_layout_BUILD.gn
new file mode 100644
index 0000000000..0ce9d7d07b
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_core_layout_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/core/layout/BUILD.gn.orig	2017-02-02 02:03:09.000000000 +0000
++++ third_party/WebKit/Source/core/layout/BUILD.gn
+@@ -361,7 +361,7 @@ blink_core_sources("layout") {
+     sources += [ "LayoutThemeFontProviderDefault.cpp" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     sources += [
+       "LayoutThemeLinux.cpp",
+       "LayoutThemeLinux.h",
diff --git a/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp
new file mode 100644
index 0000000000..5d276c14fd
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/fonts/FontCache.cpp.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/platform/fonts/FontCache.cpp
+@@ -62,9 +62,9 @@ using namespace WTF;
+ 
+ namespace blink {
+ 
+-#if !OS(WIN) && !OS(LINUX)
++#if !OS(WIN) && !OS(LINUX) && !OS(FREEBSD) && !OS(OPENBSD) && !OS(NETBSD)
+ FontCache::FontCache() : m_purgePreventCount(0), m_fontManager(nullptr) {}
+-#endif  // !OS(WIN) && !OS(LINUX)
++#endif  // !OS(WIN) && !OS(LINUX) && !OS(FREEBSD) && !OS(OPENBSD)
+ 
+ typedef HashMap<unsigned,
+                 std::unique_ptr<FontPlatformData>,
diff --git a/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h
new file mode 100644
index 0000000000..9b48566add
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontCache.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/fonts/FontCache.h.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/platform/fonts/FontCache.h
+@@ -122,7 +122,7 @@ class PLATFORM_EXPORT FontCache {
+ #else
+   static const AtomicString& legacySystemFontFamily();
+ #endif
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(FREEBSD) || OS(NETBSD)
+   static void setSystemFontFamily(const AtomicString&);
+ #endif
+ 
+@@ -232,7 +232,7 @@ class PLATFORM_EXPORT FontCache {
+                                    const FontFaceCreationParams&,
+                                    CString& name);
+ 
+-#if OS(ANDROID) || OS(LINUX)
++#if OS(ANDROID) || OS(LINUX) || OS(FREEBSD) || OS(OPENBSD) || OS(NETBSD)
+   static AtomicString getFamilyNameForCharacter(SkFontMgr*,
+                                                 UChar32,
+                                                 const FontDescription&,
diff --git a/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp
new file mode 100644
index 0000000000..fa1980f419
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.cpp
@@ -0,0 +1,49 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp
+@@ -99,7 +99,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),
+@@ -122,7 +122,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())),
+@@ -155,7 +155,7 @@ FontPlatformData::FontPlatformData(sk_sp
+       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())),
+@@ -200,7 +200,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
+ 
+@@ -226,7 +226,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/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h
new file mode 100644
index 0000000000..d4de0ce178
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_FontPlatformData.h
@@ -0,0 +1,34 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/fonts/FontPlatformData.h.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/platform/fonts/FontPlatformData.h
+@@ -47,9 +47,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;
+@@ -149,7 +149,7 @@ class PLATFORM_EXPORT FontPlatformData {
+   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; }
+@@ -177,7 +177,7 @@ class PLATFORM_EXPORT FontPlatformData {
+   FontOrientation m_orientation;
+ 
+  private:
+-#if OS(LINUX) || OS(ANDROID)
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+   FontRenderStyle m_style;
+ #endif
+ 
diff --git a/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp
new file mode 100644
index 0000000000..218766c43f
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_SimpleFontData.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp
+@@ -50,7 +50,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
+@@ -105,7 +105,7 @@ void SimpleFontData::platformInit(bool s
+   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).
+@@ -149,7 +149,7 @@ void SimpleFontData::platformInit(bool s
+       ascent = SkScalarRoundToScalar(-metrics.fAscent);
+       descent = SkScalarRoundToScalar(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
diff --git a/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp
new file mode 100644
index 0000000000..bdd8eae395
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_platform_fonts_skia_FontCacheSkia.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp
+@@ -67,7 +67,7 @@ AtomicString toAtomicString(const SkStri
+   return AtomicString::fromUTF8(str.c_str(), str.size());
+ }
+ 
+-#if OS(ANDROID) || OS(LINUX)
++#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:
+@@ -234,7 +234,7 @@ sk_sp<SkTypeface> FontCache::createTypef
+   }
+ #endif
+ 
+-#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
diff --git a/chromium/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp b/chromium/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp
new file mode 100644
index 0000000000..e4f323469a
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_platform_heap_GCInfo.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/heap/GCInfo.cpp.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/platform/heap/GCInfo.cpp
+@@ -7,6 +7,8 @@
+ #include "platform/heap/Handle.h"
+ #include "platform/heap/Heap.h"
+ 
++#include <stdlib.h>
++
+ namespace blink {
+ 
+ // GCInfo indices start from 1 for heap objects, with 0 being treated
diff --git a/chromium/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp b/chromium/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp
new file mode 100644
index 0000000000..a6dcb67ae4
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_platform_heap_StackFrameDepth.cpp
@@ -0,0 +1,51 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/platform/heap/StackFrameDepth.cpp
+@@ -6,6 +6,10 @@
+ 
+ #include "public/platform/Platform.h"
+ 
++#if OS(FREEBSD)
++#include <pthread_np.h>
++#endif
++
+ #if OS(WIN)
+ #include <stddef.h>
+ #include <windows.h>
+@@ -68,7 +72,7 @@ size_t StackFrameDepth::getUnderestimate
+ // FIXME: On Mac OSX and Linux, this method cannot estimate stack size
+ // correctly for the main thread.
+ 
+-#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD)
++#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD) || OS(NETBSD)
+   // pthread_getattr_np() can fail if the thread is not invoked by
+   // pthread_create() (e.g., the main thread of webkit_unit_tests).
+   // If so, a conservative size estimate is returned.
+@@ -89,7 +93,7 @@ size_t StackFrameDepth::getUnderestimate
+     pthread_attr_destroy(&attr);
+     return size;
+   }
+-#if OS(FREEBSD)
++#if OS(FREEBSD) || OS(NETBSD)
+   pthread_attr_destroy(&attr);
+ #endif
+ 
+@@ -135,7 +139,7 @@ size_t StackFrameDepth::getUnderestimate
+ }
+ 
+ void* StackFrameDepth::getStackStart() {
+-#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD)
++#if defined(__GLIBC__) || OS(ANDROID) || OS(FREEBSD) || OS(NETBSD)
+   pthread_attr_t attr;
+   int error;
+ #if OS(FREEBSD)
+@@ -152,7 +156,7 @@ void* StackFrameDepth::getStackStart() {
+     pthread_attr_destroy(&attr);
+     return reinterpret_cast<uint8_t*>(base) + size;
+   }
+-#if OS(FREEBSD)
++#if OS(FREEBSD) || OS(NETBSD)
+   pthread_attr_destroy(&attr);
+ #endif
+ #if defined(__GLIBC__)
diff --git a/chromium/patches/patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp b/chromium/patches/patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp
new file mode 100644
index 0000000000..7773574c2f
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_web_PopupMenuImpl.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/web/PopupMenuImpl.cpp.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/web/PopupMenuImpl.cpp
+@@ -154,7 +154,7 @@ class PopupMenuImpl::ItemIterationContex
+         m_isInGroup(false),
+         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/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp b/chromium/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp
new file mode 100644
index 0000000000..eca6684e70
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_wtf_Assertions.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/Assertions.cpp.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/wtf/Assertions.cpp
+@@ -60,7 +60,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>
+@@ -164,7 +164,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
+@@ -215,7 +215,7 @@ class FrameToNameScope {
+ };
+ 
+ FrameToNameScope::FrameToNameScope(void* addr) : 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/patches/patch-third__party_WebKit_Source_wtf_Atomics.h b/chromium/patches/patch-third__party_WebKit_Source_wtf_Atomics.h
new file mode 100644
index 0000000000..1ba93f7ba4
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_wtf_Atomics.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/Atomics.h.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/wtf/Atomics.h
+@@ -176,7 +176,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/patches/patch-third__party_WebKit_Source_wtf_BUILD.gn b/chromium/patches/patch-third__party_WebKit_Source_wtf_BUILD.gn
new file mode 100644
index 0000000000..dcb83326f5
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_wtf_BUILD.gn
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/BUILD.gn.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/wtf/BUILD.gn
+@@ -284,6 +284,10 @@ component("wtf") {
+     libs = [ "dl" ]
+   }
+ 
++  if (is_bsd) {
++    libs = [ "execinfo" ]
++  }
++
+   if (is_mac) {
+     libs = [
+       "CoreFoundation.framework",
diff --git a/chromium/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h b/chromium/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h
new file mode 100644
index 0000000000..d0dbab5d88
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_wtf_ByteSwap.h
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/ByteSwap.h.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/WebKit/Source/wtf/ByteSwap.h
+@@ -60,15 +60,21 @@ ALWAYS_INLINE uint16_t bswap16(uint16_t 
+ 
+ #else
+ 
++#ifndef bswap64
+ ALWAYS_INLINE uint64_t bswap64(uint64_t x) {
+   return __builtin_bswap64(x);
+ }
++#endif
++#ifndef bswap32
+ ALWAYS_INLINE uint32_t bswap32(uint32_t x) {
+   return __builtin_bswap32(x);
+ }
++#endif
++#ifndef bswap16
+ ALWAYS_INLINE uint16_t bswap16(uint16_t x) {
+   return __builtin_bswap16(x);
+ }
++#endif
+ 
+ #endif
+ 
diff --git a/chromium/patches/patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h b/chromium/patches/patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h
new file mode 100644
index 0000000000..631c7a62df
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_wtf_ContainerAnnotations.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/ContainerAnnotations.h.orig	2017-02-02 02:03:10.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/patches/patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp b/chromium/patches/patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp
new file mode 100644
index 0000000000..8d3f60c7b7
--- /dev/null
+++ b/chromium/patches/patch-third__party_WebKit_Source_wtf_ThreadingPthreads.cpp
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/WebKit/Source/wtf/ThreadingPthreads.cpp.orig	2017-02-02 02:03:10.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(FREEBSD)
++#include <pthread_np.h>
++#endif
++
++#if OS(LINUX) || OS(ANDROID) || OS(BSD)
+ #include <unistd.h>
+ #endif
+ 
+@@ -91,6 +95,8 @@ ThreadIdentifier currentThread() {
+   return pthread_mach_thread_np(pthread_self());
+ #elif OS(LINUX)
+   return syscall(__NR_gettid);
++#elif OS(FREEBSD)
++  return pthread_getthreadid_np();
+ #elif OS(ANDROID)
+   return gettid();
+ #else
diff --git a/chromium/patches/patch-third__party_angle_BUILD.gn b/chromium/patches/patch-third__party_angle_BUILD.gn
new file mode 100644
index 0000000000..7f25b94f76
--- /dev/null
+++ b/chromium/patches/patch-third__party_angle_BUILD.gn
@@ -0,0 +1,39 @@
+$NetBSD$
+
+--- third_party/angle/BUILD.gn.orig	2017-02-02 02:03:46.000000000 +0000
++++ third_party/angle/BUILD.gn
+@@ -16,6 +16,12 @@ if (ozone_platform_gbm) {
+   }
+ }
+ 
++if (use_x11) {
++  pkg_config("x11") {
++    packages = [ "x11", "xi", "xext" ]
++  }
++}
++
+ angle_git_is_present = exec_script("src/commit_id.py",
+                                    [
+                                      "check",
+@@ -340,11 +346,7 @@ static_library("libANGLE") {
+     if (use_x11) {
+       sources += rebase_path(gles_gypi.libangle_gl_glx_sources, ".", "src")
+       deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ]
+-      libs += [
+-        "X11",
+-        "Xi",
+-        "Xext",
+-      ]
++      configs += [ ":x11" ]
+     }
+     if (is_mac) {
+       sources += rebase_path(gles_gypi.libangle_gl_cgl_sources, ".", "src")
+@@ -486,7 +488,7 @@ util_gypi = exec_script("//build/gypi_to
+ 
+ config("angle_util_config") {
+   include_dirs = [ "util" ]
+-  if (is_linux && use_x11) {
++  if ((is_linux || is_bsd) && use_x11) {
+     libs = [ "X11" ]
+   }
+ }
diff --git a/chromium/patches/patch-third__party_angle_gni_angle.gni b/chromium/patches/patch-third__party_angle_gni_angle.gni
new file mode 100644
index 0000000000..e77b3dd93e
--- /dev/null
+++ b/chromium/patches/patch-third__party_angle_gni_angle.gni
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/angle/gni/angle.gni.orig	2017-02-02 02:03:46.000000000 +0000
++++ third_party/angle/gni/angle.gni
+@@ -20,6 +20,8 @@ if (is_win) {
+   import("//build/config/win/visual_studio_version.gni")
+ } else if (is_linux && use_x11 && !is_chromeos) {
+   angle_enable_gl = true
++} else if (is_bsd) {
++  angle_enable_gl = true
+ } else if (is_mac || ozone_platform_gbm) {
+   angle_enable_gl = true
+ } else if (is_android) {
diff --git a/chromium/patches/patch-third__party_angle_src_tests_BUILD.gn b/chromium/patches/patch-third__party_angle_src_tests_BUILD.gn
new file mode 100644
index 0000000000..61b8c060bf
--- /dev/null
+++ b/chromium/patches/patch-third__party_angle_src_tests_BUILD.gn
@@ -0,0 +1,67 @@
+$NetBSD$
+
+--- third_party/angle/src/tests/BUILD.gn.orig	2017-02-02 02:03:47.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"),
+@@ -82,7 +82,7 @@ if (is_win || is_linux || is_mac || is_a
+       "//third_party/angle:libANGLE_config",
+     ]
+ 
+-    if (is_linux && !is_component_build) {
++    if ((is_linux || is_bsd) && !is_component_build) {
+       # Set rpath to find libEGL.so and libGLESv2.so even in a non-component build.
+       configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+     }
+@@ -175,7 +175,7 @@ if (build_angle_deqp_tests) {
+     # Ask the system headers to expose all the regular function otherwise
+     # dEQP doesn't compile and produces warnings about implicitly defined
+     # functions.
+-    if (is_linux) {
++    if (is_linux || is_bsd) {
+       # This has to be GNU_SOURCE as on Linux dEQP uses syscall()
+       defines += [ "_GNU_SOURCE" ]
+     }
+@@ -198,7 +198,7 @@ if (build_angle_deqp_tests) {
+     ]
+   }
+ 
+-  if (is_linux || is_android) {
++  if (is_linux || is_android || is_bsd) {
+     deqp_undefine_configs += [ "//build/config/gcc:no_exceptions" ]
+   }
+ 
+@@ -234,7 +234,7 @@ if (build_angle_deqp_tests) {
+     if (is_win) {
+       sources += rebase_path(deqp_gypi.deqp_libtester_sources_win, ".", "../..")
+     }
+-    if (is_linux || is_android) {
++    if (is_linux || is_android || is_bsd) {
+       sources +=
+           rebase_path(deqp_gypi.deqp_libtester_sources_unix, ".", "../..")
+     }
+@@ -262,7 +262,7 @@ if (build_angle_deqp_tests) {
+ 
+     # Taken from gpu/BUILD.gn
+     # TODO(jmadill): this should be in a shared location
+-    if (is_linux && !is_chromecast) {
++    if ((is_linux || is_bsd) && !is_chromecast) {
+       libs = [ "pci" ]
+     }
+   }
+@@ -335,7 +335,7 @@ if (build_angle_deqp_tests) {
+         "../../../deqp/src/data/",
+       ]
+ 
+-      if (is_linux && !is_component_build) {
++      if ((is_linux || is_bsd) && !is_component_build) {
+         # Set rpath to find *.so files even in a non-component build.
+         configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
+       }
diff --git a/chromium/patches/patch-third__party_boringssl_BUILD.gn b/chromium/patches/patch-third__party_boringssl_BUILD.gn
new file mode 100644
index 0000000000..4c0a200672
--- /dev/null
+++ b/chromium/patches/patch-third__party_boringssl_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/boringssl/BUILD.gn.orig	2017-02-02 02:03:10.000000000 +0000
++++ third_party/boringssl/BUILD.gn
+@@ -83,7 +83,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" ]
+@@ -91,14 +91,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
+     } else {
+       public_configs = [ ":no_asm_config" ]
diff --git a/chromium/patches/patch-third__party_boringssl_src_crypto_ex__data.c b/chromium/patches/patch-third__party_boringssl_src_crypto_ex__data.c
new file mode 100644
index 0000000000..58887f23eb
--- /dev/null
+++ b/chromium/patches/patch-third__party_boringssl_src_crypto_ex__data.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- third_party/boringssl/src/crypto/ex_data.c.orig	2017-02-02 02:03:46.000000000 +0000
++++ third_party/boringssl/src/crypto/ex_data.c
+@@ -188,7 +188,9 @@ int CRYPTO_set_ex_data(CRYPTO_EX_DATA *a
+     }
+   }
+ 
+-  sk_void_set(ad->sk, index, val);
++  // expression result unused; should this cast be to 'void'?
++  // seems it should, feel free to investigate those #def
++  (void) sk_void_set(ad->sk, index, val);
+   return 1;
+ }
+ 
diff --git a/chromium/patches/patch-third__party_boringssl_src_include_openssl_thread.h b/chromium/patches/patch-third__party_boringssl_src_include_openssl_thread.h
new file mode 100644
index 0000000000..7652e24b65
--- /dev/null
+++ b/chromium/patches/patch-third__party_boringssl_src_include_openssl_thread.h
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- 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
+@@ -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];
++#if defined(__NetBSD__)
++  uint8_t      nbpad[64 + 8];
++#endif
+ } CRYPTO_MUTEX;
+ #endif
+ 
diff --git a/chromium/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h b/chromium/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h
new file mode 100644
index 0000000000..fea4a67fa8
--- /dev/null
+++ b/chromium/patches/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h.orig	2017-02-02 02:03:11.000000000 +0000
++++ third_party/cacheinvalidation/src/google/cacheinvalidation/include/types.h
+@@ -334,6 +334,8 @@ class Status {
+      */
+     PERMANENT_FAILURE
+   };
++  
++  Status() : code_(SUCCESS), message_() {}
+ 
+   /* Creates a new Status object given the code and message. */
+   Status(Code code, const string& message) : code_(code), message_(message) {}
diff --git a/chromium/patches/patch-third__party_expat_BUILD.gn b/chromium/patches/patch-third__party_expat_BUILD.gn
new file mode 100644
index 0000000000..71903cba44
--- /dev/null
+++ b/chromium/patches/patch-third__party_expat_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/expat/BUILD.gn.orig	2017-02-02 02:03:11.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/patches/patch-third__party_ffmpeg_BUILD.gn b/chromium/patches/patch-third__party_ffmpeg_BUILD.gn
new file mode 100644
index 0000000000..b44b40ca1a
--- /dev/null
+++ b/chromium/patches/patch-third__party_ffmpeg_BUILD.gn
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- third_party/ffmpeg/BUILD.gn.orig	2017-02-02 02:03:48.000000000 +0000
++++ third_party/ffmpeg/BUILD.gn
+@@ -6,8 +6,13 @@ import("ffmpeg_options.gni")
+ import("ffmpeg_generated.gni")
+ 
+ # Path to platform configuration files.
+-platform_config_root =
+-    "chromium/config/$ffmpeg_branding/$os_config/$ffmpeg_arch"
++if (!is_bsd) {
++  platform_config_root =
++      "chromium/config/$ffmpeg_branding/$os_config/$ffmpeg_arch"
++} else {
++  platform_config_root =
++      "chromium/config/$ffmpeg_branding/linux/$ffmpeg_arch"
++}
+ 
+ has_yasm_deps =
+     ffmpeg_yasm_sources != [] &&
diff --git a/chromium/patches/patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h b/chromium/patches/patch-third__party_ffmpeg_chromium_config_Chrome_netbsd_x64_config.h
new file mode 100644
index 0000000000..d51c0754c1
--- /dev/null
+++ b/chromium/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/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni b/chromium/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
new file mode 100644
index 0000000000..d817c16e18
--- /dev/null
+++ b/chromium/patches/patch-third__party_ffmpeg_ffmpeg__generated.gni
@@ -0,0 +1,287 @@
+$NetBSD$
+
+--- third_party/ffmpeg/ffmpeg_generated.gni.orig	2017-02-02 02:03:48.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) || (is_android && current_cpu == "arm64") || (is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || (is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm") || (is_linux && current_cpu == "arm64") || (is_linux && current_cpu == "mipsel") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
++if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && current_cpu == "arm64") || (is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || (is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm") || ((is_linux || is_bsd) && current_cpu == "arm64") || ((is_linux || is_bsd) && current_cpu == "mipsel") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
+   ffmpeg_c_sources += [
+     "libavcodec/allcodecs.c",
+     "libavcodec/autorename_libavcodec_flacdec.c",
+@@ -160,7 +160,7 @@ if ((is_android && current_cpu == "arm" 
+   ]
+ }
+ 
+-if ((is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm") || (is_linux && current_cpu == "arm64") || (is_linux && current_cpu == "mipsel") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm") || ((is_linux || is_bsd) && current_cpu == "arm64") || ((is_linux || is_bsd) && current_cpu == "mipsel") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
+   ffmpeg_c_sources += [
+     "libavcodec/autorename_libavcodec_hpeldsp.c",
+     "libavcodec/autorename_libavcodec_videodsp.c",
+@@ -175,7 +175,7 @@ if ((is_linux && current_cpu == "arm" &&
+   ]
+ }
+ 
+-if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && 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 == "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_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && curre
nt_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (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_win && ffmpeg_branding == "Chrome")) {
++if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && 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 == "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_bsd) && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || ((is_linux || is_b
sd) && 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 == "ChromeOS") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "Chrome") || ((is_linux || is_bsd) && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_win && ffmpeg_branding == "Chrome")) {
+   ffmpeg_c_sources += [
+     "libavcodec/aac_ac3_parser.c",
+     "libavcodec/aac_parser.c",
+@@ -212,7 +212,7 @@ if ((current_cpu == "x64" && ffmpeg_bran
+   ]
+ }
+ 
+-if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
++if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
+   ffmpeg_c_sources += [
+     "libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c",
+     "libavcodec/x86/constants.c",
+@@ -225,7 +225,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 && ffmpeg_branding == "Chrome") || (is_win && 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 && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Chrome")) {
+   ffmpeg_c_sources += [
+     "libavcodec/cabac.c",
+     "libavcodec/h2645_parse.c",
+@@ -257,7 +257,7 @@ if ((is_android && current_cpu == "arm" 
+   ]
+ }
+ 
+-if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm")) {
++if ((is_android && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm")) {
+   ffmpeg_c_sources += [
+     "libavcodec/arm/fft_fixed_init_arm.c",
+     "libavcodec/arm/fft_init_arm.c",
+@@ -276,7 +276,7 @@ if ((is_android && current_cpu == "arm" 
+   ]
+ }
+ 
+-if ((is_android && current_cpu == "x64") || (is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
++if ((is_android && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
+   ffmpeg_yasm_sources += [
+     "libavcodec/x86/fft.asm",
+     "libavcodec/x86/flacdsp.asm",
+@@ -288,7 +288,7 @@ if ((is_android && current_cpu == "x64")
+   ]
+ }
+ 
+-if ((is_linux && current_cpu == "x64") || (is_linux && current_cpu == "x86") || (is_mac) || (is_win)) {
++if (((is_linux || is_bsd) && current_cpu == "x64") || ((is_linux || is_bsd) && current_cpu == "x86") || (is_mac) || (is_win)) {
+   ffmpeg_c_sources += [
+     "libavcodec/x86/autorename_libavcodec_x86_videodsp_init.c",
+     "libavcodec/x86/h264_intrapred_init.c",
+@@ -308,7 +308,7 @@ if ((is_linux && current_cpu == "x64") |
+   ]
+ }
+ 
+-if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && 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_win && ffmpeg_branding == "Chrome")) {
++if ((current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && 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_win && ffmpeg_branding == "Chrome")) {
+   ffmpeg_c_sources += [
+     "libavcodec/x86/aacpsdsp_init.c",
+     "libavcodec/x86/dct_init.c",
+@@ -317,7 +317,7 @@ if ((current_cpu == "x64" && ffmpeg_bran
+   ]
+ }
+ 
+-if ((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_win && ffmpeg_branding == "Chrome")) {
++if ((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_win && ffmpeg_branding == "Chrome")) {
+   ffmpeg_yasm_sources += [
+     "libavcodec/x86/aacpsdsp.asm",
+     "libavcodec/x86/dct32.asm",
+@@ -326,7 +326,7 @@ if ((current_cpu == "x64" && ffmpeg_bran
+   ]
+ }
+ 
+-if ((is_linux && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm")) {
++if (((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm")) {
+   ffmpeg_c_sources += [
+     "libavcodec/arm/h264pred_init_arm.c",
+     "libavcodec/arm/hpeldsp_init_arm.c",
+@@ -346,13 +346,13 @@ if ((is_linux && current_cpu == "arm" &&
+   ]
+ }
+ 
+-if ((is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || (is_linux && current_cpu == "mipsel")) {
++if ((is_android && current_cpu == "mips64el") || (is_android && current_cpu == "mipsel") || ((is_linux || is_bsd) && current_cpu == "mipsel")) {
+   ffmpeg_c_sources += [
+     "libavutil/mips/float_dsp_mips.c",
+   ]
+ }
+ 
+-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 || 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",
+@@ -407,7 +407,7 @@ if ((is_linux && current_cpu == "arm" &&
+   ]
+ }
+ 
+-if ((is_android && current_cpu == "arm64") || (is_linux && current_cpu == "arm64")) {
++if ((is_android && current_cpu == "arm64") || ((is_linux || is_bsd) && current_cpu == "arm64")) {
+   ffmpeg_c_sources += [
+     "libavcodec/aarch64/fft_init_aarch64.c",
+     "libavcodec/aarch64/vorbisdsp_init.c",
+@@ -422,7 +422,7 @@ if ((is_android && current_cpu == "arm64
+   ]
+ }
+ 
+-if ((is_android && current_cpu == "arm" && arm_use_neon && 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_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",
+@@ -433,7 +433,7 @@ if ((is_android && current_cpu == "arm" 
+   ]
+ }
+ 
+-if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_linux && current_cpu == "arm" && arm_use_neon)) {
++if ((is_android && current_cpu == "arm" && arm_use_neon) || ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon)) {
+   ffmpeg_c_sources += [
+     "libavutil/arm/float_dsp_init_neon.c",
+   ]
+@@ -448,7 +448,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" && ffmpeg_branding == "Chrome") || (is_linux && 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",
+@@ -459,7 +459,7 @@ if ((is_linux && current_cpu == "arm" &&
+   ]
+ }
+ 
+-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 && ffmpeg_branding == "Chrome") || (is_win && 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 && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Chrome")) {
+   ffmpeg_c_sources += [
+     "libavcodec/x86/h264_qpel.c",
+     "libavcodec/x86/h264chroma_init.c",
+@@ -480,7 +480,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 || 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",
+@@ -489,7 +489,7 @@ if ((is_android && current_cpu == "mips6
+   ]
+ }
+ 
+-if (is_linux && current_cpu == "mipsel") {
++if ((is_linux || is_bsd) && current_cpu == "mipsel") {
+   ffmpeg_c_sources += [
+     "libavcodec/mips/h264pred_init_mips.c",
+     "libavcodec/mips/hpeldsp_init_mips.c",
+@@ -497,7 +497,7 @@ if (is_linux && current_cpu == "mipsel")
+   ]
+ }
+ 
+-if ((is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && 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",
+@@ -505,7 +505,7 @@ if ((is_linux && current_cpu == "mipsel"
+   ]
+ }
+ 
+-if (is_linux && current_cpu == "arm64") {
++if ((is_linux || is_bsd) && current_cpu == "arm64") {
+   ffmpeg_c_sources += [
+     "libavcodec/aarch64/h264pred_init.c",
+     "libavcodec/aarch64/hpeldsp_init_aarch64.c",
+@@ -518,7 +518,7 @@ if (is_linux && current_cpu == "arm64") 
+   ]
+ }
+ 
+-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 || 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",
+@@ -529,7 +529,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 || 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",
+@@ -543,7 +543,7 @@ if ((is_linux && current_cpu == "arm64" 
+   ]
+ }
+ 
+-if (is_linux && current_cpu == "arm" && arm_use_neon) {
++if ((is_linux || is_bsd) && current_cpu == "arm" && arm_use_neon) {
+   ffmpeg_c_sources += [
+     "libavcodec/arm/hpeldsp_init_neon.c",
+     "libavcodec/arm/vp8dsp_init_neon.c",
+@@ -556,14 +556,14 @@ if (is_linux && current_cpu == "arm" && 
+   ]
+ }
+ 
+-if ((is_android && current_cpu == "arm" && arm_use_neon && 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_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",
+   ]
+ }
+ 
+-if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && 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",
+@@ -587,13 +587,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 || 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 || 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",
+@@ -608,7 +608,7 @@ if (is_win && current_cpu == "x64") {
+   ]
+ }
+ 
+-if ((is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && 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",
+@@ -635,7 +635,7 @@ if ((is_linux && current_cpu == "x64" &&
+   ]
+ }
+ 
+-if (is_linux && 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",
+@@ -648,7 +648,7 @@ if (is_linux && current_cpu == "mipsel" 
+   ]
+ }
+ 
+-if (is_linux && 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/patches/patch-third__party_ffmpeg_libavutil_cpu.c b/chromium/patches/patch-third__party_ffmpeg_libavutil_cpu.c
new file mode 100644
index 0000000000..a85caf3552
--- /dev/null
+++ b/chromium/patches/patch-third__party_ffmpeg_libavutil_cpu.c
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- third_party/ffmpeg/libavutil/cpu.c.orig	2017-02-02 02:03:48.000000000 +0000
++++ third_party/ffmpeg/libavutil/cpu.c
+@@ -25,9 +25,15 @@
+ #include "common.h"
+ 
+ #if HAVE_SCHED_GETAFFINITY
++#if defined(__NetBSD__)
++#ifndef _NETBSD_SOURCE
++# define _NETBSD_SOURCE
++#endif
++#else
+ #ifndef _GNU_SOURCE
+ # define _GNU_SOURCE
+ #endif
++#endif
+ #include <sched.h>
+ #endif
+ #if HAVE_GETPROCESSAFFINITYMASK || HAVE_WINRT
diff --git a/chromium/patches/patch-third__party_ffmpeg_libavutil_mem.c b/chromium/patches/patch-third__party_ffmpeg_libavutil_mem.c
new file mode 100644
index 0000000000..a039008277
--- /dev/null
+++ b/chromium/patches/patch-third__party_ffmpeg_libavutil_mem.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- third_party/ffmpeg/libavutil/mem.c.orig	2017-02-02 02:03:48.000000000 +0000
++++ third_party/ffmpeg/libavutil/mem.c
+@@ -32,9 +32,6 @@
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#if HAVE_MALLOC_H
+-#include <malloc.h>
+-#endif
+ 
+ #include "avassert.h"
+ #include "avutil.h"
diff --git a/chromium/patches/patch-third__party_fontconfig_BUILD.gn b/chromium/patches/patch-third__party_fontconfig_BUILD.gn
new file mode 100644
index 0000000000..c5967f5902
--- /dev/null
+++ b/chromium/patches/patch-third__party_fontconfig_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/fontconfig/BUILD.gn.orig	2017-02-02 02:03:11.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/patches/patch-third__party_freetype2_BUILD.gn b/chromium/patches/patch-third__party_freetype2_BUILD.gn
new file mode 100644
index 0000000000..cb55e76b91
--- /dev/null
+++ b/chromium/patches/patch-third__party_freetype2_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/freetype2/BUILD.gn.orig	2017-02-02 02:03:11.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/patches/patch-third__party_glslang_BUILD.gn b/chromium/patches/patch-third__party_glslang_BUILD.gn
new file mode 100644
index 0000000000..7f4df4a995
--- /dev/null
+++ b/chromium/patches/patch-third__party_glslang_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- third_party/glslang/BUILD.gn.orig	2017-02-02 02:03:11.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/patches/patch-third__party_harfbuzz-ng_BUILD.gn b/chromium/patches/patch-third__party_harfbuzz-ng_BUILD.gn
new file mode 100644
index 0000000000..e30e340080
--- /dev/null
+++ b/chromium/patches/patch-third__party_harfbuzz-ng_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- third_party/harfbuzz-ng/BUILD.gn.orig	2017-02-02 02:03:11.000000000 +0000
++++ third_party/harfbuzz-ng/BUILD.gn
+@@ -50,7 +50,7 @@ if (use_system_harfbuzz) {
+ 
+   # See also chrome/browser/ui/libgtkui/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/patches/patch-third__party_icu_android_patch__locale.sh b/chromium/patches/patch-third__party_icu_android_patch__locale.sh
new file mode 100644
index 0000000000..fef2489ff6
--- /dev/null
+++ b/chromium/patches/patch-third__party_icu_android_patch__locale.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/icu/android/patch_locale.sh.orig	2017-02-02 02:03:49.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/patches/patch-third__party_icu_source_configure b/chromium/patches/patch-third__party_icu_source_configure
new file mode 100644
index 0000000000..7c0bc825da
--- /dev/null
+++ b/chromium/patches/patch-third__party_icu_source_configure
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- third_party/icu/source/configure.orig	2017-02-02 02:03:49.000000000 +0000
++++ third_party/icu/source/configure
+@@ -7772,13 +7772,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/patches/patch-third__party_leveldatabase_env__chromium.cc b/chromium/patches/patch-third__party_leveldatabase_env__chromium.cc
new file mode 100644
index 0000000000..df48f1fa4a
--- /dev/null
+++ b/chromium/patches/patch-third__party_leveldatabase_env__chromium.cc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- third_party/leveldatabase/env_chromium.cc.orig	2017-02-02 02:03:11.000000000 +0000
++++ third_party/leveldatabase/env_chromium.cc
+@@ -25,7 +25,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
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ 
+ using base::FilePath;
+ using leveldb::FileLock;
diff --git a/chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h b/chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
new file mode 100644
index 0000000000..fc4240fa3d
--- /dev/null
+++ b/chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/memory/singleton.h.orig	2017-02-02 02:03:50.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"
+ #include "phonenumbers/base/thread_checker.h"
+ 
+-#if !defined(__linux__) && !defined(__APPLE__)
++#if !defined(__linux__) && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+ 
+ namespace i18n {
+ namespace phonenumbers {
diff --git a/chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h b/chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
new file mode 100644
index 0000000000..9baa19c863
--- /dev/null
+++ b/chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/synchronization/lock.h.orig	2017-02-02 02:03:50.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
+ // different platform and care about thread-safety, please compile with
+ // -DI18N_PHONENUMBERS_USE_BOOST.
+-#if !defined(__linux__) && !defined(__APPLE__)
++#if !defined(__linux__) && !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+ 
+ namespace i18n {
+ namespace phonenumbers {
diff --git a/chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h b/chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
new file mode 100644
index 0000000000..787c93648a
--- /dev/null
+++ b/chromium/patches/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- third_party/libphonenumber/dist/cpp/src/phonenumbers/base/thread_checker.h.orig	2017-02-02 02:03:50.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
+ // it is not depending on Boost.
+ #if !defined(__linux__) && !defined(__APPLE__) && \
++    !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && \
+     !defined(I18N_PHONENUMBERS_NO_THREAD_SAFETY)
+ #error Building without Boost, please provide \
+        -DI18N_PHONENUMBERS_NO_THREAD_SAFETY
+@@ -31,7 +32,7 @@
+ #endif
+ 
+ #if !defined(NDEBUG) && !defined(I18N_PHONENUMBERS_USE_BOOST) && \
+-    (defined(__linux__) || defined(__apple__))
++    (defined(__linux__) || defined(__apple__)) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+ 
+ #include <pthread.h>
+ 
diff --git a/chromium/patches/patch-third__party_libusb_BUILD.gn b/chromium/patches/patch-third__party_libusb_BUILD.gn
new file mode 100644
index 0000000000..bf24c4b83a
--- /dev/null
+++ b/chromium/patches/patch-third__party_libusb_BUILD.gn
@@ -0,0 +1,263 @@
+$NetBSD$
+
+--- third_party/libusb/BUILD.gn.orig	2017-02-02 02:03:11.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/patches/patch-third__party_libxml_BUILD.gn b/chromium/patches/patch-third__party_libxml_BUILD.gn
new file mode 100644
index 0000000000..84f29e0a58
--- /dev/null
+++ b/chromium/patches/patch-third__party_libxml_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/libxml/BUILD.gn.orig	2017-02-02 02:03:11.000000000 +0000
++++ third_party/libxml/BUILD.gn
+@@ -4,7 +4,7 @@
+ 
+ # Define an "os_include" variable that points at the OS-specific generated
+ # headers.  These were generated by running the configure script offline.
+-if (is_linux || is_android || is_nacl) {
++if (is_linux || is_bsd || is_android || is_nacl) {
+   os_include = "linux"
+ } else if (is_mac || is_ios) {
+   os_include = "mac"
diff --git a/chromium/patches/patch-third__party_libxslt_BUILD.gn b/chromium/patches/patch-third__party_libxslt_BUILD.gn
new file mode 100644
index 0000000000..9645f4eed5
--- /dev/null
+++ b/chromium/patches/patch-third__party_libxslt_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/libxslt/BUILD.gn.orig	2017-02-02 02:03:11.000000000 +0000
++++ third_party/libxslt/BUILD.gn
+@@ -82,7 +82,7 @@ static_library("libxslt") {
+   public_configs = [ ":libxslt_config" ]
+ 
+   cflags = []
+-  if (is_linux || is_android) {
++  if (is_linux || is_bsd || is_android) {
+     include_dirs = [ "linux" ]
+   } else if (is_win) {
+     include_dirs = [ "win32" ]
diff --git a/chromium/patches/patch-third__party_libyuv_include_libyuv_row.h b/chromium/patches/patch-third__party_libyuv_include_libyuv_row.h
new file mode 100644
index 0000000000..d12fff6176
--- /dev/null
+++ b/chromium/patches/patch-third__party_libyuv_include_libyuv_row.h
@@ -0,0 +1,39 @@
+$NetBSD$
+
+--- third_party/libyuv/include/libyuv/row.h.orig	2017-02-02 02:03:50.000000000 +0000
++++ third_party/libyuv/include/libyuv/row.h
+@@ -161,10 +161,14 @@ extern "C" {
+ #define HAS_ARGBSHADEROW_SSE2
+ #define HAS_ARGBSUBTRACTROW_SSE2
+ #define HAS_ARGBUNATTENUATEROW_SSE2
++#if !(defined(__i386__) && defined(__GNUC__))
+ #define HAS_BLENDPLANEROW_SSSE3
++#endif
+ #define HAS_COMPUTECUMULATIVESUMROW_SSE2
+ #define HAS_CUMULATIVESUMTOAVERAGEROW_SSE2
++#if !(defined(__i386__) && defined(__GNUC__))
+ #define HAS_INTERPOLATEROW_SSSE3
++#endif
+ #define HAS_RGBCOLORTABLEROW_X86
+ #define HAS_SOBELROW_SSE2
+ #define HAS_SOBELTOPLANEROW_SSE2
+@@ -211,7 +215,9 @@ extern "C" {
+ #define HAS_I422TORGB565ROW_AVX2
+ #define HAS_I422TORGBAROW_AVX2
+ #define HAS_I444TOARGBROW_AVX2
++#if !(defined(__i386__) && defined(__GNUC__))
+ #define HAS_INTERPOLATEROW_AVX2
++#endif
+ #define HAS_J422TOARGBROW_AVX2
+ #define HAS_MERGEUVROW_AVX2
+ #define HAS_MIRRORROW_AVX2
+@@ -234,7 +240,9 @@ extern "C" {
+ #define HAS_ARGBMULTIPLYROW_AVX2
+ #define HAS_ARGBSUBTRACTROW_AVX2
+ #define HAS_ARGBUNATTENUATEROW_AVX2
++#if !(defined(__i386__) && defined(__GNUC__))
+ #define HAS_BLENDPLANEROW_AVX2
++#endif
+ 
+ #if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
+     defined(_MSC_VER)
diff --git a/chromium/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc b/chromium/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc
new file mode 100644
index 0000000000..0053511eb9
--- /dev/null
+++ b/chromium/patches/patch-third__party_libyuv_source_mjpeg__decoder.cc
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- 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
+ 
+ #endif
+-struct FILE;  // For jpeglib.h.
+ 
+ // C++ build requires extern C for jpeg internals.
+ #ifdef __cplusplus
diff --git a/chromium/patches/patch-third__party_mesa_BUILD.gn b/chromium/patches/patch-third__party_mesa_BUILD.gn
new file mode 100644
index 0000000000..292533fc55
--- /dev/null
+++ b/chromium/patches/patch-third__party_mesa_BUILD.gn
@@ -0,0 +1,25 @@
+$NetBSD$
+
+--- third_party/mesa/BUILD.gn.orig	2017-02-02 02:03:11.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/patches/patch-third__party_minigbm_BUILD.gn b/chromium/patches/patch-third__party_minigbm_BUILD.gn
new file mode 100644
index 0000000000..a3100289d7
--- /dev/null
+++ b/chromium/patches/patch-third__party_minigbm_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/minigbm/BUILD.gn.orig	2017-02-02 02:03:11.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/patches/patch-third__party_opus_BUILD.gn b/chromium/patches/patch-third__party_opus_BUILD.gn
new file mode 100644
index 0000000000..6e44dbff0c
--- /dev/null
+++ b/chromium/patches/patch-third__party_opus_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/opus/BUILD.gn.orig	2017-02-02 02:03:11.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/patches/patch-third__party_ots_include_opentype-sanitiser.h b/chromium/patches/patch-third__party_ots_include_opentype-sanitiser.h
new file mode 100644
index 0000000000..2942163422
--- /dev/null
+++ b/chromium/patches/patch-third__party_ots_include_opentype-sanitiser.h
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- third_party/ots/include/opentype-sanitiser.h.orig	2017-02-02 02:03:11.000000000 +0000
++++ third_party/ots/include/opentype-sanitiser.h
+@@ -22,6 +22,7 @@ typedef unsigned __int64 uint64_t;
+ #else
+ #include <arpa/inet.h>
+ #include <stdint.h>
++#include <sys/types.h>
+ #endif
+ 
+ #include <algorithm>
diff --git a/chromium/patches/patch-third__party_pdfium_BUILD.gn b/chromium/patches/patch-third__party_pdfium_BUILD.gn
new file mode 100644
index 0000000000..af15d3ff73
--- /dev/null
+++ b/chromium/patches/patch-third__party_pdfium_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/pdfium/BUILD.gn.orig	2017-02-02 02:03:52.000000000 +0000
++++ third_party/pdfium/BUILD.gn
+@@ -44,7 +44,7 @@ config("pdfium_core_config") {
+   cflags = []
+   configs = [ ":pdfium_common_config" ]
+   defines = [ "V8_DEPRECATION_WARNINGS" ]
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     if (current_cpu == "x64") {
+       defines += [ "_FX_CPU_=_FX_X64_" ]
+       cflags += [ "-fPIC" ]
diff --git a/chromium/patches/patch-third__party_pdfium_core_fxcrt_fx__system.h b/chromium/patches/patch-third__party_pdfium_core_fxcrt_fx__system.h
new file mode 100644
index 0000000000..aea8096fe8
--- /dev/null
+++ b/chromium/patches/patch-third__party_pdfium_core_fxcrt_fx__system.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/pdfium/core/fxcrt/fx_system.h.orig	2017-02-02 02:03:52.000000000 +0000
++++ third_party/pdfium/core/fxcrt/fx_system.h
+@@ -40,7 +40,7 @@
+ #elif defined(_WIN64)
+ #define _FX_OS_ _FX_WIN64_DESKTOP_
+ #define _FXM_PLATFORM_ _FXM_PLATFORM_WINDOWS_
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
+ #define _FX_OS_ _FX_LINUX_DESKTOP_
+ #define _FXM_PLATFORM_ _FXM_PLATFORM_LINUX_
+ #elif defined(__APPLE__)
diff --git a/chromium/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp b/chromium/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
new file mode 100644
index 0000000000..d641eb4a3d
--- /dev/null
+++ b/chromium/patches/patch-third__party_pdfium_fpdfsdk_javascript_JS__Value.cpp
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp.orig	2017-02-02 02:03:53.000000000 +0000
++++ third_party/pdfium/fpdfsdk/javascript/JS_Value.cpp
+@@ -458,11 +458,12 @@ v8::Local<v8::Date> CJS_Date::ToV8Date(C
+ }
+ 
+ double _getLocalTZA() {
++  struct tm *lt;
+   if (!FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS))
+     return 0;
+   time_t t = 0;
+   time(&t);
+-  localtime(&t);
++  lt = localtime(&t);
+ #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
+@@ -470,7 +471,11 @@ double _getLocalTZA() {
+   long timezone = 0;
+   _get_timezone(&timezone);
+ #endif
++#if defined(__FreeBSD__)
++  return (double)(-(lt->tm_gmtoff * 1000));
++#else
+   return (double)(-(timezone * 1000));
++#endif
+ }
+ 
+ int _getDaylightSavingTA(double d) {
diff --git a/chromium/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp b/chromium/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
new file mode 100644
index 0000000000..6182da64f5
--- /dev/null
+++ b/chromium/patches/patch-third__party_pdfium_fpdfsdk_javascript_PublicMethods.cpp
@@ -0,0 +1,108 @@
+$NetBSD$
+
+--- third_party/pdfium/fpdfsdk/javascript/PublicMethods.cpp.orig	2017-02-02 02:03:53.000000000 +0000
++++ third_party/pdfium/fpdfsdk/javascript/PublicMethods.cpp
+@@ -68,6 +68,103 @@ const FX_WCHAR* const fullmonths[] = {L"
+                                       L"July",    L"August",   L"September",
+                                       L"October", L"November", L"December"};
+ 
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++/*
++ * cvt.c - IEEE floating point formatting routines for FreeBSD
++ * from GNU libc-4.6.27
++ */
++
++/*
++ *    ap_ecvt converts to decimal
++ *      the number of digits is specified by ndigit
++ *      decpt is set to the position of the decimal point
++ *      sign is set to 0 for positive, 1 for negative
++ */
++
++#define	NDIG	80
++
++static char *
++     ap_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag)
++{
++    register int r2;
++    double fi, fj;
++    register char *p, *p1;
++    static char buf[NDIG];
++
++    if (ndigits >= NDIG - 1)
++	ndigits = NDIG - 2;
++    r2 = 0;
++    *sign = 0;
++    p = &buf[0];
++    if (arg < 0) {
++	*sign = 1;
++	arg = -arg;
++    }
++    arg = modf(arg, &fi);
++    p1 = &buf[NDIG];
++    /*
++     * Do integer part
++     */
++    if (fi != 0) {
++	p1 = &buf[NDIG];
++	while (fi != 0) {
++	    fj = modf(fi / 10, &fi);
++	    *--p1 = (int) ((fj + .03) * 10) + '0';
++	    r2++;
++	}
++	while (p1 < &buf[NDIG])
++	    *p++ = *p1++;
++    }
++    else if (arg > 0) {
++	while ((fj = arg * 10) < 1) {
++	    arg = fj;
++	    r2--;
++	}
++    }
++    p1 = &buf[ndigits];
++    if (eflag == 0)
++	p1 += r2;
++    *decpt = r2;
++    if (p1 < &buf[0]) {
++	buf[0] = '\0';
++	return (buf);
++    }
++    while (p <= p1 && p < &buf[NDIG]) {
++	arg *= 10;
++	arg = modf(arg, &fj);
++	*p++ = (int) fj + '0';
++    }
++    if (p1 >= &buf[NDIG]) {
++	buf[NDIG - 1] = '\0';
++	return (buf);
++    }
++    p = p1;
++    *p1 += 5;
++    while (*p1 > '9') {
++	*p1 = '0';
++	if (p1 > buf)
++	    ++ * --p1;
++	else {
++	    *p1 = '1';
++	    (*decpt)++;
++	    if (eflag == 0) {
++		if (p > buf)
++		    *p = '0';
++		p++;
++	    }
++	}
++    }
++    *p = '\0';
++    return (buf);
++}
++
++static char *
++     fcvt(double arg, int ndigits, int *decpt, int *sign)
++{
++    return (ap_cvt(arg, ndigits, decpt, sign, 0));
++}
++#endif // defined(__FreeBSD__)
++
+ CFX_ByteString StrTrim(const CFX_ByteString& pStr) {
+   CFX_ByteString result(pStr);
+   result.TrimLeft(' ');
diff --git a/chromium/patches/patch-third__party_pdfium_skia_BUILD.gn b/chromium/patches/patch-third__party_pdfium_skia_BUILD.gn
new file mode 100644
index 0000000000..9a5b5bf6e3
--- /dev/null
+++ b/chromium/patches/patch-third__party_pdfium_skia_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/pdfium/skia/BUILD.gn.orig	2017-02-02 02:03:53.000000000 +0000
++++ third_party/pdfium/skia/BUILD.gn
+@@ -102,7 +102,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",
+@@ -280,7 +280,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",
+@@ -309,7 +309,7 @@ component("skia") {
+     "../third_party:fx_zlib",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//third_party/icu:icuuc" ]
+   }
+ 
diff --git a/chromium/patches/patch-third__party_pdfium_third__party_base_logging.h b/chromium/patches/patch-third__party_pdfium_third__party_base_logging.h
new file mode 100644
index 0000000000..e5f4cfec33
--- /dev/null
+++ b/chromium/patches/patch-third__party_pdfium_third__party_base_logging.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/pdfium/third_party/base/logging.h.orig	2017-02-02 02:03:53.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/patches/patch-third__party_protobuf_post__process__dist.sh b/chromium/patches/patch-third__party_protobuf_post__process__dist.sh
new file mode 100644
index 0000000000..a0d77d0a4c
--- /dev/null
+++ b/chromium/patches/patch-third__party_protobuf_post__process__dist.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/protobuf/post_process_dist.sh.orig	2017-02-02 02:03:11.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/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h b/chromium/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
new file mode 100644
index 0000000000..35da2f0eb5
--- /dev/null
+++ b/chromium/patches/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- 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>
+ #endif
+ 
+-#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION)
++#if defined(SK_BUILD_FOR_ANDROID) || defined(__UCLIBC__) || defined(_NEWLIB_VERSION) || defined(__NetBSD__)
+ #define HAVE_LOCALE_T 0
+ #else
+ #define HAVE_LOCALE_T 1
diff --git a/chromium/patches/patch-third__party_sqlite_BUILD.gn b/chromium/patches/patch-third__party_sqlite_BUILD.gn
new file mode 100644
index 0000000000..f55c0f1063
--- /dev/null
+++ b/chromium/patches/patch-third__party_sqlite_BUILD.gn
@@ -0,0 +1,40 @@
+$NetBSD$
+
+--- third_party/sqlite/BUILD.gn.orig	2017-02-02 02:03:12.000000000 +0000
++++ third_party/sqlite/BUILD.gn
+@@ -22,7 +22,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.
+@@ -187,7 +187,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" ]
+@@ -216,7 +216,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")
+@@ -235,7 +235,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/patches/patch-third__party_usrsctp_BUILD.gn b/chromium/patches/patch-third__party_usrsctp_BUILD.gn
new file mode 100644
index 0000000000..99b87b799e
--- /dev/null
+++ b/chromium/patches/patch-third__party_usrsctp_BUILD.gn
@@ -0,0 +1,17 @@
+$NetBSD$
+
+--- third_party/usrsctp/BUILD.gn.orig	2017-02-02 02:03:12.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/patches/patch-third__party_webrtc_BUILD.gn b/chromium/patches/patch-third__party_webrtc_BUILD.gn
new file mode 100644
index 0000000000..3024ac8ffe
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_BUILD.gn
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- third_party/webrtc/BUILD.gn.orig	2017-02-02 02:03:57.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_LINUX", "WEBRTC_BSD", "WEBRTC_THREAD_RR" ]
++  }
+   if (is_mac) {
+     defines += [ "WEBRTC_MAC" ]
+   }
diff --git a/chromium/patches/patch-third__party_webrtc_base_BUILD.gn b/chromium/patches/patch-third__party_webrtc_base_BUILD.gn
new file mode 100644
index 0000000000..a9da9557f3
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_BUILD.gn
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- third_party/webrtc/base/BUILD.gn.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/base/BUILD.gn
+@@ -650,7 +650,6 @@ rtc_static_library("rtc_base") {
+       "x11windowpicker.h",
+     ]
+     libs += [
+-      "dl",
+       "rt",
+       "Xext",
+       "X11",
diff --git a/chromium/patches/patch-third__party_webrtc_base_httpcommon.cc b/chromium/patches/patch-third__party_webrtc_base_httpcommon.cc
new file mode 100644
index 0000000000..799070e397
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_httpcommon.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/webrtc/base/httpcommon.cc.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/base/httpcommon.cc
+@@ -384,7 +384,7 @@ bool HttpDateToSeconds(const std::string
+     gmt = non_gmt + kTimeZoneOffsets[zindex] * 60 * 60;
+   }
+   // TODO: Android should support timezone, see b/2441195
+-#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) || defined(BSD)
++#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD)
+   tm *tm_for_timezone = localtime(&gmt);
+   *seconds = gmt + tm_for_timezone->tm_gmtoff;
+ #else
diff --git a/chromium/patches/patch-third__party_webrtc_base_ifaddrs__converter.h b/chromium/patches/patch-third__party_webrtc_base_ifaddrs__converter.h
new file mode 100644
index 0000000000..f03dcec9c2
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_ifaddrs__converter.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/webrtc/base/ifaddrs_converter.h.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/base/ifaddrs_converter.h
+@@ -14,6 +14,8 @@
+ #if defined(WEBRTC_ANDROID)
+ #include "webrtc/base/ifaddrs-android.h"
+ #else
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <ifaddrs.h>
+ #endif  // WEBRTC_ANDROID
+ 
diff --git a/chromium/patches/patch-third__party_webrtc_base_ipaddress.h b/chromium/patches/patch-third__party_webrtc_base_ipaddress.h
new file mode 100644
index 0000000000..03c13c13e7
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_ipaddress.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- third_party/webrtc/base/ipaddress.h.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/base/ipaddress.h
+@@ -17,6 +17,10 @@
+ #include <arpa/inet.h>
+ #include <netdb.h>
+ #endif
++#if defined(WEBRTC_BSD)
++#include <sys/types.h>
++#include <sys/socket.h>
++#endif
+ #if defined(WEBRTC_WIN)
+ #include <winsock2.h>
+ #include <ws2tcpip.h>
diff --git a/chromium/patches/patch-third__party_webrtc_base_linux.cc b/chromium/patches/patch-third__party_webrtc_base_linux.cc
new file mode 100644
index 0000000000..1f10587b7b
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_linux.cc
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- third_party/webrtc/base/linux.cc.orig	2017-02-02 02:03:57.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.
+  */
+ 
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ #include "webrtc/base/linux.h"
+ 
+ #include <ctype.h>
+@@ -261,4 +261,4 @@ int ReadCpuMaxFreq() {
+ 
+ }  // namespace rtc
+ 
+-#endif  // defined(WEBRTC_LINUX)
++#endif  // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
diff --git a/chromium/patches/patch-third__party_webrtc_base_linux.h b/chromium/patches/patch-third__party_webrtc_base_linux.h
new file mode 100644
index 0000000000..f00e443ecc
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_linux.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- third_party/webrtc/base/linux.h.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/base/linux.h
+@@ -11,7 +11,7 @@
+ #ifndef WEBRTC_BASE_LINUX_H_
+ #define WEBRTC_BASE_LINUX_H_
+ 
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ #include <string>
+ #include <map>
+ #include <memory>
+@@ -114,5 +114,5 @@ int ReadCpuMaxFreq();
+ 
+ }  // namespace rtc
+ 
+-#endif  // defined(WEBRTC_LINUX)
++#endif  // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ #endif  // WEBRTC_BASE_LINUX_H_
diff --git a/chromium/patches/patch-third__party_webrtc_base_network.cc b/chromium/patches/patch-third__party_webrtc_base_network.cc
new file mode 100644
index 0000000000..b41d2be439
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_network.cc
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/webrtc/base/network.cc.orig	2017-02-02 02:03:57.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
+ // it's transitively required by linux/route.h, so include that version on
+ // linux instead of the standard posix one.
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ #include <linux/if.h>
+ #include <linux/route.h>
+ #elif !defined(__native_client__)
+@@ -656,7 +656,7 @@ bool BasicNetworkManager::CreateNetworks
+ }
+ #endif  // WEBRTC_WIN
+ 
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+ bool IsDefaultRoute(const std::string& network_name) {
+   FileStream fs;
+   if (!fs.Open("/proc/net/route", "r", NULL)) {
+@@ -699,7 +699,7 @@ bool BasicNetworkManager::IsIgnoredNetwo
+       strncmp(network.name().c_str(), "vboxnet", 7) == 0) {
+     return true;
+   }
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
+   // Make sure this is a default route, if we're ignoring non-defaults.
+   if (ignore_non_default_routes_ && !IsDefaultRoute(network.name())) {
+     return true;
diff --git a/chromium/patches/patch-third__party_webrtc_base_network.h b/chromium/patches/patch-third__party_webrtc_base_network.h
new file mode 100644
index 0000000000..07a45d5367
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_network.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- third_party/webrtc/base/network.h.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/base/network.h
+@@ -23,6 +23,10 @@
+ #include "webrtc/base/messagehandler.h"
+ #include "webrtc/base/sigslot.h"
+ 
++#if defined(WEBRTC_BSD)
++#include <sys/types.h>
++#endif
++
+ #if defined(WEBRTC_POSIX)
+ struct ifaddrs;
+ #endif  // defined(WEBRTC_POSIX)
diff --git a/chromium/patches/patch-third__party_webrtc_base_physicalsocketserver.cc b/chromium/patches/patch-third__party_webrtc_base_physicalsocketserver.cc
new file mode 100644
index 0000000000..93f4ac9cc1
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_physicalsocketserver.cc
@@ -0,0 +1,47 @@
+$NetBSD$
+
+--- third_party/webrtc/base/physicalsocketserver.cc.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/base/physicalsocketserver.cc
+@@ -61,7 +61,11 @@ typedef void* SockOptArg;
+ 
+ int64_t GetSocketRecvTimestamp(int socket) {
+   struct timeval tv_ioctl;
++#if defined(WEBRTC_BSD)
++  int ret = ioctl(socket, SO_TIMESTAMP, &tv_ioctl);
++#else
+   int ret = ioctl(socket, SIOCGSTAMP, &tv_ioctl);
++#endif
+   if (ret != 0)
+     return -1;
+   int64_t timestamp =
+@@ -274,7 +278,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) {
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+     *value = (*value != IP_PMTUDISC_DONT) ? 1 : 0;
+ #endif
+   }
+@@ -287,7 +291,7 @@ int PhysicalSocket::SetOption(Option opt
+   if (TranslateOption(opt, &slevel, &sopt) == -1)
+     return -1;
+   if (opt == OPT_DONTFRAGMENT) {
+-#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
++#if defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_BSD)
+     value = (value) ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT;
+ #endif
+   }
+@@ -569,10 +573,10 @@ int PhysicalSocket::TranslateOption(Opti
+       *slevel = IPPROTO_IP;
+       *sopt = IP_DONTFRAGMENT;
+       break;
+-#elif defined(WEBRTC_MAC) || defined(BSD) || defined(__native_client__)
++#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD) || defined(__native_client__)
+       LOG(LS_WARNING) << "Socket::OPT_DONTFRAGMENT not supported.";
+       return -1;
+-#elif defined(WEBRTC_POSIX)
++#elif defined(WEBRTC_POSIX) && !defined(WEBRTC_BSD)
+       *slevel = IPPROTO_IP;
+       *sopt = IP_MTU_DISCOVER;
+       break;
diff --git a/chromium/patches/patch-third__party_webrtc_base_platform__thread.cc b/chromium/patches/patch-third__party_webrtc_base_platform__thread.cc
new file mode 100644
index 0000000000..3606d44d69
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_platform__thread.cc
@@ -0,0 +1,50 @@
+$NetBSD$
+
+--- 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 @@
+ 
+ #include "webrtc/base/checks.h"
+ 
+-#if defined(WEBRTC_LINUX)
++#if defined(WEBRTC_LINUX) && !defined(__FreeBSD__) && !defined(__NetBSD__)
+ #include <sys/prctl.h>
+ #include <sys/syscall.h>
+ #endif
+ 
++#if defined(WEBRTC_BSD)
++#include <pthread.h>
++#if !defined(__NetBSD__)
++#include <pthread_np.h>
++#include <sys/thr.h>
++#endif
++#include <sys/syscall.h>
++#endif
++
+ namespace rtc {
+ 
+ PlatformThreadId CurrentThreadId() {
+@@ -26,6 +35,10 @@ PlatformThreadId CurrentThreadId() {
+ #elif defined(WEBRTC_POSIX)
+ #if defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
+   ret = pthread_mach_thread_np(pthread_self());
++#elif defined(__OpenBSD__) || defined(__NetBSD__)
++  ret = reinterpret_cast<uint64_t>(pthread_self());
++#elif defined(WEBRTC_BSD)
++  ret = static_cast<int>(pthread_getthreadid_np());
+ #elif defined(WEBRTC_LINUX)
+   ret =  syscall(__NR_gettid);
+ #elif defined(WEBRTC_ANDROID)
+@@ -69,7 +82,11 @@ void SetCurrentThreadName(const char* na
+                      reinterpret_cast<ULONG_PTR*>(&threadname_info));
+   } __except (EXCEPTION_EXECUTE_HANDLER) {
+   }
+-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
++#elif defined(__NetBSD__)
++  pthread_setname_np(pthread_self(), "%s", const_cast<void*>(reinterpret_cast<const void*>(name)));
++#elif defined(WEBRTC_BSD)
++  pthread_set_name_np(pthread_self(), name);
++#elif (defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)) && !defined(WEBRTC_BSD)
+   prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name));
+ #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
+   pthread_setname_np(name);
diff --git a/chromium/patches/patch-third__party_webrtc_base_stringutils.h b/chromium/patches/patch-third__party_webrtc_base_stringutils.h
new file mode 100644
index 0000000000..bf8bd1c997
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_stringutils.h
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- third_party/webrtc/base/stringutils.h.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/base/stringutils.h
+@@ -23,11 +23,11 @@
+ #endif  // WEBRTC_WIN 
+ 
+ #if defined(WEBRTC_POSIX)
+-#ifdef BSD
++#if defined(WEBRTC_BSD) || defined(BSD)
+ #include <stdlib.h>
+-#else  // BSD
++#else  // WEBRTC_BSD
+ #include <alloca.h>
+-#endif  // !BSD
++#endif  // !WEBRTC_BSD
+ #endif  // WEBRTC_POSIX
+ 
+ #include <string>
diff --git a/chromium/patches/patch-third__party_webrtc_base_systeminfo.cc b/chromium/patches/patch-third__party_webrtc_base_systeminfo.cc
new file mode 100644
index 0000000000..782e91fd53
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_base_systeminfo.cc
@@ -0,0 +1,42 @@
+$NetBSD$
+
+--- third_party/webrtc/base/systeminfo.cc.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/base/systeminfo.cc
+@@ -20,8 +20,12 @@
+ #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
+ #include <ApplicationServices/ApplicationServices.h>
+ #include <CoreServices/CoreServices.h>
+-#elif defined(WEBRTC_LINUX)
++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+ #include <unistd.h>
++#if defined(WEBRTC_BSD)
++#include <sys/types.h>
++#include <sys/sysctl.h>
++#endif
+ #endif
+ #if defined(WEBRTC_MAC)
+ #include <sys/sysctl.h>
+@@ -66,7 +70,7 @@ static int DetectNumberOfCores() {
+   SYSTEM_INFO si;
+   GetSystemInfo(&si);
+   number_of_cores = static_cast<int>(si.dwNumberOfProcessors);
+-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD)
+   number_of_cores = static_cast<int>(sysconf(_SC_NPROCESSORS_ONLN));
+ #elif defined(WEBRTC_MAC)
+   int name[] = {CTL_HW, HW_AVAILCPU};
+@@ -174,9 +178,13 @@ int64_t SystemInfo::GetMemorySize() {
+     LOG_GLE(LS_WARNING) << "GlobalMemoryStatusEx failed.";
+   }
+ 
+-#elif defined(WEBRTC_MAC)
++#elif defined(WEBRTC_MAC) || defined(WEBRTC_BSD)
+   size_t len = sizeof(memory);
++  #if defined(WEBRTC_MAC) 
+   int error = sysctlbyname("hw.memsize", &memory, &len, NULL, 0);
++  #else
++  int error = sysctlbyname("hw.physmem", &memory, &len, NULL, 0);
++  #endif
+   if (error || memory == 0)
+     memory = -1;
+ #elif defined(WEBRTC_LINUX)
diff --git a/chromium/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn b/chromium/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn
new file mode 100644
index 0000000000..4345eddb9a
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_modules_audio__device_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- third_party/webrtc/modules/audio_device/BUILD.gn.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/modules/audio_device/BUILD.gn
+@@ -77,7 +77,7 @@ rtc_static_library("audio_device") {
+   ]
+ 
+   include_dirs = []
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     include_dirs += [ "linux" ]
+   }
+   if (is_ios) {
+@@ -125,7 +125,7 @@ rtc_static_library("audio_device") {
+     if (rtc_use_dummy_audio_file_devices) {
+       defines += [ "WEBRTC_DUMMY_FILE_DEVICES" ]
+     } else {
+-      if (is_linux) {
++      if (is_linux || is_bsd) {
+         sources += [
+           "linux/alsasymboltable_linux.cc",
+           "linux/alsasymboltable_linux.h",
diff --git a/chromium/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc b/chromium/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc
new file mode 100644
index 0000000000..3e039f4d8b
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
+@@ -13,6 +13,7 @@
+ #include <string.h>
+ 
+ #include <algorithm>
++#include <cstdlib>
+ #include <iterator>
+ #include <utility>
+ 
diff --git a/chromium/patches/patch-third__party_webrtc_modules_video__coding_BUILD.gn b/chromium/patches/patch-third__party_webrtc_modules_video__coding_BUILD.gn
new file mode 100644
index 0000000000..5ab50ec2e8
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_modules_video__coding_BUILD.gn
@@ -0,0 +1,26 @@
+$NetBSD$
+
+--- third_party/webrtc/modules/video_coding/BUILD.gn.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/modules/video_coding/BUILD.gn
+@@ -137,9 +137,7 @@ rtc_static_library("webrtc_h264") {
+   }
+ 
+   defines = []
+-  deps = [
+-    "../../system_wrappers",
+-  ]
++  deps = []
+ 
+   if (rtc_use_h264) {
+     defines += [ "WEBRTC_USE_H264" ]
+@@ -153,9 +151,9 @@ rtc_static_library("webrtc_h264") {
+       "codecs/h264/h264_encoder_impl.h",
+     ]
+     deps += [
+-      "../../common_video",
+       "//third_party/ffmpeg:ffmpeg",
+       "//third_party/openh264:encoder",
++      "../../common_video",
+     ]
+   }
+ }
diff --git a/chromium/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn b/chromium/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn
new file mode 100644
index 0000000000..53fcbb2290
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_system__wrappers_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- third_party/webrtc/system_wrappers/BUILD.gn.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/system_wrappers/BUILD.gn
+@@ -90,7 +90,7 @@ rtc_static_library("system_wrappers") {
+     libs += [ "log" ]
+   }
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     defines += [ "WEBRTC_THREAD_RR" ]
+ 
+     if (!build_with_chromium) {
+@@ -100,7 +100,7 @@ rtc_static_library("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/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc b/chromium/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc
new file mode 100644
index 0000000000..f373f1f807
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_system__wrappers_source_atomic32__non__darwin__unix.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/webrtc/system_wrappers/source/atomic32_non_darwin_unix.cc.orig	2017-02-02 02:03:57.000000000 +0000
++++ third_party/webrtc/system_wrappers/source/atomic32_non_darwin_unix.cc
+@@ -12,7 +12,7 @@
+ 
+ #include <assert.h>
+ #include <inttypes.h>
+-#include <malloc.h>
++#include <stdlib.h>
+ 
+ #include "webrtc/common_types.h"
+ 
diff --git a/chromium/patches/patch-third__party_webrtc_voice__engine_voice__engine__defines.h b/chromium/patches/patch-third__party_webrtc_voice__engine_voice__engine__defines.h
new file mode 100644
index 0000000000..113aff3d0f
--- /dev/null
+++ b/chromium/patches/patch-third__party_webrtc_voice__engine_voice__engine__defines.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/webrtc/voice_engine/voice_engine_defines.h.orig	2017-02-02 02:03:57.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/patches/patch-third__party_widevine_cdm_BUILD.gn b/chromium/patches/patch-third__party_widevine_cdm_BUILD.gn
new file mode 100644
index 0000000000..dd264a4908
--- /dev/null
+++ b/chromium/patches/patch-third__party_widevine_cdm_BUILD.gn
@@ -0,0 +1,31 @@
+$NetBSD$
+
+--- third_party/widevine/cdm/BUILD.gn.orig	2017-02-02 02:03:12.000000000 +0000
++++ third_party/widevine/cdm/BUILD.gn
+@@ -26,7 +26,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) {
+@@ -160,7 +160,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) ]
+@@ -183,7 +183,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/patches/patch-third__party_widevine_cdm_stub_widevine__cdm__version.h b/chromium/patches/patch-third__party_widevine_cdm_stub_widevine__cdm__version.h
new file mode 100644
index 0000000000..fafa2d3752
--- /dev/null
+++ b/chromium/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/patches/patch-third__party_xdg-utils_scripts_xdg-terminal b/chromium/patches/patch-third__party_xdg-utils_scripts_xdg-terminal
new file mode 100644
index 0000000000..463d02d76d
--- /dev/null
+++ b/chromium/patches/patch-third__party_xdg-utils_scripts_xdg-terminal
@@ -0,0 +1,62 @@
+$NetBSD$
+
+--- third_party/xdg-utils/scripts/xdg-terminal.orig	2017-02-02 02:03:57.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/patches/patch-third__party_xdg-utils_scripts_xdg-terminal.in b/chromium/patches/patch-third__party_xdg-utils_scripts_xdg-terminal.in
new file mode 100644
index 0000000000..6f2552b19e
--- /dev/null
+++ b/chromium/patches/patch-third__party_xdg-utils_scripts_xdg-terminal.in
@@ -0,0 +1,53 @@
+$NetBSD$
+
+--- third_party/xdg-utils/scripts/xdg-terminal.in.orig	2017-02-02 02:03:57.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/patches/patch-third__party_yasm_BUILD.gn b/chromium/patches/patch-third__party_yasm_BUILD.gn
new file mode 100644
index 0000000000..5816b39ba3
--- /dev/null
+++ b/chromium/patches/patch-third__party_yasm_BUILD.gn
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- third_party/yasm/BUILD.gn.orig	2017-02-02 02:03:12.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/patches/patch-third__party_zlib_BUILD.gn b/chromium/patches/patch-third__party_zlib_BUILD.gn
new file mode 100644
index 0000000000..c8e7e37d99
--- /dev/null
+++ b/chromium/patches/patch-third__party_zlib_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- third_party/zlib/BUILD.gn.orig	2017-02-02 02:03:12.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/patches/patch-tools_battor__agent_BUILD.gn b/chromium/patches/patch-tools_battor__agent_BUILD.gn
new file mode 100644
index 0000000000..2c1b26a03f
--- /dev/null
+++ b/chromium/patches/patch-tools_battor__agent_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/battor_agent/BUILD.gn.orig	2017-02-02 02:03:12.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/patches/patch-tools_gn_args.cc b/chromium/patches/patch-tools_gn_args.cc
new file mode 100644
index 0000000000..b8daf3aee9
--- /dev/null
+++ b/chromium/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/patches/patch-tools_gn_bootstrap_bootstrap.py b/chromium/patches/patch-tools_gn_bootstrap_bootstrap.py
new file mode 100644
index 0000000000..bf9d79f831
--- /dev/null
+++ b/chromium/patches/patch-tools_gn_bootstrap_bootstrap.py
@@ -0,0 +1,65 @@
+$NetBSD$
+
+--- tools/gn/bootstrap/bootstrap.py.orig	2017-02-02 02:03:12.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_mac = sys.platform.startswith('darwin')
+-is_posix = is_linux or is_mac
++is_freebsd = sys.platform.startswith('freebsd')
++is_netbsd = sys.platform.startswith('netbsd')
++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/patches/patch-tools_variations_fieldtrial__to__struct.py b/chromium/patches/patch-tools_variations_fieldtrial__to__struct.py
new file mode 100644
index 0000000000..7dd43ff964
--- /dev/null
+++ b/chromium/patches/patch-tools_variations_fieldtrial__to__struct.py
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- tools/variations/fieldtrial_to_struct.py.orig	2017-02-02 02:03:13.000000000 +0000
++++ tools/variations/fieldtrial_to_struct.py
+@@ -116,7 +116,7 @@ def main(arguments):
+   if not opts.platform:
+     parser.error('You must specify a --platform.')
+ 
+-  supported_platforms = ['android', 'chromeos', 'ios', 'linux', 'mac', 'win']
++  supported_platforms = ['android', 'chromeos', 'ios', 'linux', 'mac', 'win', 'netbsd']
+   if opts.platform not in supported_platforms:
+     parser.error('\'%s\' is an unknown platform. Supported platforms: %s' %
+         (opts.platform, supported_platforms))
diff --git a/chromium/patches/patch-ui_accessibility_platform_ax__platform__node.h b/chromium/patches/patch-ui_accessibility_platform_ax__platform__node.h
new file mode 100644
index 0000000000..59d90ee755
--- /dev/null
+++ b/chromium/patches/patch-ui_accessibility_platform_ax__platform__node.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/accessibility/platform/ax_platform_node.h.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/accessibility/platform/ax_platform_node.h
+@@ -22,7 +22,7 @@
+ #define PLATFORM_HAS_AX_PLATFORM_NODE_IMPL 1
+ #endif
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_X11)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && defined(USE_X11)
+ #define PLATFORM_HAS_AX_PLATFORM_NODE_IMPL 1
+ #endif
+ 
diff --git a/chromium/patches/patch-ui_app__list_app__list__constants.cc b/chromium/patches/patch-ui_app__list_app__list__constants.cc
new file mode 100644
index 0000000000..a636ce1875
--- /dev/null
+++ b/chromium/patches/patch-ui_app__list_app__list__constants.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/app_list/app_list_constants.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/app_list/app_list_constants.cc
+@@ -140,7 +140,7 @@ const char kSearchQueryLength[] = "Apps.
+ const char kSearchResultDistanceFromOrigin[] =
+     "Apps.AppListSearchResultDistanceFromOrigin";
+ 
+-#if defined(OS_LINUX)
++#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/patches/patch-ui_app__list_app__list__constants.h b/chromium/patches/patch-ui_app__list_app__list__constants.h
new file mode 100644
index 0000000000..a67c86d8ed
--- /dev/null
+++ b/chromium/patches/patch-ui_app__list_app__list__constants.h
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- ui/app_list/app_list_constants.h.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/app_list/app_list_constants.h
+@@ -89,8 +89,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)
++// The WM_CLASS name for the app launcher window on Linux/FreeBSD.
+ APP_LIST_EXPORT extern const char kAppListWMClass[];
+ #endif
+ 
diff --git a/chromium/patches/patch-ui_app__list_views_app__list__item__view.cc b/chromium/patches/patch-ui_app__list_views_app__list__item__view.cc
new file mode 100644
index 0000000000..511cf6b5c7
--- /dev/null
+++ b/chromium/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	2017-02-02 02:03:13.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/patches/patch-ui_app__list_views_app__list__view.cc b/chromium/patches/patch-ui_app__list_views_app__list__view.cc
new file mode 100644
index 0000000000..5733a3588d
--- /dev/null
+++ b/chromium/patches/patch-ui_app__list_views_app__list__view.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/app_list/views/app_list_view.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/app_list/views/app_list_view.cc
+@@ -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
+@@ -538,7 +538,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/patches/patch-ui_aura_BUILD.gn b/chromium/patches/patch-ui_aura_BUILD.gn
new file mode 100644
index 0000000000..4080c8d328
--- /dev/null
+++ b/chromium/patches/patch-ui_aura_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/aura/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/aura/BUILD.gn
+@@ -361,7 +361,7 @@ test("aura_unittests") {
+     "//ui/gl:test_support",
+   ]
+ 
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//third_party/mesa" ]
+   }
+ 
diff --git a/chromium/patches/patch-ui_base_BUILD.gn b/chromium/patches/patch-ui_base_BUILD.gn
new file mode 100644
index 0000000000..dfd646194d
--- /dev/null
+++ b/chromium/patches/patch-ui_base_BUILD.gn
@@ -0,0 +1,63 @@
+$NetBSD$
+
+--- ui/base/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/base/BUILD.gn
+@@ -348,7 +348,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.
+@@ -450,11 +450,11 @@ component("base") {
+     ]
+   }
+ 
+-  if (!use_aura || !is_linux) {
++  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" ]
+   }
+ 
+@@ -462,7 +462,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",
+@@ -801,7 +801,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) {
+@@ -924,7 +924,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.
+@@ -937,7 +937,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/patches/patch-ui_base_ime_BUILD.gn b/chromium/patches/patch-ui_base_ime_BUILD.gn
new file mode 100644
index 0000000000..6677024824
--- /dev/null
+++ b/chromium/patches/patch-ui_base_ime_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/base/ime/BUILD.gn.orig	2017-02-02 02:03:13.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/patches/patch-ui_base_ime_ime__engine__handler__interface.h b/chromium/patches/patch-ui_base_ime_ime__engine__handler__interface.h
new file mode 100644
index 0000000000..0657c7fdb9
--- /dev/null
+++ b/chromium/patches/patch-ui_base_ime_ime__engine__handler__interface.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/base/ime/ime_engine_handler_interface.h.orig	2017-02-02 02:03:13.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).
+   virtual void HideInputView() = 0;
+ 
+-#elif defined(OS_LINUX) || defined(OS_WIN)
++#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ 
+   // Get the id of the IME extension.
+   virtual std::string GetExtensionId() const = 0;
diff --git a/chromium/patches/patch-ui_base_ime_input__method__factory.cc b/chromium/patches/patch-ui_base_ime_input__method__factory.cc
new file mode 100644
index 0000000000..db83c3df00
--- /dev/null
+++ b/chromium/patches/patch-ui_base_ime_input__method__factory.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- ui/base/ime/input_method_factory.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/base/ime/input_method_factory.cc
+@@ -14,7 +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(OS_BSD)) && \
++      defined(USE_X11)
+ #include "ui/base/ime/input_method_auralinux.h"
+ #elif defined(OS_ANDROID)
+ #include "ui/base/ime/input_method_android.h"
+@@ -55,7 +56,8 @@ std::unique_ptr<InputMethod> CreateInput
+   return base::MakeUnique<InputMethodWin>(delegate, widget);
+ #elif defined(OS_MACOSX)
+   return base::MakeUnique<InputMethodMac>(delegate);
+-#elif defined(USE_AURA) && defined(OS_LINUX) && defined(USE_X11)
++#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD)) && \
++      defined(USE_X11)
+   return base::MakeUnique<InputMethodAuraLinux>(delegate);
+ #elif defined(OS_ANDROID)
+   return base::MakeUnique<InputMethodAndroid>(delegate);
diff --git a/chromium/patches/patch-ui_base_ime_input__method__initializer.cc b/chromium/patches/patch-ui_base_ime_input__method__initializer.cc
new file mode 100644
index 0000000000..14687984fe
--- /dev/null
+++ b/chromium/patches/patch-ui_base_ime_input__method__initializer.cc
@@ -0,0 +1,39 @@
+$NetBSD$
+
+--- ui/base/ime/input_method_initializer.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/base/ime/input_method_initializer.cc
+@@ -8,14 +8,14 @@
+ 
+ #if defined(OS_CHROMEOS)
+ #include "ui/base/ime/ime_bridge.h"
+-#elif defined(USE_AURA) && defined(OS_LINUX)
++#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
+ #include "base/logging.h"
+ #include "ui/base/ime/linux/fake_input_method_context_factory.h"
+ #endif
+ 
+ namespace {
+ 
+-#if !defined(OS_CHROMEOS) && defined(USE_AURA) && defined(OS_LINUX)
++#if !defined(OS_CHROMEOS) && defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
+ const ui::LinuxInputMethodContextFactory* g_linux_input_method_context_factory;
+ #endif
+ 
+@@ -38,7 +38,7 @@ void ShutdownInputMethod() {
+ void InitializeInputMethodForTesting() {
+ #if defined(OS_CHROMEOS)
+   IMEBridge::Initialize();
+-#elif defined(USE_AURA) && defined(OS_LINUX)
++#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD))
+   if (!g_linux_input_method_context_factory)
+     g_linux_input_method_context_factory = new FakeInputMethodContextFactory();
+   const LinuxInputMethodContextFactory* factory =
+@@ -54,7 +54,7 @@ void InitializeInputMethodForTesting() {
+ void ShutdownInputMethodForTesting() {
+ #if defined(OS_CHROMEOS)
+   IMEBridge::Shutdown();
+-#elif defined(USE_AURA) && defined(OS_LINUX)
++#elif defined(USE_AURA) && (defined(OS_LINUX) || defined(OS_BSD)) 
+   const LinuxInputMethodContextFactory* factory =
+       LinuxInputMethodContextFactory::instance();
+   CHECK(!factory || factory == g_linux_input_method_context_factory)
diff --git a/chromium/patches/patch-ui_base_resource_resource__bundle.cc b/chromium/patches/patch-ui_base_resource_resource__bundle.cc
new file mode 100644
index 0000000000..bf6dc845fc
--- /dev/null
+++ b/chromium/patches/patch-ui_base_resource_resource__bundle.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/base/resource/resource_bundle.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/base/resource/resource_bundle.cc
+@@ -651,7 +651,7 @@ void ResourceBundle::ReloadFonts() {
+ }
+ 
+ ScaleFactor ResourceBundle::GetMaxScaleFactor() const {
+-#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+   return max_scale_factor_;
+ #else
+   return GetSupportedScaleFactors().back();
+@@ -711,7 +711,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/patches/patch-ui_base_ui__features.gni b/chromium/patches/patch-ui_base_ui__features.gni
new file mode 100644
index 0000000000..0d62cef5d0
--- /dev/null
+++ b/chromium/patches/patch-ui_base_ui__features.gni
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- ui/base/ui_features.gni.orig	2017-02-02 02:03:13.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/patches/patch-ui_base_webui_web__ui__util.cc b/chromium/patches/patch-ui_base_webui_web__ui__util.cc
new file mode 100644
index 0000000000..f478519c16
--- /dev/null
+++ b/chromium/patches/patch-ui_base_webui_web__ui__util.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/base/webui/web_ui_util.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/base/webui/web_ui_util.cc
+@@ -161,7 +161,7 @@ std::string GetFontFamily() {
+ 
+ // TODO(dnicoara) Remove Ozone check when PlatformFont support is introduced
+ // into Ozone: crbug.com/320050
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS) && !defined(USE_OZONE)
+   font_family = ui::ResourceBundle::GetSharedInstance().GetFont(
+       ui::ResourceBundle::BaseFont).GetFontName() + ", " + font_family;
+ #endif
diff --git a/chromium/patches/patch-ui_compositor_BUILD.gn b/chromium/patches/patch-ui_compositor_BUILD.gn
new file mode 100644
index 0000000000..c907bf561c
--- /dev/null
+++ b/chromium/patches/patch-ui_compositor_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/compositor/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/compositor/BUILD.gn
+@@ -201,7 +201,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/patches/patch-ui_events_event__switches.cc b/chromium/patches/patch-ui_events_event__switches.cc
new file mode 100644
index 0000000000..1d2e41a952
--- /dev/null
+++ b/chromium/patches/patch-ui_events_event__switches.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/events/event_switches.cc.orig	2017-02-02 02:03:13.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_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/patches/patch-ui_events_event__switches.h b/chromium/patches/patch-ui_events_event__switches.h
new file mode 100644
index 0000000000..69f0b3ef05
--- /dev/null
+++ b/chromium/patches/patch-ui_events_event__switches.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/events/event_switches.h.orig	2017-02-02 02:03:13.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_BSD)
+ EVENTS_BASE_EXPORT extern const char kTouchDevices[];
+ #endif
+ 
diff --git a/chromium/patches/patch-ui_events_keycodes_dom_keycode__converter.cc b/chromium/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
new file mode 100644
index 0000000000..7333abfc4c
--- /dev/null
+++ b/chromium/patches/patch-ui_events_keycodes_dom_keycode__converter.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/events/keycodes/dom/keycode_converter.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/events/keycodes/dom/keycode_converter.cc
+@@ -19,7 +19,7 @@ namespace {
+ // and DOM Level 3 |code| strings.
+ #if defined(OS_WIN)
+ #define USB_KEYMAP(usb, evdev, xkb, win, mac, code, id) {usb, win, code}
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ #define USB_KEYMAP(usb, evdev, xkb, win, mac, code, id) {usb, xkb, code}
+ #elif defined(OS_MACOSX)
+ #define USB_KEYMAP(usb, evdev, xkb, win, mac, code, id) {usb, mac, code}
diff --git a/chromium/patches/patch-ui_gfx_BUILD.gn b/chromium/patches/patch-ui_gfx_BUILD.gn
new file mode 100644
index 0000000000..62399e54ce
--- /dev/null
+++ b/chromium/patches/patch-ui_gfx_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/gfx/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/gfx/BUILD.gn
+@@ -371,7 +371,7 @@ component("gfx") {
+   }
+ 
+   # Linux.
+-  if (is_linux) {
++  if (is_linux || is_bsd) {
+     deps += [ "//build/linux:fontconfig" ]
+   }
+ 
+@@ -549,7 +549,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/patches/patch-ui_gfx_canvas__skia.cc b/chromium/patches/patch-ui_gfx_canvas__skia.cc
new file mode 100644
index 0000000000..c724328df0
--- /dev/null
+++ b/chromium/patches/patch-ui_gfx_canvas__skia.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/gfx/canvas_skia.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/gfx/canvas_skia.cc
+@@ -209,7 +209,7 @@ void Canvas::DrawStringRectWithShadows(c
+     Range range = StripAcceleratorChars(flags, &adjusted_text);
+     bool elide_text = ((flags & NO_ELLIPSIS) == 0);
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+     // On Linux, eliding really means fading the end of the string. But only
+     // for LTR text. RTL text is still elided (on the left) with "...".
+     if (elide_text) {
diff --git a/chromium/patches/patch-ui_gfx_font__fallback__linux.cc b/chromium/patches/patch-ui_gfx_font__fallback__linux.cc
new file mode 100644
index 0000000000..479793745d
--- /dev/null
+++ b/chromium/patches/patch-ui_gfx_font__fallback__linux.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- ui/gfx/font_fallback_linux.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/gfx/font_fallback_linux.cc
+@@ -15,6 +15,10 @@
+ #include "base/memory/ptr_util.h"
+ #include "ui/gfx/font.h"
+ 
++#if defined(OS_BSD)
++#include <unistd.h>
++#endif
++
+ namespace gfx {
+ 
+ namespace {
diff --git a/chromium/patches/patch-ui_gfx_font__render__params.h b/chromium/patches/patch-ui_gfx_font__render__params.h
new file mode 100644
index 0000000000..52048be39d
--- /dev/null
+++ b/chromium/patches/patch-ui_gfx_font__render__params.h
@@ -0,0 +1,20 @@
+$NetBSD$
+
+--- ui/gfx/font_render_params.h.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/gfx/font_render_params.h
+@@ -106,13 +106,13 @@ GFX_EXPORT FontRenderParams GetFontRende
+     const FontRenderParamsQuery& query,
+     std::string* family_out);
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Clears GetFontRenderParams()'s cache. Intended to be called by tests that are
+ // changing Fontconfig's configuration.
+ GFX_EXPORT void ClearFontRenderParamsCacheForTest();
+ #endif
+ 
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ // Gets the device scale factor to query the FontRenderParams.
+ GFX_EXPORT float GetFontRenderParamsDeviceScaleFactor();
+ 
diff --git a/chromium/patches/patch-ui_gfx_render__text.cc b/chromium/patches/patch-ui_gfx_render__text.cc
new file mode 100644
index 0000000000..da565eec8b
--- /dev/null
+++ b/chromium/patches/patch-ui_gfx_render__text.cc
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- ui/gfx/render_text.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/gfx/render_text.cc
+@@ -972,32 +972,33 @@ void RenderText::SetDisplayOffset(int ho
+   const int extra_content = GetContentWidth() - display_rect_.width();
+   const int cursor_width = cursor_enabled_ ? 1 : 0;
+ 
+-  int min_offset = 0;
+-  int max_offset = 0;
++  // avoid collisions with vm_map.h on FreeBSD --cmt
++  int _min_offset = 0;
++  int _max_offset = 0;
+   if (extra_content > 0) {
+     switch (GetCurrentHorizontalAlignment()) {
+       case ALIGN_LEFT:
+-        min_offset = -extra_content;
++        _min_offset = -extra_content;
+         break;
+       case ALIGN_RIGHT:
+-        max_offset = extra_content;
++        _max_offset = extra_content;
+         break;
+       case ALIGN_CENTER:
+         // The extra space reserved for cursor at the end of the text is ignored
+         // when centering text. So, to calculate the valid range for offset, we
+         // exclude that extra space, calculate the range, and add it back to the
+         // range (if cursor is enabled).
+-        min_offset = -(extra_content - cursor_width + 1) / 2 - cursor_width;
+-        max_offset = (extra_content - cursor_width) / 2;
++        _min_offset = -(extra_content - cursor_width + 1) / 2 - cursor_width;
++        _max_offset = (extra_content - cursor_width) / 2;
+         break;
+       default:
+         break;
+     }
+   }
+-  if (horizontal_offset < min_offset)
+-    horizontal_offset = min_offset;
+-  else if (horizontal_offset > max_offset)
+-    horizontal_offset = max_offset;
++  if (horizontal_offset < _min_offset)
++    horizontal_offset = _min_offset;
++  else if (horizontal_offset > _max_offset)
++    horizontal_offset = _max_offset;
+ 
+   cached_bounds_and_offset_valid_ = true;
+   display_offset_.set_x(horizontal_offset);
diff --git a/chromium/patches/patch-ui_gl_BUILD.gn b/chromium/patches/patch-ui_gl_BUILD.gn
new file mode 100644
index 0000000000..00fa54f981
--- /dev/null
+++ b/chromium/patches/patch-ui_gl_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/gl/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/gl/BUILD.gn
+@@ -13,7 +13,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 || ozone_platform_x11
+ 
+ if (is_android) {
+@@ -170,7 +170,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/patches/patch-ui_gl_sync__control__vsync__provider.cc b/chromium/patches/patch-ui_gl_sync__control__vsync__provider.cc
new file mode 100644
index 0000000000..a4744f00b9
--- /dev/null
+++ b/chromium/patches/patch-ui_gl_sync__control__vsync__provider.cc
@@ -0,0 +1,65 @@
+$NetBSD$
+
+--- ui/gl/sync_control_vsync_provider.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/gl/sync_control_vsync_provider.cc
+@@ -11,7 +11,7 @@
+ #include "base/trace_event/trace_event.h"
+ #include "build/build_config.h"
+ 
+-#if defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
+ // 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;
+@@ -21,17 +21,17 @@ const int64_t kMaxVsyncIntervalUs = base
+ // we think the latest computed interval is invalid (noisey due to
+ // monitor configuration change, moving a window between monitors, etc.).
+ const double kRelativeIntervalDifferenceThreshold = 0.05;
+-#endif  // defined(OS_LINUX) || defined(OS_WIN)
++#endif  // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
+ 
+ namespace gl {
+ 
+ SyncControlVSyncProvider::SyncControlVSyncProvider() : gfx::VSyncProvider() {
+-#if defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
+   // On platforms where we can't get an accurate reading on the refresh
+   // rate we fall back to the assumption that we're displaying 60 frames
+   // per second.
+   last_good_interval_ = base::TimeDelta::FromSeconds(1) / 60;
+-#endif  // defined(OS_LINUX) || defined(OS_WIN)
++#endif  // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
+ }
+ 
+ SyncControlVSyncProvider::~SyncControlVSyncProvider() {}
+@@ -39,7 +39,7 @@ SyncControlVSyncProvider::~SyncControlVS
+ void SyncControlVSyncProvider::GetVSyncParameters(
+     const UpdateVSyncCallback& callback) {
+   TRACE_EVENT0("gpu", "SyncControlVSyncProvider::GetVSyncParameters");
+-#if defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
+   base::TimeTicks timebase;
+ 
+   int64_t system_time;
+@@ -129,10 +129,10 @@ void SyncControlVSyncProvider::GetVSyncP
+   last_timebase_ = timebase;
+   last_media_stream_counter_ = media_stream_counter;
+   callback.Run(timebase, last_good_interval_);
+-#endif  // defined(OS_LINUX) || defined(OS_WIN)
++#endif  // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_WIN)
+ }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ bool SyncControlVSyncProvider::AdjustSyncValues(int64_t* system_time,
+                                                 int64_t* media_stream_counter) {
+   // Both Intel and Mali drivers will return TRUE for GetSyncValues
+@@ -192,7 +192,7 @@ bool SyncControlVSyncProvider::AdjustSyn
+ 
+   return true;
+ }
+-#endif  // defined(OS_LINUX)
++#endif  // defined(OS_LINUX) || defined(OS_BSD)
+ 
+ #if defined(OS_WIN)
+ bool SyncControlVSyncProvider::AdjustSyncValues(int64_t* system_time,
diff --git a/chromium/patches/patch-ui_gl_sync__control__vsync__provider.h b/chromium/patches/patch-ui_gl_sync__control__vsync__provider.h
new file mode 100644
index 0000000000..abbae8a562
--- /dev/null
+++ b/chromium/patches/patch-ui_gl_sync__control__vsync__provider.h
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/gl/sync_control_vsync_provider.h.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/gl/sync_control_vsync_provider.h
+@@ -32,7 +32,7 @@ class GL_EXPORT SyncControlVSyncProvider
+   virtual bool GetMscRate(int32_t* numerator, int32_t* denominator) = 0;
+ 
+  private:
+-#if defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+   bool AdjustSyncValues(int64_t* system_time, int64_t* media_stream_counter);
+ 
+   base::TimeTicks last_timebase_;
+@@ -48,7 +48,7 @@ class GL_EXPORT SyncControlVSyncProvider
+   std::queue<base::TimeDelta> last_computed_intervals_;
+ #endif  //  defined(OS_LINUX) || defined(OS_WIN)
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   bool invalid_msc_ = false;
+ #endif  // defined(OS_LINUX)
+ 
diff --git a/chromium/patches/patch-ui_message__center_message__center__style.h b/chromium/patches/patch-ui_message__center_message__center__style.h
new file mode 100644
index 0000000000..eefd0a6ae8
--- /dev/null
+++ b/chromium/patches/patch-ui_message__center_message__center__style.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/message_center/message_center_style.h.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/message_center/message_center_style.h
+@@ -115,7 +115,7 @@ const int kButtonHorizontalPadding = 16;
+ const int kButtonIconTopPadding = 11;      // In DIPs.
+ const int kButtonIconToTitlePadding = 16;  // In DIPs.
+ 
+-#if !defined(OS_LINUX) || defined(USE_AURA)
++#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(USE_AURA)
+ const SkColor kButtonSeparatorColor = SkColorSetRGB(234, 234, 234);
+ const SkColor kHoveredButtonBackgroundColor = SkColorSetRGB(243, 243, 243);
+ #endif
diff --git a/chromium/patches/patch-ui_message__center_views_message__center__button__bar.cc b/chromium/patches/patch-ui_message__center_views_message__center__button__bar.cc
new file mode 100644
index 0000000000..610097dd41
--- /dev/null
+++ b/chromium/patches/patch-ui_message__center_views_message__center__button__bar.cc
@@ -0,0 +1,49 @@
+$NetBSD$
+
+--- ui/message_center/views/message_center_button_bar.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/message_center/views/message_center_button_bar.cc
+@@ -95,7 +95,7 @@ MessageCenterButtonBar::MessageCenterBut
+     const base::string16& title)
+     : message_center_view_(message_center_view),
+       message_center_(message_center),
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+       close_bubble_button_(NULL),
+ #endif
+       title_arrow_(NULL),
+@@ -170,7 +170,7 @@ MessageCenterButtonBar::MessageCenterBut
+                                    IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL);
+   button_container_->AddChildView(settings_button_);
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   close_bubble_button_ = new views::ImageButton(this);
+   close_bubble_button_->SetImage(
+       views::Button::STATE_NORMAL,
+@@ -232,7 +232,7 @@ void MessageCenterButtonBar::ViewVisibil
+                     0,
+                     0);
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   // The close-bubble button.
+   column->AddColumn(views::GridLayout::LEADING,
+                     views::GridLayout::LEADING,
+@@ -247,7 +247,7 @@ void MessageCenterButtonBar::ViewVisibil
+     layout->AddView(title_arrow_);
+   layout->AddView(notification_label_);
+   layout->AddView(button_container_);
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   layout->AddView(close_bubble_button_);
+ #endif
+ }
+@@ -297,7 +297,7 @@ void MessageCenterButtonBar::ButtonPress
+     else
+       message_center()->EnterQuietModeWithExpire(base::TimeDelta::FromDays(1));
+     quiet_mode_button_->SetToggled(message_center()->IsQuietMode());
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   } else if (sender == close_bubble_button_) {
+     message_center_view()->tray()->HideMessageCenterBubble();
+ #endif
diff --git a/chromium/patches/patch-ui_message__center_views_message__center__button__bar.h b/chromium/patches/patch-ui_message__center_views_message__center__button__bar.h
new file mode 100644
index 0000000000..73553a4601
--- /dev/null
+++ b/chromium/patches/patch-ui_message__center_views_message__center__button__bar.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/message_center/views/message_center_button_bar.h.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/message_center/views/message_center_button_bar.h
+@@ -74,7 +74,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.
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   views::ImageButton* close_bubble_button_;
+ #endif
+ 
diff --git a/chromium/patches/patch-ui_message__center_views_message__view__factory.cc b/chromium/patches/patch-ui_message__center_views_message__view__factory.cc
new file mode 100644
index 0000000000..d192358dfa
--- /dev/null
+++ b/chromium/patches/patch-ui_message__center_views_message__view__factory.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/message_center/views/message_view_factory.cc.orig	2017-02-02 02:03:13.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/patches/patch-ui_resources_ui__resources.grd b/chromium/patches/patch-ui_resources_ui__resources.grd
new file mode 100644
index 0000000000..b3a9e5f311
--- /dev/null
+++ b/chromium/patches/patch-ui_resources_ui__resources.grd
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/resources/ui_resources.grd.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/resources/ui_resources.grd
+@@ -15,7 +15,7 @@
+       <!-- KEEP THESE IN ALPHABETICAL ORDER!  DO NOT ADD TO RANDOM PLACES JUST
+            BECAUSE YOUR RESOURCES ARE FUNCTIONALLY RELATED OR FALL UNDER THE
+            SAME CONDITIONALS. -->
+-      <if expr="is_linux and use_aura">
++      <if expr="(is_linux or is_bsd) and use_aura">
+         <structure type="chrome_scaled_image" name="IDR_AURA_CURSOR_BIG_ALIAS" file="common/pointers/alias_big.png" />
+         <structure type="chrome_scaled_image" name="IDR_AURA_CURSOR_BIG_CELL" file="common/pointers/cell_big.png" />
+         <structure type="chrome_scaled_image" name="IDR_AURA_CURSOR_BIG_COL_RESIZE" file="common/pointers/sb_h_double_arrow_big.png" />
diff --git a/chromium/patches/patch-ui_views_BUILD.gn b/chromium/patches/patch-ui_views_BUILD.gn
new file mode 100644
index 0000000000..487e050a5e
--- /dev/null
+++ b/chromium/patches/patch-ui_views_BUILD.gn
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/views/BUILD.gn.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/BUILD.gn
+@@ -426,7 +426,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 {
+@@ -618,7 +618,7 @@ component("views") {
+           "widget/desktop_aura/desktop_window_tree_host_ozone.cc",
+         ]
+       }
+-      if (is_linux) {
++      if (is_linux || is_bsd) {
+         sources += [
+           "style/platform_style_linux.cc",
+           "widget/desktop_aura/desktop_cursor_loader_updater_auralinux.cc",
diff --git a/chromium/patches/patch-ui_views_accessibility_native__view__accessibility.h b/chromium/patches/patch-ui_views_accessibility_native__view__accessibility.h
new file mode 100644
index 0000000000..ae51367171
--- /dev/null
+++ b/chromium/patches/patch-ui_views_accessibility_native__view__accessibility.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/accessibility/native_view_accessibility.h.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/accessibility/native_view_accessibility.h
+@@ -22,7 +22,7 @@
+ #define PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL 1
+ #endif
+ 
+-#if defined(OS_LINUX) && defined(USE_X11) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && defined(USE_X11) && !defined(OS_CHROMEOS)
+ #define PLATFORM_HAS_NATIVE_VIEW_ACCESSIBILITY_IMPL 1
+ #endif
+ 
diff --git a/chromium/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc b/chromium/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc
new file mode 100644
index 0000000000..80841a90c8
--- /dev/null
+++ b/chromium/patches/patch-ui_views_bubble_bubble__dialog__delegate.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/bubble/bubble_dialog_delegate.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/bubble/bubble_dialog_delegate.cc
+@@ -73,7 +73,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/patches/patch-ui_views_controls_label.cc b/chromium/patches/patch-ui_views_controls_label.cc
new file mode 100644
index 0000000000..40bea69323
--- /dev/null
+++ b/chromium/patches/patch-ui_views_controls_label.cc
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- ui/views/controls/label.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/controls/label.cc
+@@ -523,7 +523,7 @@ bool Label::OnMousePressed(const ui::Mou
+     GetFocusManager()->SetFocusedView(this);
+   }
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   if (event.IsOnlyMiddleMouseButton() && GetFocusManager())
+     GetFocusManager()->SetFocusedView(this);
+ #endif
+@@ -687,7 +687,7 @@ bool Label::PasteSelectionClipboard() {
+ }
+ 
+ void Label::UpdateSelectionClipboard() {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   if (!obscured()) {
+     ui::ScopedClipboardWriter(ui::CLIPBOARD_TYPE_SELECTION)
+         .WriteText(GetSelectedText());
diff --git a/chromium/patches/patch-ui_views_controls_textfield_textfield.cc b/chromium/patches/patch-ui_views_controls_textfield_textfield.cc
new file mode 100644
index 0000000000..16ea1ff0ea
--- /dev/null
+++ b/chromium/patches/patch-ui_views_controls_textfield_textfield.cc
@@ -0,0 +1,75 @@
+$NetBSD$
+
+--- ui/views/controls/textfield/textfield.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/controls/textfield/textfield.cc
+@@ -53,7 +53,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/base/ime/linux/text_edit_command_auralinux.h"
+ #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
+@@ -146,14 +146,14 @@ ui::TextEditCommand GetCommandForKeyEven
+     case ui::VKEY_BACK:
+       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 ui::TextEditCommand::DELETE_TO_BEGINNING_OF_LINE;
+ #endif
+       return ui::TextEditCommand::DELETE_WORD_BACKWARD;
+     case ui::VKEY_DELETE:
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+       // Only erase by line break on Linux and ChromeOS.
+       if (shift && control)
+         return ui::TextEditCommand::DELETE_TO_END_OF_LINE;
+@@ -580,7 +580,7 @@ bool Textfield::OnMousePressed(const ui:
+     ShowImeIfNeeded();
+   }
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   if (!handled && !HasFocus() && event.IsOnlyMiddleMouseButton())
+     RequestFocus();
+ #endif
+@@ -617,7 +617,7 @@ bool Textfield::OnKeyPressed(const ui::K
+   if (!textfield)
+     return handled;
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
+       ui::GetTextEditKeyBindingsDelegate();
+   std::vector<ui::TextEditCommandAuraLinux> commands;
+@@ -757,7 +757,7 @@ void Textfield::AboutToRequestFocusFromT
+ }
+ 
+ bool Textfield::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   // Skip any accelerator handling that conflicts with custom keybindings.
+   ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
+       ui::GetTextEditKeyBindingsDelegate();
+@@ -1035,7 +1035,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)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   // Desktop Linux Aura does not yet support transparency in drag images.
+   canvas->DrawColor(GetBackgroundColor());
+ #endif
+@@ -1827,7 +1827,7 @@ bool Textfield::PasteSelectionClipboard(
+ }
+ 
+ void Textfield::UpdateSelectionClipboard() {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   if (text_input_type_ != ui::TEXT_INPUT_TYPE_PASSWORD) {
+     ui::ScopedClipboardWriter(ui::CLIPBOARD_TYPE_SELECTION)
+         .WriteText(GetSelectedText());
diff --git a/chromium/patches/patch-ui_views_controls_webview_BUILD.gn b/chromium/patches/patch-ui_views_controls_webview_BUILD.gn
new file mode 100644
index 0000000000..c7ad441e93
--- /dev/null
+++ b/chromium/patches/patch-ui_views_controls_webview_BUILD.gn
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/controls/webview/BUILD.gn.orig	2017-02-02 02:03:13.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/patches/patch-ui_views_corewm_tooltip__aura.cc b/chromium/patches/patch-ui_views_corewm_tooltip__aura.cc
new file mode 100644
index 0000000000..c058497d8b
--- /dev/null
+++ b/chromium/patches/patch-ui_views_corewm_tooltip__aura.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/corewm/tooltip_aura.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/corewm/tooltip_aura.cc
+@@ -34,7 +34,7 @@ const int kCursorOffsetY = 15;
+ 
+ // TODO(varkha): Update if native widget can be transparent on Linux.
+ bool CanUseTranslucentTooltipWidget() {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   return false;
+ #else
+   return true;
diff --git a/chromium/patches/patch-ui_views_examples_widget__example.cc b/chromium/patches/patch-ui_views_examples_widget__example.cc
new file mode 100644
index 0000000000..c60bfccf47
--- /dev/null
+++ b/chromium/patches/patch-ui_views_examples_widget__example.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/examples/widget_example.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/examples/widget_example.cc
+@@ -77,7 +77,7 @@ void WidgetExample::CreateExampleView(Vi
+   BuildButton(container, "Popup widget", POPUP);
+   BuildButton(container, "Dialog widget", DIALOG);
+   BuildButton(container, "Modal Dialog", MODAL_DIALOG);
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+   // Windows does not support TYPE_CONTROL top-level widgets.
+   BuildButton(container, "Child widget", CHILD);
+ #endif
diff --git a/chromium/patches/patch-ui_views_selection__controller.cc b/chromium/patches/patch-ui_views_selection__controller.cc
new file mode 100644
index 0000000000..eac4d654c0
--- /dev/null
+++ b/chromium/patches/patch-ui_views_selection__controller.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/selection_controller.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/selection_controller.cc
+@@ -20,7 +20,7 @@ SelectionController::SelectionController
+       delegate_(delegate),
+       handles_selection_clipboard_(false) {
+ // On Linux, update the selection clipboard on a text selection.
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+   set_handles_selection_clipboard(true);
+ #endif
+ 
diff --git a/chromium/patches/patch-ui_views_style_platform__style.cc b/chromium/patches/patch-ui_views_style_platform__style.cc
new file mode 100644
index 0000000000..17560c6191
--- /dev/null
+++ b/chromium/patches/patch-ui_views_style_platform__style.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/style/platform_style.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/style/platform_style.cc
+@@ -17,7 +17,7 @@
+ #include "ui/views/controls/focusable_border.h"
+ #include "ui/views/controls/scrollbar/scroll_bar_views.h"
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #define DESKTOP_LINUX
+ #endif
+ 
diff --git a/chromium/patches/patch-ui_views_views__delegate.cc b/chromium/patches/patch-ui_views_views__delegate.cc
new file mode 100644
index 0000000000..c10749d973
--- /dev/null
+++ b/chromium/patches/patch-ui_views_views__delegate.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/views_delegate.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/views_delegate.cc
+@@ -71,7 +71,7 @@ HICON ViewsDelegate::GetDefaultWindowIco
+ bool ViewsDelegate::IsWindowInMetro(gfx::NativeWindow window) const {
+   return false;
+ }
+-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ gfx::ImageSkia* ViewsDelegate::GetDefaultWindowIcon() const {
+   return nullptr;
+ }
diff --git a/chromium/patches/patch-ui_views_views__delegate.h b/chromium/patches/patch-ui_views_views__delegate.h
new file mode 100644
index 0000000000..0c0a245a1a
--- /dev/null
+++ b/chromium/patches/patch-ui_views_views__delegate.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/views_delegate.h.orig	2017-02-02 02:03:13.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
+   // environment.
+   virtual bool IsWindowInMetro(gfx::NativeWindow window) const;
+-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
+   virtual gfx::ImageSkia* GetDefaultWindowIcon() const;
+ #endif
+ 
diff --git a/chromium/patches/patch-ui_views_views__switches.cc b/chromium/patches/patch-ui_views_views__switches.cc
new file mode 100644
index 0000000000..408f0c4697
--- /dev/null
+++ b/chromium/patches/patch-ui_views_views__switches.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/views_switches.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/views_switches.cc
+@@ -18,7 +18,7 @@ const char kDisableViewsRectBasedTargeti
+     "disable-views-rect-based-targeting";
+ 
+ bool IsRectBasedTargetingEnabled() {
+-#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+   return !base::CommandLine::ForCurrentProcess()->HasSwitch(
+       kDisableViewsRectBasedTargeting);
+ #else
diff --git a/chromium/patches/patch-ui_views_window_custom__frame__view.cc b/chromium/patches/patch-ui_views_window_custom__frame__view.cc
new file mode 100644
index 0000000000..9d3761c060
--- /dev/null
+++ b/chromium/patches/patch-ui_views_window_custom__frame__view.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/window/custom_frame_view.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/window/custom_frame_view.cc
+@@ -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.
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD)
+   return FrameBorderThickness();
+ #else
+   return frame_->IsMaximized() ? FrameBorderThickness() : kFrameShadowThickness;
diff --git a/chromium/patches/patch-ui_views_window_dialog__delegate.cc b/chromium/patches/patch-ui_views_window_dialog__delegate.cc
new file mode 100644
index 0000000000..e3c172c0d9
--- /dev/null
+++ b/chromium/patches/patch-ui_views_window_dialog__delegate.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/views/window/dialog_delegate.cc.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/views/window/dialog_delegate.cc
+@@ -56,7 +56,7 @@ Widget::InitParams DialogDelegate::GetDi
+   params.bounds = bounds;
+   DialogDelegate* dialog = delegate->AsDialogDelegate();
+ 
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#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_custom_frame_ &= parent != NULL;
diff --git a/chromium/patches/patch-ui_webui_resources_js_cr.js b/chromium/patches/patch-ui_webui_resources_js_cr.js
new file mode 100644
index 0000000000..fd959145a0
--- /dev/null
+++ b/chromium/patches/patch-ui_webui_resources_js_cr.js
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- ui/webui/resources/js/cr.js.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/webui/resources/js/cr.js
+@@ -451,6 +451,11 @@ var cr = cr || function() {
+     get doc() {
+       return document;
+     },
++    
++    /** Whether this is on *BSD. */
++    get isBSD() {
++      return /BSD/.test(navigator.userAgent);
++    },
+ 
+     /** Whether we are using a Mac or not. */
+     get isMac() {
diff --git a/chromium/patches/patch-ui_webui_resources_js_icon.js b/chromium/patches/patch-ui_webui_resources_js_icon.js
new file mode 100644
index 0000000000..d3bd09f8bd
--- /dev/null
+++ b/chromium/patches/patch-ui_webui_resources_js_icon.js
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- ui/webui/resources/js/icon.js.orig	2017-02-02 02:03:13.000000000 +0000
++++ ui/webui/resources/js/icon.js
+@@ -14,7 +14,7 @@ cr.define('cr.icon', function() {
+       // supports SCALE_FACTOR_100P on all non-iOS platforms.
+       supportedScaleFactors.push(1);
+     }
+-    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 have
+       // high DPI assets for 2x.  Let the renderer pick the closest image for
diff --git a/chromium/patches/patch-v8_BUILD.gn b/chromium/patches/patch-v8_BUILD.gn
new file mode 100644
index 0000000000..aca9c52942
--- /dev/null
+++ b/chromium/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/patches/patch-v8_src_base_platform_platform-netbsd.cc b/chromium/patches/patch-v8_src_base_platform_platform-netbsd.cc
new file mode 100644
index 0000000000..e2d744339c
--- /dev/null
+++ b/chromium/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/patches/patch-v8_src_base_platform_platform-posix.cc b/chromium/patches/patch-v8_src_base_platform_platform-posix.cc
new file mode 100644
index 0000000000..8ea1f9b17d
--- /dev/null
+++ b/chromium/patches/patch-v8_src_base_platform_platform-posix.cc
@@ -0,0 +1,51 @@
+$NetBSD$
+
+--- v8/src/base/platform/platform-posix.cc.orig	2016-11-10 20:03:08.000000000 +0000
++++ v8/src/base/platform/platform-posix.cc
+@@ -27,6 +27,10 @@
+ #include <sys/sysctl.h>  // NOLINT, for sysctl
+ #endif
+ 
++#if defined(__NetBSD__)
++#include <lwp.h>	// for _lwp_self
++#endif
++
+ #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());
++#elif V8_OS_DRAGONFLYBSD || defined(__DragonFly__)
++  return static_cast<int>(lwp_gettid());
++#elif V8_OS_FREEBSD
++  return static_cast<int>(pthread_getthreadid_np());
++#elif V8_OS_NETBSD
++  return reinterpret_cast<uint64_t>(pthread_self());
+ #elif V8_OS_AIX
+   return static_cast<int>(thread_self());
+ #elif V8_OS_SOLARIS
+@@ -532,8 +542,13 @@ Thread::Thread(const Options& options)
+     : data_(new PlatformData),
+       stack_size_(options.stack_size()),
+       start_semaphore_(NULL) {
++#if defined(__NetBSD__)
++  if (stack_size_ > 0 && static_cast<size_t>(stack_size_) < sysconf(_SC_THREAD_STACK_MIN)) {
++    stack_size_ = sysconf(_SC_THREAD_STACK_MIN);
++#else
+   if (stack_size_ > 0 && static_cast<size_t>(stack_size_) < PTHREAD_STACK_MIN) {
+     stack_size_ = PTHREAD_STACK_MIN;
++#endif
+   }
+   set_name(options.name());
+ }
+@@ -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);
+-  pthread_setname_np(pthread_self(), "%s", name);
++  pthread_setname_np(pthread_self(), "%s", (void *)name);
+ #elif V8_OS_MACOSX
+   // pthread_setname_np is only available in 10.6 or later, so test
+   // for it at runtime.
diff --git a/chromium/patches/patch-v8_src_base_platform_platform.h b/chromium/patches/patch-v8_src_base_platform_platform.h
new file mode 100644
index 0000000000..3053955077
--- /dev/null
+++ b/chromium/patches/patch-v8_src_base_platform_platform.h
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- 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_
+ 
+ #include <cstdarg>
++#include <cstdio>
+ #include <string>
+ #include <vector>
+ 
diff --git a/chromium/patches/patch-v8_src_globals.h b/chromium/patches/patch-v8_src_globals.h
new file mode 100644
index 0000000000..17ff6e41f0
--- /dev/null
+++ b/chromium/patches/patch-v8_src_globals.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- v8/src/globals.h.orig	2017-02-02 02:04:00.000000000 +0000
++++ v8/src/globals.h
+@@ -182,7 +182,11 @@ const size_t kCodeRangeAreaAlignment = 2
+ const size_t kMaximalCodeRangeSize = 512 * MB;
+ const size_t kCodeRangeAreaAlignment = 64 * KB;  // OS page on PPC Linux
+ #else
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++const size_t kMaximalCodeRangeSize = 256 * MB;
++#else
+ const size_t kMaximalCodeRangeSize = 512 * MB;
++#endif
+ const size_t kCodeRangeAreaAlignment = 4 * KB;  // OS page.
+ #endif
+ #if V8_OS_WIN
diff --git a/chromium/patches/patch-v8_tools_run-llprof.sh b/chromium/patches/patch-v8_tools_run-llprof.sh
new file mode 100644
index 0000000000..b6e6743590
--- /dev/null
+++ b/chromium/patches/patch-v8_tools_run-llprof.sh
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- v8/tools/run-llprof.sh.orig	2017-02-02 02:04:01.000000000 +0000
++++ v8/tools/run-llprof.sh
+@@ -46,7 +46,7 @@ framework, then calls the low level tick
+ EOF
+ }
+ 
+-if [ $# -eq 0 ] || [ "$1" == "-h" ]  || [ "$1" == "--help" ] ; then
++if [ $# -eq 0 ] || [ "$1" = "-h" ]  || [ "$1" = "--help" ] ; then
+   usage
+   exit 1
+ fi


Home | Main Index | Thread Index | Old Index