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

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: Remove old actions. 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
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..b112d63bdbc35574d1e57e1c193f8444837a5821 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",
Ilya Sherman 2014/10/29 23:55:42 Also, is "WebsiteSettings" a namespace that's alre
Ilya Sherman 2014/10/29 23:55:42 This histogram currently just has a namespace, but
lgarron 2014/10/30 00:10:19 I originally planned just to have this histogram (
lgarron 2014/10/30 00:10:19 It's used by WebsiteSettings.PermissionChanged (un
lgarron 2014/10/31 00:50:48 Acknowledged.
+ 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.HTTPS_URL",
Ilya Sherman 2014/10/29 23:55:42 Optional nit: I'd write "HTTPS_URL" as "SecureUrl"
lgarron 2014/10/31 00:50:48 SecureURL is probably a bad idea, but HttpsUrl sou
+ 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);
}

Powered by Google App Engine
This is Rietveld 408576698