summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 23:30:59 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 23:30:59 +0000
commit0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8 (patch)
tree1ad235e23d71bb494c8b67588b2798f713810cdd /chrome/browser/ssl
parentc90e16ce1fbc9abc1a1a58766e0418263ed28a84 (diff)
downloadchromium_src-0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8.zip
chromium_src-0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8.tar.gz
chromium_src-0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8.tar.bz2
Use WebConsoleMessage instead of ConsoleMessageLevel.
R=dglazkov Review URL: http://codereview.chromium.org/57073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl')
-rw-r--r--chrome/browser/ssl/ssl_manager.cc7
-rw-r--r--chrome/browser/ssl/ssl_manager.h8
-rw-r--r--chrome/browser/ssl/ssl_policy.cc11
3 files changed, 17 insertions, 9 deletions
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc
index 461979d..57ee3f8 100644
--- a/chrome/browser/ssl/ssl_manager.cc
+++ b/chrome/browser/ssl/ssl_manager.cc
@@ -28,6 +28,7 @@
#include "net/base/cert_status_flags.h"
#include "net/base/net_errors.h"
#include "net/url_request/url_request.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "webkit/glue/resource_type.h"
#if defined(OS_WIN)
@@ -40,6 +41,7 @@
#include "chrome/common/temp_scaffolding_stubs.h"
#endif
+using WebKit::WebConsoleMessage;
class SSLInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
@@ -177,8 +179,7 @@ bool SSLManager::SetMaxSecurityStyle(SecurityStyle style) {
}
// Delegate API method.
-void SSLManager::AddMessageToConsole(const std::wstring& msg,
- ConsoleMessageLevel level) {
+void SSLManager::AddMessageToConsole(const WebConsoleMessage& message) {
TabContents* tab_contents = controller_->GetTabContents(TAB_CONTENTS_WEB);
if (!tab_contents)
return;
@@ -187,7 +188,7 @@ void SSLManager::AddMessageToConsole(const std::wstring& msg,
return;
web_contents->render_view_host()->AddMessageToConsole(
- std::wstring(), msg, level);
+ std::wstring(), message);
}
// Delegate API method.
diff --git a/chrome/browser/ssl/ssl_manager.h b/chrome/browser/ssl/ssl_manager.h
index b72f1377f..14baf7a 100644
--- a/chrome/browser/ssl/ssl_manager.h
+++ b/chrome/browser/ssl/ssl_manager.h
@@ -21,7 +21,6 @@
#include "net/base/net_errors.h"
#include "net/base/ssl_info.h"
#include "net/base/x509_certificate.h"
-#include "webkit/glue/console_message_level.h"
#include "webkit/glue/resource_type.h"
class AutomationProvider;
@@ -38,6 +37,10 @@ class Task;
class URLRequest;
class WebContents;
+namespace WebKit {
+struct WebConsoleMessage;
+}
+
// The SSLManager SSLManager controls the SSL UI elements in a TabContents. It
// listens for various events that influence when these elements should or
// should not be displayed and adjusts them accordingly.
@@ -373,8 +376,7 @@ class SSLManager : public NotificationObserver {
bool SetMaxSecurityStyle(SecurityStyle style);
// Logs a message to the console of the page.
- void AddMessageToConsole(const std::wstring& msg,
- ConsoleMessageLevel level);
+ void AddMessageToConsole(const WebKit::WebConsoleMessage&);
// Records that |cert| is permitted to be used for |host| in the future.
void DenyCertForHost(net::X509Certificate* cert, const std::string& host);
diff --git a/chrome/browser/ssl/ssl_policy.cc b/chrome/browser/ssl/ssl_policy.cc
index 5221c04..0b2bcfe 100644
--- a/chrome/browser/ssl/ssl_policy.cc
+++ b/chrome/browser/ssl/ssl_policy.cc
@@ -25,7 +25,7 @@
#include "grit/generated_resources.h"
#include "net/base/cert_status_flags.h"
#include "net/base/ssl_info.h"
-#include "webkit/glue/console_message_level.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "webkit/glue/resource_type.h"
#if defined(OS_WIN)
@@ -35,6 +35,8 @@
#include "chrome/common/temp_scaffolding_stubs.h"
#endif
+using WebKit::WebConsoleMessage;
+
// Wrap all these helper classes in an anonymous namespace.
namespace {
@@ -159,11 +161,14 @@ static void InitializeEntryIfNeeded(NavigationEntry* entry) {
static void AddMixedContentWarningToConsole(
SSLManager::MixedContentHandler* handler) {
- const std::wstring& msg = l10n_util::GetStringF(
+ const std::wstring& text = l10n_util::GetStringF(
IDS_MIXED_CONTENT_LOG_MESSAGE,
UTF8ToWide(handler->frame_origin()),
UTF8ToWide(handler->request_url().spec()));
- handler->manager()->AddMessageToConsole(msg, MESSAGE_LEVEL_WARNING);
+ WebConsoleMessage message;
+ message.text = WideToUTF16Hack(text);
+ message.level = WebConsoleMessage::LevelWarning;
+ handler->manager()->AddMessageToConsole(message);
}
} // namespace