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

Side by Side Diff: Source/core/inspector/InspectorResourceAgent.cpp

Issue 23582002: CORS: Update the redirection status in Inspector Network tab for CORS requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 if (monotonicFinishTime) 391 if (monotonicFinishTime)
392 finishTime = loader->timing()->monotonicTimeToPseudoWallTime(monotonicFi nishTime); 392 finishTime = loader->timing()->monotonicTimeToPseudoWallTime(monotonicFi nishTime);
393 393
394 String requestId = IdentifiersFactory::requestId(identifier); 394 String requestId = IdentifiersFactory::requestId(identifier);
395 m_resourcesData->maybeDecodeDataToContent(requestId); 395 m_resourcesData->maybeDecodeDataToContent(requestId);
396 if (!finishTime) 396 if (!finishTime)
397 finishTime = currentTime(); 397 finishTime = currentTime();
398 m_frontend->loadingFinished(requestId, finishTime); 398 m_frontend->loadingFinished(requestId, finishTime);
399 } 399 }
400 400
401 void InspectorResourceAgent::didReceiveCORSRedirectResponse(unsigned long identi fier, DocumentLoader* loader, const ResourceResponse& response, ResourceLoader* resourceLoader, double monotonicFinishTime)
402 {
403 double finishTime = 0.0;
pfeldman 2013/08/27 14:21:33 Is this copy-paste from above? Why not to call the
ancilgeorge 2013/08/28 08:14:36 Yes. Changed it.
404
405 // Update the response and finish loading
406 didReceiveResourceResponse(identifier, loader, response, resourceLoader);
407
408 // FIXME: Expose all of the timing details to inspector and have it calculat e finishTime.
409 if (monotonicFinishTime)
410 finishTime = loader->timing()->monotonicTimeToPseudoWallTime(monotonicFi nishTime);
411
412 String requestId = IdentifiersFactory::requestId(identifier);
413 m_resourcesData->maybeDecodeDataToContent(requestId);
414 if (!finishTime)
415 finishTime = currentTime();
416 m_frontend->loadingFinished(requestId, finishTime);
417 }
418
401 void InspectorResourceAgent::didFailLoading(unsigned long identifier, DocumentLo ader* loader, const ResourceError& error) 419 void InspectorResourceAgent::didFailLoading(unsigned long identifier, DocumentLo ader* loader, const ResourceError& error)
402 { 420 {
403 String requestId = IdentifiersFactory::requestId(identifier); 421 String requestId = IdentifiersFactory::requestId(identifier);
404 bool canceled = error.isCancellation(); 422 bool canceled = error.isCancellation();
405 m_frontend->loadingFailed(requestId, currentTime(), error.localizedDescripti on(), canceled ? &canceled : 0); 423 m_frontend->loadingFailed(requestId, currentTime(), error.localizedDescripti on(), canceled ? &canceled : 0);
406 } 424 }
407 425
408 void InspectorResourceAgent::scriptImported(unsigned long identifier, const Stri ng& sourceString) 426 void InspectorResourceAgent::scriptImported(unsigned long identifier, const Stri ng& sourceString)
409 { 427 {
410 m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identifier ), sourceString); 428 m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identifier ), sourceString);
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 , m_overlay(overlay) 794 , m_overlay(overlay)
777 , m_frontend(0) 795 , m_frontend(0)
778 , m_resourcesData(adoptPtr(new NetworkResourcesData())) 796 , m_resourcesData(adoptPtr(new NetworkResourcesData()))
779 , m_loadingXHRSynchronously(false) 797 , m_loadingXHRSynchronously(false)
780 , m_isRecalculatingStyle(false) 798 , m_isRecalculatingStyle(false)
781 { 799 {
782 } 800 }
783 801
784 } // namespace WebCore 802 } // namespace WebCore
785 803
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698