From 91733b650d1e31b84a50860b3e5780d97b11d86d Mon Sep 17 00:00:00 2001 From: "darin@chromium.org" Date: Fri, 18 Sep 2009 06:21:09 +0000 Subject: Introduce WebKit::WebSecurityOrigin as a wrapper around WebCore::SecurityOrigin. This provides us a little wiggle room in the future in case we ever want to provide more details about a security origin beyond just its stringified value. This was done on recommendation from Adam Barth. R=jorlow BUG=21967 TEST=none Review URL: http://codereview.chromium.org/211013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26554 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_view.cc | 7 ++++--- chrome/renderer/render_view.h | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'chrome/renderer') diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 4a2335c..36f472a 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -65,6 +65,7 @@ #include "webkit/api/public/WebPoint.h" #include "webkit/api/public/WebRect.h" #include "webkit/api/public/WebScriptSource.h" +#include "webkit/api/public/WebSecurityOrigin.h" #include "webkit/api/public/WebSize.h" #include "webkit/api/public/WebURL.h" #include "webkit/api/public/WebURLError.h" @@ -1325,7 +1326,7 @@ WebView* RenderView::createView(WebFrame* creator) { view->opened_by_user_gesture_ = user_gesture; // Record the security origin of the creator. - GURL creator_url(creator->securityOrigin().utf8()); + GURL creator_url(creator->securityOrigin().toString().utf8()); if (!creator_url.is_valid() || !creator_url.IsStandard()) creator_url = GURL(); view->creator_url_ = creator_url; @@ -2230,8 +2231,8 @@ void RenderView::didLoadResourceFromMemoryCache( Send(new ViewHostMsg_DidLoadResourceFromMemoryCache( routing_id_, request.url(), - frame->securityOrigin().utf8(), - frame->top()->securityOrigin().utf8(), + frame->securityOrigin().toString().utf8(), + frame->top()->securityOrigin().toString().utf8(), response.securityInfo())); } diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 218d617..b647e65 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -354,7 +354,7 @@ class RenderView : public RenderWidget, const WebKit::WebURLResponse&); virtual void didDisplayInsecureContent(WebKit::WebFrame* frame) {} virtual void didRunInsecureContent( - WebKit::WebFrame* frame, const WebKit::WebString& security_origin) {} + WebKit::WebFrame* frame, const WebKit::WebSecurityOrigin& origin) {} virtual void didExhaustMemoryAvailableForScript(WebKit::WebFrame* frame); virtual void didChangeContentsSize( WebKit::WebFrame* frame, const WebKit::WebSize& size); -- cgit v1.1