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

Side by Side Diff: content/renderer/manifest/manifest_uma_util.cc

Issue 2637003002: Add share_target field to Manifest. (Closed)
Patch Set: Changed share_target type to base::Optional, and fixed tests, according to feedback. Created 3 years, 11 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
« no previous file with comments | « content/renderer/manifest/manifest_parser_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/renderer/manifest/manifest_parser_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698