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

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: review comments 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
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 {
Miguel Garcia 2014/10/02 15:56:42 can't we forward declare enums now?
mlamouri (slow - plz ping) 2014/10/02 16:10:55 Not yet, sadly.
+ FETCH_EMPTY_URL = 0,
+ FETCH_UNSPECIFIED_REASON
Miguel Garcia 2014/10/02 15:56:42 Oh you need all kind of parafernalia for UMA enums
mlamouri (slow - plz ping) 2014/10/02 16:10:55 That's what I do for the internal enum. Not the ex
+ };
+
+ // 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.
Miguel Garcia 2014/10/02 15:56:42 Record whether it succeeded (since you track failu
mlamouri (slow - plz ping) 2014/10/02 16:10:55 Did not understood.
+ 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_

Powered by Google App Engine
This is Rietveld 408576698