| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 if (m_state->getBoolean(ResourceAgentState::resourceAgentEnabled)) { | 404 if (m_state->getBoolean(ResourceAgentState::resourceAgentEnabled)) { |
| 405 ErrorString error; | 405 ErrorString error; |
| 406 disable(&error); | 406 disable(&error); |
| 407 } | 407 } |
| 408 ASSERT(!m_instrumentingAgents->inspectorResourceAgent()); | 408 ASSERT(!m_instrumentingAgents->inspectorResourceAgent()); |
| 409 #endif | 409 #endif |
| 410 } | 410 } |
| 411 | 411 |
| 412 DEFINE_TRACE(InspectorResourceAgent) | 412 DEFINE_TRACE(InspectorResourceAgent) |
| 413 { | 413 { |
| 414 visitor->trace(m_resourcesData); |
| 414 visitor->trace(m_replayXHRs); | 415 visitor->trace(m_replayXHRs); |
| 415 visitor->trace(m_replayXHRsToBeDeleted); | 416 visitor->trace(m_replayXHRsToBeDeleted); |
| 416 visitor->trace(m_pendingXHRReplayData); | 417 visitor->trace(m_pendingXHRReplayData); |
| 417 InspectorBaseAgent::trace(visitor); | 418 InspectorBaseAgent::trace(visitor); |
| 418 } | 419 } |
| 419 | 420 |
| 420 bool InspectorResourceAgent::shouldBlockRequest(const ResourceRequest& request) | 421 bool InspectorResourceAgent::shouldBlockRequest(const ResourceRequest& request) |
| 421 { | 422 { |
| 422 String url = request.url().string(); | 423 String url = request.url().string(); |
| 423 RefPtr<JSONObject> blockedURLs = m_state->getObject(ResourceAgentState::bloc
kedURLs); | 424 RefPtr<JSONObject> blockedURLs = m_state->getObject(ResourceAgentState::bloc
kedURLs); |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1084 } | 1085 } |
| 1085 | 1086 |
| 1086 void InspectorResourceAgent::removeFinishedReplayXHRFired(Timer<InspectorResourc
eAgent>*) | 1087 void InspectorResourceAgent::removeFinishedReplayXHRFired(Timer<InspectorResourc
eAgent>*) |
| 1087 { | 1088 { |
| 1088 m_replayXHRsToBeDeleted.clear(); | 1089 m_replayXHRsToBeDeleted.clear(); |
| 1089 } | 1090 } |
| 1090 | 1091 |
| 1091 InspectorResourceAgent::InspectorResourceAgent(InspectedFrames* inspectedFrames) | 1092 InspectorResourceAgent::InspectorResourceAgent(InspectedFrames* inspectedFrames) |
| 1092 : InspectorBaseAgent<InspectorResourceAgent, InspectorFrontend::Network>("Ne
twork") | 1093 : InspectorBaseAgent<InspectorResourceAgent, InspectorFrontend::Network>("Ne
twork") |
| 1093 , m_inspectedFrames(inspectedFrames) | 1094 , m_inspectedFrames(inspectedFrames) |
| 1094 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 1095 , m_resourcesData(NetworkResourcesData::create()) |
| 1095 , m_pendingRequest(nullptr) | 1096 , m_pendingRequest(nullptr) |
| 1096 , m_isRecalculatingStyle(false) | 1097 , m_isRecalculatingStyle(false) |
| 1097 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish
edReplayXHRFired) | 1098 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish
edReplayXHRFired) |
| 1098 { | 1099 { |
| 1099 } | 1100 } |
| 1100 | 1101 |
| 1101 bool InspectorResourceAgent::shouldForceCORSPreflight() | 1102 bool InspectorResourceAgent::shouldForceCORSPreflight() |
| 1102 { | 1103 { |
| 1103 return m_state->getBoolean(ResourceAgentState::cacheDisabled); | 1104 return m_state->getBoolean(ResourceAgentState::cacheDisabled); |
| 1104 } | 1105 } |
| 1105 | 1106 |
| 1106 } // namespace blink | 1107 } // namespace blink |
| OLD | NEW |