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

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

Issue 9433015: Add a force pipelining option to load flags. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add backup buffer Created 8 years, 10 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
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_FACTORY_IMPL_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 29 matching lines...) Expand all
40 virtual void PreconnectStreams(int num_streams, 40 virtual void PreconnectStreams(int num_streams,
41 const HttpRequestInfo& info, 41 const HttpRequestInfo& info,
42 const SSLConfig& server_ssl_config, 42 const SSLConfig& server_ssl_config,
43 const SSLConfig& proxy_ssl_config) OVERRIDE; 43 const SSLConfig& proxy_ssl_config) OVERRIDE;
44 virtual void AddTLSIntolerantServer(const HostPortPair& server) OVERRIDE; 44 virtual void AddTLSIntolerantServer(const HostPortPair& server) OVERRIDE;
45 virtual bool IsTLSIntolerantServer(const HostPortPair& server) const OVERRIDE; 45 virtual bool IsTLSIntolerantServer(const HostPortPair& server) const OVERRIDE;
46 virtual base::Value* PipelineInfoToValue() const OVERRIDE; 46 virtual base::Value* PipelineInfoToValue() const OVERRIDE;
47 47
48 // HttpPipelinedHostPool::Delegate interface 48 // HttpPipelinedHostPool::Delegate interface
49 virtual void OnHttpPipelinedHostHasAdditionalCapacity( 49 virtual void OnHttpPipelinedHostHasAdditionalCapacity(
50 const HostPortPair& origin) OVERRIDE; 50 HttpPipelinedHost* host) OVERRIDE;
51 51
52 private: 52 private:
53 class Request; 53 class Request;
54 class Job; 54 class Job;
55 55
56 typedef std::set<Request*> RequestSet; 56 typedef std::set<Request*> RequestSet;
57 typedef std::map<HostPortProxyPair, RequestSet> SpdySessionRequestMap; 57 typedef std::map<HostPortProxyPair, RequestSet> SpdySessionRequestMap;
58 typedef std::map<HostPortPair, RequestSet> HttpPipeliningRequestMap; 58 typedef std::map<HttpPipelinedHost::Key, RequestSet> HttpPipeliningRequestMap;
59 59
60 bool GetAlternateProtocolRequestFor(const GURL& original_url, 60 bool GetAlternateProtocolRequestFor(const GURL& original_url,
61 GURL* alternate_url) const; 61 GURL* alternate_url) const;
62 62
63 // Detaches |job| from |request|. 63 // Detaches |job| from |request|.
64 void OrphanJob(Job* job, const Request* request); 64 void OrphanJob(Job* job, const Request* request);
65 65
66 // Called when a SpdySession is ready. It will find appropriate Requests and 66 // Called when a SpdySession is ready. It will find appropriate Requests and
67 // fulfill them. |direct| indicates whether or not |spdy_session| uses a 67 // fulfill them. |direct| indicates whether or not |spdy_session| uses a
68 // proxy. 68 // proxy.
(...skipping 13 matching lines...) Expand all
82 82
83 // Invoked when an orphaned Job finishes. 83 // Invoked when an orphaned Job finishes.
84 void OnOrphanedJobComplete(const Job* job); 84 void OnOrphanedJobComplete(const Job* job);
85 85
86 // Invoked when the Job finishes preconnecting sockets. 86 // Invoked when the Job finishes preconnecting sockets.
87 void OnPreconnectsComplete(const Job* job); 87 void OnPreconnectsComplete(const Job* job);
88 88
89 // Called when the Preconnect completes. Used for testing. 89 // Called when the Preconnect completes. Used for testing.
90 virtual void OnPreconnectsCompleteInternal() {} 90 virtual void OnPreconnectsCompleteInternal() {}
91 91
92 void AbortPipelinedRequestsWithKey(const Job* job,
93 const HttpPipelinedHost::Key& key,
94 int status,
95 const SSLConfig& used_ssl_config);
96
92 HttpNetworkSession* const session_; 97 HttpNetworkSession* const session_;
93 98
94 std::set<HostPortPair> tls_intolerant_servers_; 99 std::set<HostPortPair> tls_intolerant_servers_;
95 100
96 // All Requests are handed out to clients. By the time HttpStreamFactoryImpl 101 // All Requests are handed out to clients. By the time HttpStreamFactoryImpl
97 // is destroyed, all Requests should be deleted (which should remove them from 102 // is destroyed, all Requests should be deleted (which should remove them from
98 // |request_map_|. The Requests will delete the corresponding job. 103 // |request_map_|. The Requests will delete the corresponding job.
99 std::map<const Job*, Request*> request_map_; 104 std::map<const Job*, Request*> request_map_;
100 105
101 SpdySessionRequestMap spdy_session_request_map_; 106 SpdySessionRequestMap spdy_session_request_map_;
(...skipping 12 matching lines...) Expand all
114 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be 119 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be
115 // deleted when the factory is destroyed. 120 // deleted when the factory is destroyed.
116 std::set<const Job*> preconnect_job_set_; 121 std::set<const Job*> preconnect_job_set_;
117 122
118 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); 123 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl);
119 }; 124 };
120 125
121 } // namespace net 126 } // namespace net
122 127
123 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 128 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698