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

Side by Side Diff: Source/core/html/imports/HTMLImportLoader.cpp

Issue 183883004: Let ContentSecurityPolicy shared between imports and the master. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Adding guardRef()/guardDeref() Created 6 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 | Annotate | Revision Log
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 87
88 setState(finishWriting()); 88 setState(finishWriting());
89 } 89 }
90 90
91 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR esponse& response) 91 HTMLImportLoader::State HTMLImportLoader::startWritingAndParsing(const ResourceR esponse& response)
92 { 92 {
93 DocumentInit init = DocumentInit(response.url(), 0, m_import->master()->cont extDocument(), m_import) 93 DocumentInit init = DocumentInit(response.url(), 0, m_import->master()->cont extDocument(), m_import)
94 .withRegistrationContext(m_import->master()->registrationContext()); 94 .withRegistrationContext(m_import->master()->registrationContext());
95 m_importedDocument = HTMLDocument::create(init); 95 m_importedDocument = HTMLDocument::create(init);
96 m_importedDocument->initContentSecurityPolicy(ContentSecurityPolicyResponseH eaders(response));
97 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp e(), response.textEncodingName()); 96 m_writer = DocumentWriter::create(m_importedDocument.get(), response.mimeTyp e(), response.textEncodingName());
98 97
99 return StateLoading; 98 return StateLoading;
100 } 99 }
101 100
102 HTMLImportLoader::State HTMLImportLoader::finishWriting() 101 HTMLImportLoader::State HTMLImportLoader::finishWriting()
103 { 102 {
104 return StateWritten; 103 return StateWritten;
105 } 104 }
106 105
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 client->didFinishLoading(); 155 client->didFinishLoading();
157 } 156 }
158 157
159 void HTMLImportLoader::removeClient(HTMLImportLoaderClient* client) 158 void HTMLImportLoader::removeClient(HTMLImportLoaderClient* client)
160 { 159 {
161 ASSERT(kNotFound != m_clients.find(client)); 160 ASSERT(kNotFound != m_clients.find(client));
162 m_clients.remove(m_clients.find(client)); 161 m_clients.remove(m_clients.find(client));
163 } 162 }
164 163
165 } // namespace WebCore 164 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportChild.cpp ('k') | Source/core/html/imports/HTMLImportsController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698