OLD | NEW |
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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 m_preloads = new HeapListHashSet<Member<Resource>>; | 1063 m_preloads = new HeapListHashSet<Member<Resource>>; |
1064 m_preloads->add(resource); | 1064 m_preloads->add(resource); |
1065 | 1065 |
1066 if (m_preloadedURLsForTest) | 1066 if (m_preloadedURLsForTest) |
1067 m_preloadedURLsForTest->add(resource->url().getString()); | 1067 m_preloadedURLsForTest->add(resource->url().getString()); |
1068 } | 1068 } |
1069 | 1069 |
1070 void ResourceFetcher::enableIsPreloadedForTest() { | 1070 void ResourceFetcher::enableIsPreloadedForTest() { |
1071 if (m_preloadedURLsForTest) | 1071 if (m_preloadedURLsForTest) |
1072 return; | 1072 return; |
1073 m_preloadedURLsForTest = wrapUnique(new HashSet<String>); | 1073 m_preloadedURLsForTest = WTF::wrapUnique(new HashSet<String>); |
1074 | 1074 |
1075 if (m_preloads) { | 1075 if (m_preloads) { |
1076 for (const auto& resource : *m_preloads) | 1076 for (const auto& resource : *m_preloads) |
1077 m_preloadedURLsForTest->add(resource->url().getString()); | 1077 m_preloadedURLsForTest->add(resource->url().getString()); |
1078 } | 1078 } |
1079 } | 1079 } |
1080 | 1080 |
1081 bool ResourceFetcher::isPreloadedForTest(const KURL& url) const { | 1081 bool ResourceFetcher::isPreloadedForTest(const KURL& url) const { |
1082 DCHECK(m_preloadedURLsForTest); | 1082 DCHECK(m_preloadedURLsForTest); |
1083 return m_preloadedURLsForTest->contains(url.getString()); | 1083 return m_preloadedURLsForTest->contains(url.getString()); |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1671 visitor->trace(m_context); | 1671 visitor->trace(m_context); |
1672 visitor->trace(m_archive); | 1672 visitor->trace(m_archive); |
1673 visitor->trace(m_loaders); | 1673 visitor->trace(m_loaders); |
1674 visitor->trace(m_nonBlockingLoaders); | 1674 visitor->trace(m_nonBlockingLoaders); |
1675 visitor->trace(m_documentResources); | 1675 visitor->trace(m_documentResources); |
1676 visitor->trace(m_preloads); | 1676 visitor->trace(m_preloads); |
1677 visitor->trace(m_resourceTimingInfoMap); | 1677 visitor->trace(m_resourceTimingInfoMap); |
1678 } | 1678 } |
1679 | 1679 |
1680 } // namespace blink | 1680 } // namespace blink |
OLD | NEW |