| OLD | NEW |
| 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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 XHRReplayData* xhrReplayData = m_resourcesData->xhrReplayData(requestId); | 661 XHRReplayData* xhrReplayData = m_resourcesData->xhrReplayData(requestId); |
| 662 if (!xhrReplayData) | 662 if (!xhrReplayData) |
| 663 return; | 663 return; |
| 664 | 664 |
| 665 ExecutionContext* executionContext = xhrReplayData->executionContext(); | 665 ExecutionContext* executionContext = xhrReplayData->executionContext(); |
| 666 if (!executionContext) { | 666 if (!executionContext) { |
| 667 m_resourcesData->setXHRReplayData(requestId, 0); | 667 m_resourcesData->setXHRReplayData(requestId, 0); |
| 668 return; | 668 return; |
| 669 } | 669 } |
| 670 | 670 |
| 671 RefPtr<XMLHttpRequest> xhr = XMLHttpRequest::create(executionContext); | 671 RefPtrWillBeRawPtr<XMLHttpRequest> xhr = XMLHttpRequest::create(executionCon
text); |
| 672 | 672 |
| 673 Resource* cachedResource = memoryCache()->resourceForURL(xhrReplayData->url(
)); | 673 Resource* cachedResource = memoryCache()->resourceForURL(xhrReplayData->url(
)); |
| 674 if (cachedResource) | 674 if (cachedResource) |
| 675 memoryCache()->remove(cachedResource); | 675 memoryCache()->remove(cachedResource); |
| 676 | 676 |
| 677 xhr->open(xhrReplayData->method(), xhrReplayData->url(), xhrReplayData->asyn
c(), IGNORE_EXCEPTION); | 677 xhr->open(xhrReplayData->method(), xhrReplayData->url(), xhrReplayData->asyn
c(), IGNORE_EXCEPTION); |
| 678 HTTPHeaderMap::const_iterator end = xhrReplayData->headers().end(); | 678 HTTPHeaderMap::const_iterator end = xhrReplayData->headers().end(); |
| 679 for (HTTPHeaderMap::const_iterator it = xhrReplayData->headers().begin(); it
!= end; ++it) | 679 for (HTTPHeaderMap::const_iterator it = xhrReplayData->headers().begin(); it
!= end; ++it) |
| 680 xhr->setRequestHeader(it->key, it->value, IGNORE_EXCEPTION); | 680 xhr->setRequestHeader(it->key, it->value, IGNORE_EXCEPTION); |
| 681 xhr->sendForInspectorXHRReplay(xhrReplayData->formData(), IGNORE_EXCEPTION); | 681 xhr->sendForInspectorXHRReplay(xhrReplayData->formData(), IGNORE_EXCEPTION); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 : InspectorBaseAgent<InspectorResourceAgent>("Network") | 801 : InspectorBaseAgent<InspectorResourceAgent>("Network") |
| 802 , m_pageAgent(pageAgent) | 802 , m_pageAgent(pageAgent) |
| 803 , m_client(client) | 803 , m_client(client) |
| 804 , m_frontend(0) | 804 , m_frontend(0) |
| 805 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 805 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
| 806 , m_isRecalculatingStyle(false) | 806 , m_isRecalculatingStyle(false) |
| 807 { | 807 { |
| 808 } | 808 } |
| 809 | 809 |
| 810 } // namespace WebCore | 810 } // namespace WebCore |
| OLD | NEW |