OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/renderer/manifest/manifest_uma_util.h" | 5 #include "content/renderer/manifest/manifest_uma_util.h" |
6 | 6 |
7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "content/public/common/manifest.h" | 8 #include "content/public/common/manifest.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 26 matching lines...) Expand all Loading... |
37 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.name", !manifest.name.is_null()); | 37 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.name", !manifest.name.is_null()); |
38 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.short_name", | 38 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.short_name", |
39 !manifest.short_name.is_null()); | 39 !manifest.short_name.is_null()); |
40 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.start_url", | 40 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.start_url", |
41 !manifest.start_url.is_empty()); | 41 !manifest.start_url.is_empty()); |
42 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.display", | 42 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.display", |
43 manifest.display != blink::WebDisplayModeUndefined); | 43 manifest.display != blink::WebDisplayModeUndefined); |
44 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.orientation", | 44 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.orientation", |
45 manifest.orientation != blink::WebScreenOrientationLockDefault); | 45 manifest.orientation != blink::WebScreenOrientationLockDefault); |
46 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.icons", !manifest.icons.empty()); | 46 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.icons", !manifest.icons.empty()); |
| 47 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.share_target", |
| 48 manifest.share_target.has_value()); |
47 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.gcm_sender_id", | 49 UMA_HISTOGRAM_BOOLEAN("Manifest.HasProperty.gcm_sender_id", |
48 !manifest.gcm_sender_id.is_null()); | 50 !manifest.gcm_sender_id.is_null()); |
49 } | 51 } |
50 | 52 |
51 void ManifestUmaUtil::ParseFailed() { | 53 void ManifestUmaUtil::ParseFailed() { |
52 UMA_HISTOGRAM_BOOLEAN(kUMANameParseSuccess, false); | 54 UMA_HISTOGRAM_BOOLEAN(kUMANameParseSuccess, false); |
53 } | 55 } |
54 | 56 |
55 void ManifestUmaUtil::FetchSucceeded() { | 57 void ManifestUmaUtil::FetchSucceeded() { |
56 UMA_HISTOGRAM_ENUMERATION(kUMANameFetchResult, | 58 UMA_HISTOGRAM_ENUMERATION(kUMANameFetchResult, |
(...skipping 12 matching lines...) Expand all Loading... |
69 break; | 71 break; |
70 } | 72 } |
71 DCHECK_NE(fetch_result_type, MANIFEST_FETCH_RESULT_TYPE_COUNT); | 73 DCHECK_NE(fetch_result_type, MANIFEST_FETCH_RESULT_TYPE_COUNT); |
72 | 74 |
73 UMA_HISTOGRAM_ENUMERATION(kUMANameFetchResult, | 75 UMA_HISTOGRAM_ENUMERATION(kUMANameFetchResult, |
74 fetch_result_type, | 76 fetch_result_type, |
75 MANIFEST_FETCH_RESULT_TYPE_COUNT); | 77 MANIFEST_FETCH_RESULT_TYPE_COUNT); |
76 } | 78 } |
77 | 79 |
78 } // namespace content | 80 } // namespace content |
OLD | NEW |