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

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

Issue 2654663004: [Not for review] record detailed time breakdown of SW related requests.
Patch Set: add stream uma Created 3 years, 10 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_CONTEXT_REQUEST_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/time/time.h"
11 #include "content/browser/service_worker/service_worker_request_handler.h" 12 #include "content/browser/service_worker/service_worker_request_handler.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 class ServiceWorkerVersion; 16 class ServiceWorkerVersion;
16 17
17 // A request handler derivative used to handle requests from 18 // A request handler derivative used to handle requests from
18 // service workers. 19 // service workers.
19 class CONTENT_EXPORT ServiceWorkerContextRequestHandler 20 class CONTENT_EXPORT ServiceWorkerContextRequestHandler
20 : public ServiceWorkerRequestHandler { 21 : public ServiceWorkerRequestHandler {
(...skipping 30 matching lines...) Expand all
51 ERROR_OUT_OF_RESOURCE_IDS, 52 ERROR_OUT_OF_RESOURCE_IDS,
52 // Add new types here. 53 // Add new types here.
53 54
54 NUM_TYPES 55 NUM_TYPES
55 }; 56 };
56 57
57 ServiceWorkerContextRequestHandler( 58 ServiceWorkerContextRequestHandler(
58 base::WeakPtr<ServiceWorkerContextCore> context, 59 base::WeakPtr<ServiceWorkerContextCore> context,
59 base::WeakPtr<ServiceWorkerProviderHost> provider_host, 60 base::WeakPtr<ServiceWorkerProviderHost> provider_host,
60 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, 61 base::WeakPtr<storage::BlobStorageContext> blob_storage_context,
61 ResourceType resource_type); 62 ResourceType resource_type,
63 base::TimeTicks request_start);
62 ~ServiceWorkerContextRequestHandler() override; 64 ~ServiceWorkerContextRequestHandler() override;
63 65
64 // Called via custom URLRequestJobFactory. 66 // Called via custom URLRequestJobFactory.
65 net::URLRequestJob* MaybeCreateJob( 67 net::URLRequestJob* MaybeCreateJob(
66 net::URLRequest* request, 68 net::URLRequest* request,
67 net::NetworkDelegate* network_delegate, 69 net::NetworkDelegate* network_delegate,
68 ResourceContext* resource_context) override; 70 ResourceContext* resource_context) override;
69 71
70 static std::string CreateJobStatusToString(CreateJobStatus status); 72 static std::string CreateJobStatusToString(CreateJobStatus status);
71 73
72 private: 74 private:
73 net::URLRequestJob* MaybeCreateJobImpl(net::URLRequest* request, 75 net::URLRequestJob* MaybeCreateJobImpl(net::URLRequest* request,
74 net::NetworkDelegate* network_delegate, 76 net::NetworkDelegate* network_delegate,
75 CreateJobStatus* out_status); 77 CreateJobStatus* out_status);
76 78
77 scoped_refptr<ServiceWorkerVersion> version_; 79 scoped_refptr<ServiceWorkerVersion> version_;
80 const base::TimeTicks creation_time;
78 81
79 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler); 82 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler);
80 }; 83 };
81 84
82 } // namespace content 85 } // namespace content
83 86
84 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER _H_ 87 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698