Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / content / renderer / manifest / manifest_uma_util.h
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 #ifndef CONTENT_RENDERER_MANIFEST_MANIFEST_UMA_UTIL_H_
6 #define CONTENT_RENDERER_MANIFEST_MANIFEST_UMA_UTIL_H_
7
8 namespace content {
9
10 struct Manifest;
11
12 class ManifestUmaUtil {
13  public:
14   enum FetchFailureReason {
15     FETCH_EMPTY_URL = 0,
16     FETCH_UNSPECIFIED_REASON
17   };
18
19   // Record that the Manifest was successfully parsed. If it is an empty
20   // Manifest, it will recorded as so and nothing will happen. Otherwise, the
21   // presence of each properties will be recorded.
22   static void ParseSucceeded(const Manifest& manifest);
23
24   // Record that the Manifest parsing failed.
25   static void ParseFailed();
26
27   // Record that the Manifest fetching succeeded.
28   static void FetchSucceeded();
29
30   // Record that the Manifest fetching failed and takes the |reason| why it
31   // failed.
32   static void FetchFailed(FetchFailureReason reason);
33 };
34
35 } // namespace content
36
37 #endif // CONTENT_RENDERER_MANIFEST_MANIFEST_UMA_UTIL_H_