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

Unified Diff: chrome/browser/android/offline_pages/prerendering_loader.cc

Issue 2301703002: [Offline Pages] Adds UMA for number of started attempts and for network connection when Unsupported… (Closed)
Patch Set: Adjusted count histogram max arg Created 4 years, 3 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 | « no previous file | components/offline_pages/background/offliner_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/prerendering_loader.cc
diff --git a/chrome/browser/android/offline_pages/prerendering_loader.cc b/chrome/browser/android/offline_pages/prerendering_loader.cc
index 2b84f713c4375d54447379d70c876f4ef8fb1e70..2584933c487dc4fe7788b1e07ae5e5eec829e0e0 100644
--- a/chrome/browser/android/offline_pages/prerendering_loader.cc
+++ b/chrome/browser/android/offline_pages/prerendering_loader.cc
@@ -6,11 +6,13 @@
#include "base/location.h"
#include "base/logging.h"
+#include "base/metrics/histogram_macros.h"
#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"
+#include "net/base/network_change_notifier.h"
#include "ui/gfx/geometry/size.h"
namespace offline_pages {
@@ -177,6 +179,10 @@ void PrerenderingLoader::HandleLoadingStopped() {
if (adapter_->GetFinalStatus() ==
prerender::FinalStatus::FINAL_STATUS_UNSUPPORTED_SCHEME) {
request_status = Offliner::RequestStatus::PRERENDERING_CANCELED;
+ UMA_HISTOGRAM_ENUMERATION(
+ "OfflinePages.Background.UnsupportedScheme.ConnectionType",
+ net::NetworkChangeNotifier::GetConnectionType(),
+ net::NetworkChangeNotifier::ConnectionType::CONNECTION_LAST + 1);
}
adapter_->DestroyActive();
}
« no previous file with comments | « no previous file | components/offline_pages/background/offliner_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698