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

Unified Diff: content/renderer/manifest/manifest_manager.cc

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/content_renderer.gypi ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/manifest/manifest_manager.cc
diff --git a/content/renderer/manifest/manifest_manager.cc b/content/renderer/manifest/manifest_manager.cc
index d3989e7f42b3d6ac766c40202271b334668144db..9ccee4cb38882ca1483126b4e98fa5731bebf773 100644
--- a/content/renderer/manifest/manifest_manager.cc
+++ b/content/renderer/manifest/manifest_manager.cc
@@ -10,6 +10,7 @@
#include "content/public/renderer/render_frame.h"
#include "content/renderer/fetchers/manifest_fetcher.h"
#include "content/renderer/manifest/manifest_parser.h"
+#include "content/renderer/manifest/manifest_uma_util.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -103,6 +104,7 @@ void ManifestManager::FetchManifest() {
GURL url(render_frame()->GetWebFrame()->document().manifestURL());
if (url.is_empty()) {
+ ManifestUmaUtil::FetchFailed(ManifestUmaUtil::FETCH_EMPTY_URL);
ResolveCallbacks(ResolveStateFailure);
return;
}
@@ -122,10 +124,12 @@ void ManifestManager::OnManifestFetchComplete(
const blink::WebURLResponse& response,
const std::string& data) {
if (response.isNull() && data.empty()) {
+ ManifestUmaUtil::FetchFailed(ManifestUmaUtil::FETCH_UNSPECIFIED_REASON);
ResolveCallbacks(ResolveStateFailure);
return;
}
+ ManifestUmaUtil::FetchSucceeded();
manifest_ = ManifestParser::Parse(data, response.url(), document_url);
fetcher_.reset();
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/manifest/manifest_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698