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

Side by Side Diff: Source/core/loader/ResourceLoader.cpp

Issue 16950017: Reland [Resource Timing] Expose redirect timing information (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 7 years, 5 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
« no previous file with comments | « Source/core/loader/ResourceLoadNotifier.cpp ('k') | Source/core/loader/ResourceLoaderHost.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // Store the previous URL because we may modify it. 239 // Store the previous URL because we may modify it.
240 KURL previousURL = m_request.url(); 240 KURL previousURL = m_request.url();
241 RefPtr<ResourceLoader> protect(this); 241 RefPtr<ResourceLoader> protect(this);
242 242
243 ASSERT(!request.isNull()); 243 ASSERT(!request.isNull());
244 if (!redirectResponse.isNull()) { 244 if (!redirectResponse.isNull()) {
245 if (!m_host->shouldRequest(m_resource, request, m_options)) { 245 if (!m_host->shouldRequest(m_resource, request, m_options)) {
246 cancel(); 246 cancel();
247 return; 247 return;
248 } 248 }
249 249 m_host->redirectReceived(m_resource, redirectResponse);
250 m_resource->willSendRequest(request, redirectResponse); 250 m_resource->willSendRequest(request, redirectResponse);
251 } 251 }
252 252
253 if (request.isNull() || m_state == Terminated) 253 if (request.isNull() || m_state == Terminated)
254 return; 254 return;
255 255
256 m_host->willSendRequest(m_resource, request, redirectResponse, m_options); 256 m_host->willSendRequest(m_resource, request, redirectResponse, m_options);
257 request.setReportLoadTiming(true);
257 m_request = request; 258 m_request = request;
258 259
259 if (request.isNull()) 260 if (request.isNull())
260 cancel(); 261 cancel();
261 } 262 }
262 263
263 void ResourceLoader::didReceiveCachedMetadata(ResourceHandle*, const char* data, int length) 264 void ResourceLoader::didReceiveCachedMetadata(ResourceHandle*, const char* data, int length)
264 { 265 {
265 ASSERT(m_state == Initialized); 266 ASSERT(m_state == Initialized);
266 m_resource->setSerializedCachedMetadata(data, length); 267 m_resource->setSerializedCachedMetadata(data, length);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 375
375 releaseResources(); 376 releaseResources();
376 } 377 }
377 378
378 bool ResourceLoader::isLoadedBy(ResourceLoaderHost* loader) const 379 bool ResourceLoader::isLoadedBy(ResourceLoaderHost* loader) const
379 { 380 {
380 return m_host->isLoadedBy(loader); 381 return m_host->isLoadedBy(loader);
381 } 382 }
382 383
383 } 384 }
OLDNEW
« no previous file with comments | « Source/core/loader/ResourceLoadNotifier.cpp ('k') | Source/core/loader/ResourceLoaderHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698