| OLD | NEW |
| 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 | 9 |
| 10 namespace base { | 10 namespace base { |
| 11 class TimeDelta; | 11 class TimeDelta; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace appcache { | 14 namespace appcache { |
| 15 | 15 |
| 16 class AppCacheHistograms { | 16 class AppCacheHistograms { |
| 17 public: | 17 public: |
| 18 enum InitResultType { | 18 enum InitResultType { |
| 19 INIT_OK, SQL_DATABASE_ERROR, DISK_CACHE_ERROR, | 19 INIT_OK, SQL_DATABASE_ERROR, DISK_CACHE_ERROR, |
| 20 NUM_INIT_RESULT_TYPES | 20 NUM_INIT_RESULT_TYPES |
| 21 }; | 21 }; |
| 22 static void CountInitResult(InitResultType init_result); | 22 static void CountInitResult(InitResultType init_result); |
| 23 static void CountReinitAttempt(bool repeated_attempt); | 23 static void CountReinitAttempt(bool repeated_attempt); |
| 24 static void CountCorruptionDetected(); |
| 24 | 25 |
| 25 enum CheckResponseResultType { | 26 enum CheckResponseResultType { |
| 26 RESPONSE_OK, MANIFEST_OUT_OF_DATE, RESPONSE_OUT_OF_DATE, ENTRY_NOT_FOUND, | 27 RESPONSE_OK, MANIFEST_OUT_OF_DATE, RESPONSE_OUT_OF_DATE, ENTRY_NOT_FOUND, |
| 27 READ_HEADERS_ERROR, READ_DATA_ERROR, UNEXPECTED_DATA_SIZE, CHECK_CANCELED, | 28 READ_HEADERS_ERROR, READ_DATA_ERROR, UNEXPECTED_DATA_SIZE, CHECK_CANCELED, |
| 28 NUM_CHECK_RESPONSE_RESULT_TYPES | 29 NUM_CHECK_RESPONSE_RESULT_TYPES |
| 29 }; | 30 }; |
| 30 static void CountCheckResponseResult(CheckResponseResultType result); | 31 static void CountCheckResponseResult(CheckResponseResultType result); |
| 31 | 32 |
| 32 static void AddTaskQueueTimeSample(const base::TimeDelta& duration); | 33 static void AddTaskQueueTimeSample(const base::TimeDelta& duration); |
| 33 static void AddTaskRunTimeSample(const base::TimeDelta& duration); | 34 static void AddTaskRunTimeSample(const base::TimeDelta& duration); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 45 static void AddMissingManifestDetectedAtCallsite( | 46 static void AddMissingManifestDetectedAtCallsite( |
| 46 MissingManifestCallsiteType type); | 47 MissingManifestCallsiteType type); |
| 47 | 48 |
| 48 private: | 49 private: |
| 49 DISALLOW_IMPLICIT_CONSTRUCTORS(AppCacheHistograms); | 50 DISALLOW_IMPLICIT_CONSTRUCTORS(AppCacheHistograms); |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 } // namespace appcache | 53 } // namespace appcache |
| 53 | 54 |
| 54 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_ | 55 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_ |
| OLD | NEW |