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

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

Issue 2191533003: Refactor Timer classes in preparation for landing FrameTimers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 // already initialized for the revalidation here, but won't start loading. 517 // already initialized for the revalidation here, but won't start loading.
518 if (!resourceNeedsLoad(resource, request, policy)) 518 if (!resourceNeedsLoad(resource, request, policy))
519 return resource; 519 return resource;
520 520
521 if (!startLoad(resource)) 521 if (!startLoad(resource))
522 return nullptr; 522 return nullptr;
523 ASSERT(!resource->errorOccurred() || request.options().synchronousPolicy == RequestSynchronously); 523 ASSERT(!resource->errorOccurred() || request.options().synchronousPolicy == RequestSynchronously);
524 return resource; 524 return resource;
525 } 525 }
526 526
527 void ResourceFetcher::resourceTimingReportTimerFired(Timer<ResourceFetcher>* tim er) 527 void ResourceFetcher::resourceTimingReportTimerFired(TimerBase* timer)
528 { 528 {
529 ASSERT_UNUSED(timer, timer == &m_resourceTimingReportTimer); 529 ASSERT_UNUSED(timer, timer == &m_resourceTimingReportTimer);
530 Vector<std::unique_ptr<ResourceTimingInfo>> timingReports; 530 Vector<std::unique_ptr<ResourceTimingInfo>> timingReports;
531 timingReports.swap(m_scheduledResourceTimingReports); 531 timingReports.swap(m_scheduledResourceTimingReports);
532 for (const auto& timingInfo : timingReports) 532 for (const auto& timingInfo : timingReports)
533 context().addResourceTiming(*timingInfo); 533 context().addResourceTiming(*timingInfo);
534 } 534 }
535 535
536 void ResourceFetcher::determineRequestContext(ResourceRequest& request, Resource ::Type type, bool isMainFrame) 536 void ResourceFetcher::determineRequestContext(ResourceRequest& request, Resource ::Type type, bool isMainFrame)
537 { 537 {
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 visitor->trace(m_context); 1272 visitor->trace(m_context);
1273 visitor->trace(m_archive); 1273 visitor->trace(m_archive);
1274 visitor->trace(m_loaders); 1274 visitor->trace(m_loaders);
1275 visitor->trace(m_nonBlockingLoaders); 1275 visitor->trace(m_nonBlockingLoaders);
1276 visitor->trace(m_documentResources); 1276 visitor->trace(m_documentResources);
1277 visitor->trace(m_preloads); 1277 visitor->trace(m_preloads);
1278 visitor->trace(m_resourceTimingInfoMap); 1278 visitor->trace(m_resourceTimingInfoMap);
1279 } 1279 }
1280 1280
1281 } // namespace blink 1281 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698