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

Side by Side Diff: Source/core/xml/XMLHttpRequest.cpp

Issue 667393002: [XHR] No need to remember line number and URL on send() for inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/xml/XMLHttpRequest.h ('k') | no next file » | 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) 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "platform/network/ParsedContentType.h" 63 #include "platform/network/ParsedContentType.h"
64 #include "platform/network/ResourceError.h" 64 #include "platform/network/ResourceError.h"
65 #include "platform/network/ResourceRequest.h" 65 #include "platform/network/ResourceRequest.h"
66 #include "public/platform/WebURLRequest.h" 66 #include "public/platform/WebURLRequest.h"
67 #include "wtf/ArrayBuffer.h" 67 #include "wtf/ArrayBuffer.h"
68 #include "wtf/ArrayBufferView.h" 68 #include "wtf/ArrayBufferView.h"
69 #include "wtf/Assertions.h" 69 #include "wtf/Assertions.h"
70 #include "wtf/RefCountedLeakCounter.h" 70 #include "wtf/RefCountedLeakCounter.h"
71 #include "wtf/StdLibExtras.h" 71 #include "wtf/StdLibExtras.h"
72 #include "wtf/text/CString.h" 72 #include "wtf/text/CString.h"
73 #include "wtf/text/WTFString.h"
sof 2014/10/22 06:35:41 Accidental addition?
tyoshino (SeeGerritForStatus) 2014/10/22 06:53:57 Removed
73 74
74 namespace blink { 75 namespace blink {
75 76
76 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, xmlHttpRequestCounter, ("XM LHttpRequest")); 77 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, xmlHttpRequestCounter, ("XM LHttpRequest"));
77 78
78 static bool isSetCookieHeader(const AtomicString& name) 79 static bool isSetCookieHeader(const AtomicString& name)
79 { 80 {
80 return equalIgnoringCase(name, "set-cookie") || equalIgnoringCase(name, "set -cookie2"); 81 return equalIgnoringCase(name, "set-cookie") || equalIgnoringCase(name, "set -cookie2");
81 } 82 }
82 83
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 return xmlHttpRequest.release(); 190 return xmlHttpRequest.release();
190 } 191 }
191 192
192 XMLHttpRequest::XMLHttpRequest(ExecutionContext* context, PassRefPtr<SecurityOri gin> securityOrigin) 193 XMLHttpRequest::XMLHttpRequest(ExecutionContext* context, PassRefPtr<SecurityOri gin> securityOrigin)
193 : ActiveDOMObject(context) 194 : ActiveDOMObject(context)
194 , m_timeoutMilliseconds(0) 195 , m_timeoutMilliseconds(0)
195 , m_loaderIdentifier(0) 196 , m_loaderIdentifier(0)
196 , m_state(UNSENT) 197 , m_state(UNSENT)
197 , m_lengthDownloadedToFile(0) 198 , m_lengthDownloadedToFile(0)
198 , m_receivedLength(0) 199 , m_receivedLength(0)
199 , m_lastSendLineNumber(0)
200 , m_exceptionCode(0) 200 , m_exceptionCode(0)
201 , m_progressEventThrottle(this) 201 , m_progressEventThrottle(this)
202 , m_responseTypeCode(ResponseTypeDefault) 202 , m_responseTypeCode(ResponseTypeDefault)
203 , m_securityOrigin(securityOrigin) 203 , m_securityOrigin(securityOrigin)
204 , m_async(true) 204 , m_async(true)
205 , m_includeCredentials(false) 205 , m_includeCredentials(false)
206 , m_parsedResponse(false) 206 , m_parsedResponse(false)
207 , m_error(false) 207 , m_error(false)
208 , m_uploadEventsAllowed(true) 208 , m_uploadEventsAllowed(true)
209 , m_uploadComplete(false) 209 , m_uploadComplete(false)
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 if (!m_responseDocument->wellFormed()) 1444 if (!m_responseDocument->wellFormed())
1445 m_responseDocument = nullptr; 1445 m_responseDocument = nullptr;
1446 1446
1447 m_parsedResponse = true; 1447 m_parsedResponse = true;
1448 1448
1449 endLoading(); 1449 endLoading();
1450 } 1450 }
1451 1451
1452 void XMLHttpRequest::endLoading() 1452 void XMLHttpRequest::endLoading()
1453 { 1453 {
1454 InspectorInstrumentation::didFinishXHRLoading(executionContext(), this, this , m_loaderIdentifier, m_responseText, m_method, m_url, m_lastSendURL, m_lastSend LineNumber); 1454 InspectorInstrumentation::didFinishXHRLoading(executionContext(), this, this , m_loaderIdentifier, m_responseText, m_method, m_url);
1455 1455
1456 if (m_loader) 1456 if (m_loader)
1457 m_loader = nullptr; 1457 m_loader = nullptr;
1458 m_loaderIdentifier = 0; 1458 m_loaderIdentifier = 0;
1459 1459
1460 changeState(DONE); 1460 changeState(DONE);
1461 } 1461 }
1462 1462
1463 void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long lon g totalBytesToBeSent) 1463 void XMLHttpRequest::didSendData(unsigned long long bytesSent, unsigned long lon g totalBytesToBeSent)
1464 { 1464 {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 visitor->trace(m_responseDocument); 1675 visitor->trace(m_responseDocument);
1676 visitor->trace(m_responseDocumentParser); 1676 visitor->trace(m_responseDocumentParser);
1677 visitor->trace(m_progressEventThrottle); 1677 visitor->trace(m_progressEventThrottle);
1678 visitor->trace(m_upload); 1678 visitor->trace(m_upload);
1679 visitor->trace(m_blobLoader); 1679 visitor->trace(m_blobLoader);
1680 XMLHttpRequestEventTarget::trace(visitor); 1680 XMLHttpRequestEventTarget::trace(visitor);
1681 DocumentParserClient::trace(visitor); 1681 DocumentParserClient::trace(visitor);
1682 } 1682 }
1683 1683
1684 } // namespace blink 1684 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/xml/XMLHttpRequest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698