summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 20:21:59 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 20:21:59 +0000
commit7ea066a9c3e54b7a2fd0c2ac30c8f4a64cf8eb90 (patch)
tree2f283b622f4ee681e05e7e6119903146f6f4d1ea /chrome/browser/ssl
parentd2515f6e52f42d4baaa3c676ba1370ffa1f263eb (diff)
downloadchromium_src-7ea066a9c3e54b7a2fd0c2ac30c8f4a64cf8eb90.zip
chromium_src-7ea066a9c3e54b7a2fd0c2ac30c8f4a64cf8eb90.tar.gz
chromium_src-7ea066a9c3e54b7a2fd0c2ac30c8f4a64cf8eb90.tar.bz2
Stop serializing WebString over IPC. The new rule is that only POD (plain old
data) types from WebKit API are allowed to be used in the browser process. I added a big note about this to webkit_param_traits.h to explain the details of this decision. R=dglazkov Review URL: http://codereview.chromium.org/62032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13181 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl')
-rw-r--r--chrome/browser/ssl/ssl_manager.cc6
-rw-r--r--chrome/browser/ssl/ssl_manager.h8
-rw-r--r--chrome/browser/ssl/ssl_policy.cc7
3 files changed, 8 insertions, 13 deletions
diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc
index 42c6ec0..2d953eb 100644
--- a/chrome/browser/ssl/ssl_manager.cc
+++ b/chrome/browser/ssl/ssl_manager.cc
@@ -28,7 +28,6 @@
#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)
@@ -179,14 +178,15 @@ bool SSLManager::SetMaxSecurityStyle(SecurityStyle style) {
}
// Delegate API method.
-void SSLManager::AddMessageToConsole(const WebConsoleMessage& message) {
+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(
- std::wstring(), message);
+ string16(), message, level);
}
// Delegate API method.
diff --git a/chrome/browser/ssl/ssl_manager.h b/chrome/browser/ssl/ssl_manager.h
index 14baf7a..d477e36 100644
--- a/chrome/browser/ssl/ssl_manager.h
+++ b/chrome/browser/ssl/ssl_manager.h
@@ -21,6 +21,7 @@
#include "net/base/net_errors.h"
#include "net/base/ssl_info.h"
#include "net/base/x509_certificate.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "webkit/glue/resource_type.h"
class AutomationProvider;
@@ -37,10 +38,6 @@ 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.
@@ -376,7 +373,8 @@ class SSLManager : public NotificationObserver {
bool SetMaxSecurityStyle(SecurityStyle style);
// Logs a message to the console of the page.
- void AddMessageToConsole(const WebKit::WebConsoleMessage&);
+ void AddMessageToConsole(const string16& message,
+ const WebKit::WebConsoleMessage::Level&);
// 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 0b2bcfe..5edef80a 100644
--- a/chrome/browser/ssl/ssl_policy.cc
+++ b/chrome/browser/ssl/ssl_policy.cc
@@ -25,7 +25,6 @@
#include "grit/generated_resources.h"
#include "net/base/cert_status_flags.h"
#include "net/base/ssl_info.h"
-#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "webkit/glue/resource_type.h"
#if defined(OS_WIN)
@@ -165,10 +164,8 @@ static void AddMixedContentWarningToConsole(
IDS_MIXED_CONTENT_LOG_MESSAGE,
UTF8ToWide(handler->frame_origin()),
UTF8ToWide(handler->request_url().spec()));
- WebConsoleMessage message;
- message.text = WideToUTF16Hack(text);
- message.level = WebConsoleMessage::LevelWarning;
- handler->manager()->AddMessageToConsole(message);
+ handler->manager()->AddMessageToConsole(
+ WideToUTF16Hack(text), WebConsoleMessage::LevelWarning);
}
} // namespace