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

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

Issue 9959033: Move NextProto enum to a new file net/socket/next_proto.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address wtc's comments Created 8 years, 8 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_stream_factory_impl_job.cc ('k') | net/http/http_stream_factory_impl_request.cc » ('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) 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_REQUEST_H_ 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_
6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_ 6 #define NET_HTTP_HTTP_STREAM_FACTORY_IMPL_REQUEST_H_
7 7
8 #include <set> 8 #include <set>
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 26 matching lines...) Expand all
37 // Returns true if this is this key was new to the factory. 37 // Returns true if this is this key was new to the factory.
38 bool SetHttpPipeliningKey(const HttpPipelinedHost::Key& http_pipelining_key); 38 bool SetHttpPipeliningKey(const HttpPipelinedHost::Key& http_pipelining_key);
39 39
40 // Attaches |job| to this request. Does not mean that Request will use |job|, 40 // Attaches |job| to this request. Does not mean that Request will use |job|,
41 // but Request will own |job|. 41 // but Request will own |job|.
42 void AttachJob(HttpStreamFactoryImpl::Job* job); 42 void AttachJob(HttpStreamFactoryImpl::Job* job);
43 43
44 // Marks completion of the request. Must be called before OnStreamReady(). 44 // Marks completion of the request. Must be called before OnStreamReady().
45 // |job_net_log| is the BoundNetLog of the Job that fulfilled this request. 45 // |job_net_log| is the BoundNetLog of the Job that fulfilled this request.
46 void Complete(bool was_npn_negotiated, 46 void Complete(bool was_npn_negotiated,
47 SSLClientSocket::NextProto protocol_negotiated, 47 NextProto protocol_negotiated,
48 bool using_spdy, 48 bool using_spdy,
49 const BoundNetLog& job_net_log); 49 const BoundNetLog& job_net_log);
50 50
51 // If this Request has a |spdy_session_key_|, remove this session from the 51 // If this Request has a |spdy_session_key_|, remove this session from the
52 // SpdySessionRequestMap. 52 // SpdySessionRequestMap.
53 void RemoveRequestFromSpdySessionRequestMap(); 53 void RemoveRequestFromSpdySessionRequestMap();
54 54
55 // If this Request has a |http_pipelining_key_|, remove this session from the 55 // If this Request has a |http_pipelining_key_|, remove this session from the
56 // HttpPipeliningRequestMap. 56 // HttpPipeliningRequestMap.
57 void RemoveRequestFromHttpPipeliningRequestMap(); 57 void RemoveRequestFromHttpPipeliningRequestMap();
(...skipping 29 matching lines...) Expand all
87 const SSLConfig& used_ssl_config, 87 const SSLConfig& used_ssl_config,
88 const ProxyInfo& used_proxy_info, 88 const ProxyInfo& used_proxy_info,
89 HttpStream* stream); 89 HttpStream* stream);
90 90
91 // HttpStreamRequest methods. 91 // HttpStreamRequest methods.
92 92
93 virtual int RestartTunnelWithProxyAuth( 93 virtual int RestartTunnelWithProxyAuth(
94 const AuthCredentials& credentials) OVERRIDE; 94 const AuthCredentials& credentials) OVERRIDE;
95 virtual LoadState GetLoadState() const OVERRIDE; 95 virtual LoadState GetLoadState() const OVERRIDE;
96 virtual bool was_npn_negotiated() const OVERRIDE; 96 virtual bool was_npn_negotiated() const OVERRIDE;
97 virtual SSLClientSocket::NextProto protocol_negotiated() const OVERRIDE; 97 virtual NextProto protocol_negotiated() const OVERRIDE;
98 virtual bool using_spdy() const OVERRIDE; 98 virtual bool using_spdy() const OVERRIDE;
99 99
100 private: 100 private:
101 // Used to orphan all jobs in |jobs_| other than |job| which becomes "bound" 101 // Used to orphan all jobs in |jobs_| other than |job| which becomes "bound"
102 // to the request. 102 // to the request.
103 void OrphanJobsExcept(Job* job); 103 void OrphanJobsExcept(Job* job);
104 104
105 // Used to orphan all jobs in |jobs_|. 105 // Used to orphan all jobs in |jobs_|.
106 void OrphanJobs(); 106 void OrphanJobs();
107 107
108 const GURL url_; 108 const GURL url_;
109 HttpStreamFactoryImpl* const factory_; 109 HttpStreamFactoryImpl* const factory_;
110 HttpStreamRequest::Delegate* const delegate_; 110 HttpStreamRequest::Delegate* const delegate_;
111 const BoundNetLog net_log_; 111 const BoundNetLog net_log_;
112 112
113 // At the point where Job is irrevocably tied to the Request, we set this. 113 // At the point where Job is irrevocably tied to the Request, we set this.
114 scoped_ptr<Job> bound_job_; 114 scoped_ptr<Job> bound_job_;
115 std::set<HttpStreamFactoryImpl::Job*> jobs_; 115 std::set<HttpStreamFactoryImpl::Job*> jobs_;
116 scoped_ptr<const HostPortProxyPair> spdy_session_key_; 116 scoped_ptr<const HostPortProxyPair> spdy_session_key_;
117 scoped_ptr<const HttpPipelinedHost::Key> http_pipelining_key_; 117 scoped_ptr<const HttpPipelinedHost::Key> http_pipelining_key_;
118 118
119 bool completed_; 119 bool completed_;
120 bool was_npn_negotiated_; 120 bool was_npn_negotiated_;
121 // Protocol negotiated with the server. 121 // Protocol negotiated with the server.
122 SSLClientSocket::NextProto protocol_negotiated_; 122 NextProto protocol_negotiated_;
123 bool using_spdy_; 123 bool using_spdy_;
124 124
125 DISALLOW_COPY_AND_ASSIGN(Request); 125 DISALLOW_COPY_AND_ASSIGN(Request);
126 }; 126 };
127 127
128 } // namespace net 128 } // namespace net
129 129
130 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_ 130 #endif // NET_HTTP_HTTP_STREAM_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/http/http_stream_factory_impl_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698