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

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

Issue 430783005: Support 'import' and 'imageset' WebURLRequest::RequestContext in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 #include "content/child/web_url_request_util.h" 5 #include "content/child/web_url_request_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/WebKit/public/platform/WebURLRequest.h" 8 #include "third_party/WebKit/public/platform/WebURLRequest.h"
9 9
10 using blink::WebURLRequest; 10 using blink::WebURLRequest;
(...skipping 23 matching lines...) Expand all
34 // Favicon 34 // Favicon
35 case WebURLRequest::RequestContextFavicon: 35 case WebURLRequest::RequestContextFavicon:
36 return RESOURCE_TYPE_FAVICON; 36 return RESOURCE_TYPE_FAVICON;
37 37
38 // Font 38 // Font
39 case WebURLRequest::RequestContextFont: 39 case WebURLRequest::RequestContextFont:
40 return RESOURCE_TYPE_FONT_RESOURCE; 40 return RESOURCE_TYPE_FONT_RESOURCE;
41 41
42 // Image 42 // Image
43 case WebURLRequest::RequestContextImage: 43 case WebURLRequest::RequestContextImage:
44 case WebURLRequest::RequestContextImageSet:
44 return RESOURCE_TYPE_IMAGE; 45 return RESOURCE_TYPE_IMAGE;
45 46
46 // Media 47 // Media
47 case WebURLRequest::RequestContextAudio: 48 case WebURLRequest::RequestContextAudio:
48 case WebURLRequest::RequestContextVideo: 49 case WebURLRequest::RequestContextVideo:
49 return RESOURCE_TYPE_MEDIA; 50 return RESOURCE_TYPE_MEDIA;
50 51
51 // Object 52 // Object
52 case WebURLRequest::RequestContextEmbed: 53 case WebURLRequest::RequestContextEmbed:
53 case WebURLRequest::RequestContextObject: 54 case WebURLRequest::RequestContextObject:
54 return RESOURCE_TYPE_OBJECT; 55 return RESOURCE_TYPE_OBJECT;
55 56
56 // Ping 57 // Ping
57 case WebURLRequest::RequestContextBeacon: 58 case WebURLRequest::RequestContextBeacon:
58 case WebURLRequest::RequestContextCSPReport: 59 case WebURLRequest::RequestContextCSPReport:
59 case WebURLRequest::RequestContextPing: 60 case WebURLRequest::RequestContextPing:
60 return RESOURCE_TYPE_PING; 61 return RESOURCE_TYPE_PING;
61 62
62 // Prefetch 63 // Prefetch
63 case WebURLRequest::RequestContextPrefetch: 64 case WebURLRequest::RequestContextPrefetch:
64 return RESOURCE_TYPE_PREFETCH; 65 return RESOURCE_TYPE_PREFETCH;
65 66
66 // Script 67 // Script
68 case WebURLRequest::RequestContextImport:
67 case WebURLRequest::RequestContextScript: 69 case WebURLRequest::RequestContextScript:
68 return RESOURCE_TYPE_SCRIPT; 70 return RESOURCE_TYPE_SCRIPT;
69 71
70 // Style 72 // Style
71 case WebURLRequest::RequestContextXSLT: 73 case WebURLRequest::RequestContextXSLT:
72 case WebURLRequest::RequestContextStyle: 74 case WebURLRequest::RequestContextStyle:
73 return RESOURCE_TYPE_STYLESHEET; 75 return RESOURCE_TYPE_STYLESHEET;
74 76
75 // Subresource 77 // Subresource
76 case WebURLRequest::RequestContextDownload: 78 case WebURLRequest::RequestContextDownload:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 NOTREACHED(); 114 NOTREACHED();
113 return RESOURCE_TYPE_SUB_RESOURCE; 115 return RESOURCE_TYPE_SUB_RESOURCE;
114 116
115 default: 117 default:
116 NOTREACHED(); 118 NOTREACHED();
117 return RESOURCE_TYPE_SUB_RESOURCE; 119 return RESOURCE_TYPE_SUB_RESOURCE;
118 } 120 }
119 } 121 }
120 122
121 } // namespace content 123 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698