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

Unified Diff: content/browser/media/android/browser_media_player_manager.cc

Issue 297703002: Using GURL in place of std::string for destination_url (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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/browser/media/android/browser_media_player_manager.cc
diff --git a/content/browser/media/android/browser_media_player_manager.cc b/content/browser/media/android/browser_media_player_manager.cc
index 914bb9fc30ae2f3aeb6bde20b92e52f9b8ac6eb5..ceace3651f3ed6af38442c812650213c128bb08b 100644
--- a/content/browser/media/android/browser_media_player_manager.cc
+++ b/content/browser/media/android/browser_media_player_manager.cc
@@ -365,16 +365,16 @@ void BrowserMediaPlayerManager::OnSessionMessage(
int cdm_id,
uint32 session_id,
const std::vector<uint8>& message,
- const std::string& destination_url) {
- GURL destination_gurl(destination_url);
- if (!destination_gurl.is_valid() && !destination_gurl.is_empty()) {
+ const GURL& destination_url) {
+ GURL verified_gurl = destination_url;
+ if (!verified_gurl.is_valid() && !verified_gurl.is_empty()) {
DLOG(WARNING) << "SessionMessage destination_url is invalid : "
- << destination_gurl.possibly_invalid_spec();
- destination_gurl = GURL::EmptyGURL(); // Replace invalid destination_url.
+ << destination_url.possibly_invalid_spec();
+ verified_gurl = GURL::EmptyGURL(); // Replace invalid destination_url.
}
Send(new CdmMsg_SessionMessage(
- RoutingID(), cdm_id, session_id, message, destination_gurl));
+ RoutingID(), cdm_id, session_id, message, verified_gurl));
}
void BrowserMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) {
« no previous file with comments | « content/browser/media/android/browser_media_player_manager.h ('k') | content/renderer/media/android/proxy_media_keys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698