| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights reserved. | 2 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All r
ights 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 NSURLConnection *ResourceHandle::connection() const | 350 NSURLConnection *ResourceHandle::connection() const |
| 351 { | 351 { |
| 352 return d->m_connection.get(); | 352 return d->m_connection.get(); |
| 353 } | 353 } |
| 354 | 354 |
| 355 bool ResourceHandle::loadsBlocked() | 355 bool ResourceHandle::loadsBlocked() |
| 356 { | 356 { |
| 357 return false; | 357 return false; |
| 358 } | 358 } |
| 359 | 359 |
| 360 bool ResourceHandle::willLoadFromCache(ResourceRequest& request, Frame*) |
| 361 { |
| 362 request.setCachePolicy(ReturnCacheDataDontLoad); |
| 363 NSURLResponse *nsURLResponse = nil; |
| 364 BEGIN_BLOCK_OBJC_EXCEPTIONS; |
| 365 |
| 366 [NSURLConnection sendSynchronousRequest:request.nsURLRequest() returningResp
onse:&nsURLResponse error:nil]; |
| 367 |
| 368 END_BLOCK_OBJC_EXCEPTIONS; |
| 369 |
| 370 return nsURLResponse; |
| 371 } |
| 372 |
| 360 CFStringRef ResourceHandle::synchronousLoadRunLoopMode() | 373 CFStringRef ResourceHandle::synchronousLoadRunLoopMode() |
| 361 { | 374 { |
| 362 return CFSTR("WebCoreSynchronousLoaderRunLoopMode"); | 375 return CFSTR("WebCoreSynchronousLoaderRunLoopMode"); |
| 363 } | 376 } |
| 364 | 377 |
| 365 void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const
ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& e
rror, ResourceResponse& response, Vector<char>& data) | 378 void ResourceHandle::loadResourceSynchronously(NetworkingContext* context, const
ResourceRequest& request, StoredCredentials storedCredentials, ResourceError& e
rror, ResourceResponse& response, Vector<char>& data) |
| 366 { | 379 { |
| 367 LOG(Network, "ResourceHandle::loadResourceSynchronously:%@ allowStoredCreden
tials:%u", request.nsURLRequest(), storedCredentials); | 380 LOG(Network, "ResourceHandle::loadResourceSynchronously:%@ allowStoredCreden
tials:%u", request.nsURLRequest(), storedCredentials); |
| 368 | 381 |
| 369 #if ENABLE(BLOB) | 382 #if ENABLE(BLOB) |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 920 void WebCoreSynchronousLoaderClient::didFail(ResourceHandle*, const ResourceErro
r& error) | 933 void WebCoreSynchronousLoaderClient::didFail(ResourceHandle*, const ResourceErro
r& error) |
| 921 { | 934 { |
| 922 ASSERT(!m_error); | 935 ASSERT(!m_error); |
| 923 | 936 |
| 924 m_error = [error copy]; | 937 m_error = [error copy]; |
| 925 m_isDone = true; | 938 m_isDone = true; |
| 926 } | 939 } |
| 927 | 940 |
| 928 | 941 |
| 929 #endif // !USE(CFNETWORK) | 942 #endif // !USE(CFNETWORK) |
| OLD | NEW |