Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 2202473002: DO NOT COMMIT: Experimental removal of encoded image data Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: (rebase) Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 811
812 // Prevent the case when there are clients waiting but no callback scheduled . 812 // Prevent the case when there are clients waiting but no callback scheduled .
813 ASSERT(m_clientsAwaitingCallback.isEmpty() || scheduled); 813 ASSERT(m_clientsAwaitingCallback.isEmpty() || scheduled);
814 } 814 }
815 815
816 void Resource::prune() 816 void Resource::prune()
817 { 817 {
818 destroyDecodedDataIfPossible(); 818 destroyDecodedDataIfPossible();
819 } 819 }
820 820
821 bool Resource::isReloadable() const
822 {
823 ResourceClientWalker<ResourceClient> w(m_finishedClients);
824 while (ResourceClient* c = w.next()) {
825 if (!c->isReloadable())
826 return false;
827 }
828 return true;
829 }
830
821 void Resource::prepareToSuspend() 831 void Resource::prepareToSuspend()
822 { 832 {
823 prune(); 833 prune();
824 if (!m_cacheHandler) 834 if (!m_cacheHandler)
825 return; 835 return;
826 m_cacheHandler->clearCachedMetadata(CachedMetadataHandler::CacheLocally); 836 m_cacheHandler->clearCachedMetadata(CachedMetadataHandler::CacheLocally);
827 } 837 }
828 838
829 void Resource::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfDetail, WebProcess MemoryDump* memoryDump) const 839 void Resource::onMemoryDump(WebMemoryDumpLevelOfDetail levelOfDetail, WebProcess MemoryDump* memoryDump) const
830 { 840 {
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 case Resource::TextTrack: 1075 case Resource::TextTrack:
1066 case Resource::Media: 1076 case Resource::Media:
1067 case Resource::Manifest: 1077 case Resource::Manifest:
1068 return false; 1078 return false;
1069 } 1079 }
1070 ASSERT_NOT_REACHED(); 1080 ASSERT_NOT_REACHED();
1071 return false; 1081 return false;
1072 } 1082 }
1073 1083
1074 } // namespace blink 1084 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/fetch/ResourceClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698