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_controllee_request_handler.h

Issue 515753003: Add ServiceWorker timing information on the popup panel in DevTools's Network tab (2/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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_CONTROLLEE_REQUEST_HANDLER _H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "content/browser/service_worker/service_worker_request_handler.h" 9 #include "content/browser/service_worker/service_worker_request_handler.h"
10 10
(...skipping 22 matching lines...) Expand all
33 scoped_refptr<ResourceRequestBody> body); 33 scoped_refptr<ResourceRequestBody> body);
34 virtual ~ServiceWorkerControlleeRequestHandler(); 34 virtual ~ServiceWorkerControlleeRequestHandler();
35 35
36 // Called via custom URLRequestJobFactory. 36 // Called via custom URLRequestJobFactory.
37 virtual net::URLRequestJob* MaybeCreateJob( 37 virtual net::URLRequestJob* MaybeCreateJob(
38 net::URLRequest* request, 38 net::URLRequest* request,
39 net::NetworkDelegate* network_delegate) OVERRIDE; 39 net::NetworkDelegate* network_delegate) OVERRIDE;
40 40
41 virtual void GetExtraResponseInfo( 41 virtual void GetExtraResponseInfo(
42 bool* was_fetched_via_service_worker, 42 bool* was_fetched_via_service_worker,
43 GURL* original_url_via_service_worker) const OVERRIDE; 43 GURL* original_url_via_service_worker,
44 base::TimeTicks* fetch_start_time,
45 base::TimeTicks* fetch_ready_time,
46 base::TimeTicks* fetch_end_time) const OVERRIDE;
44 47
45 private: 48 private:
46 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, 49 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest,
47 ActivateWaitingVersion); 50 ActivateWaitingVersion);
48 typedef ServiceWorkerControlleeRequestHandler self; 51 typedef ServiceWorkerControlleeRequestHandler self;
49 52
50 // For main resource case. 53 // For main resource case.
51 void PrepareForMainResource(const GURL& url); 54 void PrepareForMainResource(const GURL& url);
52 void DidLookupRegistrationForMainResource( 55 void DidLookupRegistrationForMainResource(
53 ServiceWorkerStatusCode status, 56 ServiceWorkerStatusCode status,
54 const scoped_refptr<ServiceWorkerRegistration>& registration); 57 const scoped_refptr<ServiceWorkerRegistration>& registration);
55 void OnVersionStatusChanged( 58 void OnVersionStatusChanged(
56 ServiceWorkerRegistration* registration, 59 ServiceWorkerRegistration* registration,
57 ServiceWorkerVersion* version); 60 ServiceWorkerVersion* version);
58 61
59 // For sub resource case. 62 // For sub resource case.
60 void PrepareForSubResource(); 63 void PrepareForSubResource();
61 64
62 bool is_main_resource_load_; 65 bool is_main_resource_load_;
63 scoped_refptr<ServiceWorkerURLRequestJob> job_; 66 scoped_refptr<ServiceWorkerURLRequestJob> job_;
64 scoped_refptr<ResourceRequestBody> body_; 67 scoped_refptr<ResourceRequestBody> body_;
65 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; 68 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_;
66 69
67 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); 70 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler);
68 }; 71 };
69 72
70 } // namespace content 73 } // namespace content
71 74
72 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_ 75 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698