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

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)
402 {
403 // Update the response and finish loading
404 didReceiveResourceResponse(identifier, loader, response, resourceLoader);
405 didFinishLoading(identifier, loader, 0);
406 }
407
401 void InspectorResourceAgent::didFailLoading(unsigned long identifier, DocumentLo ader* loader, const ResourceError& error) 408 void InspectorResourceAgent::didFailLoading(unsigned long identifier, DocumentLo ader* loader, const ResourceError& error)
402 { 409 {
403 String requestId = IdentifiersFactory::requestId(identifier); 410 String requestId = IdentifiersFactory::requestId(identifier);
404 bool canceled = error.isCancellation(); 411 bool canceled = error.isCancellation();
405 m_frontend->loadingFailed(requestId, currentTime(), error.localizedDescripti on(), canceled ? &canceled : 0); 412 m_frontend->loadingFailed(requestId, currentTime(), error.localizedDescripti on(), canceled ? &canceled : 0);
406 } 413 }
407 414
408 void InspectorResourceAgent::scriptImported(unsigned long identifier, const Stri ng& sourceString) 415 void InspectorResourceAgent::scriptImported(unsigned long identifier, const Stri ng& sourceString)
409 { 416 {
410 m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identifier ), sourceString); 417 m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identifier ), sourceString);
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 , m_overlay(overlay) 783 , m_overlay(overlay)
777 , m_frontend(0) 784 , m_frontend(0)
778 , m_resourcesData(adoptPtr(new NetworkResourcesData())) 785 , m_resourcesData(adoptPtr(new NetworkResourcesData()))
779 , m_loadingXHRSynchronously(false) 786 , m_loadingXHRSynchronously(false)
780 , m_isRecalculatingStyle(false) 787 , m_isRecalculatingStyle(false)
781 { 788 {
782 } 789 }
783 790
784 } // namespace WebCore 791 } // namespace WebCore
785 792
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698