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

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
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..18eb7e0ed0826f9e1027fb3eae38bd7203abc00d 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();
Miguel Garcia 2014/10/02 14:26:46 Don't you want to distinguish this case and the on
mlamouri (slow - plz ping) 2014/10/02 15:35:06 I've added "empty url" and "unspecified" for the f
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();
ResolveCallbacks(ResolveStateFailure);
return;
}
+ ManifestUmaUtil::FetchSucceeded();
manifest_ = ManifestParser::Parse(data, response.url(), document_url);
Miguel Garcia 2014/10/02 14:26:46 don't you want to track when manifest is not parsa
mlamouri (slow - plz ping) 2014/10/02 15:35:05 I've added something. It will be tracked in the pa
fetcher_.reset();

Powered by Google App Engine
This is Rietveld 408576698