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

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

Issue 1967793002: Add some UMA for recent tabs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments. Created 4 years, 7 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/offline_pages/recent_tab_helper.cc
diff --git a/chrome/browser/android/offline_pages/recent_tab_helper.cc b/chrome/browser/android/offline_pages/recent_tab_helper.cc
index 9a49b61ae44a5c14e3d526dbca3c1bed348514f9..5eb1a3f1d41b96be993c68614ae159d53bc6510a 100644
--- a/chrome/browser/android/offline_pages/recent_tab_helper.cc
+++ b/chrome/browser/android/offline_pages/recent_tab_helper.cc
@@ -11,6 +11,7 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
+#include "base/metrics/histogram_macros.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h"
@@ -91,10 +92,10 @@ void RecentTabHelper::StartSnapshot() {
return;
GURL url = web_contents()->GetLastCommittedURL();
- if (!page_model_->CanSavePage(url)) {
- // TODO(dimich): Add UMA. Bug 608112.
+ bool can_save = page_model_->CanSavePage(url);
+ UMA_HISTOGRAM_BOOLEAN("OfflinePages.CanSaveRecentPage", can_save);
+ if (!can_save)
return;
- }
snapshot_url_ = url;
@@ -180,7 +181,6 @@ void RecentTabHelper::ContinueSnapshotAfterPurge(
void RecentTabHelper::SavePageCallback(OfflinePageModel::SavePageResult result,
int64_t offline_id) {
- // TODO(dimich): add UMA, including result. Bug 608112.
ReportSnapshotCompleted();
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698