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

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

Issue 1146253004: Add workerReady timing for ServiceWorker controlled requests [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void OnDataAvailable(Stream* stream) override; 107 void OnDataAvailable(Stream* stream) override;
108 108
109 // StreamRegisterObserver override: 109 // StreamRegisterObserver override:
110 void OnStreamRegistered(Stream* stream) override; 110 void OnStreamRegistered(Stream* stream) override;
111 111
112 void GetExtraResponseInfo( 112 void GetExtraResponseInfo(
113 bool* was_fetched_via_service_worker, 113 bool* was_fetched_via_service_worker,
114 bool* was_fallback_required_by_service_worker, 114 bool* was_fallback_required_by_service_worker,
115 GURL* original_url_via_service_worker, 115 GURL* original_url_via_service_worker,
116 blink::WebServiceWorkerResponseType* response_type_via_service_worker, 116 blink::WebServiceWorkerResponseType* response_type_via_service_worker,
117 base::TimeTicks* worker_start_time) const; 117 base::TimeTicks* worker_start_time,
118 base::TimeTicks* worker_ready_time) const;
118 119
119 const base::TimeTicks& worker_start_time() const { 120 const base::TimeTicks& worker_start_time() const {
120 return worker_start_time_; 121 return worker_start_time_;
121 } 122 }
123 const base::TimeTicks& worker_ready_time() const {
124 return worker_ready_time_;
125 }
122 126
123 protected: 127 protected:
124 ~ServiceWorkerURLRequestJob() override; 128 ~ServiceWorkerURLRequestJob() override;
125 129
126 private: 130 private:
127 enum ResponseType { 131 enum ResponseType {
128 NOT_DETERMINED, 132 NOT_DETERMINED,
129 FALLBACK_TO_NETWORK, 133 FALLBACK_TO_NETWORK,
130 FORWARD_TO_SERVICE_WORKER, 134 FORWARD_TO_SERVICE_WORKER,
131 }; 135 };
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Releases the resources for streaming. 169 // Releases the resources for streaming.
166 void ClearStream(); 170 void ClearStream();
167 171
168 const net::HttpResponseInfo* http_info() const; 172 const net::HttpResponseInfo* http_info() const;
169 173
170 base::WeakPtr<ServiceWorkerProviderHost> provider_host_; 174 base::WeakPtr<ServiceWorkerProviderHost> provider_host_;
171 175
172 // Timing info to show on the popup in Devtools' Network tab. 176 // Timing info to show on the popup in Devtools' Network tab.
173 net::LoadTimingInfo load_timing_info_; 177 net::LoadTimingInfo load_timing_info_;
174 base::TimeTicks worker_start_time_; 178 base::TimeTicks worker_start_time_;
179 base::TimeTicks worker_ready_time_;
175 base::Time response_time_; 180 base::Time response_time_;
176 181
177 ResponseType response_type_; 182 ResponseType response_type_;
178 bool is_started_; 183 bool is_started_;
179 184
180 net::HttpByteRange byte_range_; 185 net::HttpByteRange byte_range_;
181 scoped_ptr<net::HttpResponseInfo> range_response_info_; 186 scoped_ptr<net::HttpResponseInfo> range_response_info_;
182 scoped_ptr<net::HttpResponseInfo> http_response_info_; 187 scoped_ptr<net::HttpResponseInfo> http_response_info_;
183 // Headers that have not yet been committed to |http_response_info_|. 188 // Headers that have not yet been committed to |http_response_info_|.
184 scoped_refptr<net::HttpResponseHeaders> http_response_headers_; 189 scoped_refptr<net::HttpResponseHeaders> http_response_headers_;
(...skipping 23 matching lines...) Expand all
208 scoped_refptr<ServiceWorkerVersion> streaming_version_; 213 scoped_refptr<ServiceWorkerVersion> streaming_version_;
209 214
210 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; 215 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
211 216
212 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); 217 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob);
213 }; 218 };
214 219
215 } // namespace content 220 } // namespace content
216 221
217 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 222 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698