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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 IdentifiersFactory::requestId(it->value), monotonicallyIncreasingTime(), | 1018 IdentifiersFactory::requestId(it->value), monotonicallyIncreasingTime(), |
1019 eventName.getString(), eventId.getString(), data); | 1019 eventName.getString(), eventId.getString(), data); |
1020 } | 1020 } |
1021 | 1021 |
1022 void InspectorNetworkAgent::didFinishEventSourceRequest( | 1022 void InspectorNetworkAgent::didFinishEventSourceRequest( |
1023 ThreadableLoaderClient* eventSource) { | 1023 ThreadableLoaderClient* eventSource) { |
1024 m_knownRequestIdMap.remove(eventSource); | 1024 m_knownRequestIdMap.remove(eventSource); |
1025 clearPendingRequestData(); | 1025 clearPendingRequestData(); |
1026 } | 1026 } |
1027 | 1027 |
| 1028 void InspectorNetworkAgent::detachClientRequest( |
| 1029 ThreadableLoaderClient* client) { |
| 1030 // This method is called by loader clients when finalizing |
| 1031 // (i.e., from their "prefinalizers".) The client reference must |
| 1032 // no longer be held onto upon completion. |
| 1033 if (m_pendingRequest == client) { |
| 1034 m_pendingRequest = nullptr; |
| 1035 if (m_pendingRequestType == InspectorPageAgent::XHRResource) { |
| 1036 m_pendingXHRReplayData.clear(); |
| 1037 } |
| 1038 } |
| 1039 m_knownRequestIdMap.remove(client); |
| 1040 } |
| 1041 |
1028 void InspectorNetworkAgent::applyUserAgentOverride(String* userAgent) { | 1042 void InspectorNetworkAgent::applyUserAgentOverride(String* userAgent) { |
1029 String userAgentOverride; | 1043 String userAgentOverride; |
1030 m_state->getString(NetworkAgentState::userAgentOverride, &userAgentOverride); | 1044 m_state->getString(NetworkAgentState::userAgentOverride, &userAgentOverride); |
1031 if (!userAgentOverride.isEmpty()) | 1045 if (!userAgentOverride.isEmpty()) |
1032 *userAgent = userAgentOverride; | 1046 *userAgent = userAgentOverride; |
1033 } | 1047 } |
1034 | 1048 |
1035 void InspectorNetworkAgent::willRecalculateStyle(Document*) { | 1049 void InspectorNetworkAgent::willRecalculateStyle(Document*) { |
1036 DCHECK(!m_isRecalculatingStyle); | 1050 DCHECK(!m_isRecalculatingStyle); |
1037 m_isRecalculatingStyle = true; | 1051 m_isRecalculatingStyle = true; |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1534 TaskRunnerHelper::get(TaskType::UnspecedLoading, | 1548 TaskRunnerHelper::get(TaskType::UnspecedLoading, |
1535 inspectedFrames->root()), | 1549 inspectedFrames->root()), |
1536 this, | 1550 this, |
1537 &InspectorNetworkAgent::removeFinishedReplayXHRFired) {} | 1551 &InspectorNetworkAgent::removeFinishedReplayXHRFired) {} |
1538 | 1552 |
1539 bool InspectorNetworkAgent::shouldForceCORSPreflight() { | 1553 bool InspectorNetworkAgent::shouldForceCORSPreflight() { |
1540 return m_state->booleanProperty(NetworkAgentState::cacheDisabled, false); | 1554 return m_state->booleanProperty(NetworkAgentState::cacheDisabled, false); |
1541 } | 1555 } |
1542 | 1556 |
1543 } // namespace blink | 1557 } // namespace blink |
OLD | NEW |