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

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

Issue 2711893002: Loosen FirstMeaningfulPaint UMA network-idle heuristics (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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 !shouldDeferImageLoad(resource->url())) 1042 !shouldDeferImageLoad(resource->url()))
1043 startLoad(resource); 1043 startLoad(resource);
1044 } 1044 }
1045 } 1045 }
1046 1046
1047 void ResourceFetcher::clearContext() { 1047 void ResourceFetcher::clearContext() {
1048 clearPreloads(ResourceFetcher::ClearAllPreloads); 1048 clearPreloads(ResourceFetcher::ClearAllPreloads);
1049 m_context.clear(); 1049 m_context.clear();
1050 } 1050 }
1051 1051
1052 int ResourceFetcher::requestCount() const { 1052 int ResourceFetcher::blockingRequestCount() const {
1053 return m_loaders.size(); 1053 return m_loaders.size();
1054 } 1054 }
1055 1055
1056 bool ResourceFetcher::hasPendingRequest() const { 1056 int ResourceFetcher::nonblockingRequestCount() const {
1057 return m_loaders.size() > 0 || m_nonBlockingLoaders.size() > 0; 1057 return m_nonBlockingLoaders.size();
1058 } 1058 }
1059 1059
1060 void ResourceFetcher::preloadStarted(Resource* resource) { 1060 void ResourceFetcher::preloadStarted(Resource* resource) {
1061 if (m_preloads && m_preloads->contains(resource)) 1061 if (m_preloads && m_preloads->contains(resource))
1062 return; 1062 return;
1063 resource->increasePreloadCount(); 1063 resource->increasePreloadCount();
1064 1064
1065 if (!m_preloads) 1065 if (!m_preloads)
1066 m_preloads = new HeapListHashSet<Member<Resource>>; 1066 m_preloads = new HeapListHashSet<Member<Resource>>;
1067 m_preloads->add(resource); 1067 m_preloads->add(resource);
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
1540 visitor->trace(m_context); 1540 visitor->trace(m_context);
1541 visitor->trace(m_archive); 1541 visitor->trace(m_archive);
1542 visitor->trace(m_loaders); 1542 visitor->trace(m_loaders);
1543 visitor->trace(m_nonBlockingLoaders); 1543 visitor->trace(m_nonBlockingLoaders);
1544 visitor->trace(m_documentResources); 1544 visitor->trace(m_documentResources);
1545 visitor->trace(m_preloads); 1545 visitor->trace(m_preloads);
1546 visitor->trace(m_resourceTimingInfoMap); 1546 visitor->trace(m_resourceTimingInfoMap);
1547 } 1547 }
1548 1548
1549 } // namespace blink 1549 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698