aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/chromium/Makefile2
-rw-r--r--www/chromium/files/patch-chrome_browser_autocomplete_chrome_autocomplete_scheme_classifier.cc11
-rw-r--r--www/chromium/files/patch-chrome_browser_net_system_network_context_manager.cc20
-rw-r--r--www/chromium/files/patch-chrome_browser_password__manager_password_store_factory.cc11
-rw-r--r--www/chromium/files/patch-chrome_browser_profiles_chrome_browser_main_extra_parts_profiles.cc11
-rw-r--r--www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance_browser_proxy.js20
-rw-r--r--www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance_page.js33
-rw-r--r--www/chromium/files/patch-chromecast_browser_cast__browser_main_parts.cc29
-rw-r--r--www/chromium/files/patch-components_autofill_core_common_autofill_util.cc11
-rw-r--r--www/chromium/files/patch-components_download_internal_common_base_file.cc11
-rw-r--r--www/chromium/files/patch-components_previews_core_previews_features.cc11
-rw-r--r--www/chromium/files/patch-components_services_font_font_service_app.cc11
-rw-r--r--www/chromium/files/patch-components_storage__monitor_removable_device_constants.cc11
-rw-r--r--www/chromium/files/patch-components_storage__monitor_removable_device_constants.h11
-rw-r--r--www/chromium/files/patch-content_browser_renderer__host_input_input_device_change_observer.cc29
-rw-r--r--www/chromium/files/patch-content_browser_service_worker_service_worker_fetch_dispatcher.cc11
-rw-r--r--www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.cc69
-rw-r--r--www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.h25
-rw-r--r--www/chromium/files/patch-content_public_browser_web_ui_data_source.h51
-rw-r--r--www/chromium/files/patch-content_public_common_use_zoom_for_dsf_policy.cc11
-rw-r--r--www/chromium/files/patch-content_renderer_media_stream_processed__local__audio__source.cc17
-rw-r--r--www/chromium/files/patch-extensions_shell_app_shell_main_delegate.cc27
-rw-r--r--www/chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc20
-rw-r--r--www/chromium/files/patch-media_capture_video_mock_gpu_memory_buffer_manager.cc11
-rw-r--r--www/chromium/files/patch-media_video_gpu_memory_buffer_video_frame_pool.cc11
-rw-r--r--www/chromium/files/patch-mojo_public_c_system_thunks.cc47
-rw-r--r--www/chromium/files/patch-net_socket_udp__socket__posix.cc23
-rw-r--r--www/chromium/files/patch-remoting_host_evaluate_capability.cc11
-rw-r--r--www/chromium/files/patch-remoting_host_host_attributes.cc11
-rw-r--r--www/chromium/files/patch-services_content_simple_browser_simple_browser_service.h20
-rw-r--r--www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor.cc13
-rw-r--r--www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor_linux.cc14
-rw-r--r--www/chromium/files/patch-services_network_network_context.cc38
-rw-r--r--www/chromium/files/patch-services_service__manager_embedder_main.cc11
-rw-r--r--www/chromium/files/patch-services_tracing_public_cpp_trace_event_agent.cc11
-rw-r--r--www/chromium/files/patch-services_tracing_tracing_service.h11
-rw-r--r--www/chromium/files/patch-third__party_blink_renderer_core_inspector_inspector_memory_agent.cc11
-rw-r--r--www/chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar_theme_aura.cc11
-rw-r--r--www/chromium/files/patch-third__party_blink_renderer_platform_fonts_font_description.cc20
-rw-r--r--www/chromium/files/patch-third_party_protobuf_src_google_protobuf_stubs_platform_macros.h11
-rw-r--r--www/chromium/files/patch-ui_events_event__switches.h10
-rw-r--r--www/chromium/files/patch-ui_gl_sync__control__vsync__provider.cc13
-rw-r--r--www/chromium/files/patch-v8_src_builtins_builtins-iterator-gen.cc19
-rw-r--r--www/chromium/files/patch-v8_src_builtins_builtins-string-gen.cc61
-rw-r--r--www/chromium/files/patch-v8_src_builtins_builtins-string-gen.h15
45 files changed, 849 insertions, 17 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index c48c6a255e47..062f1e9f2739 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -3,6 +3,7 @@
PORTNAME= chromium
PORTVERSION= 71.0.3578.98
+PORTREVISION= 1
CATEGORIES?= www
MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/ \
LOCAL/cpm/chromium/:fonts
@@ -104,6 +105,7 @@ EXTRA_PATCHES+= ${FILESDIR}/extra-patch-clang
# replace_gn_files.py script, some parts just turned on/off for target host
# OS "target_os == is_bsd", like libusb, libpci.
GN_ARGS+= clang_use_chrome_plugins=false \
+ enable_hangout_services_extension=true \
enable_nacl=false \
enable_one_click_signin=true \
enable_remoting=false \
diff --git a/www/chromium/files/patch-chrome_browser_autocomplete_chrome_autocomplete_scheme_classifier.cc b/www/chromium/files/patch-chrome_browser_autocomplete_chrome_autocomplete_scheme_classifier.cc
new file mode 100644
index 000000000000..564a3f44e689
--- /dev/null
+++ b/www/chromium/files/patch-chrome_browser_autocomplete_chrome_autocomplete_scheme_classifier.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig 2019-01-09 12:28:40.004958000 +0100
++++ chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc 2019-01-09 12:28:54.516042000 +0100
+@@ -59,7 +59,7 @@
+ return metrics::OmniboxInputType::QUERY;
+
+ case ExternalProtocolHandler::UNKNOWN: {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Linux impl of GetApplicationNameForProtocol doesn't distinguish
+ // between URL schemes with handers and those without. This will
+ // make the default behaviour be search on Linux.
diff --git a/www/chromium/files/patch-chrome_browser_net_system_network_context_manager.cc b/www/chromium/files/patch-chrome_browser_net_system_network_context_manager.cc
new file mode 100644
index 000000000000..f0610ac5ede5
--- /dev/null
+++ b/www/chromium/files/patch-chrome_browser_net_system_network_context_manager.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/net/system_network_context_manager.cc.orig 2019-01-09 22:09:37.510094000 +0100
++++ chrome/browser/net/system_network_context_manager.cc 2019-01-09 22:10:30.828698000 +0100
+@@ -67,7 +67,7 @@
+ #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
+ #endif // defined(OS_CHROMEOS)
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ #include "chrome/common/chrome_paths_internal.h"
+ #include "chrome/common/chrome_switches.h"
+ #include "chrome/grit/chromium_strings.h"
+@@ -513,7 +513,7 @@
+ content::GetNetworkService()->ConfigureStubHostResolver(
+ stub_resolver_enabled, std::move(dns_over_https_servers));
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+
diff --git a/www/chromium/files/patch-chrome_browser_password__manager_password_store_factory.cc b/www/chromium/files/patch-chrome_browser_password__manager_password_store_factory.cc
new file mode 100644
index 000000000000..4c5727f18749
--- /dev/null
+++ b/www/chromium/files/patch-chrome_browser_password__manager_password_store_factory.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/password_manager/password_store_factory.cc.orig 2019-01-09 12:33:02.101317000 +0100
++++ chrome/browser/password_manager/password_store_factory.cc 2019-01-09 12:33:45.948473000 +0100
+@@ -300,7 +300,7 @@
+ password_manager_util::RemoveUselessCredentials(ps, profile->GetPrefs(), 60,
+ network_context_getter);
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \
+ (defined(OS_LINUX) && !defined(OS_CHROMEOS))
+ std::unique_ptr<password_manager::PasswordStoreSigninNotifier> notifier =
+ std::make_unique<password_manager::PasswordStoreSigninNotifierImpl>(
diff --git a/www/chromium/files/patch-chrome_browser_profiles_chrome_browser_main_extra_parts_profiles.cc b/www/chromium/files/patch-chrome_browser_profiles_chrome_browser_main_extra_parts_profiles.cc
new file mode 100644
index 000000000000..7f597a8c14b4
--- /dev/null
+++ b/www/chromium/files/patch-chrome_browser_profiles_chrome_browser_main_extra_parts_profiles.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2019-01-10 01:15:46.031074000 +0100
++++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc 2019-01-10 01:16:16.877359000 +0100
+@@ -317,7 +317,7 @@
+ #if !defined(OS_ANDROID)
+ MediaGalleriesPreferencesFactory::GetInstance();
+ #endif
+-#if defined(OS_WIN) || defined(OS_MACOSX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD) || \
+ (defined(OS_LINUX) && !defined(OS_CHROMEOS))
+ metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance();
+ #endif
diff --git a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance_browser_proxy.js b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance_browser_proxy.js
new file mode 100644
index 000000000000..fcfb1883ec6f
--- /dev/null
+++ b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance_browser_proxy.js
@@ -0,0 +1,20 @@
+--- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js.orig 2019-01-09 12:44:51.519192000 +0100
++++ chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js 2019-01-09 12:45:25.405099000 +0100
+@@ -35,7 +35,7 @@
+
+ useDefaultTheme() {}
+
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ useSystemTheme() {}
+
+ // </if>
+@@ -93,7 +93,7 @@
+ chrome.send('useDefaultTheme');
+ }
+
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ /** @override */
+ useSystemTheme() {
+ chrome.send('useSystemTheme');
diff --git a/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance_page.js b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance_page.js
new file mode 100644
index 000000000000..64edd249c523
--- /dev/null
+++ b/www/chromium/files/patch-chrome_browser_resources_settings_appearance__page_appearance_page.js
@@ -0,0 +1,33 @@
+--- chrome/browser/resources/settings/appearance_page/appearance_page.js.orig 2019-01-09 12:45:37.575004000 +0100
++++ chrome/browser/resources/settings/appearance_page/appearance_page.js 2019-01-09 12:46:51.094149000 +0100
+@@ -120,7 +120,7 @@
+ 'defaultFontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)',
+ 'themeChanged_(prefs.extensions.theme.id.value, useSystemTheme_)',
+
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ // NOTE: this pref only exists on Linux.
+ 'useSystemThemePrefChanged_(prefs.extensions.theme.use_system.value)',
+ // </if>
+@@ -221,7 +221,7 @@
+ this.browserProxy_.useDefaultTheme();
+ },
+
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ /**
+ * @param {boolean} useSystemTheme
+ * @private
+@@ -289,10 +289,10 @@
+ }
+
+ let i18nId;
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ i18nId = useSystemTheme ? 'systemTheme' : 'classicTheme';
+ // </if>
+- // <if expr="not is_linux or chromeos">
++ // <if expr="not is_bsd or chromeos">
+ i18nId = 'chooseFromWebStore';
+ // </if>
+ this.themeSublabel_ = this.i18n(i18nId);
diff --git a/www/chromium/files/patch-chromecast_browser_cast__browser_main_parts.cc b/www/chromium/files/patch-chromecast_browser_cast__browser_main_parts.cc
new file mode 100644
index 000000000000..2dd826ec3cc0
--- /dev/null
+++ b/www/chromium/files/patch-chromecast_browser_cast__browser_main_parts.cc
@@ -0,0 +1,29 @@
+--- chromecast/browser/cast_browser_main_parts.cc.orig 2019-01-10 01:22:24.493908000 +0100
++++ chromecast/browser/cast_browser_main_parts.cc 2019-01-10 01:23:14.020775000 +0100
+@@ -73,7 +73,7 @@
+ #include "ui/compositor/compositor_switches.h"
+ #include "ui/gl/gl_switches.h"
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include <fontconfig/fontconfig.h>
+ #include <signal.h>
+ #include <sys/prctl.h>
+@@ -246,7 +246,7 @@
+ {cc::switches::kDisableThreadedAnimation, ""},
+ #endif // defined(OS_ANDROID)
+ #endif // BUILDFLAG(IS_CAST_AUDIO_ONLY)
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #if defined(ARCH_CPU_X86_FAMILY)
+ // This is needed for now to enable the x11 Ozone platform to work with
+ // current Linux/NVidia OpenGL drivers.
+@@ -393,7 +393,7 @@
+ }
+
+ void CastBrowserMainParts::ToolkitInitialized() {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Without this call, the FontConfig library gets implicitly initialized
+ // on the first call to FontConfig. Since it's not safe to initialize it
+ // concurrently from multiple threads, we explicitly initialize it here
diff --git a/www/chromium/files/patch-components_autofill_core_common_autofill_util.cc b/www/chromium/files/patch-components_autofill_core_common_autofill_util.cc
new file mode 100644
index 000000000000..99f48c0bb150
--- /dev/null
+++ b/www/chromium/files/patch-components_autofill_core_common_autofill_util.cc
@@ -0,0 +1,11 @@
+--- components/autofill/core/common/autofill_util.cc.orig 2019-01-09 12:24:12.925267000 +0100
++++ components/autofill/core/common/autofill_util.cc 2019-01-09 12:24:28.939308000 +0100
+@@ -202,7 +202,7 @@
+ }
+
+ bool ShouldAutoselectFirstSuggestionOnArrowDown() {
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ return true;
+ #else
+ return false;
diff --git a/www/chromium/files/patch-components_download_internal_common_base_file.cc b/www/chromium/files/patch-components_download_internal_common_base_file.cc
new file mode 100644
index 000000000000..ba807f1f3cd3
--- /dev/null
+++ b/www/chromium/files/patch-components_download_internal_common_base_file.cc
@@ -0,0 +1,11 @@
+--- components/download/internal/common/base_file.cc.orig 2019-01-09 12:22:40.588572000 +0100
++++ components/download/internal/common/base_file.cc 2019-01-09 12:23:00.218681000 +0100
+@@ -446,7 +446,7 @@
+ 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 {
+
diff --git a/www/chromium/files/patch-components_previews_core_previews_features.cc b/www/chromium/files/patch-components_previews_core_previews_features.cc
new file mode 100644
index 000000000000..4c2bc8ae79f4
--- /dev/null
+++ b/www/chromium/files/patch-components_previews_core_previews_features.cc
@@ -0,0 +1,11 @@
+--- components/previews/core/previews_features.cc.orig 2019-01-09 12:58:28.080581000 +0100
++++ components/previews/core/previews_features.cc 2019-01-09 12:58:43.775518000 +0100
+@@ -14,7 +14,7 @@
+ // are enabled are controlled by other features.
+ const base::Feature kPreviews {
+ "Previews",
+-#if defined(OS_ANDROID) || defined(OS_LINUX)
++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD)
+ // Previews allowed for Android (but also allow on Linux for dev/debug).
+ base::FEATURE_ENABLED_BY_DEFAULT
+ #else // !defined(OS_ANDROID) || defined(OS_LINUX)
diff --git a/www/chromium/files/patch-components_services_font_font_service_app.cc b/www/chromium/files/patch-components_services_font_font_service_app.cc
new file mode 100644
index 000000000000..8074cc7d600d
--- /dev/null
+++ b/www/chromium/files/patch-components_services_font_font_service_app.cc
@@ -0,0 +1,11 @@
+--- components/services/font/font_service_app.cc.orig 2019-01-09 12:18:51.659675000 +0100
++++ components/services/font/font_service_app.cc 2019-01-09 12:19:08.146474000 +0100
+@@ -21,7 +21,7 @@
+ #include "components/services/font/ppapi_fontconfig_matching.h" // nogncheck
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/test/fontconfig_util_linux.h"
+ #endif
+
diff --git a/www/chromium/files/patch-components_storage__monitor_removable_device_constants.cc b/www/chromium/files/patch-components_storage__monitor_removable_device_constants.cc
new file mode 100644
index 000000000000..a9b14084f313
--- /dev/null
+++ b/www/chromium/files/patch-components_storage__monitor_removable_device_constants.cc
@@ -0,0 +1,11 @@
+--- components/storage_monitor/removable_device_constants.cc.orig 2019-01-10 00:46:08.199066000 +0100
++++ components/storage_monitor/removable_device_constants.cc 2019-01-10 00:46:30.302527000 +0100
+@@ -10,7 +10,7 @@
+ const char kFSUniqueIdPrefix[] = "UUID:";
+ const char kVendorModelSerialPrefix[] = "VendorModelSerial:";
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ const char kVendorModelVolumeStoragePrefix[] = "VendorModelVolumeStorage:";
+ #endif
+
diff --git a/www/chromium/files/patch-components_storage__monitor_removable_device_constants.h b/www/chromium/files/patch-components_storage__monitor_removable_device_constants.h
new file mode 100644
index 000000000000..add0aea20c4b
--- /dev/null
+++ b/www/chromium/files/patch-components_storage__monitor_removable_device_constants.h
@@ -0,0 +1,11 @@
+--- components/storage_monitor/removable_device_constants.h.orig 2019-01-10 00:46:17.663204000 +0100
++++ components/storage_monitor/removable_device_constants.h 2019-01-10 00:46:47.654124000 +0100
+@@ -15,7 +15,7 @@
+ extern const char kFSUniqueIdPrefix[];
+ extern const char kVendorModelSerialPrefix[];
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ extern const char kVendorModelVolumeStoragePrefix[];
+ #endif
+
diff --git a/www/chromium/files/patch-content_browser_renderer__host_input_input_device_change_observer.cc b/www/chromium/files/patch-content_browser_renderer__host_input_input_device_change_observer.cc
new file mode 100644
index 000000000000..7a0a9a66a3e0
--- /dev/null
+++ b/www/chromium/files/patch-content_browser_renderer__host_input_input_device_change_observer.cc
@@ -0,0 +1,29 @@
+--- content/browser/renderer_host/input/input_device_change_observer.cc.orig 2019-01-09 11:52:33.084857000 +0100
++++ content/browser/renderer_host/input/input_device_change_observer.cc 2019-01-09 11:53:04.895039000 +0100
+@@ -9,7 +9,7 @@
+
+ #if defined(OS_WIN)
+ #include "ui/events/devices/input_device_observer_win.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ #include "ui/events/devices/input_device_manager.h"
+ #elif defined(OS_ANDROID)
+ #include "ui/events/devices/input_device_observer_android.h"
+@@ -21,7 +21,7 @@
+ render_view_host_ = rvh;
+ #if defined(OS_WIN)
+ ui::InputDeviceObserverWin::GetInstance()->AddObserver(this);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ ui::InputDeviceManager::GetInstance()->AddObserver(this);
+ #elif defined(OS_ANDROID)
+ ui::InputDeviceObserverAndroid::GetInstance()->AddObserver(this);
+@@ -31,7 +31,7 @@
+ InputDeviceChangeObserver::~InputDeviceChangeObserver() {
+ #if defined(OS_WIN)
+ ui::InputDeviceObserverWin::GetInstance()->RemoveObserver(this);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ ui::InputDeviceManager::GetInstance()->RemoveObserver(this);
+ #elif defined(OS_ANDROID)
+ ui::InputDeviceObserverAndroid::GetInstance()->RemoveObserver(this);
diff --git a/www/chromium/files/patch-content_browser_service_worker_service_worker_fetch_dispatcher.cc b/www/chromium/files/patch-content_browser_service_worker_service_worker_fetch_dispatcher.cc
new file mode 100644
index 000000000000..186da10fe523
--- /dev/null
+++ b/www/chromium/files/patch-content_browser_service_worker_service_worker_fetch_dispatcher.cc
@@ -0,0 +1,11 @@
+--- content/browser/service_worker/service_worker_fetch_dispatcher.cc.orig 2019-01-09 21:08:27.096726000 +0100
++++ content/browser/service_worker/service_worker_fetch_dispatcher.cc 2019-01-09 21:09:45.655612000 +0100
+@@ -625,7 +625,7 @@
+ network::ResourceRequest request;
+ request.method = original_request->method();
+ request.url = original_request->url();
+- // TODO(horo): Set site_for_cookies to support Same-site Cookies.
++ request.site_for_cookies = original_request->site_for_cookies();
+ request.request_initiator =
+ original_request->initiator().has_value()
+ ? original_request->initiator()
diff --git a/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.cc b/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.cc
new file mode 100644
index 000000000000..3c761fe60107
--- /dev/null
+++ b/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.cc
@@ -0,0 +1,69 @@
+--- content/browser/webui/web_ui_data_source_impl.cc.orig 2019-01-09 19:45:36.420732000 +0100
++++ content/browser/webui/web_ui_data_source_impl.cc 2019-01-09 19:53:12.218574000 +0100
+@@ -123,24 +123,24 @@
+ WebUIDataSourceImpl::~WebUIDataSourceImpl() {
+ }
+
+-void WebUIDataSourceImpl::AddString(base::StringPiece name,
++void WebUIDataSourceImpl::AddString(const std::string& name,
+ const base::string16& value) {
+ // TODO(dschuyler): Share only one copy of these strings.
+ localized_strings_.SetKey(name, base::Value(value));
+- replacements_[name.as_string()] = base::UTF16ToUTF8(value);
++ replacements_[name] = base::UTF16ToUTF8(value);
+ }
+
+-void WebUIDataSourceImpl::AddString(base::StringPiece name,
++void WebUIDataSourceImpl::AddString(const std::string& name,
+ const std::string& value) {
+ localized_strings_.SetKey(name, base::Value(value));
+- replacements_[name.as_string()] = value;
++ replacements_[name] = value;
+ }
+
+-void WebUIDataSourceImpl::AddLocalizedString(base::StringPiece name, int ids) {
++void WebUIDataSourceImpl::AddLocalizedString(const std::string& name, int ids) {
+ std::string utf8_str =
+ base::UTF16ToUTF8(GetContentClient()->GetLocalizedString(ids));
+ localized_strings_.SetKey(name, base::Value(utf8_str));
+- replacements_[name.as_string()] = utf8_str;
++ replacements_[name] = utf8_str;
+ }
+
+ void WebUIDataSourceImpl::AddLocalizedStrings(
+@@ -150,7 +150,7 @@
+ &replacements_);
+ }
+
+-void WebUIDataSourceImpl::AddBoolean(base::StringPiece name, bool value) {
++void WebUIDataSourceImpl::AddBoolean(const std::string& name, bool value) {
+ localized_strings_.SetBoolean(name, value);
+ // TODO(dschuyler): Change name of |localized_strings_| to |load_time_data_|
+ // or similar. These values haven't been found as strings for
+@@ -159,21 +159,21 @@
+ // replacements.
+ }
+
+-void WebUIDataSourceImpl::AddInteger(base::StringPiece name, int32_t value) {
++void WebUIDataSourceImpl::AddInteger(const std::string& name, int32_t value) {
+ localized_strings_.SetInteger(name, value);
+ }
+
+-void WebUIDataSourceImpl::SetJsonPath(base::StringPiece path) {
++void WebUIDataSourceImpl::SetJsonPath(const std::string& path) {
+ DCHECK(json_path_.empty());
+ DCHECK(!path.empty());
+
+- json_path_ = path.as_string();
++ json_path_ = path;
+ excluded_paths_.insert(json_path_);
+ }
+
+-void WebUIDataSourceImpl::AddResourcePath(base::StringPiece path,
++void WebUIDataSourceImpl::AddResourcePath(const std::string& path,
+ int resource_id) {
+- path_to_idr_map_[path.as_string()] = resource_id;
++ path_to_idr_map_[path] = resource_id;
+ }
+
+ void WebUIDataSourceImpl::SetDefaultResource(int resource_id) {
diff --git a/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.h b/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.h
new file mode 100644
index 000000000000..097d493816aa
--- /dev/null
+++ b/www/chromium/files/patch-content_browser_webui_web_ui_data_source_impl.h
@@ -0,0 +1,25 @@
+--- content/browser/webui/web_ui_data_source_impl.h.orig 2019-01-09 19:45:44.740357000 +0100
++++ content/browser/webui/web_ui_data_source_impl.h 2019-01-09 19:48:21.066890000 +0100
+@@ -31,15 +31,15 @@
+ public WebUIDataSource {
+ public:
+ // WebUIDataSource implementation:
+- void AddString(base::StringPiece name, const base::string16& value) override;
+- void AddString(base::StringPiece name, const std::string& value) override;
+- void AddLocalizedString(base::StringPiece name, int ids) override;
++ void AddString(const std::string& name, const base::string16& value) override;
++ void AddString(const std::string& name, const std::string& value) override;
++ void AddLocalizedString(const std::string& name, int ids) override;
+ void AddLocalizedStrings(
+ const base::DictionaryValue& localized_strings) override;
+- void AddBoolean(base::StringPiece name, bool value) override;
+- void AddInteger(base::StringPiece name, int32_t value) override;
+- void SetJsonPath(base::StringPiece path) override;
+- void AddResourcePath(base::StringPiece path, int resource_id) override;
++ void AddBoolean(const std::string& name, bool value) override;
++ void AddInteger(const std::string& name, int32_t value) override;
++ void SetJsonPath(const std::string& path) override;
++ void AddResourcePath(const std::string& path, int resource_id) override;
+ void SetDefaultResource(int resource_id) override;
+ void SetRequestFilter(
+ const WebUIDataSource::HandleRequestCallback& callback) override;
diff --git a/www/chromium/files/patch-content_public_browser_web_ui_data_source.h b/www/chromium/files/patch-content_public_browser_web_ui_data_source.h
new file mode 100644
index 000000000000..0f3eb01bf131
--- /dev/null
+++ b/www/chromium/files/patch-content_public_browser_web_ui_data_source.h
@@ -0,0 +1,51 @@
+--- content/public/browser/web_ui_data_source.h.orig 2019-01-09 12:09:09.754984000 +0100
++++ content/public/browser/web_ui_data_source.h 2019-01-09 12:14:15.249680000 +0100
+@@ -13,7 +13,6 @@
+
+ #include "base/callback.h"
+ #include "base/strings/string16.h"
+-#include "base/strings/string_piece.h"
+ #include "content/common/content_export.h"
+
+ namespace base {
+@@ -45,33 +44,33 @@
+ std::unique_ptr<base::DictionaryValue> update);
+
+ // Adds a string keyed to its name to our dictionary.
+- virtual void AddString(base::StringPiece name,
++ virtual void AddString(const std::string& name,
+ const base::string16& value) = 0;
+
+ // Adds a string keyed to its name to our dictionary.
+- virtual void AddString(base::StringPiece name, const std::string& value) = 0;
++ virtual void AddString(const std::string& name, const std::string& value) = 0;
+
+ // Adds a localized string with resource |ids| keyed to its name to our
+ // dictionary.
+- virtual void AddLocalizedString(base::StringPiece name, int ids) = 0;
++ virtual void AddLocalizedString(const std::string& name, int ids) = 0;
+
+ // Add strings from |localized_strings| to our dictionary.
+ virtual void AddLocalizedStrings(
+ const base::DictionaryValue& localized_strings) = 0;
+
+ // Adds a boolean keyed to its name to our dictionary.
+- virtual void AddBoolean(base::StringPiece name, bool value) = 0;
++ virtual void AddBoolean(const std::string& name, bool value) = 0;
+
+ // Adds a signed 32-bit integer keyed to its name to our dictionary. Larger
+ // integers may not be exactly representable in JavaScript. See
+ // MAX_SAFE_INTEGER in /v8/src/globals.h.
+- virtual void AddInteger(base::StringPiece name, int32_t value) = 0;
++ virtual void AddInteger(const std::string& name, int32_t value) = 0;
+
+ // Sets the path which will return the JSON strings.
+- virtual void SetJsonPath(base::StringPiece path) = 0;
++ virtual void SetJsonPath(const std::string& path) = 0;
+
+ // Adds a mapping between a path name and a resource to return.
+- virtual void AddResourcePath(base::StringPiece path, int resource_id) = 0;
++ virtual void AddResourcePath(const std::string& path, int resource_id) = 0;
+
+ // Sets the resource to returned when no other paths match.
+ virtual void SetDefaultResource(int resource_id) = 0;
diff --git a/www/chromium/files/patch-content_public_common_use_zoom_for_dsf_policy.cc b/www/chromium/files/patch-content_public_common_use_zoom_for_dsf_policy.cc
new file mode 100644
index 000000000000..b9e2948e9404
--- /dev/null
+++ b/www/chromium/files/patch-content_public_common_use_zoom_for_dsf_policy.cc
@@ -0,0 +1,11 @@
+--- content/public/common/use_zoom_for_dsf_policy.cc.orig 2019-01-09 12:03:15.666391000 +0100
++++ content/public/common/use_zoom_for_dsf_policy.cc 2019-01-09 12:03:35.744606000 +0100
+@@ -25,7 +25,7 @@
+ #endif
+
+ bool IsUseZoomForDSFEnabledByDefault() {
+-#if defined(OS_LINUX) || defined(OS_FUCHSIA)
++#if defined(OS_LINUX) || defined(OS_FUCHSIA) || defined(OS_BSD)
+ return true;
+ #elif defined(OS_WIN) || defined(OS_ANDROID)
+ return base::FeatureList::IsEnabled(kUseZoomForDsfEnabledByDefault);
diff --git a/www/chromium/files/patch-content_renderer_media_stream_processed__local__audio__source.cc b/www/chromium/files/patch-content_renderer_media_stream_processed__local__audio__source.cc
index 6601575b8643..543ee9de416e 100644
--- a/www/chromium/files/patch-content_renderer_media_stream_processed__local__audio__source.cc
+++ b/www/chromium/files/patch-content_renderer_media_stream_processed__local__audio__source.cc
@@ -1,7 +1,16 @@
---- content/renderer/media/stream/processed_local_audio_source.cc.orig 2018-07-19 12:34:51.152323000 +0200
-+++ content/renderer/media/stream/processed_local_audio_source.cc 2018-07-19 12:35:37.574081000 +0200
-@@ -282,7 +282,7 @@
- bool key_pressed) {
+--- content/renderer/media/stream/processed_local_audio_source.cc.orig 2018-12-12 22:56:07.000000000 +0100
++++ content/renderer/media/stream/processed_local_audio_source.cc 2019-01-09 12:08:00.136944000 +0100
+@@ -35,7 +35,7 @@
+ const_cast<void**>(&kProcessedLocalAudioSourceIdentifier);
+
+ bool ApmInAudioServiceEnabled() {
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ return base::FeatureList::IsEnabled(features::kWebRtcApmInAudioService);
+ #else
+ return false;
+@@ -341,7 +341,7 @@
+ 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)
diff --git a/www/chromium/files/patch-extensions_shell_app_shell_main_delegate.cc b/www/chromium/files/patch-extensions_shell_app_shell_main_delegate.cc
new file mode 100644
index 000000000000..f62e016f188d
--- /dev/null
+++ b/www/chromium/files/patch-extensions_shell_app_shell_main_delegate.cc
@@ -0,0 +1,27 @@
+--- extensions/shell/app/shell_main_delegate.cc.orig 2019-01-09 22:03:40.116892000 +0100
++++ extensions/shell/app/shell_main_delegate.cc 2019-01-09 22:04:39.261286000 +0100
+@@ -38,13 +38,13 @@
+
+ #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"
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ #include "components/crash/content/app/breakpad_linux.h" // nogncheck
+ #include "components/crash/content/app/crash_reporter_client.h" // nogncheck
+ #include "extensions/shell/app/shell_crash_reporter_client.h"
+@@ -70,7 +70,7 @@
+ return cmd_line->GetSwitchValuePath(switches::kContentShellDataPath);
+
+ base::FilePath data_dir;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
+ data_dir = base::nix::GetXDGDirectory(
+ env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir);
diff --git a/www/chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc b/www/chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc
new file mode 100644
index 000000000000..6f0d4ec44d39
--- /dev/null
+++ b/www/chromium/files/patch-headless_lib_browser_headless__request__context__manager.cc
@@ -0,0 +1,20 @@
+--- headless/lib/browser/headless_request_context_manager.cc.orig 2019-01-09 12:40:33.617895000 +0100
++++ headless/lib/browser/headless_request_context_manager.cc 2019-01-09 12:41:13.269426000 +0100
+@@ -35,7 +35,7 @@
+
+ namespace {
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ static char kProductName[] = "HeadlessChrome";
+ #endif
+
+@@ -252,7 +252,7 @@
+ command_line->GetSwitchValueASCII(switches::kAuthServerWhitelist);
+ network_service->ConfigureHttpAuthPrefs(std::move(auth_params));
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ if (manager->user_data_path_.empty()) {
+ ::network::mojom::CryptConfigPtr config =
+ ::network::mojom::CryptConfig::New();
diff --git a/www/chromium/files/patch-media_capture_video_mock_gpu_memory_buffer_manager.cc b/www/chromium/files/patch-media_capture_video_mock_gpu_memory_buffer_manager.cc
new file mode 100644
index 000000000000..a68a0ec104c4
--- /dev/null
+++ b/www/chromium/files/patch-media_capture_video_mock_gpu_memory_buffer_manager.cc
@@ -0,0 +1,11 @@
+--- media/capture/video/mock_gpu_memory_buffer_manager.cc.orig 2019-01-09 13:03:04.440957000 +0100
++++ media/capture/video/mock_gpu_memory_buffer_manager.cc 2019-01-09 13:03:18.319442000 +0100
+@@ -103,7 +103,7 @@
+ gfx::GpuMemoryBufferHandle handle;
+ handle.type = gfx::NATIVE_PIXMAP;
+ handle.id = handle_.id;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ handle.native_pixmap_handle =
+ gfx::CloneHandleForIPC(handle_.native_pixmap_handle);
+ #endif
diff --git a/www/chromium/files/patch-media_video_gpu_memory_buffer_video_frame_pool.cc b/www/chromium/files/patch-media_video_gpu_memory_buffer_video_frame_pool.cc
new file mode 100644
index 000000000000..820406c92c0c
--- /dev/null
+++ b/www/chromium/files/patch-media_video_gpu_memory_buffer_video_frame_pool.cc
@@ -0,0 +1,11 @@
+--- media/video/gpu_memory_buffer_video_frame_pool.cc.orig 2019-01-09 13:04:56.177184000 +0100
++++ media/video/gpu_memory_buffer_video_frame_pool.cc 2019-01-09 13:05:16.072782000 +0100
+@@ -633,7 +633,7 @@
+ }
+
+ bool is_software_backed_video_frame = !video_frame->HasTextures();
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ is_software_backed_video_frame &= !video_frame->HasDmaBufs();
+ #endif
+
diff --git a/www/chromium/files/patch-mojo_public_c_system_thunks.cc b/www/chromium/files/patch-mojo_public_c_system_thunks.cc
new file mode 100644
index 000000000000..7b80d534819e
--- /dev/null
+++ b/www/chromium/files/patch-mojo_public_c_system_thunks.cc
@@ -0,0 +1,47 @@
+--- mojo/public/c/system/thunks.cc.orig 2019-01-08 19:19:50.188491000 +0100
++++ mojo/public/c/system/thunks.cc 2019-01-08 19:21:20.891924000 +0100
+@@ -16,7 +16,7 @@
+ #include "build/build_config.h"
+ #include "mojo/public/c/system/core.h"
+
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ #include "base/environment.h"
+ #include "base/files/file_path.h"
+ #include "base/optional.h"
+@@ -28,7 +28,7 @@
+
+ typedef void (*MojoGetSystemThunksFunction)(MojoSystemThunks* thunks);
+
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ PROTECTED_MEMORY_SECTION
+ base::ProtectedMemory<MojoGetSystemThunksFunction> g_get_thunks;
+ #endif
+@@ -63,7 +63,7 @@
+ class CoreLibraryInitializer {
+ public:
+ CoreLibraryInitializer(const MojoInitializeOptions* options) {
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ bool application_provided_path = false;
+ base::Optional<base::FilePath> library_path;
+ if (options && options->struct_size >= sizeof(*options) &&
+@@ -82,7 +82,7 @@
+
+ if (!library_path) {
+ // Default to looking for the library in the current working directory.
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ const base::FilePath::CharType kDefaultLibraryPathValue[] =
+ FILE_PATH_LITERAL("./libmojo_core.so");
+ #elif defined(OS_WIN)
+@@ -132,7 +132,7 @@
+ ~CoreLibraryInitializer() = default;
+
+ private:
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ base::Optional<base::ScopedNativeLibrary> library_;
+ #endif
+
diff --git a/www/chromium/files/patch-net_socket_udp__socket__posix.cc b/www/chromium/files/patch-net_socket_udp__socket__posix.cc
index 08bc09c9f636..543e1aac1bd4 100644
--- a/www/chromium/files/patch-net_socket_udp__socket__posix.cc
+++ b/www/chromium/files/patch-net_socket_udp__socket__posix.cc
@@ -1,5 +1,5 @@
---- net/socket/udp_socket_posix.cc.orig 2018-12-03 21:17:07.000000000 +0100
-+++ net/socket/udp_socket_posix.cc 2018-12-14 00:43:45.072257000 +0100
+--- net/socket/udp_socket_posix.cc.orig 2018-12-12 22:56:10.000000000 +0100
++++ net/socket/udp_socket_posix.cc 2019-01-09 23:47:20.865195000 +0100
@@ -68,7 +68,7 @@
const base::TimeDelta kActivityMonitorMsThreshold =
base::TimeDelta::FromMilliseconds(100);
@@ -94,3 +94,22 @@
ip_mreq mreq = {};
int error = GetIPv4AddressFromIndex(socket_, multicast_interface_,
&mreq.imr_interface.s_addr);
+@@ -1023,9 +1031,18 @@
+ case IPAddress::kIPv4AddressSize: {
+ if (addr_family_ != AF_INET)
+ return ERR_ADDRESS_INVALID;
++#if defined(OS_BSD)
++ ip_mreq mreq = {};
++ int error = GetIPv4AddressFromIndex(socket_, multicast_interface_,
++ &mreq.imr_interface.s_addr);
++
++ if (error != OK)
++ return error;
++#else
+ ip_mreqn mreq = {};
+ mreq.imr_ifindex = multicast_interface_;
+ mreq.imr_address.s_addr = INADDR_ANY;
++#endif
+ memcpy(&mreq.imr_multiaddr, group_address.bytes().data(),
+ IPAddress::kIPv4AddressSize);
+ int rv = setsockopt(socket_, IPPROTO_IP, IP_DROP_MEMBERSHIP,
diff --git a/www/chromium/files/patch-remoting_host_evaluate_capability.cc b/www/chromium/files/patch-remoting_host_evaluate_capability.cc
new file mode 100644
index 000000000000..c5fe6f2eb6be
--- /dev/null
+++ b/www/chromium/files/patch-remoting_host_evaluate_capability.cc
@@ -0,0 +1,11 @@
+--- remoting/host/evaluate_capability.cc.orig 2019-01-09 13:06:32.177219000 +0100
++++ remoting/host/evaluate_capability.cc 2019-01-09 13:06:46.855681000 +0100
+@@ -50,7 +50,7 @@
+ }
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ if (path.BaseName().value() ==
+ FILE_PATH_LITERAL("chrome-remote-desktop-host")) {
+ return path;
diff --git a/www/chromium/files/patch-remoting_host_host_attributes.cc b/www/chromium/files/patch-remoting_host_host_attributes.cc
new file mode 100644
index 000000000000..d69178479a0e
--- /dev/null
+++ b/www/chromium/files/patch-remoting_host_host_attributes.cc
@@ -0,0 +1,11 @@
+--- remoting/host/host_attributes.cc.orig 2019-01-09 13:07:49.513766000 +0100
++++ remoting/host/host_attributes.cc 2019-01-09 13:08:03.536029000 +0100
+@@ -123,7 +123,7 @@
+ media::InitializeMediaFoundation()) {
+ result.push_back("HWEncoder");
+ }
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ result.push_back("HWEncoder");
+ #endif
+
diff --git a/www/chromium/files/patch-services_content_simple_browser_simple_browser_service.h b/www/chromium/files/patch-services_content_simple_browser_simple_browser_service.h
new file mode 100644
index 000000000000..7bc9ee1c1238
--- /dev/null
+++ b/www/chromium/files/patch-services_content_simple_browser_simple_browser_service.h
@@ -0,0 +1,20 @@
+--- services/content/simple_browser/simple_browser_service.h.orig 2019-01-09 13:09:39.690142000 +0100
++++ services/content/simple_browser/simple_browser_service.h 2019-01-09 13:10:00.488808000 +0100
+@@ -14,7 +14,7 @@
+ #include "services/content/public/cpp/buildflags.h"
+ #include "services/service_manager/public/cpp/service.h"
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "components/services/font/public/cpp/font_loader.h" // nogncheck
+ #endif
+
+@@ -47,7 +47,7 @@
+ // service_manager::Service:
+ void OnStart() override;
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ sk_sp<font_service::FontLoader> font_loader_;
+ #endif
+
diff --git a/www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor.cc b/www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor.cc
index 1527d9ee5540..d5e38ba98835 100644
--- a/www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor.cc
+++ b/www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor.cc
@@ -1,5 +1,14 @@
---- services/device/time_zone_monitor/time_zone_monitor.cc.orig 2018-12-03 21:17:09.000000000 +0100
-+++ services/device/time_zone_monitor/time_zone_monitor.cc 2018-12-14 00:48:16.376188000 +0100
+--- services/device/time_zone_monitor/time_zone_monitor.cc.orig 2018-12-12 22:56:10.000000000 +0100
++++ services/device/time_zone_monitor/time_zone_monitor.cc 2019-01-10 00:38:41.654967000 +0100
+@@ -29,7 +29,7 @@
+
+ void TimeZoneMonitor::NotifyClients() {
+ DCHECK(thread_checker_.CalledOnValidThread());
+-#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && defined(IS_CHROMECAST))
++#if defined(OS_CHROMEOS) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(IS_CHROMECAST))
+ // On CrOS (and Chromecast), ICU's default tz is already set to a new zone. No
+ // need to redetect it with detectHostTimeZone().
+ std::unique_ptr<icu::TimeZone> new_zone(icu::TimeZone::createDefault());
@@ -41,7 +41,7 @@
#else
std::unique_ptr<icu::TimeZone> new_zone(icu::TimeZone::detectHostTimeZone());
diff --git a/www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor_linux.cc b/www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor_linux.cc
new file mode 100644
index 000000000000..e3b7e3f3d438
--- /dev/null
+++ b/www/chromium/files/patch-services_device_time__zone__monitor_time__zone__monitor_linux.cc
@@ -0,0 +1,14 @@
+--- services/device/time_zone_monitor/time_zone_monitor_linux.cc.orig 2019-01-10 00:39:59.319666000 +0100
++++ services/device/time_zone_monitor/time_zone_monitor_linux.cc 2019-01-10 00:40:51.718178000 +0100
+@@ -99,7 +99,11 @@
+ // false positives are harmless, assuming the false positive rate is
+ // reasonable.
+ const char* const kFilesToWatch[] = {
++#if defined(OS_BSD)
++ "/etc/localtime",
++#else
+ "/etc/localtime", "/etc/timezone", "/etc/TZ",
++#endif
+ };
+
+ auto callback =
diff --git a/www/chromium/files/patch-services_network_network_context.cc b/www/chromium/files/patch-services_network_network_context.cc
new file mode 100644
index 000000000000..0ad66f16d56f
--- /dev/null
+++ b/www/chromium/files/patch-services_network_network_context.cc
@@ -0,0 +1,38 @@
+--- services/network/network_context.cc.orig 2019-01-09 11:56:44.681236000 +0100
++++ services/network/network_context.cc 2019-01-09 12:00:05.840566000 +0100
+@@ -110,7 +110,7 @@
+ #endif // defined(USE_NSS_CERTS)
+
+ #if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
+ #include "net/cert/cert_net_fetcher.h"
+ #include "net/cert_net/cert_net_fetcher_impl.h"
+ #endif
+@@ -543,7 +543,7 @@
+ #endif
+
+ #if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
+ net::ShutdownGlobalCertNetFetcher();
+ #endif
+ }
+@@ -1367,7 +1367,7 @@
+
+ net::CookieCryptoDelegate* crypto_delegate = nullptr;
+ if (params_->enable_encrypted_cookies) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) && !defined(IS_CHROMECAST)
+ DCHECK(network_service_->os_crypt_config_set())
+ << "NetworkService::SetCryptConfig must be called before creating a "
+ "NetworkContext with encrypted cookies.";
+@@ -1654,7 +1654,7 @@
+ net::SetURLRequestContextForNSSHttpIO(result.url_request_context.get());
+ #endif
+ #if defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
++ ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
+ net::SetGlobalCertNetFetcher(
+ net::CreateCertNetFetcher(result.url_request_context.get()));
+ #endif
diff --git a/www/chromium/files/patch-services_service__manager_embedder_main.cc b/www/chromium/files/patch-services_service__manager_embedder_main.cc
new file mode 100644
index 000000000000..e475d08fda72
--- /dev/null
+++ b/www/chromium/files/patch-services_service__manager_embedder_main.cc
@@ -0,0 +1,11 @@
+--- services/service_manager/embedder/main.cc.orig 2019-01-09 13:16:40.515216000 +0100
++++ services/service_manager/embedder/main.cc 2019-01-09 13:17:09.817906000 +0100
+@@ -331,7 +331,7 @@
+ #endif
+ base::EnableTerminationOnOutOfMemory();
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // The various desktop environments set this environment variable that
+ // allows the dbus client library to connect directly to the bus. When this
+ // variable is not set (test environments like xvfb-run), the dbus client
diff --git a/www/chromium/files/patch-services_tracing_public_cpp_trace_event_agent.cc b/www/chromium/files/patch-services_tracing_public_cpp_trace_event_agent.cc
new file mode 100644
index 000000000000..bd19c3056464
--- /dev/null
+++ b/www/chromium/files/patch-services_tracing_public_cpp_trace_event_agent.cc
@@ -0,0 +1,11 @@
+--- services/tracing/public/cpp/trace_event_agent.cc.orig 2019-01-09 13:13:48.962628000 +0100
++++ services/tracing/public/cpp/trace_event_agent.cc 2019-01-09 13:14:04.280587000 +0100
+@@ -23,7 +23,7 @@
+ #include "services/tracing/public/mojom/constants.mojom.h"
+
+ #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_MACOSX) || \
+- defined(OS_WIN)
++ defined(OS_WIN) || defined(OS_BSD)
+ #define PERFETTO_AVAILABLE
+ #include "services/tracing/public/cpp/perfetto/producer_client.h"
+ #include "services/tracing/public/cpp/perfetto/trace_event_data_source.h"
diff --git a/www/chromium/files/patch-services_tracing_tracing_service.h b/www/chromium/files/patch-services_tracing_tracing_service.h
new file mode 100644
index 000000000000..903ba35bc874
--- /dev/null
+++ b/www/chromium/files/patch-services_tracing_tracing_service.h
@@ -0,0 +1,11 @@
+--- services/tracing/tracing_service.h.orig 2019-01-09 13:15:21.114712000 +0100
++++ services/tracing/tracing_service.h 2019-01-09 13:15:33.753522000 +0100
+@@ -18,7 +18,7 @@
+ #include "services/tracing/coordinator.h"
+
+ #if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_MACOSX) || \
+- defined(OS_WIN)
++ defined(OS_WIN) || defined(OS_BSD)
+ #define PERFETTO_SERVICE_AVAILABLE
+ #endif
+
diff --git a/www/chromium/files/patch-third__party_blink_renderer_core_inspector_inspector_memory_agent.cc b/www/chromium/files/patch-third__party_blink_renderer_core_inspector_inspector_memory_agent.cc
new file mode 100644
index 000000000000..e20f7f095f26
--- /dev/null
+++ b/www/chromium/files/patch-third__party_blink_renderer_core_inspector_inspector_memory_agent.cc
@@ -0,0 +1,11 @@
+--- third_party/blink/renderer/core/inspector/inspector_memory_agent.cc.orig 2019-01-09 13:18:19.496883000 +0100
++++ third_party/blink/renderer/core/inspector/inspector_memory_agent.cc 2019-01-09 13:18:36.729783000 +0100
+@@ -171,7 +171,7 @@
+
+ std::vector<std::string> InspectorMemoryAgent::Symbolize(
+ const std::vector<void*>& addresses) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // TODO(alph): Move symbolization to the client.
+ std::vector<void*> addresses_to_symbolize;
+ for (void* address : addresses) {
diff --git a/www/chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar_theme_aura.cc b/www/chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar_theme_aura.cc
new file mode 100644
index 000000000000..5f6040204a7f
--- /dev/null
+++ b/www/chromium/files/patch-third__party_blink_renderer_core_scroll_scrollbar_theme_aura.cc
@@ -0,0 +1,11 @@
+--- third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc.orig 2019-01-09 13:20:32.931933000 +0100
++++ third_party/blink/renderer/core/scroll/scrollbar_theme_aura.cc 2019-01-09 13:21:17.842418000 +0100
+@@ -332,7 +332,7 @@
+
+ bool ScrollbarThemeAura::ShouldCenterOnThumb(const Scrollbar& scrollbar,
+ const WebMouseEvent& event) {
+-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++#if ((defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS))
+ if (event.button == WebPointerProperties::Button::kMiddle)
+ return true;
+ #endif
diff --git a/www/chromium/files/patch-third__party_blink_renderer_platform_fonts_font_description.cc b/www/chromium/files/patch-third__party_blink_renderer_platform_fonts_font_description.cc
new file mode 100644
index 000000000000..14414b5dd76c
--- /dev/null
+++ b/www/chromium/files/patch-third__party_blink_renderer_platform_fonts_font_description.cc
@@ -0,0 +1,20 @@
+--- third_party/blink/renderer/platform/fonts/font_description.cc.orig 2019-01-09 13:23:01.366176000 +0100
++++ third_party/blink/renderer/platform/fonts/font_description.cc 2019-01-09 13:23:27.474567000 +0100
+@@ -38,7 +38,7 @@
+ #include "third_party/blink/renderer/platform/wtf/text/atomic_string_hash.h"
+ #include "third_party/blink/renderer/platform/wtf/text/string_hash.h"
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ #include "third_party/blink/renderer/platform/fonts/font_cache.h"
+ #endif
+
+@@ -222,7 +222,7 @@
+ static_cast<unsigned>(fields_.orientation_) << 1 | // bit 2-3
+ static_cast<unsigned>(fields_.subpixel_text_position_); // bit 1
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ float device_scale_factor_for_key = FontCache::DeviceScaleFactor();
+ #else
+ float device_scale_factor_for_key = 1.0f;
diff --git a/www/chromium/files/patch-third_party_protobuf_src_google_protobuf_stubs_platform_macros.h b/www/chromium/files/patch-third_party_protobuf_src_google_protobuf_stubs_platform_macros.h
new file mode 100644
index 000000000000..71c368e2e4e0
--- /dev/null
+++ b/www/chromium/files/patch-third_party_protobuf_src_google_protobuf_stubs_platform_macros.h
@@ -0,0 +1,11 @@
+--- third_party/protobuf/src/google/protobuf/stubs/platform_macros.h.orig 2019-01-10 00:35:34.145545000 +0100
++++ third_party/protobuf/src/google/protobuf/stubs/platform_macros.h 2019-01-10 00:35:53.135144000 +0100
+@@ -117,7 +117,7 @@
+
+ #undef GOOGLE_PROTOBUF_PLATFORM_ERROR
+
+-#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__OpenBSD__)
++#if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__FreeBSD__)
+ // Android ndk does not support the __thread keyword very well yet. Here
+ // we use pthread_key_create()/pthread_getspecific()/... methods for
+ // TLS support on android.
diff --git a/www/chromium/files/patch-ui_events_event__switches.h b/www/chromium/files/patch-ui_events_event__switches.h
index a5907eb1d5f8..7fe62d810a8d 100644
--- a/www/chromium/files/patch-ui_events_event__switches.h
+++ b/www/chromium/files/patch-ui_events_event__switches.h
@@ -1,11 +1,11 @@
---- ui/events/event_switches.h.orig 2017-04-19 19:06:54 UTC
-+++ ui/events/event_switches.h
-@@ -14,7 +14,7 @@ namespace switches {
- EVENTS_BASE_EXPORT extern const char kEnableScrollPrediction[];
+--- ui/events/event_switches.h.orig 2018-12-12 22:56:27.000000000 +0100
++++ ui/events/event_switches.h 2019-01-09 23:42:56.991577000 +0100
+@@ -13,7 +13,7 @@
+
EVENTS_BASE_EXPORT extern const char kCompensateForUnstablePinchZoom[];
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_FREEBSD)
EVENTS_BASE_EXPORT extern const char kTouchDevices[];
+ EVENTS_BASE_EXPORT extern const char kPenDevices[];
#endif
-
diff --git a/www/chromium/files/patch-ui_gl_sync__control__vsync__provider.cc b/www/chromium/files/patch-ui_gl_sync__control__vsync__provider.cc
index c96e835933e9..163ce26b882e 100644
--- a/www/chromium/files/patch-ui_gl_sync__control__vsync__provider.cc
+++ b/www/chromium/files/patch-ui_gl_sync__control__vsync__provider.cc
@@ -1,5 +1,5 @@
---- ui/gl/sync_control_vsync_provider.cc.orig 2018-03-20 23:05:56.000000000 +0100
-+++ ui/gl/sync_control_vsync_provider.cc 2018-03-24 19:15:24.360217000 +0100
+--- ui/gl/sync_control_vsync_provider.cc.orig 2018-12-12 22:56:28.000000000 +0100
++++ ui/gl/sync_control_vsync_provider.cc 2019-01-09 23:55:37.488409000 +0100
@@ -11,7 +11,7 @@
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
@@ -27,7 +27,7 @@
// The actual clock used for the system time returned by glXGetSyncValuesOML
// is unspecified. In practice, the clock used is likely to be either
// CLOCK_REALTIME or CLOCK_MONOTONIC, so we compare the returned time to the
-@@ -161,7 +161,7 @@
+@@ -157,11 +157,11 @@
return true;
#else
return false;
@@ -35,4 +35,9 @@
+#endif // defined(OS_LINUX) || defined(OS_BSD)
}
- bool SyncControlVSyncProvider::SupportGetVSyncParametersIfAvailable() {
+ bool SyncControlVSyncProvider::SupportGetVSyncParametersIfAvailable() const {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ return true;
+ #else
+ return false;
diff --git a/www/chromium/files/patch-v8_src_builtins_builtins-iterator-gen.cc b/www/chromium/files/patch-v8_src_builtins_builtins-iterator-gen.cc
new file mode 100644
index 000000000000..9653cde3ad1d
--- /dev/null
+++ b/www/chromium/files/patch-v8_src_builtins_builtins-iterator-gen.cc
@@ -0,0 +1,19 @@
+--- v8/src/builtins/builtins-iterator-gen.cc.orig 2019-01-09 20:18:02.120534000 +0100
++++ v8/src/builtins/builtins-iterator-gen.cc 2019-01-09 21:49:23.285517000 +0100
+@@ -284,12 +284,12 @@
+
+ BIND(&check_string);
+ {
++ Label string_fast_call(this);
+ StringBuiltinsAssembler string_assembler(state());
+- GotoIfNot(string_assembler.IsStringPrimitiveWithNoCustomIteration(iterable,
+- context),
+- &slow_path);
++ string_assembler.BranchIfStringPrimitiveWithNoCustomIteration(
++ iterable, context, &string_fast_call, &slow_path);
+
+- // Fast path for strings.
++ BIND(&string_fast_call);
+ TailCallBuiltin(Builtins::kStringToList, context, iterable);
+ }
+
diff --git a/www/chromium/files/patch-v8_src_builtins_builtins-string-gen.cc b/www/chromium/files/patch-v8_src_builtins_builtins-string-gen.cc
new file mode 100644
index 000000000000..6acc54688ee1
--- /dev/null
+++ b/www/chromium/files/patch-v8_src_builtins_builtins-string-gen.cc
@@ -0,0 +1,61 @@
+--- v8/src/builtins/builtins-string-gen.cc.orig 2019-01-09 20:22:12.074879000 +0100
++++ v8/src/builtins/builtins-string-gen.cc 2019-01-09 21:52:28.439367000 +0100
+@@ -2493,41 +2493,38 @@
+ }
+ }
+
+-TNode<BoolT> StringBuiltinsAssembler::IsStringPrimitiveWithNoCustomIteration(
+- TNode<Object> object, TNode<Context> context) {
+- Label if_false(this, Label::kDeferred), exit(this);
+- TVARIABLE(BoolT, var_result);
++void StringBuiltinsAssembler::BranchIfStringPrimitiveWithNoCustomIteration(
++ TNode<Object> object, TNode<Context> context, Label* if_true,
++ Label* if_false) {
++ GotoIf(TaggedIsSmi(object), if_false);
++ GotoIfNot(IsString(CAST(object)), if_false);
+
+- GotoIf(TaggedIsSmi(object), &if_false);
+- GotoIfNot(IsString(CAST(object)), &if_false);
++ // Bailout if the new array doesn't fit in new space.
++ const TNode<IntPtrT> length = LoadStringLengthAsWord(CAST(object));
++ // Since we don't have allocation site, base size does not include
++ // AllocationMemento::kSize.
++ GotoIfFixedArraySizeDoesntFitInNewSpace(
++ length, if_false, JSArray::kSize + FixedArray::kHeaderSize,
++ INTPTR_PARAMETERS);
+
+ // Check that the String iterator hasn't been modified in a way that would
+ // affect iteration.
+ Node* protector_cell = LoadRoot(RootIndex::kStringIteratorProtector);
+ DCHECK(isolate()->heap()->string_iterator_protector()->IsPropertyCell());
+- var_result =
+- WordEqual(LoadObjectField(protector_cell, PropertyCell::kValueOffset),
+- SmiConstant(Isolate::kProtectorValid));
+- Goto(&exit);
+-
+- BIND(&if_false);
+- {
+- var_result = Int32FalseConstant();
+- Goto(&exit);
+- }
+-
+- BIND(&exit);
+- return var_result.value();
++ Branch(WordEqual(LoadObjectField(protector_cell, PropertyCell::kValueOffset),
++ SmiConstant(Isolate::kProtectorValid)),
++ if_true, if_false);
+ }
+
++// This function assumes StringPrimitiveWithNoCustomIteration is true.
+ TNode<JSArray> StringBuiltinsAssembler::StringToList(TNode<Context> context,
+ TNode<String> string) {
+- CSA_ASSERT(this, IsStringPrimitiveWithNoCustomIteration(string, context));
+ const ElementsKind kind = PACKED_ELEMENTS;
+ const TNode<IntPtrT> length = LoadStringLengthAsWord(string);
+
+ Node* const array_map =
+ LoadJSArrayElementsMap(kind, LoadNativeContext(context));
++ // Allocate the array to new space, assuming that the new array will fit in.
+ Node* const array = AllocateJSArray(kind, array_map, length, SmiTag(length));
+ Node* const elements = LoadElements(array);
+
diff --git a/www/chromium/files/patch-v8_src_builtins_builtins-string-gen.h b/www/chromium/files/patch-v8_src_builtins_builtins-string-gen.h
new file mode 100644
index 000000000000..0d9ff7bfa505
--- /dev/null
+++ b/www/chromium/files/patch-v8_src_builtins_builtins-string-gen.h
@@ -0,0 +1,15 @@
+--- v8/src/builtins/builtins-string-gen.h.orig 2019-01-09 20:22:23.363855000 +0100
++++ v8/src/builtins/builtins-string-gen.h 2019-01-09 20:25:02.361877000 +0100
+@@ -23,8 +23,10 @@
+ Node* rhs, Node* rhs_instance_type,
+ TNode<IntPtrT> length, Label* if_equal,
+ Label* if_not_equal, Label* if_indirect);
+- TNode<BoolT> IsStringPrimitiveWithNoCustomIteration(TNode<Object> object,
+- TNode<Context> context);
++ void BranchIfStringPrimitiveWithNoCustomIteration(TNode<Object> object,
++ TNode<Context> context,
++ Label* if_true,
++ Label* if_false);
+
+ protected:
+ TNode<JSArray> StringToList(TNode<Context> context, TNode<String> string);