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

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

Issue 2130683002: [Experiment] purge-and-suspend Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 return; 1249 return;
1250 case Revalidate: 1250 case Revalidate:
1251 ++m_revalidateCount; 1251 ++m_revalidateCount;
1252 return; 1252 return;
1253 case Use: 1253 case Use:
1254 ++m_useCount; 1254 ++m_useCount;
1255 return; 1255 return;
1256 } 1256 }
1257 } 1257 }
1258 1258
1259 void ResourceFetcher::purgeMemory()
1260 {
1261 if (isFetching())
1262 stopFetching();
1263 m_documentResources.clear();
1264 m_validatedURLs.clear();
1265 clearPreloads(ClearAllPreloads);
1266 }
1267
1259 DEFINE_TRACE(ResourceFetcher) 1268 DEFINE_TRACE(ResourceFetcher)
1260 { 1269 {
1261 visitor->trace(m_context); 1270 visitor->trace(m_context);
1262 visitor->trace(m_archive); 1271 visitor->trace(m_archive);
1263 visitor->trace(m_loaders); 1272 visitor->trace(m_loaders);
1264 visitor->trace(m_nonBlockingLoaders); 1273 visitor->trace(m_nonBlockingLoaders);
1265 visitor->trace(m_documentResources); 1274 visitor->trace(m_documentResources);
1266 visitor->trace(m_preloads); 1275 visitor->trace(m_preloads);
1267 visitor->trace(m_resourceTimingInfoMap); 1276 visitor->trace(m_resourceTimingInfoMap);
1268 } 1277 }
1269 1278
1270 } // namespace blink 1279 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698