diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-18 03:58:52 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-18 03:58:52 +0000 |
commit | 11feec32b991ffac983d2a9781c70df4b987b67f (patch) | |
tree | 1e03b4661dc20aee76151f5712f3db17d5f89426 /chrome/browser | |
parent | 0a8a19602422061bec85b329857cba7cb49c8b36 (diff) | |
download | chromium_src-11feec32b991ffac983d2a9781c70df4b987b67f.zip chromium_src-11feec32b991ffac983d2a9781c70df4b987b67f.tar.gz chromium_src-11feec32b991ffac983d2a9781c70df4b987b67f.tar.bz2 |
Switch SSLTabHelper to use WebContentsUserData.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/10916348
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157292 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/chrome_content_browser_client.cc | 10 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_add_cert_handler.cc | 15 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_client_certificate_selector.h (renamed from chrome/browser/ssl_client_certificate_selector.h) | 12 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_tab_helper.cc (renamed from chrome/browser/tab_contents/tab_contents_ssl_helper.cc) | 70 | ||||
-rw-r--r-- | chrome/browser/ssl/ssl_tab_helper.h (renamed from chrome/browser/tab_contents/tab_contents_ssl_helper.h) | 21 | ||||
-rw-r--r-- | chrome/browser/ui/android/ssl_client_certificate_selector.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/ssl_client_certificate_selector.mm | 7 | ||||
-rw-r--r-- | chrome/browser/ui/gtk/ssl_client_certificate_selector.cc | 5 | ||||
-rw-r--r-- | chrome/browser/ui/tab_contents/tab_contents.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/tab_contents/tab_contents.h | 4 | ||||
-rw-r--r-- | chrome/browser/ui/views/ssl_client_certificate_selector.cc | 5 |
11 files changed, 80 insertions, 77 deletions
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 15cc0af..e900ebf 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc @@ -63,7 +63,7 @@ #include "chrome/browser/spellchecker/spellcheck_message_filter.h" #include "chrome/browser/ssl/ssl_add_cert_handler.h" #include "chrome/browser/ssl/ssl_blocking_page.h" -#include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" +#include "chrome/browser/ssl/ssl_tab_helper.h" #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/browser/toolkit_extra_parts.h" #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h" @@ -1177,15 +1177,15 @@ void ChromeContentBrowserClient::SelectClientCertificate( } } - TabContents* tab_contents = TabContents::FromWebContents(tab); - if (!tab_contents) { - // If there is no TabContents for the given WebContents then we can't + SSLTabHelper* ssl_tab_helper = SSLTabHelper::FromWebContents(tab); + if (!ssl_tab_helper) { + // If there is no SSLTabHelper for the given WebContents then we can't // show the user a dialog to select a client certificate. So we simply // proceed with no client certificate. callback.Run(NULL); return; } - tab_contents->ssl_helper()->ShowClientCertificateRequestDialog( + ssl_tab_helper->ShowClientCertificateRequestDialog( network_session, cert_request_info, callback); } diff --git a/chrome/browser/ssl/ssl_add_cert_handler.cc b/chrome/browser/ssl/ssl_add_cert_handler.cc index 07ce962..60fe835 100644 --- a/chrome/browser/ssl/ssl_add_cert_handler.cc +++ b/chrome/browser/ssl/ssl_add_cert_handler.cc @@ -5,9 +5,8 @@ #include "chrome/browser/ssl/ssl_add_cert_handler.h" #include "base/bind.h" -#include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" +#include "chrome/browser/ssl/ssl_tab_helper.h" #include "chrome/browser/tab_contents/tab_util.h" -#include "chrome/browser/ui/tab_contents/tab_contents.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/resource_request_info.h" #include "content/public/browser/web_contents.h" @@ -88,8 +87,8 @@ void SSLAddCertHandler::CallVerifyClientCertificateError(int cert_error) { if (!tab) return; - TabContents* tab_contents = TabContents::FromWebContents(tab); - tab_contents->ssl_helper()->OnVerifyClientCertificateError(this, cert_error); + SSLTabHelper* ssl_tab_helper = SSLTabHelper::FromWebContents(tab); + ssl_tab_helper->OnVerifyClientCertificateError(this, cert_error); } void SSLAddCertHandler::CallAddClientCertificate(bool add_cert, @@ -99,13 +98,13 @@ void SSLAddCertHandler::CallAddClientCertificate(bool add_cert, if (!tab) return; - TabContents* tab_contents = TabContents::FromWebContents(tab); + SSLTabHelper* ssl_tab_helper = SSLTabHelper::FromWebContents(tab); if (add_cert) { if (cert_error == net::OK) { - tab_contents->ssl_helper()->OnAddClientCertificateSuccess(this); + ssl_tab_helper->OnAddClientCertificateSuccess(this); } else { - tab_contents->ssl_helper()->OnAddClientCertificateError(this, cert_error); + ssl_tab_helper->OnAddClientCertificateError(this, cert_error); } } - tab_contents->ssl_helper()->OnAddClientCertificateFinished(this); + ssl_tab_helper->OnAddClientCertificateFinished(this); } diff --git a/chrome/browser/ssl_client_certificate_selector.h b/chrome/browser/ssl/ssl_client_certificate_selector.h index f70a741..1568320 100644 --- a/chrome/browser/ssl_client_certificate_selector.h +++ b/chrome/browser/ssl/ssl_client_certificate_selector.h @@ -2,12 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ -#define CHROME_BROWSER_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ +#ifndef CHROME_BROWSER_SSL_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ +#define CHROME_BROWSER_SSL_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ #include "base/callback_forward.h" -class TabContents; +namespace content { +class WebContents; +} namespace net { class HttpNetworkSession; @@ -23,11 +25,11 @@ namespace chrome { // when the dialog closes in call cases; if the user cancels the dialog, we call // with a NULL certificate. void ShowSSLClientCertificateSelector( - TabContents* tab_contents, + content::WebContents* contents, const net::HttpNetworkSession* network_session, net::SSLCertRequestInfo* cert_request_info, const base::Callback<void(net::X509Certificate*)>& callback); } // namespace chrome -#endif // CHROME_BROWSER_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ +#endif // CHROME_BROWSER_SSL_SSL_CLIENT_CERTIFICATE_SELECTOR_H_ diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc b/chrome/browser/ssl/ssl_tab_helper.cc index 99bab73..76980c6 100644 --- a/chrome/browser/tab_contents/tab_contents_ssl_helper.cc +++ b/chrome/browser/ssl/ssl_tab_helper.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" +#include "chrome/browser/ssl/ssl_tab_helper.h" #include <string> #include <vector> @@ -20,7 +20,7 @@ #include "chrome/browser/infobars/infobar_tab_helper.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ssl/ssl_add_cert_handler.h" -#include "chrome/browser/ssl_client_certificate_selector.h" +#include "chrome/browser/ssl/ssl_client_certificate_selector.h" #include "chrome/browser/ui/tab_contents/tab_contents.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" @@ -109,12 +109,12 @@ bool SSLCertAddedInfoBarDelegate::Accept() { } // namespace -// TabContentsSSLHelper::SSLAddCertData --------------------------------------- +// SSLTabHelper::SSLAddCertData ------------------------------------------------ -class TabContentsSSLHelper::SSLAddCertData +class SSLTabHelper::SSLAddCertData : public content::NotificationObserver { public: - explicit SSLAddCertData(TabContents* tab_contents); + explicit SSLAddCertData(content::WebContents* contents); virtual ~SSLAddCertData(); // Displays |delegate| as an infobar in |tab_|, replacing our current one if @@ -131,44 +131,41 @@ class TabContentsSSLHelper::SSLAddCertData const content::NotificationSource& source, const content::NotificationDetails& details); - TabContents* tab_contents_; + InfoBarTabHelper* infobar_helper_; InfoBarDelegate* infobar_delegate_; content::NotificationRegistrar registrar_; DISALLOW_COPY_AND_ASSIGN(SSLAddCertData); }; -TabContentsSSLHelper::SSLAddCertData::SSLAddCertData( - TabContents* tab_contents) - : tab_contents_(tab_contents), +SSLTabHelper::SSLAddCertData::SSLAddCertData(content::WebContents* contents) + : infobar_helper_( + TabContents::FromWebContents(contents)->infobar_tab_helper()), infobar_delegate_(NULL) { - content::Source<InfoBarTabHelper> source(tab_contents_->infobar_tab_helper()); + content::Source<InfoBarTabHelper> source(infobar_helper_); registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED, source); registrar_.Add(this, chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REPLACED, source); } -TabContentsSSLHelper::SSLAddCertData::~SSLAddCertData() { +SSLTabHelper::SSLAddCertData::~SSLAddCertData() { } -void TabContentsSSLHelper::SSLAddCertData::ShowInfoBar( - InfoBarDelegate* delegate) { +void SSLTabHelper::SSLAddCertData::ShowInfoBar(InfoBarDelegate* delegate) { if (infobar_delegate_) - tab_contents_->infobar_tab_helper()->ReplaceInfoBar(infobar_delegate_, - delegate); + infobar_helper_->ReplaceInfoBar(infobar_delegate_, delegate); else - tab_contents_->infobar_tab_helper()->AddInfoBar(delegate); + infobar_helper_->AddInfoBar(delegate); infobar_delegate_ = delegate; } -void TabContentsSSLHelper::SSLAddCertData::ShowErrorInfoBar( - const string16& message) { +void SSLTabHelper::SSLAddCertData::ShowErrorInfoBar(const string16& message) { ShowInfoBar(new SimpleAlertInfoBarDelegate( - tab_contents_->infobar_tab_helper(), GetCertIcon(), message, true)); + infobar_helper_, GetCertIcon(), message, true)); } -void TabContentsSSLHelper::SSLAddCertData::Observe( +void SSLTabHelper::SSLAddCertData::Observe( int type, const content::NotificationSource& source, const content::NotificationDetails& details) { @@ -182,24 +179,26 @@ void TabContentsSSLHelper::SSLAddCertData::Observe( } -// TabContentsSSLHelper ------------------------------------------------------- +// SSLTabHelper ---------------------------------------------------------------- -TabContentsSSLHelper::TabContentsSSLHelper(TabContents* tab_contents) - : tab_contents_(tab_contents) { +int SSLTabHelper::kUserDataKey; + +SSLTabHelper::SSLTabHelper(content::WebContents* contents) + : web_contents_(contents) { } -TabContentsSSLHelper::~TabContentsSSLHelper() { +SSLTabHelper::~SSLTabHelper() { } -void TabContentsSSLHelper::ShowClientCertificateRequestDialog( +void SSLTabHelper::ShowClientCertificateRequestDialog( const net::HttpNetworkSession* network_session, net::SSLCertRequestInfo* cert_request_info, const base::Callback<void(net::X509Certificate*)>& callback) { chrome::ShowSSLClientCertificateSelector( - tab_contents_, network_session, cert_request_info, callback); + web_contents_, network_session, cert_request_info, callback); } -void TabContentsSSLHelper::OnVerifyClientCertificateError( +void SSLTabHelper::OnVerifyClientCertificateError( scoped_refptr<SSLAddCertHandler> handler, int error_code) { SSLAddCertData* add_cert_data = GetAddCertData(handler); // Display an infobar with the error message. @@ -210,20 +209,21 @@ void TabContentsSSLHelper::OnVerifyClientCertificateError( ASCIIToUTF16(net::ErrorToString(error_code)))); } -void TabContentsSSLHelper::AskToAddClientCertificate( +void SSLTabHelper::AskToAddClientCertificate( scoped_refptr<SSLAddCertHandler> handler) { NOTREACHED(); // Not implemented yet. } -void TabContentsSSLHelper::OnAddClientCertificateSuccess( +void SSLTabHelper::OnAddClientCertificateSuccess( scoped_refptr<SSLAddCertHandler> handler) { SSLAddCertData* add_cert_data = GetAddCertData(handler); // Display an infobar to inform the user. + TabContents* tab_contents = TabContents::FromWebContents(web_contents_); add_cert_data->ShowInfoBar(new SSLCertAddedInfoBarDelegate( - tab_contents_->infobar_tab_helper(), handler->cert())); + tab_contents->infobar_tab_helper(), handler->cert())); } -void TabContentsSSLHelper::OnAddClientCertificateError( +void SSLTabHelper::OnAddClientCertificateError( scoped_refptr<SSLAddCertHandler> handler, int error_code) { SSLAddCertData* add_cert_data = GetAddCertData(handler); // Display an infobar with the error message. @@ -234,19 +234,19 @@ void TabContentsSSLHelper::OnAddClientCertificateError( ASCIIToUTF16(net::ErrorToString(error_code)))); } -void TabContentsSSLHelper::OnAddClientCertificateFinished( +void SSLTabHelper::OnAddClientCertificateFinished( scoped_refptr<SSLAddCertHandler> handler) { // Clean up. request_id_to_add_cert_data_.erase(handler->network_request_id()); } -TabContentsSSLHelper::SSLAddCertData* TabContentsSSLHelper::GetAddCertData( - SSLAddCertHandler* handler) { +SSLTabHelper::SSLAddCertData* +SSLTabHelper::GetAddCertData(SSLAddCertHandler* handler) { // Find/create the slot. linked_ptr<SSLAddCertData>& ptr_ref = request_id_to_add_cert_data_[handler->network_request_id()]; // Fill it if necessary. if (!ptr_ref.get()) - ptr_ref.reset(new SSLAddCertData(tab_contents_)); + ptr_ref.reset(new SSLAddCertData(web_contents_)); return ptr_ref.get(); } diff --git a/chrome/browser/tab_contents/tab_contents_ssl_helper.h b/chrome/browser/ssl/ssl_tab_helper.h index 2b08c5a..dc2a818 100644 --- a/chrome/browser/tab_contents/tab_contents_ssl_helper.h +++ b/chrome/browser/ssl/ssl_tab_helper.h @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_SSL_HELPER_H_ -#define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_SSL_HELPER_H_ +#ifndef CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_ +#define CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_ #include <map> #include "base/callback_forward.h" #include "base/memory/linked_ptr.h" #include "base/memory/ref_counted.h" +#include "chrome/browser/tab_contents/web_contents_user_data.h" class SSLAddCertHandler; -class TabContents; namespace net { class HttpNetworkSession; @@ -20,10 +20,9 @@ class SSLCertRequestInfo; class X509Certificate; } -class TabContentsSSLHelper { +class SSLTabHelper : public WebContentsUserData<SSLTabHelper> { public: - explicit TabContentsSSLHelper(TabContents* tab_contents); - virtual ~TabContentsSSLHelper(); + virtual ~SSLTabHelper(); // Called when |handler| encounters an error in verifying a received client // certificate. Note that, because CAs often will not send us intermediate @@ -59,14 +58,18 @@ class TabContentsSSLHelper { const base::Callback<void(net::X509Certificate*)>& callback); private: - TabContents* tab_contents_; + explicit SSLTabHelper(content::WebContents* contents); + static int kUserDataKey; + friend class WebContentsUserData<SSLTabHelper>; + + content::WebContents* web_contents_; class SSLAddCertData; std::map<int, linked_ptr<SSLAddCertData> > request_id_to_add_cert_data_; SSLAddCertData* GetAddCertData(SSLAddCertHandler* handler); - DISALLOW_COPY_AND_ASSIGN(TabContentsSSLHelper); + DISALLOW_COPY_AND_ASSIGN(SSLTabHelper); }; -#endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_SSL_HELPER_H_ +#endif // CHROME_BROWSER_SSL_SSL_TAB_HELPER_H_ diff --git a/chrome/browser/ui/android/ssl_client_certificate_selector.cc b/chrome/browser/ui/android/ssl_client_certificate_selector.cc index 1851f79..7d91dc1 100644 --- a/chrome/browser/ui/android/ssl_client_certificate_selector.cc +++ b/chrome/browser/ui/android/ssl_client_certificate_selector.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl_client_certificate_selector.h" +#include "chrome/browser/ssl/ssl_client_certificate_selector.h" #include "base/logging.h" @@ -10,7 +10,7 @@ namespace chrome { // Client Auth is not implemented on Android yet. void ShowSSLClientCertificateSelector( - TabContents* tab_contents, + content::WebContents* contents, const net::HttpNetworkSession* network_session, net::SSLCertRequestInfo* cert_request_info, const base::Callback<void(net::X509Certificate*)>& callback) { diff --git a/chrome/browser/ui/cocoa/ssl_client_certificate_selector.mm b/chrome/browser/ui/cocoa/ssl_client_certificate_selector.mm index 3c9a713..34c20ab 100644 --- a/chrome/browser/ui/cocoa/ssl_client_certificate_selector.mm +++ b/chrome/browser/ui/cocoa/ssl_client_certificate_selector.mm @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl_client_certificate_selector.h" +#include "chrome/browser/ssl/ssl_client_certificate_selector.h" #import <SecurityInterface/SFChooseIdentityPanel.h> @@ -134,17 +134,18 @@ class NotificationProxy : public SSLClientAuthObserver { namespace chrome { void ShowSSLClientCertificateSelector( - TabContents* tabContents, + content::WebContents* contents, const net::HttpNetworkSession* network_session, net::SSLCertRequestInfo* cert_request_info, const base::Callback<void(net::X509Certificate*)>& callback) { + TabContents* tab_contents = TabContents::FromWebContents(contents); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); SSLClientCertificateSelectorCocoa* selector = [[[SSLClientCertificateSelectorCocoa alloc] initWithObserver:network_session certRequestInfo:cert_request_info callback:callback] autorelease]; - [selector displayDialog:tabContents]; + [selector displayDialog:tab_contents]; } } // namespace chrome diff --git a/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc b/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc index 9745db9..5cf91c4 100644 --- a/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc +++ b/chrome/browser/ui/gtk/ssl_client_certificate_selector.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ssl_client_certificate_selector.h" +#include "chrome/browser/ssl/ssl_client_certificate_selector.h" #include <gtk/gtk.h> @@ -386,11 +386,12 @@ void SSLClientCertificateSelector::OnPromptShown(GtkWidget* widget, namespace chrome { void ShowSSLClientCertificateSelector( - TabContents* tab_contents, + content::WebContents* contents, const net::HttpNetworkSession* network_session, net::SSLCertRequestInfo* cert_request_info, const base::Callback<void(net::X509Certificate*)>& callback) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + TabContents* tab_contents = TabContents::FromWebContents(contents); (new SSLClientCertificateSelector( tab_contents, network_session, cert_request_info, callback))->Show(); } diff --git a/chrome/browser/ui/tab_contents/tab_contents.cc b/chrome/browser/ui/tab_contents/tab_contents.cc index 39bf8d6..b035de4 100644 --- a/chrome/browser/ui/tab_contents/tab_contents.cc +++ b/chrome/browser/ui/tab_contents/tab_contents.cc @@ -28,8 +28,8 @@ #include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/safe_browsing/safe_browsing_tab_observer.h" #include "chrome/browser/sessions/session_tab_helper.h" +#include "chrome/browser/ssl/ssl_tab_helper.h" #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" -#include "chrome/browser/tab_contents/tab_contents_ssl_helper.h" #include "chrome/browser/tab_contents/thumbnail_generator.h" #include "chrome/browser/translate/translate_tab_helper.h" #include "chrome/browser/ui/alternate_error_tab_observer.h" @@ -151,7 +151,7 @@ TabContents::TabContents(WebContents* contents) search_tab_helper_.reset( new chrome::search::SearchTabHelper(this, is_search_enabled)); SnapshotTabHelper::CreateForWebContents(contents); - ssl_helper_.reset(new TabContentsSSLHelper(this)); + SSLTabHelper::CreateForWebContents(contents); synced_tab_delegate_.reset(new TabContentsSyncedTabDelegate(this)); translate_tab_helper_.reset(new TranslateTabHelper(contents)); zoom_controller_.reset(new ZoomController(this)); diff --git a/chrome/browser/ui/tab_contents/tab_contents.h b/chrome/browser/ui/tab_contents/tab_contents.h index 9fb341f..bc8414f 100644 --- a/chrome/browser/ui/tab_contents/tab_contents.h +++ b/chrome/browser/ui/tab_contents/tab_contents.h @@ -52,7 +52,6 @@ class SadTabHelper; class SearchEngineTabHelper; class ShellWindow; class TabAutofillManagerDelegate; -class TabContentsSSLHelper; class TabContentsTestHarness; class TabSpecificContentSettings; class TabStripModel; @@ -267,8 +266,6 @@ class TabContents : public content::WebContentsObserver { return search_tab_helper_.get(); } - TabContentsSSLHelper* ssl_helper() { return ssl_helper_.get(); } - browser_sync::SyncedTabDelegate* synced_tab_delegate() { return synced_tab_delegate_.get(); } @@ -348,7 +345,6 @@ class TabContents : public content::WebContentsObserver { scoped_ptr<SadTabHelper> sad_tab_helper_; scoped_ptr<SearchEngineTabHelper> search_engine_tab_helper_; scoped_ptr<chrome::search::SearchTabHelper> search_tab_helper_; - scoped_ptr<TabContentsSSLHelper> ssl_helper_; scoped_ptr<browser_sync::SyncedTabDelegate> synced_tab_delegate_; // The TabSpecificContentSettings object is used to query the blocked content diff --git a/chrome/browser/ui/views/ssl_client_certificate_selector.cc b/chrome/browser/ui/views/ssl_client_certificate_selector.cc index dabcbda..17eab09 100644 --- a/chrome/browser/ui/views/ssl_client_certificate_selector.cc +++ b/chrome/browser/ui/views/ssl_client_certificate_selector.cc @@ -282,12 +282,13 @@ void SSLClientCertificateSelector::CreateViewCertButton() { namespace chrome { void ShowSSLClientCertificateSelector( - TabContents* tab_contents, + content::WebContents* contents, const net::HttpNetworkSession* network_session, net::SSLCertRequestInfo* cert_request_info, const base::Callback<void(net::X509Certificate*)>& callback) { - DVLOG(1) << __FUNCTION__ << " " << tab_contents; + DVLOG(1) << __FUNCTION__ << " " << contents; DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); + TabContents* tab_contents = TabContents::FromWebContents(contents); (new SSLClientCertificateSelector( tab_contents, network_session, cert_request_info, callback))->Init(); } |