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

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

Issue 2844913002: Drop GetFrame()->GetDocument() usage in FrameFetchContext (Closed)
Patch Set: Add comment in SendMessageToConsoleForPossiblyNullDocument Created 3 years, 7 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 source_location_ = std::move(source_location); 230 source_location_ = std::move(source_location);
231 } 231 }
232 232
233 std::unique_ptr<SourceLocation> DocumentLoader::CopySourceLocation() const { 233 std::unique_ptr<SourceLocation> DocumentLoader::CopySourceLocation() const {
234 return source_location_ ? source_location_->Clone() : nullptr; 234 return source_location_ ? source_location_->Clone() : nullptr;
235 } 235 }
236 236
237 void DocumentLoader::DispatchLinkHeaderPreloads( 237 void DocumentLoader::DispatchLinkHeaderPreloads(
238 ViewportDescriptionWrapper* viewport, 238 ViewportDescriptionWrapper* viewport,
239 LinkLoader::MediaPreloadPolicy media_policy) { 239 LinkLoader::MediaPreloadPolicy media_policy) {
240 DCHECK_GE(state_, kCommitted);
240 LinkLoader::LoadLinksFromHeader( 241 LinkLoader::LoadLinksFromHeader(
241 GetResponse().HttpHeaderField(HTTPNames::Link), GetResponse().Url(), 242 GetResponse().HttpHeaderField(HTTPNames::Link), GetResponse().Url(),
242 frame_->GetDocument(), NetworkHintsInterfaceImpl(), 243 *frame_, frame_->GetDocument(), NetworkHintsInterfaceImpl(),
243 LinkLoader::kOnlyLoadResources, media_policy, viewport); 244 LinkLoader::kOnlyLoadResources, media_policy, viewport);
244 } 245 }
245 246
246 void DocumentLoader::DidChangePerformanceTiming() { 247 void DocumentLoader::DidChangePerformanceTiming() {
247 if (frame_ && state_ >= kCommitted) { 248 if (frame_ && state_ >= kCommitted) {
248 GetLocalFrameClient().DidChangePerformanceTiming(); 249 GetLocalFrameClient().DidChangePerformanceTiming();
249 } 250 }
250 } 251 }
251 252
252 void DocumentLoader::DidObserveLoadingBehavior( 253 void DocumentLoader::DidObserveLoadingBehavior(
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 InstallNewDocumentReason::kJavascriptURL, 1096 InstallNewDocumentReason::kJavascriptURL,
1096 kForceSynchronousParsing, KURL()); 1097 kForceSynchronousParsing, KURL());
1097 if (!source.IsNull()) 1098 if (!source.IsNull())
1098 writer_->AppendReplacingData(source); 1099 writer_->AppendReplacingData(source);
1099 EndWriting(); 1100 EndWriting();
1100 } 1101 }
1101 1102
1102 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 1103 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
1103 1104
1104 } // namespace blink 1105 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698