Index: chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc |
diff --git a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc |
index 8965dafa3bec7498abef5948cf508324bb214300..c3dbe132fb5af9019b32ed6d007293c7b753b0ac 100644 |
--- a/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc |
+++ b/chrome/browser/ui/webui/settings/chrome_cleanup_handler.cc |
@@ -8,6 +8,7 @@ |
#include "base/command_line.h" |
#include "base/feature_list.h" |
+#include "base/metrics/histogram_macros.h" |
#include "base/synchronization/lock.h" |
#include "base/values.h" |
#include "chrome/browser/safe_browsing/chrome_cleaner/srt_field_trial_win.h" |
@@ -53,6 +54,12 @@ std::string IdleReasonToString( |
return ""; |
} |
+enum CleanupCardHistogramValue { |
csharp
2017/07/07 20:53:33
nit: Add a comment about how this needs to match u
ftirelo
2017/07/07 21:22:08
Done.
|
+ CLEANUP_CARD_SHOWN = 0, |
+ |
+ CLEANUP_CARD_MAX, |
+}; |
+ |
} // namespace |
ChromeCleanupHandler::ChromeCleanupHandler(Profile* profile) |
@@ -133,6 +140,8 @@ void ChromeCleanupHandler::HandleRegisterChromeCleanerObserver( |
DCHECK( |
base::FeatureList::IsEnabled(safe_browsing::kInBrowserCleanerUIFeature)); |
+ UMA_HISTOGRAM_ENUMERATION("SoftwareReporter.CleanupCard", CLEANUP_CARD_SHOWN, |
+ CLEANUP_CARD_MAX); |
AllowJavascript(); |
} |
@@ -147,6 +156,8 @@ void ChromeCleanupHandler::HandleRestartComputer(const base::ListValue* args) { |
void ChromeCleanupHandler::HandleStartCleanup(const base::ListValue* args) { |
DCHECK_EQ(0U, args->GetSize()); |
+ safe_browsing::RecordCleanupStartedHistogram( |
+ safe_browsing::CLEANUP_STARTED_FROM_PROMPT_IN_SETTINGS); |
controller_->ReplyWithUserResponse( |
// TODO(proberge): Send kAcceptedWithLogs or kAcceptedWithoutLogs based on |
// the state of a logs upload permissions checkbox. |