| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 if (m_state == Terminated) | 137 if (m_state == Terminated) |
| 138 return; | 138 return; |
| 139 | 139 |
| 140 RELEASE_ASSERT(m_connectionState == ConnectionStateNew); | 140 RELEASE_ASSERT(m_connectionState == ConnectionStateNew); |
| 141 m_connectionState = ConnectionStateStarted; | 141 m_connectionState = ConnectionStateStarted; |
| 142 | 142 |
| 143 m_loader = adoptPtr(Platform::current()->createURLLoader()); | 143 m_loader = adoptPtr(Platform::current()->createURLLoader()); |
| 144 ASSERT(m_loader); | 144 ASSERT(m_loader); |
| 145 m_loader->setLoadingTaskRunner(m_fetcher->loadingTaskRunner()); | |
| 146 WrappedResourceRequest wrappedRequest(m_request); | 145 WrappedResourceRequest wrappedRequest(m_request); |
| 147 m_loader->loadAsynchronously(wrappedRequest, this); | 146 m_loader->loadAsynchronously(wrappedRequest, this); |
| 148 } | 147 } |
| 149 | 148 |
| 150 void ResourceLoader::changeToSynchronous() | 149 void ResourceLoader::changeToSynchronous() |
| 151 { | 150 { |
| 152 ASSERT(m_options.synchronousPolicy == RequestAsynchronously); | 151 ASSERT(m_options.synchronousPolicy == RequestAsynchronously); |
| 153 ASSERT(m_loader); | 152 ASSERT(m_loader); |
| 154 m_loader->cancel(); | 153 m_loader->cancel(); |
| 155 m_loader.clear(); | 154 m_loader.clear(); |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); | 511 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); |
| 513 } | 512 } |
| 514 | 513 |
| 515 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const | 514 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const |
| 516 { | 515 { |
| 517 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC
redentials); | 516 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC
redentials); |
| 518 return request; | 517 return request; |
| 519 } | 518 } |
| 520 | 519 |
| 521 } | 520 } |
| OLD | NEW |