Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_CHILD_WEB_URL_REQUEST_UTIL_H_ | 5 #ifndef CONTENT_CHILD_WEB_URL_REQUEST_UTIL_H_ |
| 6 #define CONTENT_CHILD_WEB_URL_REQUEST_UTIL_H_ | 6 #define CONTENT_CHILD_WEB_URL_REQUEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 #include "content/common/resource_request_body_impl.h" | 11 #include "content/common/resource_request_body_impl.h" |
| 12 #include "content/common/service_worker/service_worker_types.h" | 12 #include "content/common/service_worker/service_worker_types.h" |
| 13 #include "content/public/common/request_context_frame_type.h" | 13 #include "content/public/common/request_context_frame_type.h" |
| 14 #include "content/public/common/request_context_type.h" | 14 #include "content/public/common/request_context_type.h" |
| 15 #include "content/public/common/resource_type.h" | 15 #include "content/public/common/resource_type.h" |
| 16 | 16 |
| 17 namespace blink { | 17 namespace blink { |
| 18 class WebHTTPBody; | 18 class WebHTTPBody; |
| 19 class WebURL; | 19 class WebURL; |
| 20 class WebURLRequest; | 20 class WebURLRequest; |
| 21 struct WebURLError; | 21 struct WebURLError; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 | 25 |
| 26 CONTENT_EXPORT ResourceType WebURLRequestToResourceType( | 26 CONTENT_EXPORT ResourceType WebURLRequestToResourceType( |
| 27 const blink::WebURLRequest& request); | 27 const blink::WebURLRequest& request); |
| 28 | 28 |
| 29 std::string GetWebURLRequestHeaders(const blink::WebURLRequest& request); | 29 std::string GetWebURLRequestHeadersForResourceRequest( |
|
Charlie Reis
2016/09/30 21:31:55
Please document why these are different.
Łukasz Anforowicz
2016/09/30 23:17:00
Done. I should have done that before. Doing this
| |
| 30 const blink::WebURLRequest& request); | |
| 31 std::string GetWebURLRequestHeadersForOpenURLParams( | |
| 32 const blink::WebURLRequest& request); | |
| 30 | 33 |
| 31 int GetLoadFlagsForWebURLRequest(const blink::WebURLRequest& request); | 34 int GetLoadFlagsForWebURLRequest(const blink::WebURLRequest& request); |
| 32 | 35 |
| 33 // Takes a ResourceRequestBodyImpl and converts into WebHTTPBody. | 36 // Takes a ResourceRequestBodyImpl and converts into WebHTTPBody. |
| 34 blink::WebHTTPBody GetWebHTTPBodyForRequestBody( | 37 blink::WebHTTPBody GetWebHTTPBodyForRequestBody( |
| 35 const scoped_refptr<ResourceRequestBodyImpl>& input); | 38 const scoped_refptr<ResourceRequestBodyImpl>& input); |
| 36 | 39 |
| 37 // Takes a WebHTTPBody and converts into a ResourceRequestBodyImpl. | 40 // Takes a WebHTTPBody and converts into a ResourceRequestBodyImpl. |
| 38 scoped_refptr<ResourceRequestBodyImpl> GetRequestBodyForWebHTTPBody( | 41 scoped_refptr<ResourceRequestBodyImpl> GetRequestBodyForWebHTTPBody( |
| 39 const blink::WebHTTPBody& httpBody); | 42 const blink::WebHTTPBody& httpBody); |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 66 | 69 |
| 67 // Generates a WebURLError based on |reason|. | 70 // Generates a WebURLError based on |reason|. |
| 68 blink::WebURLError CreateWebURLError(const blink::WebURL& unreachable_url, | 71 blink::WebURLError CreateWebURLError(const blink::WebURL& unreachable_url, |
| 69 bool stale_copy_in_cache, | 72 bool stale_copy_in_cache, |
| 70 int reason, | 73 int reason, |
| 71 bool was_ignored_by_handler); | 74 bool was_ignored_by_handler); |
| 72 | 75 |
| 73 } // namespace content | 76 } // namespace content |
| 74 | 77 |
| 75 #endif // CONTENT_CHILD_WEB_URL_REQUEST_UTIL_H_ | 78 #endif // CONTENT_CHILD_WEB_URL_REQUEST_UTIL_H_ |
| OLD | NEW |