| 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 #include "webkit/browser/appcache/appcache_update_job.h" | 9 #include "webkit/browser/appcache/appcache_update_job.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 static void CountReinitAttempt(bool repeated_attempt); | 24 static void CountReinitAttempt(bool repeated_attempt); |
| 25 static void CountCorruptionDetected(); | 25 static void CountCorruptionDetected(); |
| 26 static void CountUpdateJobResult(AppCacheUpdateJob::ResultType result, | 26 static void CountUpdateJobResult(AppCacheUpdateJob::ResultType result, |
| 27 const GURL& origin_url); | 27 const GURL& origin_url); |
| 28 enum CheckResponseResultType { | 28 enum CheckResponseResultType { |
| 29 RESPONSE_OK, MANIFEST_OUT_OF_DATE, RESPONSE_OUT_OF_DATE, ENTRY_NOT_FOUND, | 29 RESPONSE_OK, MANIFEST_OUT_OF_DATE, RESPONSE_OUT_OF_DATE, ENTRY_NOT_FOUND, |
| 30 READ_HEADERS_ERROR, READ_DATA_ERROR, UNEXPECTED_DATA_SIZE, CHECK_CANCELED, | 30 READ_HEADERS_ERROR, READ_DATA_ERROR, UNEXPECTED_DATA_SIZE, CHECK_CANCELED, |
| 31 NUM_CHECK_RESPONSE_RESULT_TYPES | 31 NUM_CHECK_RESPONSE_RESULT_TYPES |
| 32 }; | 32 }; |
| 33 static void CountCheckResponseResult(CheckResponseResultType result); | 33 static void CountCheckResponseResult(CheckResponseResultType result); |
| 34 | 34 static void CountResponseRetrieval( |
| 35 bool success, bool is_main_resource, const GURL& origin_url); |
| 36 static void LogUpdateFailureStats( |
| 37 const GURL& origin_url, |
| 38 int percent_complete, |
| 39 bool was_making_progress, |
| 40 bool off_origin_resource_failure); |
| 35 static void AddTaskQueueTimeSample(const base::TimeDelta& duration); | 41 static void AddTaskQueueTimeSample(const base::TimeDelta& duration); |
| 36 static void AddTaskRunTimeSample(const base::TimeDelta& duration); | 42 static void AddTaskRunTimeSample(const base::TimeDelta& duration); |
| 37 static void AddCompletionQueueTimeSample(const base::TimeDelta& duration); | 43 static void AddCompletionQueueTimeSample(const base::TimeDelta& duration); |
| 38 static void AddCompletionRunTimeSample(const base::TimeDelta& duration); | 44 static void AddCompletionRunTimeSample(const base::TimeDelta& duration); |
| 39 static void AddNetworkJobStartDelaySample(const base::TimeDelta& duration); | 45 static void AddNetworkJobStartDelaySample(const base::TimeDelta& duration); |
| 40 static void AddErrorJobStartDelaySample(const base::TimeDelta& duration); | 46 static void AddErrorJobStartDelaySample(const base::TimeDelta& duration); |
| 41 static void AddAppCacheJobStartDelaySample(const base::TimeDelta& duration); | 47 static void AddAppCacheJobStartDelaySample(const base::TimeDelta& duration); |
| 42 static void AddMissingManifestEntrySample(); | 48 static void AddMissingManifestEntrySample(); |
| 43 | 49 |
| 44 enum MissingManifestCallsiteType { | 50 enum MissingManifestCallsiteType { |
| 45 CALLSITE_0, CALLSITE_1, CALLSITE_2, CALLSITE_3, | 51 CALLSITE_0, CALLSITE_1, CALLSITE_2, CALLSITE_3, |
| 46 NUM_MISSING_MANIFEST_CALLSITE_TYPES | 52 NUM_MISSING_MANIFEST_CALLSITE_TYPES |
| 47 }; | 53 }; |
| 48 static void AddMissingManifestDetectedAtCallsite( | 54 static void AddMissingManifestDetectedAtCallsite( |
| 49 MissingManifestCallsiteType type); | 55 MissingManifestCallsiteType type); |
| 50 | 56 |
| 51 private: | 57 private: |
| 52 DISALLOW_IMPLICIT_CONSTRUCTORS(AppCacheHistograms); | 58 DISALLOW_IMPLICIT_CONSTRUCTORS(AppCacheHistograms); |
| 53 }; | 59 }; |
| 54 | 60 |
| 55 } // namespace appcache | 61 } // namespace appcache |
| 56 | 62 |
| 57 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_ | 63 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_HISTOGRAMS_H_ |
| OLD | NEW |