summaryrefslogtreecommitdiffstats
path: root/content/browser/ssl
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-06 16:52:45 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-06 16:52:45 +0000
commit8ec2647afa4781b212b1a364d88aae1b493dddc1 (patch)
tree83b19415a33d56170cce7ddbe9615acd4c0da5a5 /content/browser/ssl
parentb3a54ad0f6291022412de439a3b238723bd09d07 (diff)
downloadchromium_src-8ec2647afa4781b212b1a364d88aae1b493dddc1.zip
chromium_src-8ec2647afa4781b212b1a364d88aae1b493dddc1.tar.gz
chromium_src-8ec2647afa4781b212b1a364d88aae1b493dddc1.tar.bz2
Remove the remaining Chrome SSL dependencies from content.
BUG=76697 Review URL: http://codereview.chromium.org/7058062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87998 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/ssl')
-rw-r--r--content/browser/ssl/ssl_client_auth_handler.cc15
-rw-r--r--content/browser/ssl/ssl_error_handler.cc15
-rw-r--r--content/browser/ssl/ssl_error_handler.h7
3 files changed, 15 insertions, 22 deletions
diff --git a/content/browser/ssl/ssl_client_auth_handler.cc b/content/browser/ssl/ssl_client_auth_handler.cc
index 02cb174..49e852f 100644
--- a/content/browser/ssl/ssl_client_auth_handler.cc
+++ b/content/browser/ssl/ssl_client_auth_handler.cc
@@ -4,14 +4,13 @@
#include "content/browser/ssl/ssl_client_auth_handler.h"
-#include "chrome/browser/tab_contents/tab_contents_ssl_helper.h"
-#include "chrome/browser/tab_contents/tab_util.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/browser_thread.h"
+#include "content/browser/content_browser_client.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/ssl/ssl_client_auth_notification_details.h"
#include "content/common/notification_service.h"
+#include "net/base/x509_certificate.h"
#include "net/url_request/url_request.h"
SSLClientAuthHandler::SSLClientAuthHandler(
@@ -97,14 +96,8 @@ void SSLClientAuthHandler::DoCertificateSelected(net::X509Certificate* cert) {
void SSLClientAuthHandler::ShowClientCertificateRequestDialog(
int render_process_host_id, int render_view_host_id) {
- TabContents* tab = tab_util::GetTabContentsByID(
- render_process_host_id, render_view_host_id);
- if (!tab)
- return;
-
- TabContentsWrapper* wrapper =
- TabContentsWrapper::GetCurrentWrapperForContents(tab);
- wrapper->ssl_helper()->ShowClientCertificateRequestDialog(this);
+ content::GetContentClient()->browser()->ShowClientCertificateRequestDialog(
+ render_process_host_id, render_view_host_id, this);
}
SSLClientAuthObserver::SSLClientAuthObserver(
diff --git a/content/browser/ssl/ssl_error_handler.cc b/content/browser/ssl/ssl_error_handler.cc
index 17d1fde..8fc86bd 100644
--- a/content/browser/ssl/ssl_error_handler.cc
+++ b/content/browser/ssl/ssl_error_handler.cc
@@ -4,11 +4,12 @@
#include "content/browser/ssl/ssl_error_handler.h"
-#include "chrome/browser/tab_contents/tab_util.h"
#include "content/browser/browser_thread.h"
+#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host_request_info.h"
#include "content/browser/ssl/ssl_cert_error_handler.h"
+#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "net/base/net_errors.h"
#include "net/url_request/url_request.h"
@@ -59,7 +60,12 @@ SSLCertErrorHandler* SSLErrorHandler::AsSSLCertErrorHandler() {
void SSLErrorHandler::Dispatch() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- TabContents* tab_contents = GetTabContents();
+ TabContents* tab_contents = NULL;
+ RenderViewHost* render_view_host =
+ RenderViewHost::FromID(render_process_host_id_, tab_contents_id_);
+ if (render_view_host)
+ tab_contents = render_view_host->delegate()->GetAsTabContents();
+
if (!tab_contents) {
// We arrived on the UI thread, but the tab we're looking for is no longer
// here.
@@ -72,11 +78,6 @@ void SSLErrorHandler::Dispatch() {
OnDispatched();
}
-TabContents* SSLErrorHandler::GetTabContents() {
- return tab_util::GetTabContentsByID(render_process_host_id_,
- tab_contents_id_);
-}
-
void SSLErrorHandler::CancelRequest() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
diff --git a/content/browser/ssl/ssl_error_handler.h b/content/browser/ssl/ssl_error_handler.h
index 3fe0dee..b0084d3 100644
--- a/content/browser/ssl/ssl_error_handler.h
+++ b/content/browser/ssl/ssl_error_handler.h
@@ -53,10 +53,6 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> {
// Available on either thread.
ResourceType::Type resource_type() const { return resource_type_; }
- // Returns the TabContents this object is associated with. Should be
- // called from the UI thread.
- TabContents* GetTabContents();
-
// Cancels the associated net::URLRequest.
// This method can be called from OnDispatchFailed and OnDispatched.
void CancelRequest();
@@ -80,6 +76,9 @@ class SSLErrorHandler : public base::RefCountedThreadSafe<SSLErrorHandler> {
// call this.
void TakeNoAction();
+ int render_process_host_id() const { return render_process_host_id_; }
+ int tab_contents_id() const { return tab_contents_id_; }
+
protected:
friend class base::RefCountedThreadSafe<SSLErrorHandler>;