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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 return; | 134 return; |
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 m_loader->setLoadingTaskRunner(m_fetcher->loadingTaskRunner()); | |
Sami
2015/09/25 13:31:27
nit: Move this below the assert?
alex clarke (OOO till 29th)
2015/09/28 17:24:53
Done.
| |
144 ASSERT(m_loader); | 145 ASSERT(m_loader); |
145 WrappedResourceRequest wrappedRequest(m_request); | 146 WrappedResourceRequest wrappedRequest(m_request); |
146 m_loader->loadAsynchronously(wrappedRequest, this); | 147 m_loader->loadAsynchronously(wrappedRequest, this); |
147 } | 148 } |
148 | 149 |
149 void ResourceLoader::changeToSynchronous() | 150 void ResourceLoader::changeToSynchronous() |
150 { | 151 { |
151 ASSERT(m_options.synchronousPolicy == RequestAsynchronously); | 152 ASSERT(m_options.synchronousPolicy == RequestAsynchronously); |
152 ASSERT(m_loader); | 153 ASSERT(m_loader); |
153 m_loader->cancel(); | 154 m_loader->cancel(); |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
518 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); | 519 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); |
519 } | 520 } |
520 | 521 |
521 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const | 522 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const |
522 { | 523 { |
523 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials); | 524 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials); |
524 return request; | 525 return request; |
525 } | 526 } |
526 | 527 |
527 } | 528 } |
OLD | NEW |