summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 07:58:34 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-04 07:58:34 +0000
commit57c6a6579cf274fe37d6196931a3034d90da7113 (patch)
treeec42313580156ccc039b5fee714ee12259cb08ee /chrome/browser/ssl
parentb23c9e1f05d474adc327c85d87eacc77554976e0 (diff)
downloadchromium_src-57c6a6579cf274fe37d6196931a3034d90da7113.zip
chromium_src-57c6a6579cf274fe37d6196931a3034d90da7113.tar.gz
chromium_src-57c6a6579cf274fe37d6196931a3034d90da7113.tar.bz2
Replace all occurrances of WebContents with TabContents.
Review URL: http://codereview.chromium.org/99177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15194 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl')
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.cc9
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc1
-rw-r--r--chrome/browser/ssl/ssl_manager.cc20
-rw-r--r--chrome/browser/ssl/ssl_manager.h6
-rw-r--r--chrome/browser/ssl/ssl_policy.cc7
5 files changed, 17 insertions, 26 deletions
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 5e1e2fd..5d60cb8 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -13,7 +13,7 @@
#include "chrome/browser/ssl/ssl_error_info.h"
#include "chrome/browser/tab_contents/navigation_controller.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
-#include "chrome/browser/tab_contents/web_contents.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/notification_service.h"
@@ -43,7 +43,7 @@ void RecordSSLBlockingPageStats(SSLBlockingPageEvent event) {
// No error happening loading a sub-resource triggers an interstitial so far.
SSLBlockingPage::SSLBlockingPage(SSLManager::CertError* error,
Delegate* delegate)
- : InterstitialPage(error->GetWebContents(), true, error->request_url()),
+ : InterstitialPage(error->GetTabContents(), true, error->request_url()),
error_(error),
delegate_(delegate),
delegate_has_been_notified_(false) {
@@ -88,10 +88,9 @@ std::string SSLBlockingPage::GetHTMLContents() {
}
void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) {
- WebContents* web = tab()->AsWebContents();
const net::SSLInfo& ssl_info = error_->ssl_info();
int cert_id = CertStore::GetSharedInstance()->StoreCert(
- ssl_info.cert, web->render_view_host()->process()->pid());
+ ssl_info.cert, tab()->render_view_host()->process()->pid());
entry->ssl().set_security_style(SECURITY_STYLE_AUTHENTICATION_BROKEN);
entry->ssl().set_cert_id(cert_id);
@@ -99,7 +98,7 @@ void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) {
entry->ssl().set_security_bits(ssl_info.security_bits);
NotificationService::current()->Notify(
NotificationType::SSL_VISIBLE_STATE_CHANGED,
- Source<NavigationController>(&web->controller()),
+ Source<NavigationController>(&tab()->controller()),
NotificationService::NoDetails());
}
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index 5b513d2..a6d5772 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -6,7 +6,6 @@
#include "chrome/browser/tab_contents/interstitial_page.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/tab_contents.h"
-#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "chrome/test/in_process_browser_test.h"
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc
index 3ff1385..7b54186 100644
--- a/chrome/browser/ssl/ssl_manager.cc
+++ b/chrome/browser/ssl/ssl_manager.cc
@@ -19,7 +19,6 @@
#include "chrome/browser/tab_contents/provisional_load_details.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_util.h"
-#include "chrome/browser/tab_contents/web_contents.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
@@ -178,12 +177,7 @@ bool SSLManager::SetMaxSecurityStyle(SecurityStyle style) {
// Delegate API method.
void SSLManager::AddMessageToConsole(const string16& message,
const WebConsoleMessage::Level& level) {
- TabContents* tab_contents = controller_->tab_contents();
- WebContents* web_contents = tab_contents->AsWebContents();
- if (!web_contents)
- return;
-
- web_contents->render_view_host()->AddMessageToConsole(
+ controller_->tab_contents()->render_view_host()->AddMessageToConsole(
string16(), message, level);
}
@@ -279,10 +273,10 @@ SSLManager::ErrorHandler::ErrorHandler(ResourceDispatcherHost* rdh,
void SSLManager::ErrorHandler::Dispatch() {
DCHECK(MessageLoop::current() == ui_loop_);
- TabContents* web_contents =
- tab_util::GetWebContentsByID(render_process_host_id_, tab_contents_id_);
+ TabContents* tab_contents =
+ tab_util::GetTabContentsByID(render_process_host_id_, tab_contents_id_);
- if (!web_contents) {
+ if (!tab_contents) {
// We arrived on the UI thread, but the tab we're looking for is no longer
// here.
OnDispatchFailed();
@@ -290,12 +284,12 @@ void SSLManager::ErrorHandler::Dispatch() {
}
// Hand ourselves off to the SSLManager.
- manager_ = web_contents->controller().ssl_manager();
+ manager_ = tab_contents->controller().ssl_manager();
OnDispatched();
}
-WebContents* SSLManager::ErrorHandler::GetWebContents() {
- return tab_util::GetWebContentsByID(render_process_host_id_,
+TabContents* SSLManager::ErrorHandler::GetTabContents() {
+ return tab_util::GetTabContentsByID(render_process_host_id_,
tab_contents_id_);
}
diff --git a/chrome/browser/ssl/ssl_manager.h b/chrome/browser/ssl/ssl_manager.h
index 8ad8a6a..0c940a4 100644
--- a/chrome/browser/ssl/ssl_manager.h
+++ b/chrome/browser/ssl/ssl_manager.h
@@ -36,7 +36,7 @@ class SSLErrorInfo;
class SSLHostState;
class Task;
class URLRequest;
-class WebContents;
+class TabContents;
// The SSLManager SSLManager controls the SSL UI elements in a TabContents. It
// listens for various events that influence when these elements should or
@@ -87,9 +87,9 @@ class SSLManager : public NotificationObserver {
// Call on the UI thread.
SSLManager* manager() const { return manager_; }
- // Returns the WebContents this object is associated with. Should be
+ // Returns the TabContents this object is associated with. Should be
// called from the UI thread.
- WebContents* GetWebContents();
+ TabContents* GetTabContents();
// Cancels the associated URLRequest.
// This method can be called from OnDispatchFailed and OnDispatched.
diff --git a/chrome/browser/ssl/ssl_policy.cc b/chrome/browser/ssl/ssl_policy.cc
index ebe5e60..e921d42 100644
--- a/chrome/browser/ssl/ssl_policy.cc
+++ b/chrome/browser/ssl/ssl_policy.cc
@@ -10,9 +10,8 @@
#include "chrome/browser/cert_store.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/ssl/ssl_error_info.h"
-#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
-#include "chrome/browser/tab_contents/web_contents.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/notification_service.h"
@@ -125,7 +124,7 @@ static void ShowErrorPage(SSLPolicy* policy, SSLManager::CertError* error) {
std::string html_text(jstemplate_builder::GetTemplateHtml(html, &strings,
"template_root"));
- WebContents* tab = error->GetWebContents();
+ TabContents* tab = error->GetTabContents();
int cert_id = CertStore::GetSharedInstance()->StoreCert(
error->ssl_info().cert, tab->render_view_host()->process()->pid());
std::string security_info =
@@ -217,7 +216,7 @@ void SSLPolicy::OnCertError(SSLManager::CertError* error) {
void SSLPolicy::OnMixedContent(SSLManager::MixedContentHandler* handler) {
// Get the user's mixed content preference.
- PrefService* prefs = handler->GetWebContents()->profile()->GetPrefs();
+ PrefService* prefs = handler->GetTabContents()->profile()->GetPrefs();
FilterPolicy::Type filter_policy =
FilterPolicy::FromInt(prefs->GetInteger(prefs::kMixedContentFiltering));