Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp

Issue 2751023005: DevTools: expose linkPreload bit on the network request (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/browser_protocol.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/browser_protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698