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

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

Issue 2043753002: Declarative resource hints go through mojo IPC to //content Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use unique_ptr to avoid memory leaks in unit tests Created 4 years, 6 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "core/inspector/ConsoleMessage.h" 46 #include "core/inspector/ConsoleMessage.h"
47 #include "core/inspector/IdentifiersFactory.h" 47 #include "core/inspector/IdentifiersFactory.h"
48 #include "core/inspector/InspectorInstrumentation.h" 48 #include "core/inspector/InspectorInstrumentation.h"
49 #include "core/inspector/InspectorNetworkAgent.h" 49 #include "core/inspector/InspectorNetworkAgent.h"
50 #include "core/inspector/InspectorTraceEvents.h" 50 #include "core/inspector/InspectorTraceEvents.h"
51 #include "core/loader/DocumentLoader.h" 51 #include "core/loader/DocumentLoader.h"
52 #include "core/loader/FrameLoader.h" 52 #include "core/loader/FrameLoader.h"
53 #include "core/loader/FrameLoaderClient.h" 53 #include "core/loader/FrameLoaderClient.h"
54 #include "core/loader/LinkLoader.h" 54 #include "core/loader/LinkLoader.h"
55 #include "core/loader/MixedContentChecker.h" 55 #include "core/loader/MixedContentChecker.h"
56 #include "core/loader/NetworkHintsInterface.h"
57 #include "core/loader/PingLoader.h" 56 #include "core/loader/PingLoader.h"
58 #include "core/loader/ProgressTracker.h" 57 #include "core/loader/ProgressTracker.h"
59 #include "core/loader/appcache/ApplicationCacheHost.h" 58 #include "core/loader/appcache/ApplicationCacheHost.h"
60 #include "core/page/NetworkStateNotifier.h" 59 #include "core/page/NetworkStateNotifier.h"
61 #include "core/page/Page.h" 60 #include "core/page/Page.h"
62 #include "core/svg/graphics/SVGImageChromeClient.h" 61 #include "core/svg/graphics/SVGImageChromeClient.h"
63 #include "core/timing/DOMWindowPerformance.h" 62 #include "core/timing/DOMWindowPerformance.h"
64 #include "core/timing/Performance.h" 63 #include "core/timing/Performance.h"
65 #include "platform/Logging.h" 64 #include "platform/Logging.h"
66 #include "platform/TracedValue.h" 65 #include "platform/TracedValue.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 LinkLoader::CanLoadResources resourceLoadingPolicy = LinkLoader::LoadResourc esAndPreconnect; 307 LinkLoader::CanLoadResources resourceLoadingPolicy = LinkLoader::LoadResourc esAndPreconnect;
309 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss()); 308 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss());
310 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { 309 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) {
311 ResourceFetcher* fetcher = nullptr; 310 ResourceFetcher* fetcher = nullptr;
312 if (frame()->document()) 311 if (frame()->document())
313 fetcher = frame()->document()->fetcher(); 312 fetcher = frame()->document()->fetcher();
314 m_documentLoader->clientHintsPreferences().updateFromAcceptClientHintsHe ader(response.httpHeaderField(HTTPNames::Accept_CH), fetcher); 313 m_documentLoader->clientHintsPreferences().updateFromAcceptClientHintsHe ader(response.httpHeaderField(HTTPNames::Accept_CH), fetcher);
315 // When response is received with a provisional docloader, the resource haven't committed yet, and we cannot load resources, only preconnect. 314 // When response is received with a provisional docloader, the resource haven't committed yet, and we cannot load resources, only preconnect.
316 resourceLoadingPolicy = LinkLoader::DoNotLoadResources; 315 resourceLoadingPolicy = LinkLoader::DoNotLoadResources;
317 } 316 }
318 LinkLoader::loadLinksFromHeader(response.httpHeaderField(HTTPNames::Link), r esponse.url(), frame()->document(), NetworkHintsInterfaceImpl(), resourceLoading Policy, nullptr); 317 LinkLoader::loadLinksFromHeader(response.httpHeaderField(HTTPNames::Link), r esponse.url(), frame()->document(), resourceLoadingPolicy, nullptr);
319 318
320 if (response.hasMajorCertificateErrors()) 319 if (response.hasMajorCertificateErrors())
321 MixedContentChecker::handleCertificateError(frame(), response, frameType , requestContext); 320 MixedContentChecker::handleCertificateError(frame(), response, frameType , requestContext);
322 321
323 frame()->loader().progress().incrementProgress(identifier, response); 322 frame()->loader().progress().incrementProgress(identifier, response);
324 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide ntifier, response); 323 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide ntifier, response);
325 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_E VENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame (), response)); 324 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_E VENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame (), response));
326 DocumentLoader* documentLoader = masterDocumentLoader(); 325 DocumentLoader* documentLoader = masterDocumentLoader();
327 InspectorInstrumentation::didReceiveResourceResponse(frame(), identifier, do cumentLoader, response, resource); 326 InspectorInstrumentation::didReceiveResourceResponse(frame(), identifier, do cumentLoader, response, resource);
328 // It is essential that inspector gets resource response BEFORE console. 327 // It is essential that inspector gets resource response BEFORE console.
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 } 784 }
786 785
787 DEFINE_TRACE(FrameFetchContext) 786 DEFINE_TRACE(FrameFetchContext)
788 { 787 {
789 visitor->trace(m_document); 788 visitor->trace(m_document);
790 visitor->trace(m_documentLoader); 789 visitor->trace(m_documentLoader);
791 FetchContext::trace(visitor); 790 FetchContext::trace(visitor);
792 } 791 }
793 792
794 } // namespace blink 793 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698