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

Side by Side Diff: content/child/web_url_loader_impl.cc

Issue 603913002: [ServiceWorker] Add was_fallback_required flag to ResourceResponseInfo. [2/2 chromium] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ByServiceWorker suffix Created 6 years, 2 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
OLDNEW
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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge.
6 6
7 #include "content/child/web_url_loader_impl.h" 7 #include "content/child/web_url_loader_impl.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 response->setAppCacheManifestURL(info.appcache_manifest_url); 771 response->setAppCacheManifestURL(info.appcache_manifest_url);
772 response->setWasCached(!info.load_timing.request_start_time.is_null() && 772 response->setWasCached(!info.load_timing.request_start_time.is_null() &&
773 info.response_time < info.load_timing.request_start_time); 773 info.response_time < info.load_timing.request_start_time);
774 response->setRemoteIPAddress( 774 response->setRemoteIPAddress(
775 WebString::fromUTF8(info.socket_address.host())); 775 WebString::fromUTF8(info.socket_address.host()));
776 response->setRemotePort(info.socket_address.port()); 776 response->setRemotePort(info.socket_address.port());
777 response->setConnectionID(info.load_timing.socket_log_id); 777 response->setConnectionID(info.load_timing.socket_log_id);
778 response->setConnectionReused(info.load_timing.socket_reused); 778 response->setConnectionReused(info.load_timing.socket_reused);
779 response->setDownloadFilePath(info.download_file_path.AsUTF16Unsafe()); 779 response->setDownloadFilePath(info.download_file_path.AsUTF16Unsafe());
780 response->setWasFetchedViaServiceWorker(info.was_fetched_via_service_worker); 780 response->setWasFetchedViaServiceWorker(info.was_fetched_via_service_worker);
781 response->setWasFallbackRequiredByServiceWorker(
782 info.was_fallback_required_by_service_worker);
781 WebURLResponseExtraDataImpl* extra_data = 783 WebURLResponseExtraDataImpl* extra_data =
782 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol); 784 new WebURLResponseExtraDataImpl(info.npn_negotiated_protocol);
783 response->setExtraData(extra_data); 785 response->setExtraData(extra_data);
784 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy); 786 extra_data->set_was_fetched_via_spdy(info.was_fetched_via_spdy);
785 extra_data->set_was_npn_negotiated(info.was_npn_negotiated); 787 extra_data->set_was_npn_negotiated(info.was_npn_negotiated);
786 extra_data->set_was_alternate_protocol_available( 788 extra_data->set_was_alternate_protocol_available(
787 info.was_alternate_protocol_available); 789 info.was_alternate_protocol_available);
788 extra_data->set_connection_info(info.connection_info); 790 extra_data->set_connection_info(info.connection_info);
789 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy); 791 extra_data->set_was_fetched_via_proxy(info.was_fetched_via_proxy);
790 792
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 int intra_priority_value) { 922 int intra_priority_value) {
921 context_->DidChangePriority(new_priority, intra_priority_value); 923 context_->DidChangePriority(new_priority, intra_priority_value);
922 } 924 }
923 925
924 bool WebURLLoaderImpl::attachThreadedDataReceiver( 926 bool WebURLLoaderImpl::attachThreadedDataReceiver(
925 blink::WebThreadedDataReceiver* threaded_data_receiver) { 927 blink::WebThreadedDataReceiver* threaded_data_receiver) {
926 return context_->AttachThreadedDataReceiver(threaded_data_receiver); 928 return context_->AttachThreadedDataReceiver(threaded_data_receiver);
927 } 929 }
928 930
929 } // namespace content 931 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698