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

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

Issue 2516353002: Introduce url_list to the Response scheme of CacheStorage. (Closed)
Patch Set: Created 4 years 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 #include "content/child/web_url_loader_impl.h" 5 #include "content/child/web_url_loader_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 response->setRemotePort(info.socket_address.port()); 1047 response->setRemotePort(info.socket_address.port());
1048 response->setConnectionID(info.load_timing.socket_log_id); 1048 response->setConnectionID(info.load_timing.socket_log_id);
1049 response->setConnectionReused(info.load_timing.socket_reused); 1049 response->setConnectionReused(info.load_timing.socket_reused);
1050 response->setDownloadFilePath(info.download_file_path.AsUTF16Unsafe()); 1050 response->setDownloadFilePath(info.download_file_path.AsUTF16Unsafe());
1051 response->setWasFetchedViaSPDY(info.was_fetched_via_spdy); 1051 response->setWasFetchedViaSPDY(info.was_fetched_via_spdy);
1052 response->setWasFetchedViaServiceWorker(info.was_fetched_via_service_worker); 1052 response->setWasFetchedViaServiceWorker(info.was_fetched_via_service_worker);
1053 response->setWasFetchedViaForeignFetch(info.was_fetched_via_foreign_fetch); 1053 response->setWasFetchedViaForeignFetch(info.was_fetched_via_foreign_fetch);
1054 response->setWasFallbackRequiredByServiceWorker( 1054 response->setWasFallbackRequiredByServiceWorker(
1055 info.was_fallback_required_by_service_worker); 1055 info.was_fallback_required_by_service_worker);
1056 response->setServiceWorkerResponseType(info.response_type_via_service_worker); 1056 response->setServiceWorkerResponseType(info.response_type_via_service_worker);
1057 response->setOriginalURLViaServiceWorker( 1057 blink::WebVector<blink::WebURL> url_list_via_service_worker(
1058 info.original_url_via_service_worker); 1058 info.url_list_via_service_worker.size());
1059 std::transform(info.url_list_via_service_worker.begin(),
1060 info.url_list_via_service_worker.end(),
1061 url_list_via_service_worker.begin(),
1062 [](const GURL& url) { return url; });
1063 response->setURLListViaServiceWorker(url_list_via_service_worker);
1059 response->setCacheStorageCacheName( 1064 response->setCacheStorageCacheName(
1060 info.is_in_cache_storage 1065 info.is_in_cache_storage
1061 ? blink::WebString::fromUTF8(info.cache_storage_cache_name) 1066 ? blink::WebString::fromUTF8(info.cache_storage_cache_name)
1062 : blink::WebString()); 1067 : blink::WebString());
1063 blink::WebVector<blink::WebString> cors_exposed_header_names( 1068 blink::WebVector<blink::WebString> cors_exposed_header_names(
1064 info.cors_exposed_header_names.size()); 1069 info.cors_exposed_header_names.size());
1065 std::transform( 1070 std::transform(
1066 info.cors_exposed_header_names.begin(), 1071 info.cors_exposed_header_names.begin(),
1067 info.cors_exposed_header_names.end(), cors_exposed_header_names.begin(), 1072 info.cors_exposed_header_names.end(), cors_exposed_header_names.begin(),
1068 [](const std::string& h) { return blink::WebString::fromLatin1(h); }); 1073 [](const std::string& h) { return blink::WebString::fromLatin1(h); });
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 int intra_priority_value) { 1259 int intra_priority_value) {
1255 context_->DidChangePriority(new_priority, intra_priority_value); 1260 context_->DidChangePriority(new_priority, intra_priority_value);
1256 } 1261 }
1257 1262
1258 void WebURLLoaderImpl::setLoadingTaskRunner( 1263 void WebURLLoaderImpl::setLoadingTaskRunner(
1259 base::SingleThreadTaskRunner* loading_task_runner) { 1264 base::SingleThreadTaskRunner* loading_task_runner) {
1260 context_->SetTaskRunner(loading_task_runner); 1265 context_->SetTaskRunner(loading_task_runner);
1261 } 1266 }
1262 1267
1263 } // namespace content 1268 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698