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

Side by Side Diff: third_party/WebKit/public/platform/WebURLRequest.h

Issue 2387113002: reflow comments in public/platform/ (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 public: 51 public:
52 enum Priority { 52 enum Priority {
53 PriorityUnresolved = -1, 53 PriorityUnresolved = -1,
54 PriorityVeryLow, 54 PriorityVeryLow,
55 PriorityLow, 55 PriorityLow,
56 PriorityMedium, 56 PriorityMedium,
57 PriorityHigh, 57 PriorityHigh,
58 PriorityVeryHigh, 58 PriorityVeryHigh,
59 }; 59 };
60 60
61 // Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-req uest-context 61 // Corresponds to Fetch's "context":
62 // http://fetch.spec.whatwg.org/#concept-request-context
62 enum RequestContext { 63 enum RequestContext {
63 RequestContextUnspecified = 0, 64 RequestContextUnspecified = 0,
64 RequestContextAudio, 65 RequestContextAudio,
65 RequestContextBeacon, 66 RequestContextBeacon,
66 RequestContextCSPReport, 67 RequestContextCSPReport,
67 RequestContextDownload, 68 RequestContextDownload,
68 RequestContextEmbed, 69 RequestContextEmbed,
69 RequestContextEventSource, 70 RequestContextEventSource,
70 RequestContextFavicon, 71 RequestContextFavicon,
71 RequestContextFetch, 72 RequestContextFetch,
(...skipping 17 matching lines...) Expand all
89 RequestContextSharedWorker, 90 RequestContextSharedWorker,
90 RequestContextSubresource, 91 RequestContextSubresource,
91 RequestContextStyle, 92 RequestContextStyle,
92 RequestContextTrack, 93 RequestContextTrack,
93 RequestContextVideo, 94 RequestContextVideo,
94 RequestContextWorker, 95 RequestContextWorker,
95 RequestContextXMLHttpRequest, 96 RequestContextXMLHttpRequest,
96 RequestContextXSLT 97 RequestContextXSLT
97 }; 98 };
98 99
99 // Corresponds to Fetch's "context frame type": http://fetch.spec.whatwg.org/# concept-request-context-frame-type 100 // Corresponds to Fetch's "context frame type":
101 // http://fetch.spec.whatwg.org/#concept-request-context-frame-type
100 enum FrameType { 102 enum FrameType {
101 FrameTypeAuxiliary, 103 FrameTypeAuxiliary,
102 FrameTypeNested, 104 FrameTypeNested,
103 FrameTypeNone, 105 FrameTypeNone,
104 FrameTypeTopLevel 106 FrameTypeTopLevel
105 }; 107 };
106 108
107 enum FetchRequestMode { 109 enum FetchRequestMode {
108 FetchRequestModeSameOrigin, 110 FetchRequestModeSameOrigin,
109 FetchRequestModeNoCORS, 111 FetchRequestModeNoCORS,
(...skipping 17 matching lines...) Expand all
127 129
128 // Used to report performance metrics timed from the UI action that 130 // Used to report performance metrics timed from the UI action that
129 // triggered them (as opposed to navigation start time used in the 131 // triggered them (as opposed to navigation start time used in the
130 // Navigation Timing API). 132 // Navigation Timing API).
131 enum InputToLoadPerfMetricReportPolicy { 133 enum InputToLoadPerfMetricReportPolicy {
132 NoReport, // Don't report metrics for this WebURLRequest. 134 NoReport, // Don't report metrics for this WebURLRequest.
133 ReportLink, // Report metrics with UI action link clicked. 135 ReportLink, // Report metrics with UI action link clicked.
134 ReportIntent, // Report metrics with UI action displayed intent. 136 ReportIntent, // Report metrics with UI action displayed intent.
135 }; 137 };
136 138
137 // The LoFi state which determines whether to request a Lo-Fi version of the r esource. 139 // The LoFi state which determines whether to request a Lo-Fi version of the
140 // resource.
138 enum LoFiState { 141 enum LoFiState {
139 LoFiUnspecified, // Let the browser process decide whether or not to reques t the Lo-Fi version. 142 LoFiUnspecified, // Let the browser process decide whether or not to
140 LoFiOff, // Request a normal (non-Lo-Fi) version of the resource. 143 // request the Lo-Fi version.
141 LoFiOn, // Request a Lo-Fi version of the resource. 144 LoFiOff, // Request a normal (non-Lo-Fi) version of the resource.
145 LoFiOn, // Request a Lo-Fi version of the resource.
142 }; 146 };
143 147
144 // Indicates which types of ServiceWorkers should skip handling this request. 148 // Indicates which types of ServiceWorkers should skip handling this request.
145 enum class SkipServiceWorker { 149 enum class SkipServiceWorker {
146 // Request can be handled both by a controlling same-origin worker and 150 // Request can be handled both by a controlling same-origin worker and
147 // a cross-origin foreign fetch service worker. 151 // a cross-origin foreign fetch service worker.
148 None, 152 None,
149 // Request should not be handled by a same-origin controlling worker, 153 // Request should not be handled by a same-origin controlling worker,
150 // but can be intercepted by a foreign fetch service worker. 154 // but can be intercepted by a foreign fetch service worker.
151 Controlling, 155 Controlling,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 BLINK_PLATFORM_EXPORT bool allowStoredCredentials() const; 192 BLINK_PLATFORM_EXPORT bool allowStoredCredentials() const;
189 BLINK_PLATFORM_EXPORT void setAllowStoredCredentials(bool); 193 BLINK_PLATFORM_EXPORT void setAllowStoredCredentials(bool);
190 194
191 BLINK_PLATFORM_EXPORT WebCachePolicy getCachePolicy() const; 195 BLINK_PLATFORM_EXPORT WebCachePolicy getCachePolicy() const;
192 BLINK_PLATFORM_EXPORT void setCachePolicy(WebCachePolicy); 196 BLINK_PLATFORM_EXPORT void setCachePolicy(WebCachePolicy);
193 197
194 BLINK_PLATFORM_EXPORT WebString httpMethod() const; 198 BLINK_PLATFORM_EXPORT WebString httpMethod() const;
195 BLINK_PLATFORM_EXPORT void setHTTPMethod(const WebString&); 199 BLINK_PLATFORM_EXPORT void setHTTPMethod(const WebString&);
196 200
197 BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const; 201 BLINK_PLATFORM_EXPORT WebString httpHeaderField(const WebString& name) const;
198 // It's not possible to set the referrer header using this method. Use setHTTP Referrer instead. 202 // It's not possible to set the referrer header using this method. Use
203 // setHTTPReferrer instead.
199 BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name, 204 BLINK_PLATFORM_EXPORT void setHTTPHeaderField(const WebString& name,
200 const WebString& value); 205 const WebString& value);
201 BLINK_PLATFORM_EXPORT void setHTTPReferrer(const WebString& referrer, 206 BLINK_PLATFORM_EXPORT void setHTTPReferrer(const WebString& referrer,
202 WebReferrerPolicy); 207 WebReferrerPolicy);
203 BLINK_PLATFORM_EXPORT void addHTTPHeaderField(const WebString& name, 208 BLINK_PLATFORM_EXPORT void addHTTPHeaderField(const WebString& name,
204 const WebString& value); 209 const WebString& value);
205 BLINK_PLATFORM_EXPORT void clearHTTPHeaderField(const WebString& name); 210 BLINK_PLATFORM_EXPORT void clearHTTPHeaderField(const WebString& name);
206 BLINK_PLATFORM_EXPORT void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const; 211 BLINK_PLATFORM_EXPORT void visitHTTPHeaderFields(WebHTTPHeaderVisitor*) const;
207 212
208 BLINK_PLATFORM_EXPORT WebHTTPBody httpBody() const; 213 BLINK_PLATFORM_EXPORT WebHTTPBody httpBody() const;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode); 278 BLINK_PLATFORM_EXPORT void setFetchRequestMode(FetchRequestMode);
274 279
275 // The credentials mode which will be passed to the ServiceWorker. 280 // The credentials mode which will be passed to the ServiceWorker.
276 BLINK_PLATFORM_EXPORT FetchCredentialsMode getFetchCredentialsMode() const; 281 BLINK_PLATFORM_EXPORT FetchCredentialsMode getFetchCredentialsMode() const;
277 BLINK_PLATFORM_EXPORT void setFetchCredentialsMode(FetchCredentialsMode); 282 BLINK_PLATFORM_EXPORT void setFetchCredentialsMode(FetchCredentialsMode);
278 283
279 // The redirect mode which is used in Fetch API. 284 // The redirect mode which is used in Fetch API.
280 BLINK_PLATFORM_EXPORT FetchRedirectMode getFetchRedirectMode() const; 285 BLINK_PLATFORM_EXPORT FetchRedirectMode getFetchRedirectMode() const;
281 BLINK_PLATFORM_EXPORT void setFetchRedirectMode(FetchRedirectMode); 286 BLINK_PLATFORM_EXPORT void setFetchRedirectMode(FetchRedirectMode);
282 287
283 // The LoFi state which determines whether to request a Lo-Fi version of the r esource. 288 // The LoFi state which determines whether to request a Lo-Fi version of the
289 // resource.
284 BLINK_PLATFORM_EXPORT LoFiState getLoFiState() const; 290 BLINK_PLATFORM_EXPORT LoFiState getLoFiState() const;
285 BLINK_PLATFORM_EXPORT void setLoFiState(LoFiState); 291 BLINK_PLATFORM_EXPORT void setLoFiState(LoFiState);
286 292
287 // Extra data associated with the underlying resource request. Resource 293 // Extra data associated with the underlying resource request. Resource
288 // requests can be copied. If non-null, each copy of a resource requests 294 // requests can be copied. If non-null, each copy of a resource requests
289 // holds a pointer to the extra data, and the extra data pointer will be 295 // holds a pointer to the extra data, and the extra data pointer will be
290 // deleted when the last resource request is destroyed. Setting the extra 296 // deleted when the last resource request is destroyed. Setting the extra
291 // data pointer will cause the underlying resource request to be 297 // data pointer will cause the underlying resource request to be
292 // dissociated from any existing non-null extra data pointer. 298 // dissociated from any existing non-null extra data pointer.
293 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const; 299 BLINK_PLATFORM_EXPORT ExtraData* getExtraData() const;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 // instance it contains. 342 // instance it contains.
337 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest; 343 std::unique_ptr<ResourceRequestContainer> m_ownedResourceRequest;
338 344
339 // Should never be null. 345 // Should never be null.
340 ResourceRequest* m_resourceRequest; 346 ResourceRequest* m_resourceRequest;
341 }; 347 };
342 348
343 } // namespace blink 349 } // namespace blink
344 350
345 #endif 351 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698