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

Side by Side Diff: Source/core/xml/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: rebase 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 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 if (m_uploadEventsAllowed) 1447 if (m_uploadEventsAllowed)
1448 m_upload->dispatchProgressEvent(bytesSent, totalBytesToBeSent); 1448 m_upload->dispatchProgressEvent(bytesSent, totalBytesToBeSent);
1449 1449
1450 if (bytesSent == totalBytesToBeSent && !m_uploadComplete) { 1450 if (bytesSent == totalBytesToBeSent && !m_uploadComplete) {
1451 m_uploadComplete = true; 1451 m_uploadComplete = true;
1452 if (m_uploadEventsAllowed) 1452 if (m_uploadEventsAllowed)
1453 m_upload->dispatchEventAndLoadEnd(EventTypeNames::load, true, bytesS ent, totalBytesToBeSent); 1453 m_upload->dispatchEventAndLoadEnd(EventTypeNames::load, true, bytesS ent, totalBytesToBeSent);
1454 } 1454 }
1455 } 1455 }
1456 1456
1457 void XMLHttpRequest::didReceiveResponse(unsigned long identifier, const Resource Response& response) 1457 void XMLHttpRequest::didReceiveResponse(unsigned long identifier, const Resource Response& response, PassOwnPtr<WebDataConsumerHandle>)
1458 { 1458 {
1459 WTF_LOG(Network, "XMLHttpRequest %p didReceiveResponse(%lu)", this, identifi er); 1459 WTF_LOG(Network, "XMLHttpRequest %p didReceiveResponse(%lu)", this, identifi er);
1460 1460
1461 m_response = response; 1461 m_response = response;
1462 if (!m_mimeTypeOverride.isEmpty()) { 1462 if (!m_mimeTypeOverride.isEmpty()) {
1463 m_response.setHTTPHeaderField("Content-Type", m_mimeTypeOverride); 1463 m_response.setHTTPHeaderField("Content-Type", m_mimeTypeOverride);
1464 m_finalResponseCharset = extractCharsetFromMediaType(m_mimeTypeOverride) ; 1464 m_finalResponseCharset = extractCharsetFromMediaType(m_mimeTypeOverride) ;
1465 } 1465 }
1466 1466
1467 if (m_finalResponseCharset.isEmpty()) 1467 if (m_finalResponseCharset.isEmpty())
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 visitor->trace(m_responseDocument); 1652 visitor->trace(m_responseDocument);
1653 visitor->trace(m_responseDocumentParser); 1653 visitor->trace(m_responseDocumentParser);
1654 visitor->trace(m_progressEventThrottle); 1654 visitor->trace(m_progressEventThrottle);
1655 visitor->trace(m_upload); 1655 visitor->trace(m_upload);
1656 visitor->trace(m_blobLoader); 1656 visitor->trace(m_blobLoader);
1657 XMLHttpRequestEventTarget::trace(visitor); 1657 XMLHttpRequestEventTarget::trace(visitor);
1658 DocumentParserClient::trace(visitor); 1658 DocumentParserClient::trace(visitor);
1659 } 1659 }
1660 1660
1661 } // namespace blink 1661 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698