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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 DCHECK_EQ(request.resourceRequest().frameType(), | 110 DCHECK_EQ(request.resourceRequest().frameType(), |
111 WebURLRequest::FrameTypeNone); | 111 WebURLRequest::FrameTypeNone); |
112 DCHECK_EQ(request.resourceRequest().requestContext(), | 112 DCHECK_EQ(request.resourceRequest().requestContext(), |
113 WebURLRequest::RequestContextManifest); | 113 WebURLRequest::RequestContextManifest); |
114 return toRawResource(fetcher->requestResource( | 114 return toRawResource(fetcher->requestResource( |
115 request, RawResourceFactory(Resource::Manifest))); | 115 request, RawResourceFactory(Resource::Manifest))); |
116 } | 116 } |
117 | 117 |
118 RawResource::RawResource(const ResourceRequest& resourceRequest, | 118 RawResource::RawResource(const ResourceRequest& resourceRequest, |
119 Type type, | 119 Type type, |
120 const ResourceLoaderOptions& options) | 120 const ResourceLoaderOptions& options, |
121 : Resource(resourceRequest, type, options) {} | 121 FetchContext* fetchContext) |
| 122 : Resource(resourceRequest, type, options, fetchContext) {} |
122 | 123 |
123 void RawResource::appendData(const char* data, size_t length) { | 124 void RawResource::appendData(const char* data, size_t length) { |
124 Resource::appendData(data, length); | 125 Resource::appendData(data, length); |
125 | 126 |
126 ResourceClientWalker<RawResourceClient> w(clients()); | 127 ResourceClientWalker<RawResourceClient> w(clients()); |
127 while (RawResourceClient* c = w.next()) | 128 while (RawResourceClient* c = w.next()) |
128 c->dataReceived(this, data, length); | 129 c->dataReceived(this, data, length); |
129 } | 130 } |
130 | 131 |
131 void RawResource::didAddClient(ResourceClient* c) { | 132 void RawResource::didAddClient(ResourceClient* c) { |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 SECURITY_CHECK(m_state != NotAddedAsClient); | 357 SECURITY_CHECK(m_state != NotAddedAsClient); |
357 SECURITY_CHECK(m_state != NotifyFinished); | 358 SECURITY_CHECK(m_state != NotifyFinished); |
358 SECURITY_CHECK(resource->errorOccurred() || | 359 SECURITY_CHECK(resource->errorOccurred() || |
359 (m_state == ResponseReceived || | 360 (m_state == ResponseReceived || |
360 m_state == SetSerializedCachedMetadata || | 361 m_state == SetSerializedCachedMetadata || |
361 m_state == DataReceived || m_state == DataDownloaded)); | 362 m_state == DataReceived || m_state == DataDownloaded)); |
362 m_state = NotifyFinished; | 363 m_state = NotifyFinished; |
363 } | 364 } |
364 | 365 |
365 } // namespace blink | 366 } // namespace blink |
OLD | NEW |