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

Side by Side Diff: net/socket_stream/socket_stream.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/socket/ssl_client_socket_pool_unittest.cc ('k') | net/socket_stream/socket_stream.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_SOCKET_STREAM_SOCKET_STREAM_H_ 5 #ifndef NET_SOCKET_STREAM_SOCKET_STREAM_H_
6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_ 6 #define NET_SOCKET_STREAM_SOCKET_STREAM_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <map> 10 #include <map>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/linked_ptr.h" 14 #include "base/linked_ptr.h"
15 #include "base/ref_counted.h" 15 #include "base/ref_counted.h"
16 #include "base/scoped_ptr.h" 16 #include "base/scoped_ptr.h"
17 #include "base/string16.h"
17 #include "base/task.h" 18 #include "base/task.h"
18 #include "net/base/address_list.h" 19 #include "net/base/address_list.h"
19 #include "net/base/completion_callback.h" 20 #include "net/base/completion_callback.h"
20 #include "net/base/io_buffer.h" 21 #include "net/base/io_buffer.h"
21 #include "net/base/net_log.h" 22 #include "net/base/net_log.h"
22 #include "net/base/net_errors.h" 23 #include "net/base/net_errors.h"
23 #include "net/http/http_auth.h" 24 #include "net/http/http_auth.h"
24 #include "net/http/http_auth_cache.h" 25 #include "net/http/http_auth_cache.h"
25 #include "net/http/http_auth_handler.h" 26 #include "net/http/http_auth_handler.h"
26 #include "net/proxy/proxy_service.h" 27 #include "net/proxy/proxy_service.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // |max_pending_send_allowed_| and |data| is not sent at all. 127 // |max_pending_send_allowed_| and |data| is not sent at all.
127 virtual bool SendData(const char* data, int len); 128 virtual bool SendData(const char* data, int len);
128 129
129 // Requests to close the connection. 130 // Requests to close the connection.
130 // Once the connection is closed, calls delegate's OnClose. 131 // Once the connection is closed, calls delegate's OnClose.
131 virtual void Close(); 132 virtual void Close();
132 133
133 // Restarts with authentication info. 134 // Restarts with authentication info.
134 // Should be used for response of OnAuthRequired. 135 // Should be used for response of OnAuthRequired.
135 virtual void RestartWithAuth( 136 virtual void RestartWithAuth(
136 const std::wstring& username, 137 const string16& username,
137 const std::wstring& password); 138 const string16& password);
138 139
139 // Detach delegate. Call before delegate is deleted. 140 // Detach delegate. Call before delegate is deleted.
140 // Once delegate is detached, close the socket stream and never call delegate 141 // Once delegate is detached, close the socket stream and never call delegate
141 // back. 142 // back.
142 virtual void DetachDelegate(); 143 virtual void DetachDelegate();
143 144
144 // Sets an alternative HostResolver. For testing purposes only. 145 // Sets an alternative HostResolver. For testing purposes only.
145 void SetHostResolver(HostResolver* host_resolver); 146 void SetHostResolver(HostResolver* host_resolver);
146 147
147 // Sets an alternative ClientSocketFactory. Doesn't take ownership of 148 // Sets an alternative ClientSocketFactory. Doesn't take ownership of
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 bool closing_; 323 bool closing_;
323 324
324 scoped_ptr<SocketStreamMetrics> metrics_; 325 scoped_ptr<SocketStreamMetrics> metrics_;
325 326
326 DISALLOW_COPY_AND_ASSIGN(SocketStream); 327 DISALLOW_COPY_AND_ASSIGN(SocketStream);
327 }; 328 };
328 329
329 } // namespace net 330 } // namespace net
330 331
331 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_ 332 #endif // NET_SOCKET_STREAM_SOCKET_STREAM_H_
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_pool_unittest.cc ('k') | net/socket_stream/socket_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698