mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix PDF extension loading with custom request context handler (issue #1710)
This commit is contained in:
27
patch/patches/stream_context_1710.patch
Normal file
27
patch/patches/stream_context_1710.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff --git stream_context.cc stream_context.cc
|
||||
index e338396..150cde5 100644
|
||||
--- stream_context.cc
|
||||
+++ stream_context.cc
|
||||
@@ -19,6 +19,10 @@ namespace content {
|
||||
|
||||
StreamContext::StreamContext() {}
|
||||
|
||||
+const void* StreamContext::GetUserDataKey() {
|
||||
+ return kStreamContextKeyName;
|
||||
+}
|
||||
+
|
||||
StreamContext* StreamContext::GetFor(BrowserContext* context) {
|
||||
if (!context->GetUserData(kStreamContextKeyName)) {
|
||||
scoped_refptr<StreamContext> stream = new StreamContext();
|
||||
diff --git stream_context.h stream_context.h
|
||||
index ad8f65c..60310db 100644
|
||||
--- stream_context.h
|
||||
+++ stream_context.h
|
||||
@@ -28,6 +28,7 @@ class StreamContext
|
||||
public:
|
||||
StreamContext();
|
||||
|
||||
+ CONTENT_EXPORT static const void* GetUserDataKey();
|
||||
CONTENT_EXPORT static StreamContext* GetFor(BrowserContext* browser_context);
|
||||
|
||||
void InitializeOnIOThread();
|
17
patch/patches/supports_user_data_1710.patch
Normal file
17
patch/patches/supports_user_data_1710.patch
Normal file
@@ -0,0 +1,17 @@
|
||||
diff --git supports_user_data.h supports_user_data.h
|
||||
index 711ee7d..cf38fc0 100644
|
||||
--- supports_user_data.h
|
||||
+++ supports_user_data.h
|
||||
@@ -32,9 +32,9 @@ class BASE_EXPORT SupportsUserData {
|
||||
// Multiple user data values can be stored under different keys.
|
||||
// This object will TAKE OWNERSHIP of the given data pointer, and will
|
||||
// delete the object if it is changed or the object is destroyed.
|
||||
- Data* GetUserData(const void* key) const;
|
||||
- void SetUserData(const void* key, Data* data);
|
||||
- void RemoveUserData(const void* key);
|
||||
+ virtual Data* GetUserData(const void* key) const;
|
||||
+ virtual void SetUserData(const void* key, Data* data);
|
||||
+ virtual void RemoveUserData(const void* key);
|
||||
|
||||
// SupportsUserData is not thread-safe, and on debug build will assert it is
|
||||
// only used on one thread. Calling this method allows the caller to hand
|
Reference in New Issue
Block a user