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

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

Issue 2720763002: PlzNavigate: preserve SourceLocation when navigating (Closed)
Patch Set: Addressed nate's comments 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 223
224 // CSP layout tests verify that preloads are subject to access checks by 224 // CSP layout tests verify that preloads are subject to access checks by
225 // seeing if they are in the `preload started` list. Therefore do not add 225 // seeing if they are in the `preload started` list. Therefore do not add
226 // them to the list if the load is immediately denied. 226 // them to the list if the load is immediately denied.
227 if (resource && !resource->resourceError().isAccessCheck()) 227 if (resource && !resource->resourceError().isAccessCheck())
228 fetcher()->preloadStarted(resource); 228 fetcher()->preloadStarted(resource);
229 return resource; 229 return resource;
230 } 230 }
231 231
232 void DocumentLoader::setSourceLocation(
233 std::unique_ptr<SourceLocation> sourceLocation) {
234 m_sourceLocation = std::move(sourceLocation);
235 }
236
237 std::unique_ptr<SourceLocation> DocumentLoader::copySourceLocation() const {
238 return m_sourceLocation ? m_sourceLocation->clone() : nullptr;
239 }
240
232 void DocumentLoader::dispatchLinkHeaderPreloads( 241 void DocumentLoader::dispatchLinkHeaderPreloads(
233 ViewportDescriptionWrapper* viewport, 242 ViewportDescriptionWrapper* viewport,
234 LinkLoader::MediaPreloadPolicy mediaPolicy) { 243 LinkLoader::MediaPreloadPolicy mediaPolicy) {
235 LinkLoader::loadLinksFromHeader( 244 LinkLoader::loadLinksFromHeader(
236 response().httpHeaderField(HTTPNames::Link), response().url(), 245 response().httpHeaderField(HTTPNames::Link), response().url(),
237 m_frame->document(), NetworkHintsInterfaceImpl(), 246 m_frame->document(), NetworkHintsInterfaceImpl(),
238 LinkLoader::OnlyLoadResources, mediaPolicy, viewport); 247 LinkLoader::OnlyLoadResources, mediaPolicy, viewport);
239 } 248 }
240 249
241 void DocumentLoader::didChangePerformanceTiming() { 250 void DocumentLoader::didChangePerformanceTiming() {
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 m_writer ? m_writer->encoding() : emptyAtom, true, 821 m_writer ? m_writer->encoding() : emptyAtom, true,
813 ForceSynchronousParsing); 822 ForceSynchronousParsing);
814 if (!source.isNull()) 823 if (!source.isNull())
815 m_writer->appendReplacingData(source); 824 m_writer->appendReplacingData(source);
816 endWriting(); 825 endWriting();
817 } 826 }
818 827
819 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 828 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
820 829
821 } // namespace blink 830 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698