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

Unified Diff: chrome/renderer/worker_content_settings_client_proxy.cc

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: chrome/renderer/worker_content_settings_client_proxy.cc
diff --git a/chrome/renderer/worker_content_settings_client_proxy.cc b/chrome/renderer/worker_content_settings_client_proxy.cc
index 7ae145c134771db50a9f8eb792e30cb35ba88a1f..8b1233c6df499beace13a226f328b1fdd892ba3a 100644
--- a/chrome/renderer/worker_content_settings_client_proxy.cc
+++ b/chrome/renderer/worker_content_settings_client_proxy.cc
@@ -9,6 +9,7 @@
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_thread.h"
#include "ipc/ipc_sync_message_filter.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebSecurityOrigin.h"
@@ -22,8 +23,10 @@ WorkerContentSettingsClientProxy::WorkerContentSettingsClientProxy(
frame->top()->securityOrigin().isUnique())
is_unique_origin_ = true;
sync_message_filter_ = content::RenderThread::Get()->GetSyncMessageFilter();
- document_origin_url_ = GURL(frame->document().securityOrigin().toString());
- top_frame_origin_url_ = GURL(frame->top()->securityOrigin().toString());
+ document_origin_url_ =
+ blink::WebStringToGURL(frame->document().securityOrigin().toString());
+ top_frame_origin_url_ =
+ blink::WebStringToGURL(frame->top()->securityOrigin().toString());
}
WorkerContentSettingsClientProxy::~WorkerContentSettingsClientProxy() {}

Powered by Google App Engine
This is Rietveld 408576698