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 30 matching lines...) Expand all Loading... |
41 #include "net/spdy/spdy_session_pool.h" | 41 #include "net/spdy/spdy_session_pool.h" |
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(const GURL* original_url, | 47 base::Value* NetLogHttpStreamJobCallback(const GURL* original_url, |
48 const GURL* url, | 48 const GURL* url, |
49 const GURL* alternate_url, | 49 const GURL* alternate_url, |
50 RequestPriority priority, | 50 RequestPriority priority, |
51 NetLog::LogLevel /* log_level */) { | 51 NetLogCaptureMode /* capture_mode */) { |
52 base::DictionaryValue* dict = new base::DictionaryValue(); | 52 base::DictionaryValue* dict = new base::DictionaryValue(); |
53 dict->SetString("original_url", original_url->GetOrigin().spec()); | 53 dict->SetString("original_url", original_url->GetOrigin().spec()); |
54 dict->SetString("url", url->GetOrigin().spec()); | 54 dict->SetString("url", url->GetOrigin().spec()); |
55 dict->SetString("alternate_service_url", alternate_url->GetOrigin().spec()); | 55 dict->SetString("alternate_service_url", alternate_url->GetOrigin().spec()); |
56 dict->SetString("priority", RequestPriorityToString(priority)); | 56 dict->SetString("priority", RequestPriorityToString(priority)); |
57 return dict; | 57 return dict; |
58 } | 58 } |
59 | 59 |
60 // Returns parameters associated with the Proto (with NPN negotiation) of a HTTP | 60 // Returns parameters associated with the Proto (with NPN negotiation) of a HTTP |
61 // stream. | 61 // stream. |
62 base::Value* NetLogHttpStreamProtoCallback( | 62 base::Value* NetLogHttpStreamProtoCallback( |
63 const SSLClientSocket::NextProtoStatus status, | 63 const SSLClientSocket::NextProtoStatus status, |
64 const std::string* proto, | 64 const std::string* proto, |
65 NetLog::LogLevel /* log_level */) { | 65 NetLogCaptureMode /* capture_mode */) { |
66 base::DictionaryValue* dict = new base::DictionaryValue(); | 66 base::DictionaryValue* dict = new base::DictionaryValue(); |
67 | 67 |
68 dict->SetString("next_proto_status", | 68 dict->SetString("next_proto_status", |
69 SSLClientSocket::NextProtoStatusToString(status)); | 69 SSLClientSocket::NextProtoStatusToString(status)); |
70 dict->SetString("proto", *proto); | 70 dict->SetString("proto", *proto); |
71 return dict; | 71 return dict; |
72 } | 72 } |
73 | 73 |
74 HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory, | 74 HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory, |
75 HttpNetworkSession* session, | 75 HttpNetworkSession* session, |
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1498 if (scheme == "ftp") | 1498 if (scheme == "ftp") |
1499 return ClientSocketPoolManager::FTP_GROUP; | 1499 return ClientSocketPoolManager::FTP_GROUP; |
1500 | 1500 |
1501 if (scheme == "https" || scheme == "wss") | 1501 if (scheme == "https" || scheme == "wss") |
1502 return ClientSocketPoolManager::SSL_GROUP; | 1502 return ClientSocketPoolManager::SSL_GROUP; |
1503 | 1503 |
1504 return ClientSocketPoolManager::NORMAL_GROUP; | 1504 return ClientSocketPoolManager::NORMAL_GROUP; |
1505 } | 1505 } |
1506 | 1506 |
1507 } // namespace net | 1507 } // namespace net |
OLD | NEW |