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

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

Issue 1632523002: `<link rel=preload>` with no `as` should be subject to connect-src (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 4 years, 10 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 break; 180 break;
181 case Resource::Media: 181 case Resource::Media:
182 resource = RawResource::fetchMedia(request, fetcher()); 182 resource = RawResource::fetchMedia(request, fetcher());
183 break; 183 break;
184 case Resource::TextTrack: 184 case Resource::TextTrack:
185 resource = RawResource::fetchTextTrack(request, fetcher()); 185 resource = RawResource::fetchTextTrack(request, fetcher());
186 break; 186 break;
187 case Resource::ImportResource: 187 case Resource::ImportResource:
188 resource = RawResource::fetchImport(request, fetcher()); 188 resource = RawResource::fetchImport(request, fetcher());
189 break; 189 break;
190 case Resource::LinkSubresource: 190 case Resource::LinkPreload:
191 resource = RawResource::fetch(request, fetcher()); 191 resource = RawResource::fetch(request, fetcher());
192 break; 192 break;
193 default: 193 default:
194 ASSERT_NOT_REACHED(); 194 ASSERT_NOT_REACHED();
195 } 195 }
196 196
197 if (resource) 197 if (resource)
198 fetcher()->preloadStarted(resource.get()); 198 fetcher()->preloadStarted(resource.get());
199 return resource; 199 return resource;
200 } 200 }
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 { 846 {
847 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing); 847 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true, ForceSynchronousParsing);
848 if (!source.isNull()) 848 if (!source.isNull())
849 m_writer->appendReplacingData(source); 849 m_writer->appendReplacingData(source);
850 endWriting(m_writer.get()); 850 endWriting(m_writer.get());
851 } 851 }
852 852
853 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); 853 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader);
854 854
855 } // namespace blink 855 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698