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

Side by Side Diff: content/browser/service_worker/service_worker_url_request_job.cc

Issue 1915833002: Introduce Platform::cacheMetadataInCacheStorage() to store V8 code cache in CacheStorage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments in render_process_messages.h Created 4 years, 7 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 #include "content/browser/service_worker/service_worker_url_request_job.h" 5 #include "content/browser/service_worker/service_worker_url_request_job.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 header.append(it->second); 741 header.append(it->second);
742 http_response_headers_->AddHeader(header); 742 http_response_headers_->AddHeader(header);
743 } 743 }
744 } 744 }
745 745
746 void ServiceWorkerURLRequestJob::CommitResponseHeader() { 746 void ServiceWorkerURLRequestJob::CommitResponseHeader() {
747 if (!http_response_info_) 747 if (!http_response_info_)
748 http_response_info_.reset(new net::HttpResponseInfo()); 748 http_response_info_.reset(new net::HttpResponseInfo());
749 http_response_info_->headers.swap(http_response_headers_); 749 http_response_info_->headers.swap(http_response_headers_);
750 http_response_info_->vary_data = net::HttpVaryData(); 750 http_response_info_->vary_data = net::HttpVaryData();
751 http_response_info_->metadata = nullptr; 751 http_response_info_->metadata =
752 blob_request_ ? blob_request_->response_info().metadata : nullptr;
752 NotifyHeadersComplete(); 753 NotifyHeadersComplete();
753 } 754 }
754 755
755 void ServiceWorkerURLRequestJob::DeliverErrorResponse() { 756 void ServiceWorkerURLRequestJob::DeliverErrorResponse() {
756 // TODO(falken): Print an error to the console of the ServiceWorker and of 757 // TODO(falken): Print an error to the console of the ServiceWorker and of
757 // the requesting page. 758 // the requesting page.
758 CreateResponseHeader( 759 CreateResponseHeader(
759 500, "Service Worker Response Error", ServiceWorkerHeaderMap()); 760 500, "Service Worker Response Error", ServiceWorkerHeaderMap());
760 CommitResponseHeader(); 761 CommitResponseHeader();
761 } 762 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 service_worker_response_type_, worker_start_time_, 855 service_worker_response_type_, worker_start_time_,
855 worker_ready_time_, response_is_in_cache_storage_, 856 worker_ready_time_, response_is_in_cache_storage_,
856 response_cache_storage_cache_name_); 857 response_cache_storage_cache_name_);
857 } 858 }
858 859
859 bool ServiceWorkerURLRequestJob::IsMainResourceLoad() const { 860 bool ServiceWorkerURLRequestJob::IsMainResourceLoad() const {
860 return ServiceWorkerUtils::IsMainResourceType(resource_type_); 861 return ServiceWorkerUtils::IsMainResourceType(resource_type_);
861 } 862 }
862 863
863 } // namespace content 864 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698