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 #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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 return RESOURCE_TYPE_SUB_RESOURCE; | 97 return RESOURCE_TYPE_SUB_RESOURCE; |
98 | 98 |
99 // XHR | 99 // XHR |
100 case WebURLRequest::RequestContextEventSource: | 100 case WebURLRequest::RequestContextEventSource: |
101 case WebURLRequest::RequestContextFetch: | 101 case WebURLRequest::RequestContextFetch: |
102 case WebURLRequest::RequestContextXMLHttpRequest: | 102 case WebURLRequest::RequestContextXMLHttpRequest: |
103 return RESOURCE_TYPE_XHR; | 103 return RESOURCE_TYPE_XHR; |
104 | 104 |
105 // These should be handled by the FrameType checks at the top of the | 105 // These should be handled by the FrameType checks at the top of the |
106 // function. | 106 // function. |
107 // Main Frame | |
108 case WebURLRequest::RequestContextForm: | 107 case WebURLRequest::RequestContextForm: |
109 case WebURLRequest::RequestContextHyperlink: | 108 case WebURLRequest::RequestContextHyperlink: |
110 case WebURLRequest::RequestContextLocation: | 109 case WebURLRequest::RequestContextLocation: |
111 case WebURLRequest::RequestContextFrame: | 110 case WebURLRequest::RequestContextFrame: |
112 case WebURLRequest::RequestContextIframe: | 111 case WebURLRequest::RequestContextIframe: |
113 NOTREACHED(); | 112 NOTREACHED(); |
114 return RESOURCE_TYPE_SUB_RESOURCE; | 113 return RESOURCE_TYPE_SUB_RESOURCE; |
| 114 |
| 115 default: |
| 116 NOTREACHED(); |
| 117 return RESOURCE_TYPE_SUB_RESOURCE; |
115 } | 118 } |
116 NOTREACHED(); | |
117 return RESOURCE_TYPE_SUB_RESOURCE; | |
118 } | 119 } |
119 | 120 |
120 } // namespace content | 121 } // namespace content |
OLD | NEW |