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

Side by Side Diff: Source/core/loader/FrameFetchContext.cpp

Issue 1245223008: Add unit and layout test to <link rel=preconnect> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 4 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 | « Source/core/html/HTMLLinkElement.cpp ('k') | Source/core/loader/LinkLoader.h » ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "core/html/HTMLFrameOwnerElement.h" 42 #include "core/html/HTMLFrameOwnerElement.h"
43 #include "core/html/imports/HTMLImportsController.h" 43 #include "core/html/imports/HTMLImportsController.h"
44 #include "core/inspector/ConsoleMessage.h" 44 #include "core/inspector/ConsoleMessage.h"
45 #include "core/inspector/InspectorInstrumentation.h" 45 #include "core/inspector/InspectorInstrumentation.h"
46 #include "core/inspector/InspectorTraceEvents.h" 46 #include "core/inspector/InspectorTraceEvents.h"
47 #include "core/loader/DocumentLoader.h" 47 #include "core/loader/DocumentLoader.h"
48 #include "core/loader/FrameLoader.h" 48 #include "core/loader/FrameLoader.h"
49 #include "core/loader/FrameLoaderClient.h" 49 #include "core/loader/FrameLoaderClient.h"
50 #include "core/loader/LinkLoader.h" 50 #include "core/loader/LinkLoader.h"
51 #include "core/loader/MixedContentChecker.h" 51 #include "core/loader/MixedContentChecker.h"
52 #include "core/loader/NetworkHintsInterface.h"
52 #include "core/loader/PingLoader.h" 53 #include "core/loader/PingLoader.h"
53 #include "core/loader/ProgressTracker.h" 54 #include "core/loader/ProgressTracker.h"
54 #include "core/loader/appcache/ApplicationCacheHost.h" 55 #include "core/loader/appcache/ApplicationCacheHost.h"
55 #include "core/page/Page.h" 56 #include "core/page/Page.h"
56 #include "core/svg/graphics/SVGImageChromeClient.h" 57 #include "core/svg/graphics/SVGImageChromeClient.h"
57 #include "core/timing/DOMWindowPerformance.h" 58 #include "core/timing/DOMWindowPerformance.h"
58 #include "core/timing/Performance.h" 59 #include "core/timing/Performance.h"
59 #include "platform/Logging.h" 60 #include "platform/Logging.h"
60 #include "platform/network/ResourceTimingInfo.h" 61 #include "platform/network/ResourceTimingInfo.h"
61 #include "platform/weborigin/SchemeRegistry.h" 62 #include "platform/weborigin/SchemeRegistry.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 } 222 }
222 223
223 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const ResourceReq uest& request, const ResourceResponse& response) 224 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const ResourceReq uest& request, const ResourceResponse& response)
224 { 225 {
225 frame()->loader().client()->dispatchDidLoadResourceFromMemoryCache(request, response); 226 frame()->loader().client()->dispatchDidLoadResourceFromMemoryCache(request, response);
226 } 227 }
227 228
228 void FrameFetchContext::dispatchDidReceiveResponse(unsigned long identifier, con st ResourceResponse& response, ResourceLoader* resourceLoader) 229 void FrameFetchContext::dispatchDidReceiveResponse(unsigned long identifier, con st ResourceResponse& response, ResourceLoader* resourceLoader)
229 { 230 {
230 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss()); 231 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss());
231 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do cument()); 232 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do cument(), NetworkHintsInterfaceImpl());
232 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { 233 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) {
233 ResourceFetcher* fetcher = nullptr; 234 ResourceFetcher* fetcher = nullptr;
234 if (frame()->document()) 235 if (frame()->document())
235 fetcher = frame()->document()->fetcher(); 236 fetcher = frame()->document()->fetcher();
236 handleAcceptClientHintsHeader(response.httpHeaderField("accept-ch"), m_d ocumentLoader->clientHintsPreferences(), fetcher); 237 handleAcceptClientHintsHeader(response.httpHeaderField("accept-ch"), m_d ocumentLoader->clientHintsPreferences(), fetcher);
237 } 238 }
238 239
239 frame()->loader().progress().incrementProgress(identifier, response); 240 frame()->loader().progress().incrementProgress(identifier, response);
240 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide ntifier, response); 241 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide ntifier, response);
241 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_E VENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame (), response)); 242 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_E VENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame (), response));
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 } 670 }
670 671
671 DEFINE_TRACE(FrameFetchContext) 672 DEFINE_TRACE(FrameFetchContext)
672 { 673 {
673 visitor->trace(m_document); 674 visitor->trace(m_document);
674 visitor->trace(m_documentLoader); 675 visitor->trace(m_documentLoader);
675 FetchContext::trace(visitor); 676 FetchContext::trace(visitor);
676 } 677 }
677 678
678 } // namespace blink 679 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLLinkElement.cpp ('k') | Source/core/loader/LinkLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698