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

Unified Diff: content/renderer/drop_data_builder.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: content/renderer/drop_data_builder.cc
diff --git a/content/renderer/drop_data_builder.cc b/content/renderer/drop_data_builder.cc
index beb98b6dec2c20976ec126df03a6d89024dac9cd..232428b5891004d3a4b611335b393707c17966a4 100644
--- a/content/renderer/drop_data_builder.cc
+++ b/content/renderer/drop_data_builder.cc
@@ -8,6 +8,7 @@
#include "base/strings/string_util.h"
#include "content/public/common/drop_data.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebDragData.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebVector.h"
@@ -34,7 +35,7 @@ DropData DropDataBuilder::Build(const WebDragData& drag_data) {
break;
}
if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeURIList)) {
- result.url = GURL(item.stringData);
+ result.url = blink::WebStringToGURL(item.stringData);
result.url_title = item.title;
break;
}
« no previous file with comments | « content/renderer/dom_storage/webstoragenamespace_impl.cc ('k') | content/renderer/media/android/webmediaplayer_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698