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

Unified Diff: chrome/browser/ui/website_settings/website_settings.cc

Issue 690483003: Log major user interactions with the WebsiteSettings (origin info) bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indentation in switch clause. Created 6 years, 2 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 | « chrome/browser/ui/website_settings/website_settings.h ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/website_settings/website_settings.cc
diff --git a/chrome/browser/ui/website_settings/website_settings.cc b/chrome/browser/ui/website_settings/website_settings.cc
index f19d2b0c32d7377af28621cf8e011910d477b608..4e2cfa2b4e22b476544f16f568fd543574dd7758 100644
--- a/chrome/browser/ui/website_settings/website_settings.cc
+++ b/chrome/browser/ui/website_settings/website_settings.cc
@@ -202,18 +202,39 @@ WebsiteSettings::WebsiteSettings(
// Every time the Website Settings UI is opened a |WebsiteSettings| object is
// created. So this counts how ofter the Website Settings UI is opened.
- content::RecordAction(base::UserMetricsAction("WebsiteSettings_Opened"));
+ RecordWebsiteSettingsAction(WEBSITE_SETTINGS_OPENED);
}
WebsiteSettings::~WebsiteSettings() {
}
+void WebsiteSettings::RecordWebsiteSettingsAction(
+ WebsiteSettingsAction action) {
+ UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Action",
+ action,
+ WEBSITE_SETTINGS_COUNT);
+
+ // Use a separate histogram to record actions if they are done on a page with
+ // an HTTPS URL. Note that this *disregards* security status.
+ if (site_url_.SchemeIs(url::kHttpsScheme)) {
+ UMA_HISTOGRAM_ENUMERATION("WebsiteSettings.Action.HttpsUrl",
+ action,
+ WEBSITE_SETTINGS_COUNT);
+ }
+}
+
+
void WebsiteSettings::OnSitePermissionChanged(ContentSettingsType type,
ContentSetting setting) {
// Count how often a permission for a specific content type is changed using
// the Website Settings UI.
UMA_HISTOGRAM_COUNTS("WebsiteSettings.PermissionChanged", type);
+ // This is technically redundant given the histogram above, but putting the
+ // total count of permission changes in another histogram makes it easier to
+ // compare it against other kinds of actions in WebsiteSettings[PopupView].
+ RecordWebsiteSettingsAction(WEBSITE_SETTINGS_CHANGED_PERMISSION);
+
ContentSettingsPattern primary_pattern;
ContentSettingsPattern secondary_pattern;
switch (type) {
@@ -627,8 +648,11 @@ void WebsiteSettings::Init(Profile* profile,
site_identity_status_ == SITE_IDENTITY_STATUS_CERT_REVOCATION_UNKNOWN ||
site_identity_status_ == SITE_IDENTITY_STATUS_ADMIN_PROVIDED_CERT ||
site_identity_status_ ==
- SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM)
+ SITE_IDENTITY_STATUS_DEPRECATED_SIGNATURE_ALGORITHM) {
tab_id = WebsiteSettingsUI::TAB_ID_CONNECTION;
+ RecordWebsiteSettingsAction(
+ WEBSITE_SETTINGS_CONNECTION_TAB_SHOWN_IMMEDIATELY);
+ }
ui_->SetSelectedTab(tab_id);
}
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings.h ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698