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

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

Issue 375513002: [ServiceWorker] Propagates ServiceWorker fetched response's URL and wasFetchedViaServiceWorker flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 (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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/child/resource_dispatcher.h" 7 #include "content/child/resource_dispatcher.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 request_info->response_start = ConsumeIOTimestamp(); 351 request_info->response_start = ConsumeIOTimestamp();
352 352
353 if (delegate_) { 353 if (delegate_) {
354 RequestPeer* new_peer = 354 RequestPeer* new_peer =
355 delegate_->OnReceivedResponse( 355 delegate_->OnReceivedResponse(
356 request_info->peer, response_head.mime_type, request_info->url); 356 request_info->peer, response_head.mime_type, request_info->url);
357 if (new_peer) 357 if (new_peer)
358 request_info->peer = new_peer; 358 request_info->peer = new_peer;
359 } 359 }
360 360
361 // Updates the response_url if the response was feched via a ServiceWorker,
tyoshino (SeeGerritForStatus) 2014/07/08 14:27:49 feched -> fetched
horo 2014/07/09 03:15:01 Done.
362 // and it was not generated inside the SherviceWorker.
tyoshino (SeeGerritForStatus) 2014/07/08 14:27:49 Shervice -> Service
tyoshino (SeeGerritForStatus) 2014/07/08 14:27:49 // and -> // and
horo 2014/07/09 03:15:01 Done.
horo 2014/07/09 03:15:01 Done.
363 if (response_head.was_fetched_via_service_worker &&
364 !response_head.original_url_via_service_worker.is_empty()) {
365 request_info->response_url = response_head.original_url_via_service_worker;
366 }
367
361 ResourceResponseInfo renderer_response_info; 368 ResourceResponseInfo renderer_response_info;
362 ToResourceResponseInfo(*request_info, response_head, &renderer_response_info); 369 ToResourceResponseInfo(*request_info, response_head, &renderer_response_info);
363 request_info->site_isolation_metadata = 370 request_info->site_isolation_metadata =
364 SiteIsolationPolicy::OnReceivedResponse(request_info->frame_origin, 371 SiteIsolationPolicy::OnReceivedResponse(request_info->frame_origin,
365 request_info->response_url, 372 request_info->response_url,
366 request_info->resource_type, 373 request_info->resource_type,
367 request_info->origin_pid, 374 request_info->origin_pid,
368 renderer_response_info); 375 renderer_response_info);
369 request_info->peer->OnReceivedResponse(renderer_response_info); 376 request_info->peer->OnReceivedResponse(renderer_response_info);
370 } 377 }
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { 859 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) {
853 while (!queue->empty()) { 860 while (!queue->empty()) {
854 IPC::Message* message = queue->front(); 861 IPC::Message* message = queue->front();
855 ReleaseResourcesInDataMessage(*message); 862 ReleaseResourcesInDataMessage(*message);
856 queue->pop_front(); 863 queue->pop_front();
857 delete message; 864 delete message;
858 } 865 }
859 } 866 }
860 867
861 } // namespace content 868 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698