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

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

Issue 603903003: [Streams] Pass WebDataConsumerHandle when the response arrives. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@web-data-pipe
Patch Set: Created 6 years, 1 month 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) 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 m_document.clear(); 73 m_document.clear();
74 } 74 }
75 } 75 }
76 #endif 76 #endif
77 77
78 void HTMLImportLoader::startLoading(const ResourcePtr<RawResource>& resource) 78 void HTMLImportLoader::startLoading(const ResourcePtr<RawResource>& resource)
79 { 79 {
80 setResource(resource); 80 setResource(resource);
81 } 81 }
82 82
83 void HTMLImportLoader::responseReceived(Resource* resource, const ResourceRespon se& response) 83 void HTMLImportLoader::responseReceived(Resource* resource, const ResourceRespon se& response, PassOwnPtr<WebDataConsumerHandle> handle)
84 { 84 {
85 ASSERT_UNUSED(handle, !handle);
85 // Resource may already have been loaded with the import loader 86 // Resource may already have been loaded with the import loader
86 // being added as a client later & now being notified. Fail early. 87 // being added as a client later & now being notified. Fail early.
87 if (resource->loadFailedOrCanceled() || response.httpStatusCode() >= 400) { 88 if (resource->loadFailedOrCanceled() || response.httpStatusCode() >= 400) {
88 setState(StateError); 89 setState(StateError);
89 return; 90 return;
90 } 91 }
91 setState(startWritingAndParsing(response)); 92 setState(startWritingAndParsing(response));
92 } 93 }
93 94
94 void HTMLImportLoader::dataReceived(Resource*, const char* data, unsigned length ) 95 void HTMLImportLoader::dataReceived(Resource*, const char* data, unsigned length )
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 #if ENABLE(OILPAN) 231 #if ENABLE(OILPAN)
231 visitor->trace(m_imports); 232 visitor->trace(m_imports);
232 #endif 233 #endif
233 visitor->trace(m_document); 234 visitor->trace(m_document);
234 visitor->trace(m_writer); 235 visitor->trace(m_writer);
235 visitor->trace(m_microtaskQueue); 236 visitor->trace(m_microtaskQueue);
236 DocumentParserClient::trace(visitor); 237 DocumentParserClient::trace(visitor);
237 } 238 }
238 239
239 } // namespace blink 240 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportLoader.h ('k') | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698