| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. | 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. |
| 6 | 6 |
| 7 #include "webkit/glue/weburlloader_impl.h" | 7 #include "webkit/glue/weburlloader_impl.h" |
| 8 | 8 |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 response->setSecurityInfo(info.security_info); | 182 response->setSecurityInfo(info.security_info); |
| 183 response->setAppCacheID(info.appcache_id); | 183 response->setAppCacheID(info.appcache_id); |
| 184 response->setAppCacheManifestURL(info.appcache_manifest_url); | 184 response->setAppCacheManifestURL(info.appcache_manifest_url); |
| 185 response->setWasCached(!info.load_timing.base_time.is_null() && | 185 response->setWasCached(!info.load_timing.base_time.is_null() && |
| 186 info.response_time < info.load_timing.base_time); | 186 info.response_time < info.load_timing.base_time); |
| 187 response->setWasFetchedViaSPDY(info.was_fetched_via_spdy); | 187 response->setWasFetchedViaSPDY(info.was_fetched_via_spdy); |
| 188 response->setWasNpnNegotiated(info.was_npn_negotiated); | 188 response->setWasNpnNegotiated(info.was_npn_negotiated); |
| 189 response->setWasAlternateProtocolAvailable( | 189 response->setWasAlternateProtocolAvailable( |
| 190 info.was_alternate_protocol_available); | 190 info.was_alternate_protocol_available); |
| 191 response->setWasFetchedViaProxy(info.was_fetched_via_proxy); | 191 response->setWasFetchedViaProxy(info.was_fetched_via_proxy); |
| 192 response->setSocketAddress(WebString::fromUTF8(info.socket_address)); |
| 192 response->setConnectionID(info.connection_id); | 193 response->setConnectionID(info.connection_id); |
| 193 response->setConnectionReused(info.connection_reused); | 194 response->setConnectionReused(info.connection_reused); |
| 194 response->setDownloadFilePath(FilePathToWebString(info.download_file_path)); | 195 response->setDownloadFilePath(FilePathToWebString(info.download_file_path)); |
| 195 | 196 |
| 196 WebURLLoadTiming timing; | 197 WebURLLoadTiming timing; |
| 197 timing.initialize(); | 198 timing.initialize(); |
| 198 const ResourceLoadTimingInfo& timing_info = info.load_timing; | 199 const ResourceLoadTimingInfo& timing_info = info.load_timing; |
| 199 timing.setRequestTime(timing_info.base_time.ToDoubleT()); | 200 timing.setRequestTime(timing_info.base_time.ToDoubleT()); |
| 200 timing.setProxyStart(timing_info.proxy_start); | 201 timing.setProxyStart(timing_info.proxy_start); |
| 201 timing.setProxyEnd(timing_info.proxy_end); | 202 timing.setProxyEnd(timing_info.proxy_end); |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 | 753 |
| 753 void WebURLLoaderImpl::cancel() { | 754 void WebURLLoaderImpl::cancel() { |
| 754 context_->Cancel(); | 755 context_->Cancel(); |
| 755 } | 756 } |
| 756 | 757 |
| 757 void WebURLLoaderImpl::setDefersLoading(bool value) { | 758 void WebURLLoaderImpl::setDefersLoading(bool value) { |
| 758 context_->SetDefersLoading(value); | 759 context_->SetDefersLoading(value); |
| 759 } | 760 } |
| 760 | 761 |
| 761 } // namespace webkit_glue | 762 } // namespace webkit_glue |
| OLD | NEW |