OLD | NEW |
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_METRICS_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/browser/service_worker/service_worker_database.h" | 9 #include "content/browser/service_worker/service_worker_database.h" |
10 #include "content/common/service_worker/service_worker_types.h" | 10 #include "content/common/service_worker/service_worker_types.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 static void CountReadResponseResult(ReadResponseResult result); | 88 static void CountReadResponseResult(ReadResponseResult result); |
89 static void CountWriteResponseResult(WriteResponseResult result); | 89 static void CountWriteResponseResult(WriteResponseResult result); |
90 | 90 |
91 // Used for ServiceWorkerDatabase. | 91 // Used for ServiceWorkerDatabase. |
92 static void CountOpenDatabaseResult(ServiceWorkerDatabase::Status status); | 92 static void CountOpenDatabaseResult(ServiceWorkerDatabase::Status status); |
93 static void CountReadDatabaseResult(ServiceWorkerDatabase::Status status); | 93 static void CountReadDatabaseResult(ServiceWorkerDatabase::Status status); |
94 static void CountWriteDatabaseResult(ServiceWorkerDatabase::Status status); | 94 static void CountWriteDatabaseResult(ServiceWorkerDatabase::Status status); |
95 static void RecordDestroyDatabaseResult(ServiceWorkerDatabase::Status status); | 95 static void RecordDestroyDatabaseResult(ServiceWorkerDatabase::Status status); |
96 | 96 |
97 // Used for ServiceWorkerStorage. | 97 // Used for ServiceWorkerStorage. |
| 98 static void RecordPurgeResourceResult(int net_error); |
98 static void RecordDeleteAndStartOverResult(DeleteAndStartOverResult result); | 99 static void RecordDeleteAndStartOverResult(DeleteAndStartOverResult result); |
99 static void RecordDiskCacheMigrationResult(DiskCacheMigrationResult result); | 100 static void RecordDiskCacheMigrationResult(DiskCacheMigrationResult result); |
100 | 101 |
101 // Counts the number of page loads controlled by a Service Worker. | 102 // Counts the number of page loads controlled by a Service Worker. |
102 static void CountControlledPageLoad(const GURL& url); | 103 static void CountControlledPageLoad(const GURL& url); |
103 | 104 |
104 // Records the result of trying to start a worker. |is_installed| indicates | 105 // Records the result of trying to start a worker. |is_installed| indicates |
105 // whether the version has been installed. | 106 // whether the version has been installed. |
106 static void RecordStartWorkerStatus(ServiceWorkerStatusCode status, | 107 static void RecordStartWorkerStatus(ServiceWorkerStatusCode status, |
107 bool is_installed); | 108 bool is_installed); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 bool is_main_resource, | 148 bool is_main_resource, |
148 blink::WebServiceWorkerResponseError error); | 149 blink::WebServiceWorkerResponseError error); |
149 | 150 |
150 private: | 151 private: |
151 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); | 152 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics); |
152 }; | 153 }; |
153 | 154 |
154 } // namespace content | 155 } // namespace content |
155 | 156 |
156 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ | 157 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_ |
OLD | NEW |