| 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 { | 722 { |
| 723 if (!hasClientsOrObservers() && m_isAlive) { | 723 if (!hasClientsOrObservers() && m_isAlive) { |
| 724 m_isAlive = false; | 724 m_isAlive = false; |
| 725 memoryCache()->makeDead(this); | 725 memoryCache()->makeDead(this); |
| 726 allClientsAndObserversRemoved(); | 726 allClientsAndObserversRemoved(); |
| 727 | 727 |
| 728 // RFC2616 14.9.2: | 728 // RFC2616 14.9.2: |
| 729 // "no-store: ... MUST make a best-effort attempt to remove the informat
ion from volatile storage as promptly as possible" | 729 // "no-store: ... MUST make a best-effort attempt to remove the informat
ion from volatile storage as promptly as possible" |
| 730 // "... History buffers MAY store such responses as part of their normal
operation." | 730 // "... History buffers MAY store such responses as part of their normal
operation." |
| 731 // We allow non-secure content to be reused in history, but we do not al
low secure content to be reused. | 731 // We allow non-secure content to be reused in history, but we do not al
low secure content to be reused. |
| 732 if (hasCacheControlNoStoreHeader() && url().protocolIs("https")) { | 732 if (hasCacheControlNoStoreHeader() && url().protocolIs("https")) |
| 733 memoryCache()->remove(this); | 733 memoryCache()->remove(this); |
| 734 memoryCache()->prune(); | |
| 735 } else { | |
| 736 memoryCache()->prune(this); | |
| 737 } | |
| 738 } | 734 } |
| 739 // This object may be dead here. | |
| 740 } | 735 } |
| 741 | 736 |
| 742 void Resource::allClientsAndObserversRemoved() | 737 void Resource::allClientsAndObserversRemoved() |
| 743 { | 738 { |
| 744 if (!m_loader) | 739 if (!m_loader) |
| 745 return; | 740 return; |
| 746 if (m_type == Raw) | 741 if (m_type == Raw) |
| 747 cancelTimerFired(&m_cancelTimer); | 742 cancelTimerFired(&m_cancelTimer); |
| 748 else if (!m_cancelTimer.isActive()) | 743 else if (!m_cancelTimer.isActive()) |
| 749 m_cancelTimer.startOneShot(0, BLINK_FROM_HERE); | 744 m_cancelTimer.startOneShot(0, BLINK_FROM_HERE); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1065 case Resource::TextTrack: | 1060 case Resource::TextTrack: |
| 1066 case Resource::Media: | 1061 case Resource::Media: |
| 1067 case Resource::Manifest: | 1062 case Resource::Manifest: |
| 1068 return false; | 1063 return false; |
| 1069 } | 1064 } |
| 1070 NOTREACHED(); | 1065 NOTREACHED(); |
| 1071 return false; | 1066 return false; |
| 1072 } | 1067 } |
| 1073 | 1068 |
| 1074 } // namespace blink | 1069 } // namespace blink |
| OLD | NEW |