| OLD | NEW |
| 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 #include "net/http/http_stream_factory_impl_job.h" | 5 #include "net/http/http_stream_factory_impl_job.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 const GURL& url) { | 48 const GURL& url) { |
| 49 return make_scoped_refptr(new HttpStreamJobParameters(original_url, url)); | 49 return make_scoped_refptr(new HttpStreamJobParameters(original_url, url)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 virtual Value* ToValue() const; | 52 virtual Value* ToValue() const; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 HttpStreamJobParameters(const GURL& original_url, const GURL& url) | 55 HttpStreamJobParameters(const GURL& original_url, const GURL& url) |
| 56 : original_url_(original_url.GetOrigin().spec()), | 56 : original_url_(original_url.GetOrigin().spec()), |
| 57 url_(url.GetOrigin().spec()) {} | 57 url_(url.GetOrigin().spec()) {} |
| 58 virtual ~HttpStreamJobParameters() {} |
| 58 | 59 |
| 59 const std::string original_url_; | 60 const std::string original_url_; |
| 60 const std::string url_; | 61 const std::string url_; |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 Value* HttpStreamJobParameters::ToValue() const { | 64 Value* HttpStreamJobParameters::ToValue() const { |
| 64 DictionaryValue* dict = new DictionaryValue(); | 65 DictionaryValue* dict = new DictionaryValue(); |
| 65 dict->SetString("original_url", original_url_); | 66 dict->SetString("original_url", original_url_); |
| 66 dict->SetString("url", url_); | 67 dict->SetString("url", url_); |
| 67 return dict; | 68 return dict; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 80 | 81 |
| 81 virtual Value* ToValue() const; | 82 virtual Value* ToValue() const; |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 HttpStreamProtoParameters(const SSLClientSocket::NextProtoStatus status, | 85 HttpStreamProtoParameters(const SSLClientSocket::NextProtoStatus status, |
| 85 const std::string& proto, | 86 const std::string& proto, |
| 86 const std::string& server_protos) | 87 const std::string& server_protos) |
| 87 : status_(status), | 88 : status_(status), |
| 88 proto_(proto), | 89 proto_(proto), |
| 89 server_protos_(server_protos) {} | 90 server_protos_(server_protos) {} |
| 91 virtual ~HttpStreamProtoParameters() {} |
| 90 | 92 |
| 91 const SSLClientSocket::NextProtoStatus status_; | 93 const SSLClientSocket::NextProtoStatus status_; |
| 92 const std::string proto_; | 94 const std::string proto_; |
| 93 const std::string server_protos_; | 95 const std::string server_protos_; |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 Value* HttpStreamProtoParameters::ToValue() const { | 98 Value* HttpStreamProtoParameters::ToValue() const { |
| 97 DictionaryValue* dict = new DictionaryValue(); | 99 DictionaryValue* dict = new DictionaryValue(); |
| 98 | 100 |
| 99 dict->SetString("next_proto_status", | 101 dict->SetString("next_proto_status", |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 return false; | 1246 return false; |
| 1245 } | 1247 } |
| 1246 if (request_info_.method != "GET" && request_info_.method != "HEAD") { | 1248 if (request_info_.method != "GET" && request_info_.method != "HEAD") { |
| 1247 return false; | 1249 return false; |
| 1248 } | 1250 } |
| 1249 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( | 1251 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( |
| 1250 *http_pipelining_key_.get()); | 1252 *http_pipelining_key_.get()); |
| 1251 } | 1253 } |
| 1252 | 1254 |
| 1253 } // namespace net | 1255 } // namespace net |
| OLD | NEW |