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

Side by Side Diff: content/child/web_url_request_util.h

Issue 958083002: PlzNavigate: Show error pages when the navigation failed before commit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@support-data-urls
Patch Set: Updated test Created 5 years, 8 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
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | content/child/web_url_request_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.h" 11 #include "content/common/resource_request_body.h"
12 #include "content/public/common/resource_type.h" 12 #include "content/public/common/resource_type.h"
13 13
14 namespace blink { 14 namespace blink {
15 class WebURL;
15 class WebURLRequest; 16 class WebURLRequest;
17 struct WebURLError;
16 } 18 }
17 19
18 namespace content { 20 namespace content {
19 21
20 CONTENT_EXPORT ResourceType WebURLRequestToResourceType( 22 CONTENT_EXPORT ResourceType WebURLRequestToResourceType(
21 const blink::WebURLRequest& request); 23 const blink::WebURLRequest& request);
22 24
23 std::string GetWebURLRequestHeaders(const blink::WebURLRequest& request); 25 std::string GetWebURLRequestHeaders(const blink::WebURLRequest& request);
24 26
25 int GetLoadFlagsForWebURLRequest(const blink::WebURLRequest& request); 27 int GetLoadFlagsForWebURLRequest(const blink::WebURLRequest& request);
26 28
27 // Takes a WebURLRequest and sets the appropriate information 29 // Takes a WebURLRequest and sets the appropriate information
28 // in a ResourceRequestBody structure. Returns an empty scoped_refptr 30 // in a ResourceRequestBody structure. Returns an empty scoped_refptr
29 // if the request body is not present. 31 // if the request body is not present.
30 scoped_refptr<ResourceRequestBody> GetRequestBodyForWebURLRequest( 32 scoped_refptr<ResourceRequestBody> GetRequestBodyForWebURLRequest(
31 const blink::WebURLRequest& request); 33 const blink::WebURLRequest& request);
32 34
35 // Generates a WebURLError based on |reason|.
36 blink::WebURLError CreateWebURLError(const blink::WebURL& unreachable_url,
37 bool stale_copy_in_cache,
38 int reason);
39
33 } // namespace content 40 } // namespace content
34 41
35 #endif // CONTENT_CHILD_WEB_URL_REQUEST_UTIL_H_ 42 #endif // CONTENT_CHILD_WEB_URL_REQUEST_UTIL_H_
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | content/child/web_url_request_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698