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

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

Issue 1987413002: Add link preload as=document support Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: crash fix Created 4 years, 3 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 break; 194 break;
195 case Resource::TextTrack: 195 case Resource::TextTrack:
196 resource = RawResource::fetchTextTrack(request, fetcher()); 196 resource = RawResource::fetchTextTrack(request, fetcher());
197 break; 197 break;
198 case Resource::ImportResource: 198 case Resource::ImportResource:
199 resource = RawResource::fetchImport(request, fetcher()); 199 resource = RawResource::fetchImport(request, fetcher());
200 break; 200 break;
201 case Resource::Raw: 201 case Resource::Raw:
202 resource = RawResource::fetch(request, fetcher()); 202 resource = RawResource::fetch(request, fetcher());
203 break; 203 break;
204 case Resource::MainResource:
205 resource = RawResource::fetchMainResource(request, fetcher(), m_substitu teData);
206 break;
204 default: 207 default:
205 ASSERT_NOT_REACHED(); 208 ASSERT_NOT_REACHED();
206 } 209 }
207 210
208 if (resource) 211 if (resource)
209 fetcher()->preloadStarted(resource); 212 fetcher()->preloadStarted(resource);
210 return resource; 213 return resource;
211 } 214 }
212 215
213 void DocumentLoader::didRedirect(const KURL& oldURL, const KURL& newURL) 216 void DocumentLoader::didRedirect(const KURL& oldURL, const KURL& newURL)
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 { 734 {
732 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing); 735 m_writer = createWriterFor(init, mimeType(), m_writer ? m_writer->encoding() : emptyAtom, true, ForceSynchronousParsing);
733 if (!source.isNull()) 736 if (!source.isNull())
734 m_writer->appendReplacingData(source); 737 m_writer->appendReplacingData(source);
735 endWriting(m_writer.get()); 738 endWriting(m_writer.get());
736 } 739 }
737 740
738 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 741 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
739 742
740 } // namespace blink 743 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698