Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(697)

Side by Side Diff: webkit/glue/weburlloader_impl.cc

Issue 9413038: SPDY - chrome:loadtimes() should display negotiated NPN protocol. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/glue/weburlresponse_extradata_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // 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/bind.h" 9 #include "base/bind.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 17 matching lines...) Expand all
28 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoadTi ming.h" 28 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoadTi ming.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader Client.h" 29 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoader Client.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" 30 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
31 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h" 31 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h"
32 #include "webkit/glue/ftp_directory_listing_response_delegate.h" 32 #include "webkit/glue/ftp_directory_listing_response_delegate.h"
33 #include "webkit/glue/multipart_response_delegate.h" 33 #include "webkit/glue/multipart_response_delegate.h"
34 #include "webkit/glue/resource_loader_bridge.h" 34 #include "webkit/glue/resource_loader_bridge.h"
35 #include "webkit/glue/webkit_glue.h" 35 #include "webkit/glue/webkit_glue.h"
36 #include "webkit/glue/webkitplatformsupport_impl.h" 36 #include "webkit/glue/webkitplatformsupport_impl.h"
37 #include "webkit/glue/weburlrequest_extradata_impl.h" 37 #include "webkit/glue/weburlrequest_extradata_impl.h"
38 #include "webkit/glue/weburlresponse_extradata_impl.h"
38 39
39 using base::Time; 40 using base::Time;
40 using base::TimeTicks; 41 using base::TimeTicks;
41 using WebKit::WebData; 42 using WebKit::WebData;
42 using WebKit::WebHTTPBody; 43 using WebKit::WebHTTPBody;
43 using WebKit::WebHTTPHeaderVisitor; 44 using WebKit::WebHTTPHeaderVisitor;
44 using WebKit::WebHTTPLoadInfo; 45 using WebKit::WebHTTPLoadInfo;
45 using WebKit::WebReferrerPolicy; 46 using WebKit::WebReferrerPolicy;
46 using WebKit::WebSecurityPolicy; 47 using WebKit::WebSecurityPolicy;
47 using WebKit::WebString; 48 using WebKit::WebString;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 response->setWasNpnNegotiated(info.was_npn_negotiated); 164 response->setWasNpnNegotiated(info.was_npn_negotiated);
164 response->setWasAlternateProtocolAvailable( 165 response->setWasAlternateProtocolAvailable(
165 info.was_alternate_protocol_available); 166 info.was_alternate_protocol_available);
166 response->setWasFetchedViaProxy(info.was_fetched_via_proxy); 167 response->setWasFetchedViaProxy(info.was_fetched_via_proxy);
167 response->setRemoteIPAddress( 168 response->setRemoteIPAddress(
168 WebString::fromUTF8(info.socket_address.host())); 169 WebString::fromUTF8(info.socket_address.host()));
169 response->setRemotePort(info.socket_address.port()); 170 response->setRemotePort(info.socket_address.port());
170 response->setConnectionID(info.connection_id); 171 response->setConnectionID(info.connection_id);
171 response->setConnectionReused(info.connection_reused); 172 response->setConnectionReused(info.connection_reused);
172 response->setDownloadFilePath(FilePathToWebString(info.download_file_path)); 173 response->setDownloadFilePath(FilePathToWebString(info.download_file_path));
174 response->setExtraData(new WebURLResponseExtraDataImpl(
175 info.npn_negotiated_protocol));
173 176
174 const ResourceLoadTimingInfo& timing_info = info.load_timing; 177 const ResourceLoadTimingInfo& timing_info = info.load_timing;
175 if (!timing_info.base_time.is_null()) { 178 if (!timing_info.base_time.is_null()) {
176 WebURLLoadTiming timing; 179 WebURLLoadTiming timing;
177 timing.initialize(); 180 timing.initialize();
178 timing.setRequestTime((timing_info.base_ticks - TimeTicks()).InSecondsF()); 181 timing.setRequestTime((timing_info.base_ticks - TimeTicks()).InSecondsF());
179 timing.setProxyStart(timing_info.proxy_start); 182 timing.setProxyStart(timing_info.proxy_start);
180 timing.setProxyEnd(timing_info.proxy_end); 183 timing.setProxyEnd(timing_info.proxy_end);
181 timing.setDNSStart(timing_info.dns_start); 184 timing.setDNSStart(timing_info.dns_start);
182 timing.setDNSEnd(timing_info.dns_end); 185 timing.setDNSEnd(timing_info.dns_end);
(...skipping 566 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 752
750 void WebURLLoaderImpl::setDefersLoading(bool value) { 753 void WebURLLoaderImpl::setDefersLoading(bool value) {
751 context_->SetDefersLoading(value); 754 context_->SetDefersLoading(value);
752 } 755 }
753 756
754 void WebURLLoaderImpl::UpdateRoutingId(int new_routing_id) { 757 void WebURLLoaderImpl::UpdateRoutingId(int new_routing_id) {
755 context_->UpdateRoutingId(new_routing_id); 758 context_->UpdateRoutingId(new_routing_id);
756 } 759 }
757 760
758 } // namespace webkit_glue 761 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webkit_glue.gypi ('k') | webkit/glue/weburlresponse_extradata_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698