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

Side by Side Diff: Source/core/html/HTMLImportChild.cpp

Issue 137983010: (Re)organize handling of CORS access control during resource loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: HTMLImportLoader no longer needs a ResourceFetcher Created 6 years, 11 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
« no previous file with comments | « Source/core/fetch/ResourceLoaderOptions.h ('k') | Source/core/html/HTMLImportLoader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (HTMLImportChild* found = root()->findLinkFor(m_url, this)) 170 if (HTMLImportChild* found = root()->findLinkFor(m_url, this))
171 shareLoader(found); 171 shareLoader(found);
172 else 172 else
173 createLoader(); 173 createLoader();
174 } 174 }
175 175
176 void HTMLImportChild::createLoader() 176 void HTMLImportChild::createLoader()
177 { 177 {
178 ASSERT(!isStateBlockedFromCreatingDocument()); 178 ASSERT(!isStateBlockedFromCreatingDocument());
179 ASSERT(!m_loader); 179 ASSERT(!m_loader);
180 m_loader = HTMLImportLoader::create(this, parent()->document()->fetcher()); 180 m_loader = HTMLImportLoader::create(this);
181 m_loader->addClient(this); 181 m_loader->addClient(this);
182 m_loader->startLoading(resource()); 182 m_loader->startLoading(resource());
183 } 183 }
184 184
185 void HTMLImportChild::shareLoader(HTMLImportChild* loader) 185 void HTMLImportChild::shareLoader(HTMLImportChild* loader)
186 { 186 {
187 ASSERT(!m_loader); 187 ASSERT(!m_loader);
188 m_loader = loader->m_loader; 188 m_loader = loader->m_loader;
189 m_loader->addClient(this); 189 m_loader->addClient(this);
190 stateWillChange(); 190 stateWillChange();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 HTMLImport::showThis(); 232 HTMLImport::showThis();
233 fprintf(stderr, " loader=%p own=%s async=%s url=%s", 233 fprintf(stderr, " loader=%p own=%s async=%s url=%s",
234 m_loader.get(), 234 m_loader.get(),
235 hasLoader() && ownsLoader() ? "Y" : "N", 235 hasLoader() && ownsLoader() ? "Y" : "N",
236 isCreatedByParser() ? "Y" : "N", 236 isCreatedByParser() ? "Y" : "N",
237 url().string().utf8().data()); 237 url().string().utf8().data());
238 } 238 }
239 #endif 239 #endif
240 240
241 } // namespace WebCore 241 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceLoaderOptions.h ('k') | Source/core/html/HTMLImportLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698