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

Side by Side Diff: Source/core/xmlhttprequest/XMLHttpRequest.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) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org>
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org>
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved.
6 * Copyright (C) 2012 Intel Corporation 6 * Copyright (C) 2012 Intel Corporation
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 if (m_uploadEventsAllowed) 1457 if (m_uploadEventsAllowed)
1458 m_upload->dispatchProgressEvent(bytesSent, totalBytesToBeSent); 1458 m_upload->dispatchProgressEvent(bytesSent, totalBytesToBeSent);
1459 1459
1460 if (bytesSent == totalBytesToBeSent && !m_uploadComplete) { 1460 if (bytesSent == totalBytesToBeSent && !m_uploadComplete) {
1461 m_uploadComplete = true; 1461 m_uploadComplete = true;
1462 if (m_uploadEventsAllowed) 1462 if (m_uploadEventsAllowed)
1463 m_upload->dispatchEventAndLoadEnd(EventTypeNames::load, true, bytesS ent, totalBytesToBeSent); 1463 m_upload->dispatchEventAndLoadEnd(EventTypeNames::load, true, bytesS ent, totalBytesToBeSent);
1464 } 1464 }
1465 } 1465 }
1466 1466
1467 void XMLHttpRequest::didReceiveResponse(unsigned long identifier, const Resource Response& response) 1467 void XMLHttpRequest::didReceiveResponse(unsigned long identifier, const Resource Response& response, PassOwnPtr<WebDataConsumerHandle>)
1468 { 1468 {
1469 WTF_LOG(Network, "XMLHttpRequest %p didReceiveResponse(%lu)", this, identifi er); 1469 WTF_LOG(Network, "XMLHttpRequest %p didReceiveResponse(%lu)", this, identifi er);
1470 1470
1471 m_response = response; 1471 m_response = response;
1472 if (!m_mimeTypeOverride.isEmpty()) { 1472 if (!m_mimeTypeOverride.isEmpty()) {
1473 m_response.setHTTPHeaderField("Content-Type", m_mimeTypeOverride); 1473 m_response.setHTTPHeaderField("Content-Type", m_mimeTypeOverride);
1474 m_finalResponseCharset = extractCharsetFromMediaType(m_mimeTypeOverride) ; 1474 m_finalResponseCharset = extractCharsetFromMediaType(m_mimeTypeOverride) ;
1475 } 1475 }
1476 1476
1477 if (m_finalResponseCharset.isEmpty()) 1477 if (m_finalResponseCharset.isEmpty())
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1662 visitor->trace(m_responseDocument); 1662 visitor->trace(m_responseDocument);
1663 visitor->trace(m_responseDocumentParser); 1663 visitor->trace(m_responseDocumentParser);
1664 visitor->trace(m_progressEventThrottle); 1664 visitor->trace(m_progressEventThrottle);
1665 visitor->trace(m_upload); 1665 visitor->trace(m_upload);
1666 visitor->trace(m_blobLoader); 1666 visitor->trace(m_blobLoader);
1667 XMLHttpRequestEventTarget::trace(visitor); 1667 XMLHttpRequestEventTarget::trace(visitor);
1668 DocumentParserClient::trace(visitor); 1668 DocumentParserClient::trace(visitor);
1669 } 1669 }
1670 1670
1671 } // namespace blink 1671 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/xmlhttprequest/XMLHttpRequest.h ('k') | Source/modules/serviceworkers/FetchManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698