OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "chrome/browser/renderer_host/resource_dispatcher_host.h" |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert, | 1132 CertStore::GetSharedInstance()->StoreCert(request->ssl_info().cert, |
1133 info->child_id()); | 1133 info->child_id()); |
1134 response->response_head.security_info = | 1134 response->response_head.security_info = |
1135 SSLManager::SerializeSecurityInfo( | 1135 SSLManager::SerializeSecurityInfo( |
1136 cert_id, request->ssl_info().cert_status, | 1136 cert_id, request->ssl_info().cert_status, |
1137 request->ssl_info().security_bits, | 1137 request->ssl_info().security_bits, |
1138 request->ssl_info().connection_status); | 1138 request->ssl_info().connection_status); |
1139 } else { | 1139 } else { |
1140 // We should not have any SSL state. | 1140 // We should not have any SSL state. |
1141 DCHECK(!request->ssl_info().cert_status && | 1141 DCHECK(!request->ssl_info().cert_status && |
1142 (request->ssl_info().security_bits == -1 || | 1142 request->ssl_info().security_bits == -1 && |
1143 request->ssl_info().security_bits == 0) && | |
1144 !request->ssl_info().connection_status); | 1143 !request->ssl_info().connection_status); |
1145 } | 1144 } |
1146 | 1145 |
1147 NotifyResponseStarted(request, info->child_id()); | 1146 NotifyResponseStarted(request, info->child_id()); |
1148 info->set_called_on_response_started(true); | 1147 info->set_called_on_response_started(true); |
1149 return info->resource_handler()->OnResponseStarted(info->request_id(), | 1148 return info->resource_handler()->OnResponseStarted(info->request_id(), |
1150 response.get()); | 1149 response.get()); |
1151 } | 1150 } |
1152 | 1151 |
1153 void ResourceDispatcherHost::CancelRequest(int child_id, | 1152 void ResourceDispatcherHost::CancelRequest(int child_id, |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1928 return is_prefetch_enabled_; | 1927 return is_prefetch_enabled_; |
1929 } | 1928 } |
1930 | 1929 |
1931 // static | 1930 // static |
1932 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { | 1931 void ResourceDispatcherHost::set_is_prefetch_enabled(bool value) { |
1933 is_prefetch_enabled_ = value; | 1932 is_prefetch_enabled_ = value; |
1934 } | 1933 } |
1935 | 1934 |
1936 // static | 1935 // static |
1937 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; | 1936 bool ResourceDispatcherHost::is_prefetch_enabled_ = false; |
OLD | NEW |