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

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

Issue 1362973004: Rename FROM_HERE to BLINK_FROM_HERE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 2 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 if (isStaticData) 256 if (isStaticData)
257 return; 257 return;
258 258
259 if (type == ResourceLoadingFromCache && !resource->stillNeedsLoad() && !m_va lidatedURLs.contains(request.resourceRequest().url())) { 259 if (type == ResourceLoadingFromCache && !resource->stillNeedsLoad() && !m_va lidatedURLs.contains(request.resourceRequest().url())) {
260 // Resources loaded from memory cache should be reported the first time they're used. 260 // Resources loaded from memory cache should be reported the first time they're used.
261 OwnPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(request.opt ions().initiatorInfo.name, monotonicallyIncreasingTime(), resource->type() == Re source::MainResource); 261 OwnPtr<ResourceTimingInfo> info = ResourceTimingInfo::create(request.opt ions().initiatorInfo.name, monotonicallyIncreasingTime(), resource->type() == Re source::MainResource);
262 populateResourceTiming(info.get(), resource, true); 262 populateResourceTiming(info.get(), resource, true);
263 m_scheduledResourceTimingReports.append(info.release()); 263 m_scheduledResourceTimingReports.append(info.release());
264 if (!m_resourceTimingReportTimer.isActive()) 264 if (!m_resourceTimingReportTimer.isActive())
265 m_resourceTimingReportTimer.startOneShot(0, FROM_HERE); 265 m_resourceTimingReportTimer.startOneShot(0, BLINK_FROM_HERE);
266 } 266 }
267 267
268 if (m_validatedURLs.size() >= kMaxValidatedURLsSize) { 268 if (m_validatedURLs.size() >= kMaxValidatedURLsSize) {
269 m_validatedURLs.clear(); 269 m_validatedURLs.clear();
270 } 270 }
271 m_validatedURLs.add(request.resourceRequest().url()); 271 m_validatedURLs.add(request.resourceRequest().url());
272 } 272 }
273 273
274 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> urlForTraceEvent(const K URL& url) 274 static PassRefPtr<TraceEvent::ConvertableToTraceFormat> urlForTraceEvent(const K URL& url)
275 { 275 {
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 774
775 void ResourceFetcher::didLoadResource() 775 void ResourceFetcher::didLoadResource()
776 { 776 {
777 scheduleDocumentResourcesGC(); 777 scheduleDocumentResourcesGC();
778 context().didLoadResource(); 778 context().didLoadResource();
779 } 779 }
780 780
781 void ResourceFetcher::scheduleDocumentResourcesGC() 781 void ResourceFetcher::scheduleDocumentResourcesGC()
782 { 782 {
783 if (!m_garbageCollectDocumentResourcesTimer.isActive()) 783 if (!m_garbageCollectDocumentResourcesTimer.isActive())
784 m_garbageCollectDocumentResourcesTimer.startOneShot(0, FROM_HERE); 784 m_garbageCollectDocumentResourcesTimer.startOneShot(0, BLINK_FROM_HERE);
785 } 785 }
786 786
787 // Garbage collecting m_documentResources is a workaround for the 787 // Garbage collecting m_documentResources is a workaround for the
788 // ResourcePtrs on the RHS being strong references. Ideally this 788 // ResourcePtrs on the RHS being strong references. Ideally this
789 // would be a weak map, however ResourcePtrs perform additional 789 // would be a weak map, however ResourcePtrs perform additional
790 // bookkeeping on Resources, so instead pseudo-GC them -- when the 790 // bookkeeping on Resources, so instead pseudo-GC them -- when the
791 // reference count reaches 1, m_documentResources is the only reference, so 791 // reference count reaches 1, m_documentResources is the only reference, so
792 // remove it from the map. 792 // remove it from the map.
793 void ResourceFetcher::garbageCollectDocumentResourcesTimerFired(Timer<ResourceFe tcher>* timer) 793 void ResourceFetcher::garbageCollectDocumentResourcesTimerFired(Timer<ResourceFe tcher>* timer)
794 { 794 {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 visitor->trace(m_archiveResourceCollection); 1167 visitor->trace(m_archiveResourceCollection);
1168 visitor->trace(m_loaders); 1168 visitor->trace(m_loaders);
1169 visitor->trace(m_nonBlockingLoaders); 1169 visitor->trace(m_nonBlockingLoaders);
1170 #if ENABLE(OILPAN) 1170 #if ENABLE(OILPAN)
1171 visitor->trace(m_preloads); 1171 visitor->trace(m_preloads);
1172 visitor->trace(m_resourceTimingInfoMap); 1172 visitor->trace(m_resourceTimingInfoMap);
1173 #endif 1173 #endif
1174 } 1174 }
1175 1175
1176 } 1176 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.cpp ('k') | third_party/WebKit/Source/core/fileapi/FileReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698