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

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

Issue 1494813002: Fix HttpStreamParser::CanReuseConnection(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes Created 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_HTTP_HTTP_STREAM_PARSER_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_PARSER_H_
6 #define NET_HTTP_HTTP_STREAM_PARSER_H_ 6 #define NET_HTTP_HTTP_STREAM_PARSER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 bool IsMoreDataBuffered() const; 72 bool IsMoreDataBuffered() const;
73 73
74 bool IsConnectionReused() const; 74 bool IsConnectionReused() const;
75 75
76 void SetConnectionReused(); 76 void SetConnectionReused();
77 77
78 // Returns true if the underlying connection can be reused. 78 // Returns true if the underlying connection can be reused.
79 // The connection can be reused if: 79 // The connection can be reused if:
80 // * It's still connected. 80 // * It's still connected.
81 // * The response headers indicate the connection can be kept alive. 81 // * The response headers indicate the connection can be kept alive.
82 // * The end of the response can be found. 82 // * The end of the response can be found, though it may not have yet been
83 // received.
83 // 84 //
84 // Note that if response headers have yet to be received, this will return 85 // Note that if response headers have yet to be received, this will return
85 // false. 86 // false.
86 bool CanReuseConnection() const; 87 bool CanReuseConnection() const;
87 88
88 int64_t received_bytes() const { return received_bytes_; } 89 int64_t received_bytes() const { return received_bytes_; }
89 90
90 int64_t sent_bytes() const { return sent_bytes_; } 91 int64_t sent_bytes() const { return sent_bytes_; }
91 92
92 void GetSSLInfo(SSLInfo* ssl_info); 93 void GetSSLInfo(SSLInfo* ssl_info);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 int upload_error_; 267 int upload_error_;
267 268
268 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; 269 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_;
269 270
270 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); 271 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser);
271 }; 272 };
272 273
273 } // namespace net 274 } // namespace net
274 275
275 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ 276 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698