Chromium Code Reviews| 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_ |