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

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: removing un-necessary includes 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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 uint32 session_id, 384 uint32 session_id,
385 const std::string& web_session_id) { 385 const std::string& web_session_id) {
386 Send(new CdmMsg_SessionCreated( 386 Send(new CdmMsg_SessionCreated(
387 routing_id(), cdm_id, session_id, web_session_id)); 387 routing_id(), cdm_id, session_id, web_session_id));
388 } 388 }
389 389
390 void BrowserMediaPlayerManager::OnSessionMessage( 390 void BrowserMediaPlayerManager::OnSessionMessage(
391 int cdm_id, 391 int cdm_id,
392 uint32 session_id, 392 uint32 session_id,
393 const std::vector<uint8>& message, 393 const std::vector<uint8>& message,
394 const std::string& destination_url) { 394 const GURL& destination_url) {
395 GURL destination_gurl(destination_url); 395 if (!destination_url.is_valid() && !destination_url.is_empty()) {
396 if (!destination_gurl.is_valid() && !destination_gurl.is_empty()) {
397 DLOG(WARNING) << "SessionMessage destination_url is invalid : " 396 DLOG(WARNING) << "SessionMessage destination_url is invalid : "
398 << destination_gurl.possibly_invalid_spec(); 397 << destination_url.possibly_invalid_spec();
399 destination_gurl = GURL::EmptyGURL(); // Replace invalid destination_url. 398 Send(new CdmMsg_SessionMessage(
399 routing_id(), cdm_id, session_id, message, GURL::EmptyGURL()));
xhwang 2014/05/21 16:59:01 You could still use a "verified_gurl" so that you
amogh.bihani 2014/05/22 11:59:49 I have made the change. I did this as I was thinki
400 return;
400 } 401 }
401 402
402 Send(new CdmMsg_SessionMessage( 403 Send(new CdmMsg_SessionMessage(
403 routing_id(), cdm_id, session_id, message, destination_gurl)); 404 routing_id(), cdm_id, session_id, message, destination_url));
404 } 405 }
405 406
406 void BrowserMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) { 407 void BrowserMediaPlayerManager::OnSessionReady(int cdm_id, uint32 session_id) {
407 Send(new CdmMsg_SessionReady(routing_id(), cdm_id, session_id)); 408 Send(new CdmMsg_SessionReady(routing_id(), cdm_id, session_id));
408 } 409 }
409 410
410 void BrowserMediaPlayerManager::OnSessionClosed(int cdm_id, uint32 session_id) { 411 void BrowserMediaPlayerManager::OnSessionClosed(int cdm_id, uint32 session_id) {
411 Send(new CdmMsg_SessionClosed(routing_id(), cdm_id, session_id)); 412 Send(new CdmMsg_SessionClosed(routing_id(), cdm_id, session_id));
412 } 413 }
413 414
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 #if defined(VIDEO_HOLE) 893 #if defined(VIDEO_HOLE)
893 MediaPlayerAndroid* player = GetPlayer(player_id); 894 MediaPlayerAndroid* player = GetPlayer(player_id);
894 if (player && player->IsSurfaceInUse()) 895 if (player && player->IsSurfaceInUse())
895 return; 896 return;
896 if (external_video_surface_container_) 897 if (external_video_surface_container_)
897 external_video_surface_container_->ReleaseExternalVideoSurface(player_id); 898 external_video_surface_container_->ReleaseExternalVideoSurface(player_id);
898 #endif // defined(VIDEO_HOLE) 899 #endif // defined(VIDEO_HOLE)
899 } 900 }
900 901
901 } // namespace content 902 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698