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

Side by Side Diff: Source/core/xml/XMLHttpRequestUpload.h

Issue 66323004: XHR: compliant event sequencing on request errors and aborts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve test code quality Created 7 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
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/core/xml/XMLHttpRequestUpload.cpp » ('j') | 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void ref() { m_xmlHttpRequest->ref(); } 54 void ref() { m_xmlHttpRequest->ref(); }
55 void deref() { m_xmlHttpRequest->deref(); } 55 void deref() { m_xmlHttpRequest->deref(); }
56 XMLHttpRequest* xmlHttpRequest() const { return m_xmlHttpRequest; } 56 XMLHttpRequest* xmlHttpRequest() const { return m_xmlHttpRequest; }
57 57
58 virtual const AtomicString& interfaceName() const OVERRIDE; 58 virtual const AtomicString& interfaceName() const OVERRIDE;
59 virtual ExecutionContext* executionContext() const OVERRIDE; 59 virtual ExecutionContext* executionContext() const OVERRIDE;
60 60
61 void dispatchEventAndLoadEnd(PassRefPtr<Event>); 61 void dispatchEventAndLoadEnd(PassRefPtr<Event>);
62 void dispatchProgressEvent(unsigned long long bytesSent, unsigned long long totalBytesToBeSent); 62 void dispatchProgressEvent(unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
63 63
64 void handleRequestError(const AtomicString& type);
65
64 private: 66 private:
65 explicit XMLHttpRequestUpload(XMLHttpRequest*); 67 explicit XMLHttpRequestUpload(XMLHttpRequest*);
66 68
67 virtual void refEventTarget() OVERRIDE { ref(); } 69 virtual void refEventTarget() OVERRIDE { ref(); }
68 virtual void derefEventTarget() OVERRIDE { deref(); } 70 virtual void derefEventTarget() OVERRIDE { deref(); }
69 71
70 XMLHttpRequest* m_xmlHttpRequest; 72 XMLHttpRequest* m_xmlHttpRequest;
71 EventTargetData m_eventTargetData; 73 EventTargetData m_eventTargetData;
72 74
73 // Last progress event values; used when issuing the 75 // Last progress event values; used when issuing the
74 // required 'progress' event on a request error or abort. 76 // required 'progress' event on a request error or abort.
75 unsigned long long m_lastBytesSent; 77 unsigned long long m_lastBytesSent;
76 unsigned long long m_lastTotalBytesToBeSent; 78 unsigned long long m_lastTotalBytesToBeSent;
77 }; 79 };
78 80
79 } // namespace WebCore 81 } // namespace WebCore
80 82
81 #endif // XMLHttpRequestUpload_h 83 #endif // XMLHttpRequestUpload_h
OLDNEW
« no previous file with comments | « Source/core/xml/XMLHttpRequest.cpp ('k') | Source/core/xml/XMLHttpRequestUpload.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698