• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_HISTOGRAMS_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_HISTOGRAMS_H_
7 
8 #include "base/macros.h"
9 
10 namespace content {
11 
12 class ServiceWorkerHistograms {
13  public:
14   enum ReadResponseResult {
15     READ_OK,
16     READ_HEADERS_ERROR,
17     READ_DATA_ERROR,
18     NUM_READ_RESPONSE_RESULT_TYPES,
19   };
20 
21   enum WriteResponseResult {
22     WRITE_OK,
23     WRITE_HEADERS_ERROR,
24     WRITE_DATA_ERROR,
25     NUM_WRITE_RESPONSE_RESULT_TYPES,
26   };
27 
28   static void CountInitDiskCacheResult(bool result);
29   static void CountReadResponseResult(ReadResponseResult result);
30   static void CountWriteResponseResult(WriteResponseResult result);
31 
32  private:
33   DISALLOW_IMPLICIT_CONSTRUCTORS(ServiceWorkerHistograms);
34 };
35 
36 }  // namespace content
37 
38 #endif  // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_HISTOGRAMS_H_
39