| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 return; | 200 return; |
| 201 | 201 |
| 202 if (m_notifiedLoadComplete) | 202 if (m_notifiedLoadComplete) |
| 203 return; | 203 return; |
| 204 m_notifiedLoadComplete = true; | 204 m_notifiedLoadComplete = true; |
| 205 m_fetcher->didFinishLoading(m_resource, finishTime, encodedDataLength); | 205 m_fetcher->didFinishLoading(m_resource, finishTime, encodedDataLength); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority, int in
traPriorityValue) | 208 void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority, int in
traPriorityValue) |
| 209 { | 209 { |
| 210 if (m_loader) { | 210 ASSERT(m_state != Terminated); |
| 211 m_fetcher->didChangeLoadingPriority(m_resource, loadPriority, intraPrior
ityValue); | 211 if (m_loader) |
| 212 ASSERT(m_state != Terminated); | |
| 213 m_loader->didChangePriority(static_cast<WebURLRequest::Priority>(loadPri
ority), intraPriorityValue); | 212 m_loader->didChangePriority(static_cast<WebURLRequest::Priority>(loadPri
ority), intraPriorityValue); |
| 214 } | |
| 215 } | |
| 216 | |
| 217 bool ResourceLoader::shouldUseIncreasedPriorities() | |
| 218 { | |
| 219 return m_fetcher->context().fetchIncreasePriorities(); | |
| 220 } | 213 } |
| 221 | 214 |
| 222 void ResourceLoader::cancelIfNotFinishing() | 215 void ResourceLoader::cancelIfNotFinishing() |
| 223 { | 216 { |
| 224 if (m_state != Initialized) | 217 if (m_state != Initialized) |
| 225 return; | 218 return; |
| 226 cancel(); | 219 cancel(); |
| 227 } | 220 } |
| 228 | 221 |
| 229 void ResourceLoader::cancel() | 222 void ResourceLoader::cancel() |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); | 512 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); |
| 520 } | 513 } |
| 521 | 514 |
| 522 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const | 515 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const |
| 523 { | 516 { |
| 524 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC
redentials); | 517 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC
redentials); |
| 525 return request; | 518 return request; |
| 526 } | 519 } |
| 527 | 520 |
| 528 } | 521 } |
| OLD | NEW |