OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. |
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) | 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 return; | 199 return; |
200 | 200 |
201 if (m_notifiedLoadComplete) | 201 if (m_notifiedLoadComplete) |
202 return; | 202 return; |
203 m_notifiedLoadComplete = true; | 203 m_notifiedLoadComplete = true; |
204 m_fetcher->didFinishLoading(m_resource, finishTime, encodedDataLength); | 204 m_fetcher->didFinishLoading(m_resource, finishTime, encodedDataLength); |
205 } | 205 } |
206 | 206 |
207 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority, int in
traPriorityValue) | 207 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority, int in
traPriorityValue) |
208 { | 208 { |
209 if (m_loader) { | 209 ASSERT(m_state != Terminated); |
210 m_fetcher->didChangeLoadingPriority(m_resource, loadPriority, intraPrior
ityValue); | 210 if (m_loader) |
211 ASSERT(m_state != Terminated); | |
212 m_loader->didChangePriority(static_cast<WebURLRequest::Priority>(loadPri
ority), intraPriorityValue); | 211 m_loader->didChangePriority(static_cast<WebURLRequest::Priority>(loadPri
ority), intraPriorityValue); |
213 } | |
214 } | |
215 | |
216 bool ResourceLoader::shouldUseIncreasedPriorities() | |
217 { | |
218 return m_fetcher->context().fetchIncreasePriorities(); | |
219 } | 212 } |
220 | 213 |
221 void ResourceLoader::cancelIfNotFinishing() | 214 void ResourceLoader::cancelIfNotFinishing() |
222 { | 215 { |
223 if (m_state != Initialized) | 216 if (m_state != Initialized) |
224 return; | 217 return; |
225 cancel(); | 218 cancel(); |
226 } | 219 } |
227 | 220 |
228 void ResourceLoader::cancel() | 221 void ResourceLoader::cancel() |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); | 511 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); |
519 } | 512 } |
520 | 513 |
521 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const | 514 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const |
522 { | 515 { |
523 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC
redentials); | 516 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC
redentials); |
524 return request; | 517 return request; |
525 } | 518 } |
526 | 519 |
527 } | 520 } |
OLD | NEW |