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

Unified Diff: content/renderer/manifest/manifest_uma_util.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/manifest/manifest_parser.cc ('k') | content/renderer/manifest/manifest_uma_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/manifest/manifest_uma_util.h
diff --git a/content/renderer/manifest/manifest_uma_util.h b/content/renderer/manifest/manifest_uma_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..9498145a1d83f5e46542d9b3e3c4bb1110347a70
--- /dev/null
+++ b/content/renderer/manifest/manifest_uma_util.h
@@ -0,0 +1,37 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MANIFEST_MANIFEST_UMA_UTIL_H_
+#define CONTENT_RENDERER_MANIFEST_MANIFEST_UMA_UTIL_H_
+
+namespace content {
+
+struct Manifest;
+
+class ManifestUmaUtil {
+ public:
+ enum FetchFailureReason {
+ FETCH_EMPTY_URL = 0,
+ FETCH_UNSPECIFIED_REASON
+ };
+
+ // Record that the Manifest was successfully parsed. If it is an empty
+ // Manifest, it will recorded as so and nothing will happen. Otherwise, the
+ // presence of each properties will be recorded.
+ static void ParseSucceeded(const Manifest& manifest);
+
+ // Record that the Manifest parsing failed.
+ static void ParseFailed();
+
+ // Record that the Manifest fetching succeeded.
+ static void FetchSucceeded();
+
+ // Record that the Manifest fetching failed and takes the |reason| why it
+ // failed.
+ static void FetchFailed(FetchFailureReason reason);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MANIFEST_MANIFEST_UMA_UTIL_H_
« no previous file with comments | « content/renderer/manifest/manifest_parser.cc ('k') | content/renderer/manifest/manifest_uma_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698