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

Unified Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm

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: Make Ilya's suggested changes and support OSX. 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 | « no previous file | chrome/browser/ui/views/website_settings/website_settings_popup_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
index 5d6597c3bd474f1e6610c0cff6b370c0aa19be54..c346dc4350cd2271ffd758457998157ea4317996 100644
--- a/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm
@@ -522,14 +522,16 @@ NSColor* IdentityVerifiedTextColor() {
// Handler for the link button below the list of cookies.
- (void)showCookiesAndSiteData:(id)sender {
DCHECK(webContents_);
- content::RecordAction(
- base::UserMetricsAction("WebsiteSettings_CookiesDialogOpened"));
+ presenter_->RecordWebsiteSettingsAction(
+ WebsiteSettings::WEBSITE_SETTINGS_COOKIES_DIALOG_OPENED);
chrome::ShowCollectedCookiesDialog(webContents_);
}
// Handler for the link button to show certificate information.
- (void)showCertificateInfo:(id)sender {
DCHECK(certificateId_);
+ presenter_->RecordWebsiteSettingsAction(
+ WebsiteSettings::WEBSITE_SETTINGS_CERTIFICATE_DIALOG_OPENED);
ShowCertificateViewerByID(webContents_, [self parentWindow], certificateId_);
}
@@ -542,6 +544,8 @@ NSColor* IdentityVerifiedTextColor() {
// Handler for the link to show help information about the connection tab.
- (void)showHelpPage:(id)sender {
+ presenter_->RecordWebsiteSettingsAction(
+ WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_HELP_OPENED);
webContents_->OpenURL(content::OpenURLParams(
GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(),
NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, false));
@@ -939,7 +943,20 @@ NSColor* IdentityVerifiedTextColor() {
// Called when the user changes the selected segment in the segmented control.
- (void)tabSelected:(id)sender {
- [tabView_ selectTabViewItemAtIndex:[segmentedControl_ selectedSegment]];
+ NSInteger index = [segmentedControl_ selectedSegment];
+ switch (index) {
+ case WebsiteSettingsUI::TAB_ID_PERMISSIONS:
+ presenter_->RecordWebsiteSettingsAction(
+ WebsiteSettings::WEBSITE_SETTINGS_PERMISSIONS_TAB_SELECTED);
+ break;
+ case WebsiteSettingsUI::TAB_ID_CONNECTION:
+ presenter_->RecordWebsiteSettingsAction(
+ WebsiteSettings::WEBSITE_SETTINGS_CONNECTION_TAB_SELECTED);
+ break;
+ default:
+ NOTREACHED();
Ilya Sherman 2014/10/31 02:23:20 nit: Each of lines 948-952 and 955-957 should be i
+ }
+ [tabView_ selectTabViewItemAtIndex:index];
}
// Adds a new row to the UI listing the permissions. Returns the amount of
« no previous file with comments | « no previous file | chrome/browser/ui/views/website_settings/website_settings_popup_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698