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

Unified Diff: chrome/browser/ssl/ssl_tab_helper.cc

Issue 190063006: Infobar Componentization Proof of Concept (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes Created 6 years, 9 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/ssl/ssl_tab_helper.cc
diff --git a/chrome/browser/ssl/ssl_tab_helper.cc b/chrome/browser/ssl/ssl_tab_helper.cc
index 51612f4517a21557704f87f2027b471c0673fd3c..553e6f6e96a53c3430a9fd2f65ae2975436fd562 100644
--- a/chrome/browser/ssl/ssl_tab_helper.cc
+++ b/chrome/browser/ssl/ssl_tab_helper.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/certificate_viewer.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
-#include "chrome/browser/infobars/confirm_infobar_delegate.h"
+#include "chrome/browser/infobars/content_confirm_infobar_delegate.h"
#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -40,7 +40,7 @@
namespace {
-class SSLCertResultInfoBarDelegate : public ConfirmInfoBarDelegate {
+class SSLCertResultInfoBarDelegate : public ContentConfirmInfoBarDelegate {
public:
// Creates an SSL cert result infobar and delegate. If |previous_infobar| is
// NULL, adds the infobar to |infobar_service|; otherwise, replaces
@@ -52,7 +52,8 @@ class SSLCertResultInfoBarDelegate : public ConfirmInfoBarDelegate {
net::X509Certificate* cert);
private:
- SSLCertResultInfoBarDelegate(const base::string16& message,
+ SSLCertResultInfoBarDelegate(content::WebContents* web_contents,
+ const base::string16& message,
net::X509Certificate* cert);
virtual ~SSLCertResultInfoBarDelegate();
@@ -76,20 +77,20 @@ InfoBar* SSLCertResultInfoBarDelegate::Create(InfoBarService* infobar_service,
const base::string16& message,
net::X509Certificate* cert) {
scoped_ptr<InfoBar> infobar(ConfirmInfoBarDelegate::CreateInfoBar(
- scoped_ptr<ConfirmInfoBarDelegate>(
- new SSLCertResultInfoBarDelegate(message, cert))));
+ scoped_ptr<ConfirmInfoBarDelegate>(new SSLCertResultInfoBarDelegate(
+ infobar_service->web_contents(), message, cert))));
return previous_infobar ?
infobar_service->ReplaceInfoBar(previous_infobar, infobar.Pass()) :
infobar_service->AddInfoBar(infobar.Pass());
}
SSLCertResultInfoBarDelegate::SSLCertResultInfoBarDelegate(
+ content::WebContents* web_contents,
const base::string16& message,
net::X509Certificate* cert)
- : ConfirmInfoBarDelegate(),
+ : ContentConfirmInfoBarDelegate(web_contents),
message_(message),
- cert_(cert) {
-}
+ cert_(cert) {}
SSLCertResultInfoBarDelegate::~SSLCertResultInfoBarDelegate() {
}

Powered by Google App Engine
This is Rietveld 408576698