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

Unified Diff: chrome/renderer/extensions/media_galleries_custom_bindings.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
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | chrome/renderer/extensions/resource_request_policy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/media_galleries_custom_bindings.cc
diff --git a/chrome/renderer/extensions/media_galleries_custom_bindings.cc b/chrome/renderer/extensions/media_galleries_custom_bindings.cc
index 16d0b4aee15381e42d9aa0781b0a1a56af784779..a9f4cab53fe8a281944df31dc3dca93c94cf4a63 100644
--- a/chrome/renderer/extensions/media_galleries_custom_bindings.cc
+++ b/chrome/renderer/extensions/media_galleries_custom_bindings.cc
@@ -8,6 +8,7 @@
#include "extensions/renderer/script_context.h"
#include "storage/common/fileapi/file_system_util.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/web/WebDOMFileSystem.h"
#include "third_party/WebKit/public/web/WebDocument.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -36,7 +37,8 @@ void MediaGalleriesCustomBindings::GetMediaFileSystemObject(
blink::WebLocalFrame* webframe =
blink::WebLocalFrame::frameForCurrentContext();
- const GURL origin = GURL(webframe->document().securityOrigin().toString());
+ const GURL origin =
+ blink::WebStringToGURL(webframe->document().securityOrigin().toString());
std::string fs_name =
storage::GetFileSystemName(origin, storage::kFileSystemTypeExternal);
fs_name.append("_");
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | chrome/renderer/extensions/resource_request_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698