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

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..cc5f2eb37f9d3f90084c37cdb3eff490f2c1795c 100644
--- a/content/renderer/drop_data_builder.cc
+++ b/content/renderer/drop_data_builder.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include "base/strings/string_util.h"
+#include "content/public/child/url_conversion.h"
#include "content/public/common/drop_data.h"
#include "third_party/WebKit/public/platform/WebDragData.h"
#include "third_party/WebKit/public/platform/WebString.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 = WebStringToGURL(item.stringData);
result.url_title = item.title;
break;
}

Powered by Google App Engine
This is Rietveld 408576698