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

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

Issue 1410153009: DevTools: Make network events continuous on Timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments. Created 5 years, 1 month 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 resource->setIdentifier(createUniqueIdentifier()); 319 resource->setIdentifier(createUniqueIdentifier());
320 resource->setCacheIdentifier(cacheIdentifier); 320 resource->setCacheIdentifier(cacheIdentifier);
321 resource->finish(); 321 resource->finish();
322 memoryCache()->add(resource.get()); 322 memoryCache()->add(resource.get());
323 scheduleDocumentResourcesGC(); 323 scheduleDocumentResourcesGC();
324 } 324 }
325 325
326 ResourcePtr<Resource> ResourceFetcher::requestResource(FetchRequest& request, co nst ResourceFactory& factory, const SubstituteData& substituteData) 326 ResourcePtr<Resource> ResourceFetcher::requestResource(FetchRequest& request, co nst ResourceFactory& factory, const SubstituteData& substituteData)
327 { 327 {
328 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || facto ry.type() == Resource::Raw || factory.type() == Resource::XSLStyleSheet); 328 ASSERT(request.options().synchronousPolicy == RequestAsynchronously || facto ry.type() == Resource::Raw || factory.type() == Resource::XSLStyleSheet);
329 TRACE_EVENT0("devtools.timeline", "ResourceFetcher::requestResource");
329 330
330 context().upgradeInsecureRequest(request); 331 context().upgradeInsecureRequest(request);
331 context().addClientHintsIfNecessary(request); 332 context().addClientHintsIfNecessary(request);
332 context().addCSPHeaderIfNecessary(factory.type(), request); 333 context().addCSPHeaderIfNecessary(factory.type(), request);
333 334
334 bool isStaticData = request.resourceRequest().url().protocolIsData() || subs tituteData.isValid(); 335 bool isStaticData = request.resourceRequest().url().protocolIsData() || subs tituteData.isValid();
335 if (isStaticData) 336 if (isStaticData)
336 preCacheData(request, factory, substituteData); 337 preCacheData(request, factory, substituteData);
337 338
338 KURL url = request.resourceRequest().url(); 339 KURL url = request.resourceRequest().url();
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 visitor->trace(m_archiveResourceCollection); 1160 visitor->trace(m_archiveResourceCollection);
1160 visitor->trace(m_loaders); 1161 visitor->trace(m_loaders);
1161 visitor->trace(m_nonBlockingLoaders); 1162 visitor->trace(m_nonBlockingLoaders);
1162 #if ENABLE(OILPAN) 1163 #if ENABLE(OILPAN)
1163 visitor->trace(m_preloads); 1164 visitor->trace(m_preloads);
1164 visitor->trace(m_resourceTimingInfoMap); 1165 visitor->trace(m_resourceTimingInfoMap);
1165 #endif 1166 #endif
1166 } 1167 }
1167 1168
1168 } 1169 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698