[Ozone-Gbm] Explicitly crash if trying software rendering on GBM
[chromium-blink-merge.git] / content / browser / service_worker / service_worker_metrics.h
blobcf2c70065673f2ed2509e67d2477e9c5e9e71572
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_
8 #include "base/macros.h"
9 #include "content/browser/service_worker/service_worker_database.h"
11 class GURL;
13 namespace content {
15 class ServiceWorkerMetrics {
16 public:
17 enum ReadResponseResult {
18 READ_OK,
19 READ_HEADERS_ERROR,
20 READ_DATA_ERROR,
21 NUM_READ_RESPONSE_RESULT_TYPES,
24 enum WriteResponseResult {
25 WRITE_OK,
26 WRITE_HEADERS_ERROR,
27 WRITE_DATA_ERROR,
28 NUM_WRITE_RESPONSE_RESULT_TYPES,
31 // Used for ServiceWorkerDiskCache.
32 static void CountInitDiskCacheResult(bool result);
33 static void CountReadResponseResult(ReadResponseResult result);
34 static void CountWriteResponseResult(WriteResponseResult result);
36 // Used for ServiceWorkerDatabase.
37 static void CountOpenDatabaseResult(ServiceWorkerDatabase::Status status);
38 static void CountReadDatabaseResult(ServiceWorkerDatabase::Status status);
39 static void CountWriteDatabaseResult(ServiceWorkerDatabase::Status status);
41 // Counts the number of page loads controlled by a Service Worker.
42 static void CountControlledPageLoad(const GURL& url);
44 private:
45 DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerMetrics);
48 } // namespace content
50 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_METRICS_H_