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

Unified Diff: chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc

Issue 2662163002: Add UMA histogram for popup actions on Android. (Closed)
Patch Set: Created 3 years, 11 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: chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
diff --git a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
index 66c7b91fc1c2a72d5e4fc270511bb54f0b686e47..4b709f1c111583e47bd3f93f0ce87d0d6eb9fb03 100644
--- a/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
+++ b/chrome/browser/ui/android/content_settings/popup_blocked_infobar_delegate.cc
@@ -6,7 +6,7 @@
#include <stddef.h>
#include <utility>
-
+#include "chrome/browser/content_settings/chrome_content_settings_utils.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -49,6 +49,9 @@ void PopupBlockedInfoBarDelegate::Create(content::WebContents* web_contents,
}
infobar_service->AddInfoBar(std::move(infobar));
+
+ content_settings::RecordPopupsAction(
+ content_settings::POPUPS_ACTION_DISPLAYED_INFOBAR_ON_MOBILE);
Nico 2017/02/02 22:09:49 This looks like general code, why is the enum call
charleszhao 2017/02/03 02:20:48 These two enum POPUPS_ACTION_DISPLAYED_INFOBAR_ON
}
PopupBlockedInfoBarDelegate::~PopupBlockedInfoBarDelegate() {
@@ -116,5 +119,7 @@ bool PopupBlockedInfoBarDelegate::Accept() {
it != blocked_popups.end(); ++it)
popup_blocker_helper->ShowBlockedPopup(it->first);
+ content_settings::RecordPopupsAction(
+ content_settings::POPUPS_ACTION_CLICKED_ALWAYS_SHOW_ON_MOBILE);
Nico 2017/02/02 22:09:49 same question
charleszhao 2017/02/05 23:03:13 Done.
return true;
}
« no previous file with comments | « chrome/browser/content_settings/chrome_content_settings_utils.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698