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 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 initiatorObject = it->value->clone(); | 630 initiatorObject = it->value->clone(); |
631 } | 631 } |
632 | 632 |
633 std::unique_ptr<protocol::Network::Request> requestInfo( | 633 std::unique_ptr<protocol::Network::Request> requestInfo( |
634 buildObjectForResourceRequest(request)); | 634 buildObjectForResourceRequest(request)); |
635 | 635 |
636 requestInfo->setMixedContentType(mixedContentTypeForContextType( | 636 requestInfo->setMixedContentType(mixedContentTypeForContextType( |
637 MixedContentChecker::contextTypeForInspector(frame, request))); | 637 MixedContentChecker::contextTypeForInspector(frame, request))); |
638 | 638 |
639 requestInfo->setReferrerPolicy(referrerPolicy(request.getReferrerPolicy())); | 639 requestInfo->setReferrerPolicy(referrerPolicy(request.getReferrerPolicy())); |
| 640 if (initiatorInfo.isLinkPreload) |
| 641 requestInfo->setIsLinkPreload(true); |
640 | 642 |
641 String resourceType = InspectorPageAgent::resourceTypeJson(type); | 643 String resourceType = InspectorPageAgent::resourceTypeJson(type); |
642 frontend()->requestWillBeSent( | 644 frontend()->requestWillBeSent( |
643 requestId, frameId, loaderId, | 645 requestId, frameId, loaderId, |
644 urlWithoutFragment(loader->url()).getString(), std::move(requestInfo), | 646 urlWithoutFragment(loader->url()).getString(), std::move(requestInfo), |
645 monotonicallyIncreasingTime(), currentTime(), std::move(initiatorObject), | 647 monotonicallyIncreasingTime(), currentTime(), std::move(initiatorObject), |
646 buildObjectForResourceResponse(redirectResponse), resourceType); | 648 buildObjectForResourceResponse(redirectResponse), resourceType); |
647 if (m_pendingXHRReplayData && !m_pendingXHRReplayData->async()) | 649 if (m_pendingXHRReplayData && !m_pendingXHRReplayData->async()) |
648 frontend()->flush(); | 650 frontend()->flush(); |
649 } | 651 } |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 TaskRunnerHelper::get(TaskType::UnspecedLoading, | 1548 TaskRunnerHelper::get(TaskType::UnspecedLoading, |
1547 inspectedFrames->root()), | 1549 inspectedFrames->root()), |
1548 this, | 1550 this, |
1549 &InspectorNetworkAgent::removeFinishedReplayXHRFired) {} | 1551 &InspectorNetworkAgent::removeFinishedReplayXHRFired) {} |
1550 | 1552 |
1551 bool InspectorNetworkAgent::shouldForceCORSPreflight() { | 1553 bool InspectorNetworkAgent::shouldForceCORSPreflight() { |
1552 return m_state->booleanProperty(NetworkAgentState::cacheDisabled, false); | 1554 return m_state->booleanProperty(NetworkAgentState::cacheDisabled, false); |
1553 } | 1555 } |
1554 | 1556 |
1555 } // namespace blink | 1557 } // namespace blink |
OLD | NEW |