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

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

Issue 275953002: Remove HTTP pipelining support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix line endings Created 6 years, 6 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/http/http_pipelined_host_capability.h ('k') | net/http/http_pipelined_host_forced.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_HTTP_HTTP_PIPELINED_HOST_FORCED_H_
6 #define NET_HTTP_HTTP_PIPELINED_HOST_FORCED_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "net/base/host_port_pair.h"
13 #include "net/base/net_export.h"
14 #include "net/http/http_pipelined_connection.h"
15 #include "net/http/http_pipelined_host.h"
16 #include "net/http/http_pipelined_host_capability.h"
17
18 namespace base {
19 class Value;
20 }
21
22 namespace net {
23
24 class BoundNetLog;
25 class ClientSocketHandle;
26 class HttpPipelinedStream;
27 class ProxyInfo;
28 struct SSLConfig;
29
30 // Manages a single pipelined connection for requests to a host that are forced
31 // to use pipelining. Note that this is normally not used. It is intended to
32 // test the user's connection for pipelining compatibility.
33 class NET_EXPORT_PRIVATE HttpPipelinedHostForced
34 : public HttpPipelinedHost,
35 public HttpPipelinedConnection::Delegate {
36 public:
37 HttpPipelinedHostForced(HttpPipelinedHost::Delegate* delegate,
38 const Key& key,
39 HttpPipelinedConnection::Factory* factory);
40 virtual ~HttpPipelinedHostForced();
41
42 // HttpPipelinedHost interface
43 virtual HttpPipelinedStream* CreateStreamOnNewPipeline(
44 ClientSocketHandle* connection,
45 const SSLConfig& used_ssl_config,
46 const ProxyInfo& used_proxy_info,
47 const BoundNetLog& net_log,
48 bool was_npn_negotiated,
49 NextProto protocol_negotiated) OVERRIDE;
50
51 virtual HttpPipelinedStream* CreateStreamOnExistingPipeline() OVERRIDE;
52
53 virtual bool IsExistingPipelineAvailable() const OVERRIDE;
54
55 virtual const Key& GetKey() const OVERRIDE;
56
57 virtual base::Value* PipelineInfoToValue() const OVERRIDE;
58
59 // HttpPipelinedConnection::Delegate interface
60
61 virtual void OnPipelineHasCapacity(
62 HttpPipelinedConnection* pipeline) OVERRIDE;
63
64 virtual void OnPipelineFeedback(
65 HttpPipelinedConnection* pipeline,
66 HttpPipelinedConnection::Feedback feedback) OVERRIDE;
67
68 private:
69 // Called when a pipeline is empty and there are no pending requests. Closes
70 // the connection.
71 void OnPipelineEmpty(HttpPipelinedConnection* pipeline);
72
73 HttpPipelinedHost::Delegate* delegate_;
74 const Key key_;
75 scoped_ptr<HttpPipelinedConnection> pipeline_;
76 scoped_ptr<HttpPipelinedConnection::Factory> factory_;
77
78 DISALLOW_COPY_AND_ASSIGN(HttpPipelinedHostForced);
79 };
80
81 } // namespace net
82
83 #endif // NET_HTTP_HTTP_PIPELINED_HOST_FORCED_H_
OLDNEW
« no previous file with comments | « net/http/http_pipelined_host_capability.h ('k') | net/http/http_pipelined_host_forced.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698