OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/child/web_url_loader_impl.h" | 5 #include "content/child/web_url_loader_impl.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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 void WebURLLoaderImpl::PopulateURLResponse(const GURL& url, | 880 void WebURLLoaderImpl::PopulateURLResponse(const GURL& url, |
881 const ResourceResponseInfo& info, | 881 const ResourceResponseInfo& info, |
882 WebURLResponse* response, | 882 WebURLResponse* response, |
883 bool report_security_info) { | 883 bool report_security_info) { |
884 response->setURL(url); | 884 response->setURL(url); |
885 response->setResponseTime(info.response_time.ToInternalValue()); | 885 response->setResponseTime(info.response_time.ToInternalValue()); |
886 response->setMIMEType(WebString::fromUTF8(info.mime_type)); | 886 response->setMIMEType(WebString::fromUTF8(info.mime_type)); |
887 response->setTextEncodingName(WebString::fromUTF8(info.charset)); | 887 response->setTextEncodingName(WebString::fromUTF8(info.charset)); |
888 response->setExpectedContentLength(info.content_length); | 888 response->setExpectedContentLength(info.content_length); |
889 response->setSecurityInfo(info.security_info); | 889 response->setSecurityInfo(info.security_info); |
890 response->setHasMajorCertificateErrors(info.has_major_certificate_errors); | |
891 response->setAppCacheID(info.appcache_id); | 890 response->setAppCacheID(info.appcache_id); |
892 response->setAppCacheManifestURL(info.appcache_manifest_url); | 891 response->setAppCacheManifestURL(info.appcache_manifest_url); |
893 response->setWasCached(!info.load_timing.request_start_time.is_null() && | 892 response->setWasCached(!info.load_timing.request_start_time.is_null() && |
894 info.response_time < info.load_timing.request_start_time); | 893 info.response_time < info.load_timing.request_start_time); |
895 response->setRemoteIPAddress( | 894 response->setRemoteIPAddress( |
896 WebString::fromUTF8(info.socket_address.host())); | 895 WebString::fromUTF8(info.socket_address.host())); |
897 response->setRemotePort(info.socket_address.port()); | 896 response->setRemotePort(info.socket_address.port()); |
898 response->setConnectionID(info.load_timing.socket_log_id); | 897 response->setConnectionID(info.load_timing.socket_log_id); |
899 response->setConnectionReused(info.load_timing.socket_reused); | 898 response->setConnectionReused(info.load_timing.socket_reused); |
900 response->setDownloadFilePath(info.download_file_path.AsUTF16Unsafe()); | 899 response->setDownloadFilePath(info.download_file_path.AsUTF16Unsafe()); |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1092 } | 1091 } |
1093 | 1092 |
1094 void WebURLLoaderImpl::setLoadingTaskRunner( | 1093 void WebURLLoaderImpl::setLoadingTaskRunner( |
1095 blink::WebTaskRunner* loading_task_runner) { | 1094 blink::WebTaskRunner* loading_task_runner) { |
1096 // There's no guarantee on the lifetime of |loading_task_runner| so we take a | 1095 // There's no guarantee on the lifetime of |loading_task_runner| so we take a |
1097 // copy. | 1096 // copy. |
1098 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); | 1097 context_->SetWebTaskRunner(make_scoped_ptr(loading_task_runner->clone())); |
1099 } | 1098 } |
1100 | 1099 |
1101 } // namespace content | 1100 } // namespace content |
OLD | NEW |