OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2011 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 return toRawResource(fetcher->requestResource(request, RawResourceFactory(Re
source::Media))); | 72 return toRawResource(fetcher->requestResource(request, RawResourceFactory(Re
source::Media))); |
73 } | 73 } |
74 | 74 |
75 ResourcePtr<RawResource> RawResource::fetchTextTrack(FetchRequest& request, Reso
urceFetcher* fetcher) | 75 ResourcePtr<RawResource> RawResource::fetchTextTrack(FetchRequest& request, Reso
urceFetcher* fetcher) |
76 { | 76 { |
77 ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone
); | 77 ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone
); |
78 request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestCon
textTrack); | 78 request.mutableResourceRequest().setRequestContext(WebURLRequest::RequestCon
textTrack); |
79 return toRawResource(fetcher->requestResource(request, RawResourceFactory(Re
source::TextTrack))); | 79 return toRawResource(fetcher->requestResource(request, RawResourceFactory(Re
source::TextTrack))); |
80 } | 80 } |
81 | 81 |
| 82 ResourcePtr<RawResource> RawResource::fetchManifest(FetchRequest& request, Resou
rceFetcher* fetcher) |
| 83 { |
| 84 ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone
); |
| 85 ASSERT(request.resourceRequest().requestContext() == WebURLRequest::RequestC
ontextManifest); |
| 86 return toRawResource(fetcher->requestResource(request, RawResourceFactory(Re
source::Manifest))); |
| 87 } |
| 88 |
82 RawResource::RawResource(const ResourceRequest& resourceRequest, Type type) | 89 RawResource::RawResource(const ResourceRequest& resourceRequest, Type type) |
83 : Resource(resourceRequest, type) | 90 : Resource(resourceRequest, type) |
84 { | 91 { |
85 } | 92 } |
86 | 93 |
87 void RawResource::appendData(const char* data, unsigned length) | 94 void RawResource::appendData(const char* data, unsigned length) |
88 { | 95 { |
89 Resource::appendData(data, length); | 96 Resource::appendData(data, length); |
90 | 97 |
91 ResourcePtr<RawResource> protect(this); | 98 ResourcePtr<RawResource> protect(this); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 for (const auto& header : oldHeaders) { | 268 for (const auto& header : oldHeaders) { |
262 AtomicString headerName = header.key; | 269 AtomicString headerName = header.key; |
263 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 270 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
264 return false; | 271 return false; |
265 } | 272 } |
266 | 273 |
267 return true; | 274 return true; |
268 } | 275 } |
269 | 276 |
270 } // namespace blink | 277 } // namespace blink |
OLD | NEW |