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

Unified Diff: media/blink/webmediaplayer_impl.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 | « media/blink/webencryptedmediaclient_impl.cc ('k') | media/mojo/services/mojo_cdm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 584a0d951b17bf60d709d299a316c455094ff59b..463a61cb00c0c9b492b28c7e75d4051b834a7a24 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -44,6 +44,7 @@
#include "media/blink/webmediasource_impl.h"
#include "media/filters/chunk_demuxer.h"
#include "media/filters/ffmpeg_demuxer.h"
+#include "third_party/WebKit/public/platform/URLConversion.h"
#include "third_party/WebKit/public/platform/WebEncryptedMediaTypes.h"
#include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
#include "third_party/WebKit/public/platform/WebMediaPlayerEncryptedMediaClient.h"
@@ -266,8 +267,9 @@ void WebMediaPlayerImpl::DoLoad(LoadType load_type,
DCHECK(main_task_runner_->BelongsToCurrentThread());
GURL gurl(url);
- ReportMetrics(load_type, gurl,
- GURL(frame_->document().securityOrigin().toString()));
+ ReportMetrics(
+ load_type, gurl,
+ blink::WebStringToGURL(frame_->document().securityOrigin().toString()));
// Set subresource URL for crash reporting.
base::debug::SetCrashKeyValue("subresource_url", gurl.spec());
« no previous file with comments | « media/blink/webencryptedmediaclient_impl.cc ('k') | media/mojo/services/mojo_cdm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698