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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/media/android/browser_media_player_manager.h" 5 #include "content/browser/media/android/browser_media_player_manager.h"
6 6
7 #include "base/android/scoped_java_ref.h" 7 #include "base/android/scoped_java_ref.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "content/browser/android/content_view_core_impl.h" 10 #include "content/browser/android/content_view_core_impl.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 uint32 session_id, 358 uint32 session_id,
359 const std::string& web_session_id) { 359 const std::string& web_session_id) {
360 Send(new CdmMsg_SessionCreated( 360 Send(new CdmMsg_SessionCreated(
361 RoutingID(), cdm_id, session_id, web_session_id)); 361 RoutingID(), cdm_id, session_id, web_session_id));
362 } 362 }
363 363
364 void BrowserMediaPlayerManager::OnSessionMessage( 364 void BrowserMediaPlayerManager::OnSessionMessage(
365 int cdm_id, 365 int cdm_id,
366 uint32 session_id, 366 uint32 session_id,
367 const std::vector<uint8>& message, 367 const std::vector<uint8>& message,
368 const std::string& destination_url) { 368 const GURL& destination_url) {
369 GURL destination_gurl(destination_url); 369 GURL verified_gurl = destination_url;
370 if (!destination_gurl.is_valid() && !destination_gurl.is_empty()) { 370 if (!verified_gurl.is_valid() && !verified_gurl.is_empty()) {
371 DLOG(WARNING) << "SessionMessage destination_url is invalid : " 371 DLOG(WARNING) << "SessionMessage destination_url is invalid : "
372 << destination_gurl.possibly_invalid_spec(); 372 << destination_url.possibly_invalid_spec();
373 destination_gurl = GURL::EmptyGURL(); // Replace invalid destination_url. 373 verified_gurl = GURL::EmptyGURL(); // Replace invalid destination_url.
374 } 374 }
375 375
376 Send(new CdmMsg_SessionMessage( 376 Send(new CdmMsg_SessionMessage(
377 RoutingID(), cdm_id, session_id, message, destination_gurl)); 377 RoutingID(), cdm_id, session_id, message, verified_gurl));
378 } 378 }
379 379
380 void BrowserMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) { 380 void BrowserMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) {
381 Send(new CdmMsg_SessionReady(RoutingID(), cdm_id, session_id)); 381 Send(new CdmMsg_SessionReady(RoutingID(), cdm_id, session_id));
382 } 382 }
383 383
384 void BrowserMediaPlayerManager::OnSessionClosed(int cdm_id, uint32 session_id) { 384 void BrowserMediaPlayerManager::OnSessionClosed(int cdm_id, uint32 session_id) {
385 Send(new CdmMsg_SessionClosed(RoutingID(), cdm_id, session_id)); 385 Send(new CdmMsg_SessionClosed(RoutingID(), cdm_id, session_id));
386 } 386 }
387 387
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 #if defined(VIDEO_HOLE) 874 #if defined(VIDEO_HOLE)
875 MediaPlayerAndroid* player = GetPlayer(player_id); 875 MediaPlayerAndroid* player = GetPlayer(player_id);
876 if (player && player->IsSurfaceInUse()) 876 if (player && player->IsSurfaceInUse())
877 return; 877 return;
878 if (external_video_surface_container_) 878 if (external_video_surface_container_)
879 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); 879 external_video_surface_container_->ReleaseExternalVideoSurface(player_id);
880 #endif // defined(VIDEO_HOLE) 880 #endif // defined(VIDEO_HOLE)
881 } 881 }
882 882
883 } // namespace content 883 } // namespace content
OLDNEW
« 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