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

Side by Side Diff: net/http/connect_response_http_stream.h

Issue 4935001: Allow a non-200 (or non-407) response for a CONNECT request from an HTTPS pro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Cleaned up Created 10 years 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
vandebo (ex-Chrome) 2010/12/04 00:30:37 Why do you need a ConnectResponseHttpStream? Why
vandebo (ex-Chrome) 2010/12/04 00:30:37 2010
Ryan Hamilton 2010/12/09 21:19:35 Well HttpStream is abstract/virtual, right? Did y
Ryan Hamilton 2010/12/09 21:19:35 Done.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // ConnectResponseHttpStream is a simple implementation of HttpStream, for
6 // Handling the processing of a non-200 response from a CONNECT request to an
7 // HTTPS proxy.
8
9 #ifndef NET_HTTP_CONNECT_RESPONSE_HTTP_STREAM_H_
10 #define NET_HTTP_CONNECT_RESPONSE_HTTP_STREAM_H_
11 #pragma once
12
13 #include "base/basictypes.h"
14 #include "base/scoped_ptr.h"
15 #include "net/http/http_response_info.h"
16 #include "net/http/http_stream.h"
17 #include "net/http/http_stream_parser.h"
18
19 namespace net {
20
21 class BoundNetLog;
22 class ClientSocketHandle;
23 class GrowableIOBuffer;
24 //class HttpResponseInfo;
vandebo (ex-Chrome) 2010/12/04 00:30:37 remove
Ryan Hamilton 2010/12/09 21:19:35 Done.
25 struct HttpRequestInfo;
26 class HttpRequestHeaders;
27 class IOBuffer;
28 class UploadDataStream;
29
30 class ConnectResponseHttpStream : public HttpStream {
vandebo (ex-Chrome) 2010/12/04 00:30:37 ResponseOnlyHttpStream ?
31 public:
32 ConnectResponseHttpStream(HttpStreamParser* parser);
vandebo (ex-Chrome) 2010/12/04 00:30:37 explicit
Ryan Hamilton 2010/12/09 21:19:35 Done. (Then I changed the signature, and removed
33 virtual ~ConnectResponseHttpStream();
34
35 // HttpStream methods
36
37 virtual int InitializeStream(const HttpRequestInfo* request_info,
38 const BoundNetLog& net_log,
39 CompletionCallback* callback);
40
41 virtual int SendRequest(const HttpRequestHeaders& request_headers,
42 UploadDataStream* request_body,
43 HttpResponseInfo* response,
44 CompletionCallback* callback);
45
46 virtual uint64 GetUploadProgress() const;
47
48 virtual int ReadResponseHeaders(CompletionCallback* callback);
49
50 virtual const HttpResponseInfo* GetResponseInfo() const;
51
52 virtual int ReadResponseBody(IOBuffer* buf, int buf_len,
53 CompletionCallback* callback);
54
55 virtual void Close(bool not_reusable);
56
57 virtual HttpStream* RenewStreamForAuth();
58
59 virtual bool IsResponseBodyComplete() const;
60
61 virtual bool CanFindEndOfResponse() const;
62
63 virtual bool IsMoreDataBuffered() const;
64
65 virtual bool IsConnectionReused() const;
66 virtual void SetConnectionReused();
67
68 virtual void GetSSLInfo(SSLInfo* ssl_info);
69
70 virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info);
71
72 private:
73 scoped_ptr<HttpStreamParser> parser_;
74
75 // |response_info_| is the HTTP response data object which is filled in
76 // when a SYN_REPLY comes in for the stream.
77 // It is not owned by this stream object, or point to |push_response_info_|.
78 HttpResponseInfo* response_info_;
vandebo (ex-Chrome) 2010/12/04 00:30:37 This doesn't seem to be used.
Ryan Hamilton 2010/12/09 21:19:35 Done.
79 };
80
81 } // namespace net
82
83
84 #endif // NET_HTTP_CONNECT_RESPONSE_HTTP_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698