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

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

Issue 1287783003: Make ClientHintsPreferences class work like a class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 228
229 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)
230 { 230 {
231 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss()); 231 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre ss());
232 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do cument(), NetworkHintsInterfaceImpl()); 232 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do cument(), NetworkHintsInterfaceImpl());
233 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { 233 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) {
234 ResourceFetcher* fetcher = nullptr; 234 ResourceFetcher* fetcher = nullptr;
235 if (frame()->document()) 235 if (frame()->document())
236 fetcher = frame()->document()->fetcher(); 236 fetcher = frame()->document()->fetcher();
237 handleAcceptClientHintsHeader(response.httpHeaderField("accept-ch"), m_d ocumentLoader->clientHintsPreferences(), fetcher); 237 m_documentLoader->clientHintsPreferences().updateFromAcceptClientHintsHe ader(response.httpHeaderField("accept-ch"), fetcher);
238 } 238 }
239 239
240 frame()->loader().progress().incrementProgress(identifier, response); 240 frame()->loader().progress().incrementProgress(identifier, response);
241 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide ntifier, response); 241 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide ntifier, response);
242 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));
243 DocumentLoader* documentLoader = ensureLoaderForNotifications(); 243 DocumentLoader* documentLoader = ensureLoaderForNotifications();
244 InspectorInstrumentation::didReceiveResourceResponse(frame(), identifier, do cumentLoader, response, resourceLoader); 244 InspectorInstrumentation::didReceiveResourceResponse(frame(), identifier, do cumentLoader, response, resourceLoader);
245 // It is essential that inspector gets resource response BEFORE console. 245 // It is essential that inspector gets resource response BEFORE console.
246 frame()->console().reportResourceResponseReceived(documentLoader, identifier , response); 246 frame()->console().reportResourceResponseReceived(documentLoader, identifier , response);
247 } 247 }
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 697
698 698
699 DEFINE_TRACE(FrameFetchContext) 699 DEFINE_TRACE(FrameFetchContext)
700 { 700 {
701 visitor->trace(m_document); 701 visitor->trace(m_document);
702 visitor->trace(m_documentLoader); 702 visitor->trace(m_documentLoader);
703 FetchContext::trace(visitor); 703 FetchContext::trace(visitor);
704 } 704 }
705 705
706 } // namespace blink 706 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/parser/PreloadRequest.cpp ('k') | Source/core/loader/FrameFetchContextTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698