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

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

Issue 2724363002: Migrate WTF::LinkedHashSet/ListHashSet::add() to ::insert() (Closed)
Patch Set: 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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 return m_loaders.size() > 0 || m_nonBlockingLoaders.size() > 0; 1068 return m_loaders.size() > 0 || m_nonBlockingLoaders.size() > 0;
1069 } 1069 }
1070 1070
1071 void ResourceFetcher::preloadStarted(Resource* resource) { 1071 void ResourceFetcher::preloadStarted(Resource* resource) {
1072 if (m_preloads && m_preloads->contains(resource)) 1072 if (m_preloads && m_preloads->contains(resource))
1073 return; 1073 return;
1074 resource->increasePreloadCount(); 1074 resource->increasePreloadCount();
1075 1075
1076 if (!m_preloads) 1076 if (!m_preloads)
1077 m_preloads = new HeapListHashSet<Member<Resource>>; 1077 m_preloads = new HeapListHashSet<Member<Resource>>;
1078 m_preloads->add(resource); 1078 m_preloads->insert(resource);
1079 1079
1080 if (m_preloadedURLsForTest) 1080 if (m_preloadedURLsForTest)
1081 m_preloadedURLsForTest->insert(resource->url().getString()); 1081 m_preloadedURLsForTest->insert(resource->url().getString());
1082 } 1082 }
1083 1083
1084 void ResourceFetcher::enableIsPreloadedForTest() { 1084 void ResourceFetcher::enableIsPreloadedForTest() {
1085 if (m_preloadedURLsForTest) 1085 if (m_preloadedURLsForTest)
1086 return; 1086 return;
1087 m_preloadedURLsForTest = WTF::wrapUnique(new HashSet<String>); 1087 m_preloadedURLsForTest = WTF::wrapUnique(new HashSet<String>);
1088 1088
(...skipping 463 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.h ('k') | third_party/WebKit/Source/wtf/LinkedHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698