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

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

Issue 8586015: Slow start pipelining. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 9 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
« no previous file with comments | « no previous file | net/http/http_pipelined_connection_impl.h » ('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) 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_HTTP_HTTP_PIPELINED_CONNECTION_H_ 5 #ifndef NET_HTTP_HTTP_PIPELINED_CONNECTION_H_
6 #define NET_HTTP_HTTP_PIPELINED_CONNECTION_H_ 6 #define NET_HTTP_HTTP_PIPELINED_CONNECTION_H_
7 #pragma once 7 #pragma once
8 8
9 #include "net/base/net_export.h" 9 #include "net/base/net_export.h"
10 #include "net/base/net_log.h" 10 #include "net/base/net_log.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 class BoundNetLog; 14 class BoundNetLog;
15 class ClientSocketHandle; 15 class ClientSocketHandle;
16 class HttpPipelinedStream; 16 class HttpPipelinedStream;
17 class ProxyInfo; 17 class ProxyInfo;
18 struct SSLConfig; 18 struct SSLConfig;
19 19
20 class NET_EXPORT_PRIVATE HttpPipelinedConnection { 20 class NET_EXPORT_PRIVATE HttpPipelinedConnection {
21 public: 21 public:
22 enum Feedback {
23 OK,
24 PIPELINE_SOCKET_ERROR,
25 OLD_HTTP_VERSION,
26 MUST_CLOSE_CONNECTION,
27 };
28
22 class Delegate { 29 class Delegate {
23 public: 30 public:
24 // Called when a pipeline has newly available capacity. This may be because 31 // Called when a pipeline has newly available capacity. This may be because
25 // the first request has been sent and the pipeline is now active. Or, it 32 // the first request has been sent and the pipeline is now active. Or, it
26 // may be because a request successfully completed. 33 // may be because a request successfully completed.
27 virtual void OnPipelineHasCapacity(HttpPipelinedConnection* pipeline) = 0; 34 virtual void OnPipelineHasCapacity(HttpPipelinedConnection* pipeline) = 0;
35
36 // Called every time a pipeline receives headers. Lets the delegate know if
37 // the headers indicate that pipelining can be used.
38 virtual void OnPipelineFeedback(HttpPipelinedConnection* pipeline,
39 Feedback feedback) = 0;
28 }; 40 };
29 41
30 class Factory { 42 class Factory {
31 public: 43 public:
32 virtual ~Factory() {} 44 virtual ~Factory() {}
33 45
34 virtual HttpPipelinedConnection* CreateNewPipeline( 46 virtual HttpPipelinedConnection* CreateNewPipeline(
35 ClientSocketHandle* connection, 47 ClientSocketHandle* connection,
36 Delegate* delegate, 48 Delegate* delegate,
37 const SSLConfig& used_ssl_config, 49 const SSLConfig& used_ssl_config,
(...skipping 27 matching lines...) Expand all
65 // The source of this pipelined connection. 77 // The source of this pipelined connection.
66 virtual const NetLog::Source& source() const = 0; 78 virtual const NetLog::Source& source() const = 0;
67 79
68 // True if this connection was NPN negotiated. 80 // True if this connection was NPN negotiated.
69 virtual bool was_npn_negotiated() const = 0; 81 virtual bool was_npn_negotiated() const = 0;
70 }; 82 };
71 83
72 } // namespace net 84 } // namespace net
73 85
74 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_H_ 86 #endif // NET_HTTP_HTTP_PIPELINED_CONNECTION_H_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_pipelined_connection_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698