| 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 | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 7 rights reserved. | 7 rights reserved. |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 if (!errorOccurred()) | 409 if (!errorOccurred()) |
| 410 setStatus(LoadError); | 410 setStatus(LoadError); |
| 411 DCHECK(errorOccurred()); | 411 DCHECK(errorOccurred()); |
| 412 m_data.clear(); | 412 m_data.clear(); |
| 413 m_loader = nullptr; | 413 m_loader = nullptr; |
| 414 checkNotify(); | 414 checkNotify(); |
| 415 } | 415 } |
| 416 | 416 |
| 417 void Resource::finish(double loadFinishTime) { | 417 void Resource::finish(double loadFinishTime) { |
| 418 DCHECK(!m_isRevalidating); | 418 DCHECK(!m_isRevalidating); |
| 419 if (m_resourceRequest.isCacheAwareLoadingActivated()) |
| 420 m_resourceRequest.deactivateCacheAwareLoading(); |
| 419 m_loadFinishTime = loadFinishTime; | 421 m_loadFinishTime = loadFinishTime; |
| 420 if (!errorOccurred()) | 422 if (!errorOccurred()) |
| 421 m_status = Cached; | 423 m_status = Cached; |
| 422 m_loader = nullptr; | 424 m_loader = nullptr; |
| 423 checkNotify(); | 425 checkNotify(); |
| 424 } | 426 } |
| 425 | 427 |
| 426 AtomicString Resource::httpContentType() const { | 428 AtomicString Resource::httpContentType() const { |
| 427 return extractMIMETypeFromMediaType( | 429 return extractMIMETypeFromMediaType( |
| 428 m_response.httpHeaderField(HTTPNames::Content_Type).lower()); | 430 m_response.httpHeaderField(HTTPNames::Content_Type).lower()); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 DCHECK(!request.isNull()); | 549 DCHECK(!request.isNull()); |
| 548 m_isRevalidating = true; | 550 m_isRevalidating = true; |
| 549 m_resourceRequest = request; | 551 m_resourceRequest = request; |
| 550 m_status = NotStarted; | 552 m_status = NotStarted; |
| 551 } | 553 } |
| 552 | 554 |
| 553 void Resource::willFollowRedirect(ResourceRequest& newRequest, | 555 void Resource::willFollowRedirect(ResourceRequest& newRequest, |
| 554 const ResourceResponse& redirectResponse) { | 556 const ResourceResponse& redirectResponse) { |
| 555 if (m_isRevalidating) | 557 if (m_isRevalidating) |
| 556 revalidationFailed(); | 558 revalidationFailed(); |
| 559 if (m_resourceRequest.isCacheAwareLoadingActivated()) |
| 560 m_resourceRequest.deactivateCacheAwareLoading(); |
| 557 m_redirectChain.append(RedirectPair(newRequest, redirectResponse)); | 561 m_redirectChain.append(RedirectPair(newRequest, redirectResponse)); |
| 558 } | 562 } |
| 559 | 563 |
| 560 void Resource::setResponse(const ResourceResponse& response) { | 564 void Resource::setResponse(const ResourceResponse& response) { |
| 561 m_response = response; | 565 m_response = response; |
| 562 if (m_response.wasFetchedViaServiceWorker()) | 566 if (m_response.wasFetchedViaServiceWorker()) |
| 563 m_cacheHandler = ServiceWorkerResponseCachedMetadataHandler::create( | 567 m_cacheHandler = ServiceWorkerResponseCachedMetadataHandler::create( |
| 564 this, m_fetcherSecurityOrigin.get()); | 568 this, m_fetcherSecurityOrigin.get()); |
| 565 } | 569 } |
| 566 | 570 |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 case Resource::TextTrack: | 1083 case Resource::TextTrack: |
| 1080 case Resource::Media: | 1084 case Resource::Media: |
| 1081 case Resource::Manifest: | 1085 case Resource::Manifest: |
| 1082 return false; | 1086 return false; |
| 1083 } | 1087 } |
| 1084 NOTREACHED(); | 1088 NOTREACHED(); |
| 1085 return false; | 1089 return false; |
| 1086 } | 1090 } |
| 1087 | 1091 |
| 1088 } // namespace blink | 1092 } // namespace blink |
| OLD | NEW |