| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
| 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
| 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 setStatus(status); | 291 setStatus(status); |
| 292 ASSERT(errorOccurred()); | 292 ASSERT(errorOccurred()); |
| 293 m_data.clear(); | 293 m_data.clear(); |
| 294 | 294 |
| 295 setLoading(false); | 295 setLoading(false); |
| 296 checkNotify(); | 296 checkNotify(); |
| 297 markClientsFinished(); | 297 markClientsFinished(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 void Resource::finishOnePart() | |
| 301 { | |
| 302 setLoading(false); | |
| 303 checkNotify(); | |
| 304 } | |
| 305 | |
| 306 void Resource::finish() | 300 void Resource::finish() |
| 307 { | 301 { |
| 308 ASSERT(m_revalidatingRequest.isNull()); | 302 ASSERT(m_revalidatingRequest.isNull()); |
| 309 ASSERT(!errorOccurred()); | 303 setLoading(false); |
| 310 finishOnePart(); | 304 checkNotify(); |
| 311 markClientsFinished(); | 305 markClientsFinished(); |
| 312 if (!errorOccurred()) | 306 if (!errorOccurred()) |
| 313 m_status = Cached; | 307 m_status = Cached; |
| 314 } | 308 } |
| 315 | 309 |
| 316 AtomicString Resource::httpContentType() const | 310 AtomicString Resource::httpContentType() const |
| 317 { | 311 { |
| 318 return extractMIMETypeFromMediaType(m_response.httpHeaderField(HTTPNames::Co
ntent_Type).lower()); | 312 return extractMIMETypeFromMediaType(m_response.httpHeaderField(HTTPNames::Co
ntent_Type).lower()); |
| 319 } | 313 } |
| 320 | 314 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 { | 444 { |
| 451 m_responseTimestamp = currentTime(); | 445 m_responseTimestamp = currentTime(); |
| 452 | 446 |
| 453 if (!m_revalidatingRequest.isNull()) { | 447 if (!m_revalidatingRequest.isNull()) { |
| 454 if (response.httpStatusCode() == 304) { | 448 if (response.httpStatusCode() == 304) { |
| 455 revalidationSucceeded(response); | 449 revalidationSucceeded(response); |
| 456 return; | 450 return; |
| 457 } | 451 } |
| 458 revalidationFailed(); | 452 revalidationFailed(); |
| 459 } | 453 } |
| 460 | |
| 461 setResponse(response); | 454 setResponse(response); |
| 462 String encoding = response.textEncodingName(); | 455 String encoding = response.textEncodingName(); |
| 463 if (!encoding.isNull()) | 456 if (!encoding.isNull()) |
| 464 setEncoding(encoding); | 457 setEncoding(encoding); |
| 465 } | 458 } |
| 466 | 459 |
| 467 void Resource::setSerializedCachedMetadata(const char* data, size_t size) | 460 void Resource::setSerializedCachedMetadata(const char* data, size_t size) |
| 468 { | 461 { |
| 469 // We only expect to receive cached metadata from the platform once. | 462 // We only expect to receive cached metadata from the platform once. |
| 470 // If this triggers, it indicates an efficiency problem which is most | 463 // If this triggers, it indicates an efficiency problem which is most |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 case Resource::Media: | 1098 case Resource::Media: |
| 1106 return "Media"; | 1099 return "Media"; |
| 1107 case Resource::Manifest: | 1100 case Resource::Manifest: |
| 1108 return "Manifest"; | 1101 return "Manifest"; |
| 1109 } | 1102 } |
| 1110 ASSERT_NOT_REACHED(); | 1103 ASSERT_NOT_REACHED(); |
| 1111 return "Unknown"; | 1104 return "Unknown"; |
| 1112 } | 1105 } |
| 1113 | 1106 |
| 1114 } // namespace blink | 1107 } // namespace blink |
| OLD | NEW |