OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SOCKET_STREAM_SOCKET_STREAM_JOB_H_ | 5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_ |
6 #define NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_ | 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void set_context(URLRequestContext* context) { | 56 void set_context(URLRequestContext* context) { |
57 socket_->set_context(context); | 57 socket_->set_context(context); |
58 } | 58 } |
59 | 59 |
60 virtual void Connect(); | 60 virtual void Connect(); |
61 | 61 |
62 virtual bool SendData(const char* data, int len); | 62 virtual bool SendData(const char* data, int len); |
63 | 63 |
64 virtual void Close(); | 64 virtual void Close(); |
65 | 65 |
66 virtual void RestartWithAuth(const string16& username, | 66 virtual void RestartWithAuth(const AuthCredentials& credentials); |
67 const string16& password); | |
68 | 67 |
69 virtual void DetachDelegate(); | 68 virtual void DetachDelegate(); |
70 | 69 |
71 protected: | 70 protected: |
72 friend class WebSocketJobTest; | 71 friend class WebSocketJobTest; |
73 friend class base::RefCountedThreadSafe<SocketStreamJob>; | 72 friend class base::RefCountedThreadSafe<SocketStreamJob>; |
74 virtual ~SocketStreamJob(); | 73 virtual ~SocketStreamJob(); |
75 | 74 |
76 scoped_refptr<SocketStream> socket_; | 75 scoped_refptr<SocketStream> socket_; |
77 | 76 |
78 DISALLOW_COPY_AND_ASSIGN(SocketStreamJob); | 77 DISALLOW_COPY_AND_ASSIGN(SocketStreamJob); |
79 }; | 78 }; |
80 | 79 |
81 } // namespace net | 80 } // namespace net |
82 | 81 |
83 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_ | 82 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_JOB_H_ |
OLD | NEW |