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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.mm

Issue 476513002: Add UMA histogram to count hard revokes of user certificate error decisions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro ller.h" 5 #import "chrome/browser/ui/cocoa/website_settings/website_settings_bubble_contro ller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #import <AppKit/AppKit.h> 9 #import <AppKit/AppKit.h>
10 10
11 #include "base/mac/bind_objc_block.h" 11 #include "base/mac/bind_objc_block.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/sys_string_conversions.h" 13 #include "base/strings/sys_string_conversions.h"
14 #import "chrome/browser/certificate_viewer.h" 14 #import "chrome/browser/certificate_viewer.h"
15 #include "chrome/browser/infobars/infobar_service.h" 15 #include "chrome/browser/infobars/infobar_service.h"
16 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h"
17 #import "chrome/browser/ui/browser_dialogs.h" 16 #import "chrome/browser/ui/browser_dialogs.h"
18 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 17 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
19 #import "chrome/browser/ui/cocoa/info_bubble_view.h" 18 #import "chrome/browser/ui/cocoa/info_bubble_view.h"
20 #import "chrome/browser/ui/cocoa/info_bubble_window.h" 19 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
21 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" 20 #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
22 #import "chrome/browser/ui/cocoa/website_settings/permission_selector_button.h" 21 #import "chrome/browser/ui/cocoa/website_settings/permission_selector_button.h"
23 #include "chrome/browser/ui/website_settings/permission_menu_model.h" 22 #include "chrome/browser/ui/website_settings/permission_menu_model.h"
24 #include "chrome/browser/ui/website_settings/website_settings_utils.h" 23 #include "chrome/browser/ui/website_settings/website_settings_utils.h"
25 #include "chrome/common/url_constants.h" 24 #include "chrome/common/url_constants.h"
26 #include "chrome/grit/chromium_strings.h" 25 #include "chrome/grit/chromium_strings.h"
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 511
513 // Handler for the link button to show certificate information. 512 // Handler for the link button to show certificate information.
514 - (void)showCertificateInfo:(id)sender { 513 - (void)showCertificateInfo:(id)sender {
515 DCHECK(certificateId_); 514 DCHECK(certificateId_);
516 ShowCertificateViewerByID(webContents_, [self parentWindow], certificateId_); 515 ShowCertificateViewerByID(webContents_, [self parentWindow], certificateId_);
517 } 516 }
518 517
519 // Handler for the link button to revoke user certificate decisions. 518 // Handler for the link button to revoke user certificate decisions.
520 - (void)resetCertificateDecisions:(id)sender { 519 - (void)resetCertificateDecisions:(id)sender {
521 DCHECK(resetDecisionsButton_); 520 DCHECK(resetDecisionsButton_);
522 ChromeSSLHostStateDelegate* delegate = 521 presenter_->OnRevokeSSLErrorBypassButtonPressed();
523 presenter_->chrome_ssl_host_state_delegate();
524 DCHECK(delegate);
525 delegate->RevokeUserDecisionsHard(presenter_->site_url().host());
526 [self close]; 522 [self close];
527 } 523 }
528 524
529 // Handler for the link to show help information about the connection tab. 525 // Handler for the link to show help information about the connection tab.
530 - (void)showHelpPage:(id)sender { 526 - (void)showHelpPage:(id)sender {
531 webContents_->OpenURL(content::OpenURLParams( 527 webContents_->OpenURL(content::OpenURLParams(
532 GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(), 528 GURL(chrome::kPageInfoHelpCenterURL), content::Referrer(),
533 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false)); 529 NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_LINK, false));
534 } 530 }
535 531
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 [bubble_controller_ setPermissionInfo:permission_info_list]; 1219 [bubble_controller_ setPermissionInfo:permission_info_list];
1224 } 1220 }
1225 1221
1226 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) { 1222 void WebsiteSettingsUIBridge::SetFirstVisit(const base::string16& first_visit) {
1227 [bubble_controller_ setFirstVisit:first_visit]; 1223 [bubble_controller_ setFirstVisit:first_visit];
1228 } 1224 }
1229 1225
1230 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) { 1226 void WebsiteSettingsUIBridge::SetSelectedTab(TabId tab_id) {
1231 [bubble_controller_ setSelectedTab:tab_id]; 1227 [bubble_controller_ setSelectedTab:tab_id];
1232 } 1228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698