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

Unified Diff: Source/core/platform/network/chromium/SocketStreamError.h

Issue 14071008: WebSocket object should fire error event when WebSocket server can't be connected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Add new layouttests into TestExceptions because it depends on chromium side patch Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/network/chromium/SocketStreamError.h
diff --git a/Source/core/platform/network/chromium/SocketStreamError.h b/Source/core/platform/network/chromium/SocketStreamError.h
index 540496b4eb98b9447638e29b462358b3c9df9759..9a34adcf1da19803328c10d3b80f08712fa1ef9e 100644
--- a/Source/core/platform/network/chromium/SocketStreamError.h
+++ b/Source/core/platform/network/chromium/SocketStreamError.h
@@ -32,14 +32,23 @@
#define SocketStreamError_h
#include "SocketStreamErrorBase.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
namespace WebCore {
-class SocketStreamError : public SocketStreamErrorBase {
+class SocketStreamError : public RefCounted<SocketStreamError>, public SocketStreamErrorBase {
public:
- SocketStreamError() { }
- explicit SocketStreamError(int errorCode)
- : SocketStreamErrorBase(errorCode) { }
+ static PassRefPtr<SocketStreamError> create(int errorCode, const String& errorMessage)
+ {
+ return adoptRef(new SocketStreamError(errorCode, errorMessage));
+ }
+
+private:
+ SocketStreamError(int errorCode, const String& errorMessage)
+ : SocketStreamErrorBase(errorCode, String(), errorMessage)
+ {
+ }
};
} // namespace WebCore
« no previous file with comments | « Source/core/platform/network/SocketStreamErrorBase.cpp ('k') | Source/core/platform/network/chromium/SocketStreamHandle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698