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

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

Issue 2435873003: [WeakMemoryCache] Do not prune in didAccessDecodedData() (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 m_encodedSizeMemoryUsage = encodedSize; 801 m_encodedSizeMemoryUsage = encodedSize;
802 memoryCache()->update(this, oldSize, size()); 802 memoryCache()->update(this, oldSize, size());
803 } 803 }
804 804
805 void Resource::setEncodedSizeMemoryUsage(size_t encodedSize) { 805 void Resource::setEncodedSizeMemoryUsage(size_t encodedSize) {
806 m_encodedSizeMemoryUsage = encodedSize; 806 m_encodedSizeMemoryUsage = encodedSize;
807 } 807 }
808 808
809 void Resource::didAccessDecodedData() { 809 void Resource::didAccessDecodedData() {
810 memoryCache()->updateDecodedResource(this, UpdateForAccess); 810 memoryCache()->updateDecodedResource(this, UpdateForAccess);
811 memoryCache()->prune();
812 } 811 }
813 812
814 void Resource::finishPendingClients() { 813 void Resource::finishPendingClients() {
815 // We're going to notify clients one by one. It is simple if the client does 814 // We're going to notify clients one by one. It is simple if the client does
816 // nothing. However there are a couple other things that can happen. 815 // nothing. However there are a couple other things that can happen.
817 // 816 //
818 // 1. Clients can be added during the loop. Make sure they are not processed. 817 // 1. Clients can be added during the loop. Make sure they are not processed.
819 // 2. Clients can be removed during the loop. Make sure they are always 818 // 2. Clients can be removed during the loop. Make sure they are always
820 // available to be removed. Also don't call removed clients or add them 819 // available to be removed. Also don't call removed clients or add them
821 // back. 820 // back.
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 case Resource::TextTrack: 1103 case Resource::TextTrack:
1105 case Resource::Media: 1104 case Resource::Media:
1106 case Resource::Manifest: 1105 case Resource::Manifest:
1107 return false; 1106 return false;
1108 } 1107 }
1109 NOTREACHED(); 1108 NOTREACHED();
1110 return false; 1109 return false;
1111 } 1110 }
1112 1111
1113 } // namespace blink 1112 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698