| Index: content/renderer/manifest/manifest_parser.cc
|
| diff --git a/content/renderer/manifest/manifest_parser.cc b/content/renderer/manifest/manifest_parser.cc
|
| index a68ca2ae72e3fb14b86582ebae006612bfd7d201..bab85cd75f1b1acc9aad4161f213dfe65b155f6e 100644
|
| --- a/content/renderer/manifest/manifest_parser.cc
|
| +++ b/content/renderer/manifest/manifest_parser.cc
|
| @@ -12,6 +12,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/values.h"
|
| #include "content/public/common/manifest.h"
|
| +#include "content/renderer/manifest/manifest_uma_util.h"
|
| #include "ui/gfx/geometry/size.h"
|
|
|
| namespace content {
|
| @@ -291,11 +292,13 @@ Manifest ManifestParser::Parse(const base::StringPiece& json,
|
| if (!value) {
|
| // TODO(mlamouri): get the JSON parsing error and report it to the developer
|
| // console.
|
| + ManifestUmaUtil::ParseFailed();
|
| return Manifest();
|
| }
|
|
|
| if (value->GetType() != base::Value::TYPE_DICTIONARY) {
|
| // TODO(mlamouri): provide a custom message to the developer console.
|
| + ManifestUmaUtil::ParseFailed();
|
| return Manifest();
|
| }
|
|
|
| @@ -303,6 +306,7 @@ Manifest ManifestParser::Parse(const base::StringPiece& json,
|
| value->GetAsDictionary(&dictionary);
|
| if (!dictionary) {
|
| // TODO(mlamouri): provide a custom message to the developer console.
|
| + ManifestUmaUtil::ParseFailed();
|
| return Manifest();
|
| }
|
|
|
| @@ -316,6 +320,8 @@ Manifest ManifestParser::Parse(const base::StringPiece& json,
|
| manifest.icons = ParseIcons(*dictionary, manifest_url);
|
| manifest.gcm_sender_id = ParseGCMSenderID(*dictionary);
|
|
|
| + ManifestUmaUtil::ParseSucceeded(manifest);
|
| +
|
| return manifest;
|
| }
|
|
|
|
|