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

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

Issue 2725063003: Migrate WTF::LinkedHashSet/ListHashSet/HashTable::remove() to ::erase() (Closed)
Patch Set: rebase Created 3 years, 9 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 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 rights reserved. 6 rights reserved.
7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
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 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 if (!m_preloads) 1101 if (!m_preloads)
1102 return; 1102 return;
1103 1103
1104 logPreloadStats(policy); 1104 logPreloadStats(policy);
1105 1105
1106 for (const auto& resource : *m_preloads) { 1106 for (const auto& resource : *m_preloads) {
1107 if (policy == ClearAllPreloads || !resource->isLinkPreload()) { 1107 if (policy == ClearAllPreloads || !resource->isLinkPreload()) {
1108 resource->decreasePreloadCount(); 1108 resource->decreasePreloadCount();
1109 if (resource->getPreloadResult() == Resource::PreloadNotReferenced) 1109 if (resource->getPreloadResult() == Resource::PreloadNotReferenced)
1110 memoryCache()->remove(resource.get()); 1110 memoryCache()->remove(resource.get());
1111 m_preloads->remove(resource); 1111 m_preloads->erase(resource);
1112 } 1112 }
1113 } 1113 }
1114 if (!m_preloads->size()) 1114 if (!m_preloads->size())
1115 m_preloads.clear(); 1115 m_preloads.clear();
1116 } 1116 }
1117 1117
1118 void ResourceFetcher::warnUnusedPreloads() { 1118 void ResourceFetcher::warnUnusedPreloads() {
1119 if (!m_preloads) 1119 if (!m_preloads)
1120 return; 1120 return;
1121 for (const auto& resource : *m_preloads) { 1121 for (const auto& resource : *m_preloads) {
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1552 visitor->trace(m_context); 1552 visitor->trace(m_context);
1553 visitor->trace(m_archive); 1553 visitor->trace(m_archive);
1554 visitor->trace(m_loaders); 1554 visitor->trace(m_loaders);
1555 visitor->trace(m_nonBlockingLoaders); 1555 visitor->trace(m_nonBlockingLoaders);
1556 visitor->trace(m_documentResources); 1556 visitor->trace(m_documentResources);
1557 visitor->trace(m_preloads); 1557 visitor->trace(m_preloads);
1558 visitor->trace(m_resourceTimingInfoMap); 1558 visitor->trace(m_resourceTimingInfoMap);
1559 } 1559 }
1560 1560
1561 } // namespace blink 1561 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/ThreadState.cpp ('k') | third_party/WebKit/Source/wtf/LinkedHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698