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

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

Issue 622813002: [Manifest] Add metrics recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen_orientation_usage_count
Patch Set: Created 6 years, 2 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/renderer/manifest/manifest_uma_util.h"
6
7 #include "base/metrics/histogram.h"
8 #include "content/public/common/manifest.h"
9
10 namespace content {
11
12 void ManifestUmaUtil::ParsedManifest(const Manifest& manifest) {
13 UMA_HISTOGRAM_BOOLEAN("Manifest.IsEmpty", manifest.IsEmpty());
Miguel Garcia 2014/10/02 14:26:46 you could early return here if it's empty.
mlamouri (slow - plz ping) 2014/10/02 15:35:06 Done.
14 UMA_HISTOGRAM_BOOLEAN("Manifest.name", !manifest.name.is_null());
15 UMA_HISTOGRAM_BOOLEAN("Manifest.short_name", !manifest.short_name.is_null());
16 UMA_HISTOGRAM_BOOLEAN("Manifest.start_url", !manifest.start_url.is_empty());
17 UMA_HISTOGRAM_BOOLEAN("Manifest.display",
18 manifest.display != Manifest::DISPLAY_MODE_UNSPECIFIED);
19 UMA_HISTOGRAM_BOOLEAN("Manifest.orientation",
20 manifest.orientation != blink::WebScreenOrientationLockDefault);
21 UMA_HISTOGRAM_BOOLEAN("Manifest.icons", !manifest.icons.empty());
22 UMA_HISTOGRAM_BOOLEAN("Manifest.gcm_sender_id",
23 !manifest.gcm_sender_id.is_null());
Miguel Garcia 2014/10/02 14:26:46 what if it's empty?
mlamouri (slow - plz ping) 2014/10/02 15:35:06 It will be null if the value was not present of fa
24 }
25
26 void ManifestUmaUtil::FetchSucceeded() {
27 UMA_HISTOGRAM_BOOLEAN("Manifest.FetchSuccess", true);
28 }
29
30 void ManifestUmaUtil::FetchFailed() {
31 UMA_HISTOGRAM_BOOLEAN("Manifest.FetchSuccess", false);
32 }
33
34 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698