| 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 InspectorBaseAgent::trace(visitor); |
| 296 } | 304 } |
| 297 | 305 |
| 298 void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentL
oader* loader, ResourceRequest& request, const ResourceResponse& redirectRespons
e, const FetchInitiatorInfo& initiatorInfo) | 306 void InspectorResourceAgent::willSendRequest(unsigned long identifier, DocumentL
oader* loader, ResourceRequest& request, const ResourceResponse& redirectRespons
e, const FetchInitiatorInfo& initiatorInfo) |
| 299 { | 307 { |
| 300 // Ignore the request initiated internally. | 308 // Ignore the request initiated internally. |
| 301 if (initiatorInfo.name == FetchInitiatorTypeNames::internal) | 309 if (initiatorInfo.name == FetchInitiatorTypeNames::internal) |
| 302 return; | 310 return; |
| 303 | 311 |
| 304 if (!m_hostId.isEmpty()) | 312 if (!m_hostId.isEmpty()) |
| 305 request.addHTTPHeaderField(kDevToolsEmulateNetworkConditionsClientId, At
omicString(m_hostId)); | 313 request.addHTTPHeaderField(kDevToolsEmulateNetworkConditionsClientId, At
omicString(m_hostId)); |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 InspectorResourceAgent::InspectorResourceAgent(InspectorPageAgent* pageAgent) | 846 InspectorResourceAgent::InspectorResourceAgent(InspectorPageAgent* pageAgent) |
| 839 : InspectorBaseAgent<InspectorResourceAgent>("Network") | 847 : InspectorBaseAgent<InspectorResourceAgent>("Network") |
| 840 , m_pageAgent(pageAgent) | 848 , m_pageAgent(pageAgent) |
| 841 , m_frontend(0) | 849 , m_frontend(0) |
| 842 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 850 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
| 843 , m_isRecalculatingStyle(false) | 851 , m_isRecalculatingStyle(false) |
| 844 { | 852 { |
| 845 } | 853 } |
| 846 | 854 |
| 847 } // namespace WebCore | 855 } // namespace WebCore |
| OLD | NEW |