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

Side by Side Diff: webkit/browser/appcache/appcache_histograms.h

Issue 165613002: Add UMA stats for AppCacheUpdateJob results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_ 5 #ifndef WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_
6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_ 6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "webkit/browser/appcache/appcache_update_job.h"
9 10
10 namespace base { 11 namespace base {
11 class TimeDelta; 12 class TimeDelta;
12 } 13 }
13 14
14 namespace appcache { 15 namespace appcache {
15 16
16 class AppCacheHistograms { 17 class AppCacheHistograms {
17 public: 18 public:
18 enum InitResultType { 19 enum InitResultType {
19 INIT_OK, SQL_DATABASE_ERROR, DISK_CACHE_ERROR, 20 INIT_OK, SQL_DATABASE_ERROR, DISK_CACHE_ERROR,
20 NUM_INIT_RESULT_TYPES 21 NUM_INIT_RESULT_TYPES
21 }; 22 };
22 static void CountInitResult(InitResultType init_result); 23 static void CountInitResult(InitResultType init_result);
23 static void CountReinitAttempt(bool repeated_attempt); 24 static void CountReinitAttempt(bool repeated_attempt);
24 static void CountCorruptionDetected(); 25 static void CountCorruptionDetected();
25 26
26 enum CheckResponseResultType { 27 enum CheckResponseResultType {
27 RESPONSE_OK, MANIFEST_OUT_OF_DATE, RESPONSE_OUT_OF_DATE, ENTRY_NOT_FOUND, 28 RESPONSE_OK, MANIFEST_OUT_OF_DATE, RESPONSE_OUT_OF_DATE, ENTRY_NOT_FOUND,
28 READ_HEADERS_ERROR, READ_DATA_ERROR, UNEXPECTED_DATA_SIZE, CHECK_CANCELED, 29 READ_HEADERS_ERROR, READ_DATA_ERROR, UNEXPECTED_DATA_SIZE, CHECK_CANCELED,
29 NUM_CHECK_RESPONSE_RESULT_TYPES 30 NUM_CHECK_RESPONSE_RESULT_TYPES
30 }; 31 };
31 static void CountCheckResponseResult(CheckResponseResultType result); 32 static void CountCheckResponseResult(CheckResponseResultType result);
32 33
34 static void CountUpdateJobResult(AppCacheUpdateJob::ResultType result);
35
33 static void AddTaskQueueTimeSample(const base::TimeDelta& duration); 36 static void AddTaskQueueTimeSample(const base::TimeDelta& duration);
34 static void AddTaskRunTimeSample(const base::TimeDelta& duration); 37 static void AddTaskRunTimeSample(const base::TimeDelta& duration);
35 static void AddCompletionQueueTimeSample(const base::TimeDelta& duration); 38 static void AddCompletionQueueTimeSample(const base::TimeDelta& duration);
36 static void AddCompletionRunTimeSample(const base::TimeDelta& duration); 39 static void AddCompletionRunTimeSample(const base::TimeDelta& duration);
37 static void AddNetworkJobStartDelaySample(const base::TimeDelta& duration); 40 static void AddNetworkJobStartDelaySample(const base::TimeDelta& duration);
38 static void AddErrorJobStartDelaySample(const base::TimeDelta& duration); 41 static void AddErrorJobStartDelaySample(const base::TimeDelta& duration);
39 static void AddAppCacheJobStartDelaySample(const base::TimeDelta& duration); 42 static void AddAppCacheJobStartDelaySample(const base::TimeDelta& duration);
40 static void AddMissingManifestEntrySample(); 43 static void AddMissingManifestEntrySample();
41 44
42 enum MissingManifestCallsiteType { 45 enum MissingManifestCallsiteType {
43 CALLSITE_0, CALLSITE_1, CALLSITE_2, CALLSITE_3, 46 CALLSITE_0, CALLSITE_1, CALLSITE_2, CALLSITE_3,
44 NUM_MISSING_MANIFEST_CALLSITE_TYPES 47 NUM_MISSING_MANIFEST_CALLSITE_TYPES
45 }; 48 };
46 static void AddMissingManifestDetectedAtCallsite( 49 static void AddMissingManifestDetectedAtCallsite(
47 MissingManifestCallsiteType type); 50 MissingManifestCallsiteType type);
48 51
49 private: 52 private:
50 DISALLOW_IMPLICIT_CONSTRUCTORS(AppCacheHistograms); 53 DISALLOW_IMPLICIT_CONSTRUCTORS(AppCacheHistograms);
51 }; 54 };
52 55
53 } // namespace appcache 56 } // namespace appcache
54 57
55 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_ 58 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/browser/appcache/appcache_histograms.cc » ('j') | webkit/browser/appcache/appcache_update_job.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698