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

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

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: s/which/whose/ 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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool fatal) OVERRIDE; 83 bool fatal) OVERRIDE;
84 virtual void OnBeforeNetworkStart(net::URLRequest* request, 84 virtual void OnBeforeNetworkStart(net::URLRequest* request,
85 bool* defer) OVERRIDE; 85 bool* defer) OVERRIDE;
86 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE; 86 virtual void OnResponseStarted(net::URLRequest* request) OVERRIDE;
87 virtual void OnReadCompleted(net::URLRequest* request, 87 virtual void OnReadCompleted(net::URLRequest* request,
88 int bytes_read) OVERRIDE; 88 int bytes_read) OVERRIDE;
89 89
90 const net::HttpResponseInfo* http_info() const; 90 const net::HttpResponseInfo* http_info() const;
91 91
92 void GetExtraResponseInfo(bool* was_fetched_via_service_worker, 92 void GetExtraResponseInfo(bool* was_fetched_via_service_worker,
93 bool* was_fallback_required_by_service_worker,
93 GURL* original_url_via_service_worker, 94 GURL* original_url_via_service_worker,
94 base::TimeTicks* fetch_start_time, 95 base::TimeTicks* fetch_start_time,
95 base::TimeTicks* fetch_ready_time, 96 base::TimeTicks* fetch_ready_time,
96 base::TimeTicks* fetch_end_time) const; 97 base::TimeTicks* fetch_end_time) const;
97 98
98 protected: 99 protected:
99 virtual ~ServiceWorkerURLRequestJob(); 100 virtual ~ServiceWorkerURLRequestJob();
100 101
101 private: 102 private:
102 enum ResponseType { 103 enum ResponseType {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 scoped_ptr<net::HttpResponseInfo> http_response_info_; 154 scoped_ptr<net::HttpResponseInfo> http_response_info_;
154 // Headers that have not yet been committed to |http_response_info_|. 155 // Headers that have not yet been committed to |http_response_info_|.
155 scoped_refptr<net::HttpResponseHeaders> http_response_headers_; 156 scoped_refptr<net::HttpResponseHeaders> http_response_headers_;
156 GURL response_url_; 157 GURL response_url_;
157 158
158 // Used when response type is FORWARD_TO_SERVICE_WORKER. 159 // Used when response type is FORWARD_TO_SERVICE_WORKER.
159 scoped_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_; 160 scoped_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher_;
160 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; 161 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_;
161 scoped_ptr<net::URLRequest> blob_request_; 162 scoped_ptr<net::URLRequest> blob_request_;
162 FetchRequestMode request_mode_; 163 FetchRequestMode request_mode_;
164 bool fall_back_required_;
163 // ResourceRequestBody has a collection of BlobDataHandles attached to it 165 // ResourceRequestBody has a collection of BlobDataHandles attached to it
164 // using the userdata mechanism. So we have to keep it not to free the blobs. 166 // using the userdata mechanism. So we have to keep it not to free the blobs.
165 scoped_refptr<ResourceRequestBody> body_; 167 scoped_refptr<ResourceRequestBody> body_;
166 scoped_ptr<storage::BlobDataHandle> request_body_blob_data_handle_; 168 scoped_ptr<storage::BlobDataHandle> request_body_blob_data_handle_;
167 169
168 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; 170 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
169 171
170 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); 172 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob);
171 }; 173 };
172 174
173 } // namespace content 175 } // namespace content
174 176
175 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 177 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698