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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone
); | 84 ASSERT(request.resourceRequest().frameType() == WebURLRequest::FrameTypeNone
); |
85 ASSERT(request.resourceRequest().requestContext() == WebURLRequest::RequestC
ontextManifest); | 85 ASSERT(request.resourceRequest().requestContext() == WebURLRequest::RequestC
ontextManifest); |
86 return toRawResource(fetcher->requestResource(request, RawResourceFactory(Re
source::Manifest))); | 86 return toRawResource(fetcher->requestResource(request, RawResourceFactory(Re
source::Manifest))); |
87 } | 87 } |
88 | 88 |
89 RawResource::RawResource(const ResourceRequest& resourceRequest, Type type) | 89 RawResource::RawResource(const ResourceRequest& resourceRequest, Type type) |
90 : Resource(resourceRequest, type) | 90 : Resource(resourceRequest, type) |
91 { | 91 { |
92 } | 92 } |
93 | 93 |
94 void RawResource::appendData(const char* data, unsigned length) | 94 void RawResource::appendData(const char* data, size_t length) |
95 { | 95 { |
96 Resource::appendData(data, length); | 96 Resource::appendData(data, length); |
97 | 97 |
98 ResourcePtr<RawResource> protect(this); | 98 ResourcePtr<RawResource> protect(this); |
99 ResourceClientWalker<RawResourceClient> w(m_clients); | 99 ResourceClientWalker<RawResourceClient> w(m_clients); |
100 while (RawResourceClient* c = w.next()) | 100 while (RawResourceClient* c = w.next()) |
101 c->dataReceived(this, data, length); | 101 c->dataReceived(this, data, length); |
102 } | 102 } |
103 | 103 |
104 void RawResource::didAddClient(ResourceClient* c) | 104 void RawResource::didAddClient(ResourceClient* c) |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 for (const auto& header : oldHeaders) { | 268 for (const auto& header : oldHeaders) { |
269 AtomicString headerName = header.key; | 269 AtomicString headerName = header.key; |
270 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) | 270 if (!shouldIgnoreHeaderForCacheReuse(headerName) && header.value != newH
eaders.get(headerName)) |
271 return false; | 271 return false; |
272 } | 272 } |
273 | 273 |
274 return true; | 274 return true; |
275 } | 275 } |
276 | 276 |
277 } // namespace blink | 277 } // namespace blink |
OLD | NEW |