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

Side by Side Diff: net/websockets/websocket_job.h

Issue 3040016: Net: Convert username and password to string16. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address comments Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | net/websockets/websocket_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_WEBSOCKETS_WEBSOCKET_JOB_H_ 5 #ifndef NET_WEBSOCKETS_WEBSOCKET_JOB_H_
6 #define NET_WEBSOCKETS_WEBSOCKET_JOB_H_ 6 #define NET_WEBSOCKETS_WEBSOCKET_JOB_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/string16.h"
12 #include "net/base/address_list.h" 13 #include "net/base/address_list.h"
13 #include "net/base/completion_callback.h" 14 #include "net/base/completion_callback.h"
14 #include "net/socket_stream/socket_stream_job.h" 15 #include "net/socket_stream/socket_stream_job.h"
15 16
16 class GURL; 17 class GURL;
17 18
18 namespace net { 19 namespace net {
19 20
20 class DrainableIOBuffer; 21 class DrainableIOBuffer;
21 class WebSocketFrameHandler; 22 class WebSocketFrameHandler;
(...skipping 18 matching lines...) Expand all
40 }; 41 };
41 static void EnsureInit(); 42 static void EnsureInit();
42 43
43 explicit WebSocketJob(SocketStream::Delegate* delegate); 44 explicit WebSocketJob(SocketStream::Delegate* delegate);
44 45
45 State state() const { return state_; } 46 State state() const { return state_; }
46 virtual void Connect(); 47 virtual void Connect();
47 virtual bool SendData(const char* data, int len); 48 virtual bool SendData(const char* data, int len);
48 virtual void Close(); 49 virtual void Close();
49 virtual void RestartWithAuth( 50 virtual void RestartWithAuth(
50 const std::wstring& username, 51 const string16& username,
51 const std::wstring& password); 52 const string16& password);
52 virtual void DetachDelegate(); 53 virtual void DetachDelegate();
53 54
54 // SocketStream::Delegate methods. 55 // SocketStream::Delegate methods.
55 virtual int OnStartOpenConnection( 56 virtual int OnStartOpenConnection(
56 SocketStream* socket, CompletionCallback* callback); 57 SocketStream* socket, CompletionCallback* callback);
57 virtual void OnConnected( 58 virtual void OnConnected(
58 SocketStream* socket, int max_pending_send_allowed); 59 SocketStream* socket, int max_pending_send_allowed);
59 virtual void OnSentData( 60 virtual void OnSentData(
60 SocketStream* socket, int amount_sent); 61 SocketStream* socket, int amount_sent);
61 virtual void OnReceivedData( 62 virtual void OnReceivedData(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 scoped_ptr<WebSocketFrameHandler> send_frame_handler_; 113 scoped_ptr<WebSocketFrameHandler> send_frame_handler_;
113 scoped_refptr<DrainableIOBuffer> current_buffer_; 114 scoped_refptr<DrainableIOBuffer> current_buffer_;
114 scoped_ptr<WebSocketFrameHandler> receive_frame_handler_; 115 scoped_ptr<WebSocketFrameHandler> receive_frame_handler_;
115 116
116 DISALLOW_COPY_AND_ASSIGN(WebSocketJob); 117 DISALLOW_COPY_AND_ASSIGN(WebSocketJob);
117 }; 118 };
118 119
119 } // namespace 120 } // namespace
120 121
121 #endif // NET_WEBSOCKETS_WEBSOCKET_JOB_H_ 122 #endif // NET_WEBSOCKETS_WEBSOCKET_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | net/websockets/websocket_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698