diff --git a/patches/common/chromium/.patches.yaml b/patches/common/chromium/.patches.yaml index 6902c0ddaa3..1e088a3a574 100644 --- a/patches/common/chromium/.patches.yaml +++ b/patches/common/chromium/.patches.yaml @@ -475,3 +475,9 @@ patches: desktop capture api. * Backports https://chromium-review.googlesource.com/c/chromium/src/+/1199806 that fixes crash with screen capturer, can be removed in 71.0.3539.0 +- + author: Jeremy Apthorp + file: expose-net-observer-api.patch + description: | + Expose URLRequestContextGetter::{Add,Remove}Observer. + This patch should be removed once we switch to using the net service (cc @robo) diff --git a/patches/common/chromium/expose-net-observer-api.patch b/patches/common/chromium/expose-net-observer-api.patch new file mode 100644 index 00000000000..1cc83693798 --- /dev/null +++ b/patches/common/chromium/expose-net-observer-api.patch @@ -0,0 +1,30 @@ +From f9178257245c16180336ff06debc6778d80b0975 Mon Sep 17 00:00:00 2001 +From: Jeremy Apthorp +Date: Mon, 1 Oct 2018 12:16:41 -0700 +Subject: Expose URLRequestContextGetter::{Add,Remove}Observer + + +diff --git a/net/url_request/url_request_context_getter.h b/net/url_request/url_request_context_getter.h +index 7a2dcd9de423..494526c843b9 100644 +--- a/net/url_request/url_request_context_getter.h ++++ b/net/url_request/url_request_context_getter.h +@@ -79,11 +79,16 @@ class NET_EXPORT URLRequestContextGetter + friend class web::NetworkContextOwner; + #endif // defined(OS_IOS) + ++ // NOTE(nornagon/robo): electron currently depends on this deprecated API ++ // from net/, but will be removing it soon when we switch to using the ++ // network service. ++ public: + // Adds / removes an observer to watch for shutdown of |this|'s context. Must + // only be called on network thread. May not be called once + // GetURLRequestContext() starts returning nullptr. + void AddObserver(URLRequestContextGetterObserver* observer); + void RemoveObserver(URLRequestContextGetterObserver* observer); ++ private: + + // OnDestruct is used to ensure deletion on the thread on which the request + // IO happens. +-- +2.17.0 +