diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-20 19:00:55 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-20 19:00:55 +0000 |
commit | f0c2505359166dd1367793415a266adee4e0e2e8 (patch) | |
tree | 41d1e084dac83f6a82418176b8dac18e252c03f1 | |
parent | 03b8b8cea4fceecdc06f29a943aed24cd5dd251d (diff) | |
download | chromium_src-f0c2505359166dd1367793415a266adee4e0e2e8.zip chromium_src-f0c2505359166dd1367793415a266adee4e0e2e8.tar.gz chromium_src-f0c2505359166dd1367793415a266adee4e0e2e8.tar.bz2 |
net: Add NET_API to websockets.
BUG=76997
TEST=none
Review URL: http://codereview.chromium.org/7046017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86123 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/websockets/websocket.h | 5 | ||||
-rw-r--r-- | net/websockets/websocket_frame_handler.h | 3 | ||||
-rw-r--r-- | net/websockets/websocket_handshake.h | 5 | ||||
-rw-r--r-- | net/websockets/websocket_handshake_draft75.h | 4 | ||||
-rw-r--r-- | net/websockets/websocket_handshake_handler.h | 5 | ||||
-rw-r--r-- | net/websockets/websocket_job.h | 4 | ||||
-rw-r--r-- | net/websockets/websocket_net_log_params.h | 3 | ||||
-rw-r--r-- | net/websockets/websocket_throttle.h | 5 |
8 files changed, 21 insertions, 13 deletions
diff --git a/net/websockets/websocket.h b/net/websockets/websocket.h index 2490a54..cc0176b 100644 --- a/net/websockets/websocket.h +++ b/net/websockets/websocket.h @@ -19,6 +19,7 @@ #include "base/memory/scoped_ptr.h" #include "googleurl/src/gurl.h" #include "net/base/io_buffer.h" +#include "net/base/net_api.h" #include "net/socket_stream/socket_stream.h" #include "net/url_request/url_request_context.h" @@ -55,8 +56,8 @@ class WebSocketDelegate { virtual void OnSocketError(const WebSocket* socket, int error) {} }; -class WebSocket : public base::RefCountedThreadSafe<WebSocket>, - public SocketStream::Delegate { +class NET_API WebSocket : public base::RefCountedThreadSafe<WebSocket>, + public SocketStream::Delegate { public: enum State { INITIALIZED = -1, diff --git a/net/websockets/websocket_frame_handler.h b/net/websockets/websocket_frame_handler.h index b193e4a..293d43b 100644 --- a/net/websockets/websocket_frame_handler.h +++ b/net/websockets/websocket_frame_handler.h @@ -11,6 +11,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" +#include "net/base/net_api.h" namespace net { @@ -18,7 +19,7 @@ class IOBuffer; class IOBufferWithSize; // Handles WebSocket frame messages. -class WebSocketFrameHandler { +class NET_TEST WebSocketFrameHandler { public: struct FrameInfo { const char* frame_start; diff --git a/net/websockets/websocket_handshake.h b/net/websockets/websocket_handshake.h index ddb59af..b0b00a7 100644 --- a/net/websockets/websocket_handshake.h +++ b/net/websockets/websocket_handshake.h @@ -11,12 +11,13 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "googleurl/src/gurl.h" +#include "net/base/net_api.h" namespace net { class HttpResponseHeaders; -class WebSocketHandshake { +class NET_TEST WebSocketHandshake { public: static const int kWebSocketPort; static const int kSecureWebSocketPort; @@ -72,7 +73,7 @@ class WebSocketHandshake { private: friend class WebSocketHandshakeTest; - class Parameter { + class NET_TEST Parameter { public: static const int kKey3Size = 8; static const int kExpectedResponseSize = 16; diff --git a/net/websockets/websocket_handshake_draft75.h b/net/websockets/websocket_handshake_draft75.h index 3caaa98..12e11e1 100644 --- a/net/websockets/websocket_handshake_draft75.h +++ b/net/websockets/websocket_handshake_draft75.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,7 +16,7 @@ namespace net { class HttpResponseHeaders; -class WebSocketHandshakeDraft75 : public WebSocketHandshake { +class NET_TEST WebSocketHandshakeDraft75 : public WebSocketHandshake { public: static const int kWebSocketPort; static const int kSecureWebSocketPort; diff --git a/net/websockets/websocket_handshake_handler.h b/net/websockets/websocket_handshake_handler.h index b96ee87..09da372 100644 --- a/net/websockets/websocket_handshake_handler.h +++ b/net/websockets/websocket_handshake_handler.h @@ -33,13 +33,14 @@ #include <vector> #include "base/memory/ref_counted.h" +#include "net/base/net_api.h" #include "net/http/http_request_info.h" #include "net/http/http_response_info.h" #include "net/spdy/spdy_framer.h" namespace net { -class WebSocketHandshakeRequestHandler { +class NET_TEST WebSocketHandshakeRequestHandler { public: WebSocketHandshakeRequestHandler(); ~WebSocketHandshakeRequestHandler() {} @@ -92,7 +93,7 @@ class WebSocketHandshakeRequestHandler { DISALLOW_COPY_AND_ASSIGN(WebSocketHandshakeRequestHandler); }; -class WebSocketHandshakeResponseHandler { +class NET_TEST WebSocketHandshakeResponseHandler { public: WebSocketHandshakeResponseHandler(); ~WebSocketHandshakeResponseHandler(); diff --git a/net/websockets/websocket_job.h b/net/websockets/websocket_job.h index ae527ce..f1dcdc8 100644 --- a/net/websockets/websocket_job.h +++ b/net/websockets/websocket_job.h @@ -29,7 +29,9 @@ class WebSocketHandshakeResponseHandler; // see HttpOnly cookies, so it injects cookie header in handshake request and // strips set-cookie headers in handshake response. // TODO(ukai): refactor websocket.cc to use this. -class WebSocketJob : public SocketStreamJob, public SocketStream::Delegate { +class NET_API WebSocketJob + : public SocketStreamJob, + public SocketStream::Delegate { public: // This is state of WebSocket, not SocketStream. enum State { diff --git a/net/websockets/websocket_net_log_params.h b/net/websockets/websocket_net_log_params.h index 2bbad5b..8f0fc3f 100644 --- a/net/websockets/websocket_net_log_params.h +++ b/net/websockets/websocket_net_log_params.h @@ -19,7 +19,8 @@ namespace net { -class NetLogWebSocketHandshakeParameter : public NetLog::EventParameters { +class NET_TEST NetLogWebSocketHandshakeParameter + : public NetLog::EventParameters { public: explicit NetLogWebSocketHandshakeParameter(const std::string& headers); diff --git a/net/websockets/websocket_throttle.h b/net/websockets/websocket_throttle.h index 9becc62..2ec5146 100644 --- a/net/websockets/websocket_throttle.h +++ b/net/websockets/websocket_throttle.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -10,6 +10,7 @@ #include <string> #include "base/hash_tables.h" +#include "net/base/net_api.h" template <typename T> struct DefaultSingletonTraits; @@ -26,7 +27,7 @@ class WebSocketJob; // remote host (IP address) identified by /host/, even if known by // another name, wait until that connection has been established or // for that connection to have failed. -class WebSocketThrottle { +class NET_TEST WebSocketThrottle { public: // Returns the singleton instance. static WebSocketThrottle* GetInstance(); |