Commit 6f774e2e authored by tyoshino@chromium.org's avatar tyoshino@chromium.org

Remove fail() method without sourceURL and lineNumber parameter.

We can reduce overloads and also remove using.

BUG=none

Review URL: https://codereview.chromium.org/309533008

git-svn-id: svn://svn.chromium.org/blink/trunk@175271 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 9c591241
...@@ -82,7 +82,6 @@ public: ...@@ -82,7 +82,6 @@ public:
// argument to omit payload. // argument to omit payload.
virtual void close(int code, const String& reason) OVERRIDE; virtual void close(int code, const String& reason) OVERRIDE;
virtual void fail(const String& reason, MessageLevel, const String&, unsigned lineNumber) OVERRIDE; virtual void fail(const String& reason, MessageLevel, const String&, unsigned lineNumber) OVERRIDE;
using WebSocketChannel::fail;
virtual void disconnect() OVERRIDE; virtual void disconnect() OVERRIDE;
virtual void suspend() OVERRIDE; virtual void suspend() OVERRIDE;
......
...@@ -89,7 +89,6 @@ public: ...@@ -89,7 +89,6 @@ public:
// argument to omit payload. // argument to omit payload.
virtual void close(int code, const String& reason) OVERRIDE; virtual void close(int code, const String& reason) OVERRIDE;
virtual void fail(const String& reason, MessageLevel, const String&, unsigned lineNumber) OVERRIDE; virtual void fail(const String& reason, MessageLevel, const String&, unsigned lineNumber) OVERRIDE;
using WebSocketChannel::fail;
virtual void disconnect() OVERRIDE; virtual void disconnect() OVERRIDE;
virtual void suspend() OVERRIDE; virtual void suspend() OVERRIDE;
......
...@@ -480,7 +480,7 @@ void WebSocket::closeInternal(int code, const String& reason, ExceptionState& ex ...@@ -480,7 +480,7 @@ void WebSocket::closeInternal(int code, const String& reason, ExceptionState& ex
return; return;
if (m_state == CONNECTING) { if (m_state == CONNECTING) {
m_state = CLOSING; m_state = CLOSING;
m_channel->fail("WebSocket is closed before the connection is established.", WarningMessageLevel); m_channel->fail("WebSocket is closed before the connection is established.", WarningMessageLevel, String(), 0);
return; return;
} }
m_state = CLOSING; m_state = CLOSING;
......
...@@ -105,7 +105,6 @@ public: ...@@ -105,7 +105,6 @@ public:
// You can specify String() and 0 for sourceURL and lineNumber // You can specify String() and 0 for sourceURL and lineNumber
// respectively, if you can't / needn't provide the information. // respectively, if you can't / needn't provide the information.
virtual void fail(const String& reason, MessageLevel, const String& sourceURL, unsigned lineNumber) = 0; virtual void fail(const String& reason, MessageLevel, const String& sourceURL, unsigned lineNumber) = 0;
void fail(const String& reason, MessageLevel level) { fail(reason, level, String(), 0); }
virtual void disconnect() = 0; // Will suppress didClose(). virtual void disconnect() = 0; // Will suppress didClose().
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "public/platform/WebURL.h" #include "public/platform/WebURL.h"
#include "public/web/WebDocument.h" #include "public/web/WebDocument.h"
#include "wtf/ArrayBuffer.h" #include "wtf/ArrayBuffer.h"
#include "wtf/text/WTFString.h"
using namespace WebCore; using namespace WebCore;
...@@ -114,7 +115,7 @@ void WebSocketImpl::close(int code, const WebString& reason) ...@@ -114,7 +115,7 @@ void WebSocketImpl::close(int code, const WebString& reason)
void WebSocketImpl::fail(const WebString& reason) void WebSocketImpl::fail(const WebString& reason)
{ {
m_private->fail(reason, ErrorMessageLevel); m_private->fail(reason, ErrorMessageLevel, String(), 0);
} }
void WebSocketImpl::disconnect() void WebSocketImpl::disconnect()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment