| 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(params.GetResourceRequest().GetFrameType(), | 110 DCHECK_EQ(params.GetResourceRequest().GetFrameType(), |
| 111 WebURLRequest::kFrameTypeNone); | 111 WebURLRequest::kFrameTypeNone); |
| 112 DCHECK_EQ(params.GetResourceRequest().GetRequestContext(), | 112 DCHECK_EQ(params.GetResourceRequest().GetRequestContext(), |
| 113 WebURLRequest::kRequestContextManifest); | 113 WebURLRequest::kRequestContextManifest); |
| 114 return ToRawResource(fetcher->RequestResource( | 114 return ToRawResource(fetcher->RequestResource( |
| 115 params, RawResourceFactory(Resource::kManifest))); | 115 params, RawResourceFactory(Resource::kManifest))); |
| 116 } | 116 } |
| 117 | 117 |
| 118 RawResource::RawResource(const ResourceRequest& resource_request, | 118 RawResource::RawResource(const ResourceRequest& resource_request, |
| 119 Type type, | 119 Type type, |
| 120 const ResourceLoaderOptions& options) | 120 const ResourceLoaderOptions& options, |
| 121 : Resource(resource_request, type, options) {} | 121 FetchContext* fetch_context) |
| 122 : Resource(resource_request, type, options, fetch_context) {} |
| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 SECURITY_CHECK(state_ != kNotAddedAsClient); | 367 SECURITY_CHECK(state_ != kNotAddedAsClient); |
| 367 SECURITY_CHECK(state_ != kNotifyFinished); | 368 SECURITY_CHECK(state_ != kNotifyFinished); |
| 368 SECURITY_CHECK(resource->ErrorOccurred() || | 369 SECURITY_CHECK(resource->ErrorOccurred() || |
| 369 (state_ == kResponseReceived || | 370 (state_ == kResponseReceived || |
| 370 state_ == kSetSerializedCachedMetadata || | 371 state_ == kSetSerializedCachedMetadata || |
| 371 state_ == kDataReceived || state_ == kDataDownloaded)); | 372 state_ == kDataReceived || state_ == kDataDownloaded)); |
| 372 state_ = kNotifyFinished; | 373 state_ = kNotifyFinished; |
| 373 } | 374 } |
| 374 | 375 |
| 375 } // namespace blink | 376 } // namespace blink |
| OLD | NEW |