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

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

Issue 2711893002: Loosen FirstMeaningfulPaint UMA network-idle heuristics (Closed)
Patch Set: less hacky test 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 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 !shouldDeferImageLoad(resource->url())) 1047 !shouldDeferImageLoad(resource->url()))
1048 startLoad(resource); 1048 startLoad(resource);
1049 } 1049 }
1050 } 1050 }
1051 1051
1052 void ResourceFetcher::clearContext() { 1052 void ResourceFetcher::clearContext() {
1053 clearPreloads(ResourceFetcher::ClearAllPreloads); 1053 clearPreloads(ResourceFetcher::ClearAllPreloads);
1054 m_context.clear(); 1054 m_context.clear();
1055 } 1055 }
1056 1056
1057 int ResourceFetcher::requestCount() const { 1057 int ResourceFetcher::blockingRequestCount() const {
1058 return m_loaders.size(); 1058 return m_loaders.size();
1059 } 1059 }
1060 1060
1061 bool ResourceFetcher::hasPendingRequest() const { 1061 int ResourceFetcher::nonblockingRequestCount() const {
1062 return m_loaders.size() > 0 || m_nonBlockingLoaders.size() > 0; 1062 return m_nonBlockingLoaders.size();
1063 } 1063 }
1064 1064
1065 void ResourceFetcher::preloadStarted(Resource* resource) { 1065 void ResourceFetcher::preloadStarted(Resource* resource) {
1066 if (m_preloads && m_preloads->contains(resource)) 1066 if (m_preloads && m_preloads->contains(resource))
1067 return; 1067 return;
1068 resource->increasePreloadCount(); 1068 resource->increasePreloadCount();
1069 1069
1070 if (!m_preloads) 1070 if (!m_preloads)
1071 m_preloads = new HeapListHashSet<Member<Resource>>; 1071 m_preloads = new HeapListHashSet<Member<Resource>>;
1072 m_preloads->insert(resource); 1072 m_preloads->insert(resource);
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 visitor->trace(m_context); 1546 visitor->trace(m_context);
1547 visitor->trace(m_archive); 1547 visitor->trace(m_archive);
1548 visitor->trace(m_loaders); 1548 visitor->trace(m_loaders);
1549 visitor->trace(m_nonBlockingLoaders); 1549 visitor->trace(m_nonBlockingLoaders);
1550 visitor->trace(m_documentResources); 1550 visitor->trace(m_documentResources);
1551 visitor->trace(m_preloads); 1551 visitor->trace(m_preloads);
1552 visitor->trace(m_resourceTimingInfoMap); 1552 visitor->trace(m_resourceTimingInfoMap);
1553 } 1553 }
1554 1554
1555 } // namespace blink 1555 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698