Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2210)

Unified Diff: content/renderer/dom_storage/webstoragenamespace_impl.cc

Issue 2382973002: Convert WebSecurityOrigin -> GURL without re-parsing the url (Closed)
Patch Set: rebase on #427122 Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/dom_storage/webstoragenamespace_impl.cc
diff --git a/content/renderer/dom_storage/webstoragenamespace_impl.cc b/content/renderer/dom_storage/webstoragenamespace_impl.cc
index e87a857d8f751904c95d4089425bd0910b2b0c3b..ae4f79e2f73349f5ad51dfa275cce32c16511822 100644
--- a/content/renderer/dom_storage/webstoragenamespace_impl.cc
+++ b/content/renderer/dom_storage/webstoragenamespace_impl.cc
@@ -8,12 +8,12 @@
#include "content/common/dom_storage/dom_storage_types.h"
#include "content/renderer/dom_storage/webstoragearea_impl.h"
#include "third_party/WebKit/public/platform/URLConversion.h"
-#include "third_party/WebKit/public/platform/WebString.h"
+#include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
#include "url/gurl.h"
+#include "url/origin.h"
using blink::WebStorageArea;
using blink::WebStorageNamespace;
-using blink::WebString;
namespace content {
@@ -30,8 +30,8 @@ WebStorageNamespaceImpl::~WebStorageNamespaceImpl() {
}
WebStorageArea* WebStorageNamespaceImpl::createStorageArea(
- const WebString& origin) {
- return new WebStorageAreaImpl(namespace_id_, blink::WebStringToGURL(origin));
+ const blink::WebSecurityOrigin& origin) {
+ return new WebStorageAreaImpl(namespace_id_, url::Origin(origin).GetURL());
}
WebStorageNamespace* WebStorageNamespaceImpl::copy() {
« no previous file with comments | « content/renderer/dom_storage/webstoragenamespace_impl.h ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698