| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 if (!remoteIPAddress.isEmpty()) { | 281 if (!remoteIPAddress.isEmpty()) { |
| 282 responseObject->setRemoteIPAddress(remoteIPAddress); | 282 responseObject->setRemoteIPAddress(remoteIPAddress); |
| 283 responseObject->setRemotePort(response.remotePort()); | 283 responseObject->setRemotePort(response.remotePort()); |
| 284 } | 284 } |
| 285 | 285 |
| 286 return responseObject; | 286 return responseObject; |
| 287 } | 287 } |
| 288 | 288 |
| 289 InspectorResourceAgent::~InspectorResourceAgent() | 289 InspectorResourceAgent::~InspectorResourceAgent() |
| 290 { | 290 { |
| 291 #if !ENABLE(OILPAN) |
| 291 if (m_state->getBoolean(ResourceAgentState::resourceAgentEnabled)) { | 292 if (m_state->getBoolean(ResourceAgentState::resourceAgentEnabled)) { |
| 292 ErrorString error; | 293 ErrorString error; |
| 293 disable(&error); | 294 disable(&error); |
| 294 } | 295 } |
| 295 ASSERT(!m_instrumentingAgents->inspectorResourceAgent()); | 296 ASSERT(!m_instrumentingAgents->inspectorResourceAgent()); |
| 297 #endif |
| 298 } |
| 299 |
| 300 void InspectorResourceAgent::trace(Visitor* visitor) |
| 301 { |
| 302 visitor->trace(m_pageAgent); |
| 303 #if ENABLE(OILPAN) |
| 304 visitor->trace(m_replayXHRs); |
| 305 visitor->trace(m_replayXHRsToBeDeleted); |
| 306 #endif |
| 307 InspectorBaseAgent::trace(visitor); |
| 296 } | 308 } |
| 297 | 309 |
| 298 void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentL
oader* loader, ResourceRequest& request, const ResourceResponse& redirectRespons
e, const FetchInitiatorInfo& initiatorInfo) | 310 void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentL
oader* loader, ResourceRequest& request, const ResourceResponse& redirectRespons
e, const FetchInitiatorInfo& initiatorInfo) |
| 299 { | 311 { |
| 300 // Ignore the request initiated internally. | 312 // Ignore the request initiated internally. |
| 301 if (initiatorInfo.name == FetchInitiatorTypeNames::internal) | 313 if (initiatorInfo.name == FetchInitiatorTypeNames::internal) |
| 302 return; | 314 return; |
| 303 | 315 |
| 304 if (!m_hostId.isEmpty()) | 316 if (!m_hostId.isEmpty()) |
| 305 request.addHTTPHeaderField(kDevToolsEmulateNetworkConditionsClientId, At
omicString(m_hostId)); | 317 request.addHTTPHeaderField(kDevToolsEmulateNetworkConditionsClientId, At
omicString(m_hostId)); |
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 : InspectorBaseAgent<InspectorResourceAgent>("Network") | 875 : InspectorBaseAgent<InspectorResourceAgent>("Network") |
| 864 , m_pageAgent(pageAgent) | 876 , m_pageAgent(pageAgent) |
| 865 , m_frontend(0) | 877 , m_frontend(0) |
| 866 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 878 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
| 867 , m_isRecalculatingStyle(false) | 879 , m_isRecalculatingStyle(false) |
| 868 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish
edReplayXHRFired) | 880 , m_removeFinishedReplayXHRTimer(this, &InspectorResourceAgent::removeFinish
edReplayXHRFired) |
| 869 { | 881 { |
| 870 } | 882 } |
| 871 | 883 |
| 872 } // namespace blink | 884 } // namespace blink |
| OLD | NEW |