| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "net/ssl/ssl_cert_request_info.h" | 42 #include "net/ssl/ssl_cert_request_info.h" |
| 43 | 43 |
| 44 namespace net { | 44 namespace net { |
| 45 | 45 |
| 46 // Returns parameters associated with the start of a HTTP stream job. | 46 // Returns parameters associated with the start of a HTTP stream job. |
| 47 base::Value* NetLogHttpStreamJobCallback( | 47 base::Value* NetLogHttpStreamJobCallback( |
| 48 const GURL* original_url, | 48 const GURL* original_url, |
| 49 const GURL* url, | 49 const GURL* url, |
| 50 const AlternativeService* alternative_service, | 50 const AlternativeService* alternative_service, |
| 51 RequestPriority priority, | 51 RequestPriority priority, |
| 52 NetLog::LogLevel /* log_level */) { | 52 NetLogCaptureMode /* capture_mode */) { |
| 53 base::DictionaryValue* dict = new base::DictionaryValue(); | 53 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 54 dict->SetString("original_url", original_url->GetOrigin().spec()); | 54 dict->SetString("original_url", original_url->GetOrigin().spec()); |
| 55 dict->SetString("url", url->GetOrigin().spec()); | 55 dict->SetString("url", url->GetOrigin().spec()); |
| 56 dict->SetString("alternative_service", alternative_service->ToString()); | 56 dict->SetString("alternative_service", alternative_service->ToString()); |
| 57 dict->SetString("priority", RequestPriorityToString(priority)); | 57 dict->SetString("priority", RequestPriorityToString(priority)); |
| 58 return dict; | 58 return dict; |
| 59 } | 59 } |
| 60 | 60 |
| 61 // Returns parameters associated with the Proto (with NPN negotiation) of a HTTP | 61 // Returns parameters associated with the Proto (with NPN negotiation) of a HTTP |
| 62 // stream. | 62 // stream. |
| 63 base::Value* NetLogHttpStreamProtoCallback( | 63 base::Value* NetLogHttpStreamProtoCallback( |
| 64 const SSLClientSocket::NextProtoStatus status, | 64 const SSLClientSocket::NextProtoStatus status, |
| 65 const std::string* proto, | 65 const std::string* proto, |
| 66 NetLog::LogLevel /* log_level */) { | 66 NetLogCaptureMode /* capture_mode */) { |
| 67 base::DictionaryValue* dict = new base::DictionaryValue(); | 67 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 68 | 68 |
| 69 dict->SetString("next_proto_status", | 69 dict->SetString("next_proto_status", |
| 70 SSLClientSocket::NextProtoStatusToString(status)); | 70 SSLClientSocket::NextProtoStatusToString(status)); |
| 71 dict->SetString("proto", *proto); | 71 dict->SetString("proto", *proto); |
| 72 return dict; | 72 return dict; |
| 73 } | 73 } |
| 74 | 74 |
| 75 HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory, | 75 HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory, |
| 76 HttpNetworkSession* session, | 76 HttpNetworkSession* session, |
| (...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 if (scheme == "https" || scheme == "wss" || IsSpdyAlternate()) | 1474 if (scheme == "https" || scheme == "wss" || IsSpdyAlternate()) |
| 1475 return ClientSocketPoolManager::SSL_GROUP; | 1475 return ClientSocketPoolManager::SSL_GROUP; |
| 1476 | 1476 |
| 1477 if (scheme == "ftp") | 1477 if (scheme == "ftp") |
| 1478 return ClientSocketPoolManager::FTP_GROUP; | 1478 return ClientSocketPoolManager::FTP_GROUP; |
| 1479 | 1479 |
| 1480 return ClientSocketPoolManager::NORMAL_GROUP; | 1480 return ClientSocketPoolManager::NORMAL_GROUP; |
| 1481 } | 1481 } |
| 1482 | 1482 |
| 1483 } // namespace net | 1483 } // namespace net |
| OLD | NEW |