Chromium Code Reviews| 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 6f5fc9b3aa3fa722ad8772020c4f17e94b469871..97d8ce1d0467ffabe05283a7109a3fbe700c9fe9 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/thread_task_runner_handle.h" |
| #include "base/time/time.h" |
| #include "chrome/browser/android/offline_pages/offline_page_mhtml_archiver.h" |
| @@ -92,7 +93,7 @@ void RecentTabHelper::StartSnapshot() { |
| GURL url = web_contents()->GetLastCommittedURL(); |
| if (!page_model_->CanSavePage(url)) { |
| - // TODO(dimich): Add UMA. Bug 608112. |
| + UMA_HISTOGRAM_COUNTS("OfflinePages.CanNotSaveRecentPage", 1); |
|
dewittj
2016/05/10 23:07:56
I wonder if we should have an enumerated histogram
bburns
2016/05/11 16:21:52
I don't feel strongly. Is this detailed in a PRD
dewittj
2016/05/11 16:31:58
nope, not in the PRD. I don't super care about th
fgorski
2016/05/11 16:54:23
Boolean sounds good for this one, as this is a pro
|
| return; |
| } |
| @@ -180,7 +181,9 @@ void RecentTabHelper::ContinueSnapshotAfterPurge( |
| void RecentTabHelper::SavePageCallback(OfflinePageModel::SavePageResult result, |
| int64_t offline_id) { |
| - // TODO(dimich): add UMA, including result. Bug 608112. |
| + UMA_HISTOGRAM_ENUMERATION( |
| + "OfflinePages.SavePageResult.RecentPage", static_cast<int>(result), |
|
fgorski
2016/05/11 16:54:23
I don't think this is needed in this shape and for
|
| + static_cast<int>(OfflinePageModel::SavePageResult::RESULT_COUNT)); |
| ReportSnapshotCompleted(); |
| } |