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

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

Issue 9567025: Ensure pipelined requests are sent in the same order they're queued. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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 #include <vector>
10 11
11 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
12 #include "net/base/host_port_pair.h" 13 #include "net/base/host_port_pair.h"
13 #include "net/base/net_log.h" 14 #include "net/base/net_log.h"
14 #include "net/http/http_pipelined_host_pool.h" 15 #include "net/http/http_pipelined_host_pool.h"
15 #include "net/http/http_stream_factory.h" 16 #include "net/http/http_stream_factory.h"
16 #include "net/proxy/proxy_server.h" 17 #include "net/proxy/proxy_server.h"
17 #include "net/socket/ssl_client_socket.h" 18 #include "net/socket/ssl_client_socket.h"
18 19
19 namespace net { 20 namespace net {
(...skipping 27 matching lines...) Expand all
47 48
48 // HttpPipelinedHostPool::Delegate interface 49 // HttpPipelinedHostPool::Delegate interface
49 virtual void OnHttpPipelinedHostHasAdditionalCapacity( 50 virtual void OnHttpPipelinedHostHasAdditionalCapacity(
50 HttpPipelinedHost* host) OVERRIDE; 51 HttpPipelinedHost* host) OVERRIDE;
51 52
52 private: 53 private:
53 class Request; 54 class Request;
54 class Job; 55 class Job;
55 56
56 typedef std::set<Request*> RequestSet; 57 typedef std::set<Request*> RequestSet;
58 typedef std::vector<Request*> RequestVector;
57 typedef std::map<HostPortProxyPair, RequestSet> SpdySessionRequestMap; 59 typedef std::map<HostPortProxyPair, RequestSet> SpdySessionRequestMap;
58 typedef std::map<HttpPipelinedHost::Key, RequestSet> HttpPipeliningRequestMap; 60 typedef std::map<HttpPipelinedHost::Key,
61 RequestVector> HttpPipeliningRequestMap;
59 62
60 bool GetAlternateProtocolRequestFor(const GURL& original_url, 63 bool GetAlternateProtocolRequestFor(const GURL& original_url,
61 GURL* alternate_url) const; 64 GURL* alternate_url) const;
62 65
63 // Detaches |job| from |request|. 66 // Detaches |job| from |request|.
64 void OrphanJob(Job* job, const Request* request); 67 void OrphanJob(Job* job, const Request* request);
65 68
66 // Called when a SpdySession is ready. It will find appropriate Requests and 69 // Called when a SpdySession is ready. It will find appropriate Requests and
67 // fulfill them. |direct| indicates whether or not |spdy_session| uses a 70 // fulfill them. |direct| indicates whether or not |spdy_session| uses a
68 // proxy. 71 // proxy.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be 122 // object. They're owned by HttpStreamFactoryImpl. Leftover jobs will be
120 // deleted when the factory is destroyed. 123 // deleted when the factory is destroyed.
121 std::set<const Job*> preconnect_job_set_; 124 std::set<const Job*> preconnect_job_set_;
122 125
123 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl); 126 DISALLOW_COPY_AND_ASSIGN(HttpStreamFactoryImpl);
124 }; 127 };
125 128
126 } // namespace net 129 } // namespace net
127 130
128 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 131 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698