Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: public/platform/WebURLRequest.h

Issue 360233005: Replace 'ResourceRequest::TargetType' with 'ResourceRequest::RequestContext'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Uninitialized === crash. :( Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebURLRequest.h
diff --git a/public/platform/WebURLRequest.h b/public/platform/WebURLRequest.h
index 0e65e80f99750704d611416bdc763a0dd5cb4178..4cc236024bfd0174eeec66ac17116b8deec6c5c0 100644
--- a/public/platform/WebURLRequest.h
+++ b/public/platform/WebURLRequest.h
@@ -88,6 +88,33 @@ public:
TargetIsUnspecified = 17,
};
+ // FIXME: Drop the TargetType enum once embedders are updated upstream.
+ enum RequestContext {
+ RequestContextUnspecified = 0,
+ RequestContextAudio,
+ RequestContextChildDocument,
+ RequestContextConnect,
+ RequestContextDocument,
+ RequestContextDownload,
+ RequestContextFavicon,
+ RequestContextFont,
+ RequestContextForm,
+ RequestContextImage,
+ RequestContextManifest,
+ RequestContextObject,
+ RequestContextObjectRequest,
+ RequestContextPing,
+ RequestContextPrefetch,
+ RequestContextScript,
+ RequestContextServiceWorker,
+ RequestContextSharedWorker,
+ RequestContextStyle,
+ RequestContextSubresource,
+ RequestContextTextTrack,
+ RequestContextVideo,
+ RequestContextWorker
+ };
+
class ExtraData {
public:
virtual ~ExtraData() { }
@@ -154,9 +181,13 @@ public:
BLINK_PLATFORM_EXPORT bool reportRawHeaders() const;
BLINK_PLATFORM_EXPORT void setReportRawHeaders(bool);
+ // FIXME: Remove these once content/ and net/ are updated.
BLINK_PLATFORM_EXPORT TargetType targetType() const;
BLINK_PLATFORM_EXPORT void setTargetType(TargetType);
+ BLINK_PLATFORM_EXPORT RequestContext requestContext() const;
+ BLINK_PLATFORM_EXPORT void setRequestContext(RequestContext);
+
BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const;
// Adds an HTTP origin header if it is empty and the HTTP method of the
@@ -203,6 +234,9 @@ public:
BLINK_PLATFORM_EXPORT const WebCore::ResourceRequest& toResourceRequest() const;
#endif
+ // FIXME: Drop these once we replace TargetType upstream.
+ static RequestContext requestContextFromTargetType(TargetType);
+ static TargetType targetTypeFromRequestContext(RequestContext);
protected:
BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*);
« no previous file with comments | « Source/web/WebSharedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698