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

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

Issue 1157823003: Refactoring timing info for ServiceWorker controlled requests [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 #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* fetch_start_time, 117 base::TimeTicks* worker_start_time) const;
118 base::TimeTicks* fetch_ready_time,
119 base::TimeTicks* fetch_end_time) const;
120 118
121 protected: 119 protected:
122 ~ServiceWorkerURLRequestJob() override; 120 ~ServiceWorkerURLRequestJob() override;
123 121
124 private: 122 private:
125 enum ResponseType { 123 enum ResponseType {
126 NOT_DETERMINED, 124 NOT_DETERMINED,
127 FALLBACK_TO_NETWORK, 125 FALLBACK_TO_NETWORK,
128 FORWARD_TO_SERVICE_WORKER, 126 FORWARD_TO_SERVICE_WORKER,
129 }; 127 };
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 160
163 // Releases the resources for streaming. 161 // Releases the resources for streaming.
164 void ClearStream(); 162 void ClearStream();
165 163
166 const net::HttpResponseInfo* http_info() const; 164 const net::HttpResponseInfo* http_info() const;
167 165
168 base::WeakPtr<ServiceWorkerProviderHost> provider_host_; 166 base::WeakPtr<ServiceWorkerProviderHost> provider_host_;
169 167
170 // Timing info to show on the popup in Devtools' Network tab. 168 // Timing info to show on the popup in Devtools' Network tab.
171 net::LoadTimingInfo load_timing_info_; 169 net::LoadTimingInfo load_timing_info_;
172 base::TimeTicks fetch_start_time_; 170 base::TimeTicks worker_start_time_;
173 base::TimeTicks fetch_ready_time_;
174 base::TimeTicks fetch_end_time_;
175 base::Time response_time_; 171 base::Time response_time_;
176 172
177 ResponseType response_type_; 173 ResponseType response_type_;
178 bool is_started_; 174 bool is_started_;
179 175
180 net::HttpByteRange byte_range_; 176 net::HttpByteRange byte_range_;
181 scoped_ptr<net::HttpResponseInfo> range_response_info_; 177 scoped_ptr<net::HttpResponseInfo> range_response_info_;
182 scoped_ptr<net::HttpResponseInfo> http_response_info_; 178 scoped_ptr<net::HttpResponseInfo> http_response_info_;
183 // Headers that have not yet been committed to |http_response_info_|. 179 // Headers that have not yet been committed to |http_response_info_|.
184 scoped_refptr<net::HttpResponseHeaders> http_response_headers_; 180 scoped_refptr<net::HttpResponseHeaders> http_response_headers_;
(...skipping 23 matching lines...) Expand all
208 scoped_refptr<ServiceWorkerVersion> streaming_version_; 204 scoped_refptr<ServiceWorkerVersion> streaming_version_;
209 205
210 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_; 206 base::WeakPtrFactory<ServiceWorkerURLRequestJob> weak_factory_;
211 207
212 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob); 208 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerURLRequestJob);
213 }; 209 };
214 210
215 } // namespace content 211 } // namespace content
216 212
217 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_ 213 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698