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

Side by Side Diff: media/cdm/ppapi/external_clear_key/clear_key_cdm.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 "media/cdm/ppapi/external_clear_key/clear_key_cdm.h" 5 #include "media/cdm/ppapi/external_clear_key/clear_key_cdm.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <sstream> 9 #include <sstream>
10 #include <string> 10 #include <string>
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 // Defer OnSessionCreated() until the session is loaded. 555 // Defer OnSessionCreated() until the session is loaded.
556 return; 556 return;
557 } 557 }
558 558
559 host_->OnSessionCreated( 559 host_->OnSessionCreated(
560 session_id, web_session_id.data(), web_session_id.size()); 560 session_id, web_session_id.data(), web_session_id.size());
561 } 561 }
562 562
563 void ClearKeyCdm::OnSessionMessage(uint32 session_id, 563 void ClearKeyCdm::OnSessionMessage(uint32 session_id,
564 const std::vector<uint8>& message, 564 const std::vector<uint8>& message,
565 const std::string& destination_url) { 565 const GURL& destination_url) {
566 DVLOG(1) << "OnSessionMessage: " << message.size(); 566 DVLOG(1) << "OnSessionMessage: " << message.size();
567 567
568 // Ignore the message when we are waiting to update the loadable session. 568 // Ignore the message when we are waiting to update the loadable session.
569 if (session_id == session_id_for_emulated_loadsession_) 569 if (session_id == session_id_for_emulated_loadsession_)
570 return; 570 return;
571 571
572 host_->OnSessionMessage(session_id, 572 host_->OnSessionMessage(session_id,
573 reinterpret_cast<const char*>(message.data()), 573 reinterpret_cast<const char*>(message.data()),
574 message.size(), 574 message.size(),
575 destination_url.data(), 575 destination_url.spec().data(),
576 destination_url.size()); 576 destination_url.spec().size());
577 } 577 }
578 578
579 void ClearKeyCdm::OnSessionReady(uint32 session_id) { 579 void ClearKeyCdm::OnSessionReady(uint32 session_id) {
580 if (session_id == session_id_for_emulated_loadsession_) { 580 if (session_id == session_id_for_emulated_loadsession_) {
581 session_id_for_emulated_loadsession_ = MediaKeys::kInvalidSessionId; 581 session_id_for_emulated_loadsession_ = MediaKeys::kInvalidSessionId;
582 host_->OnSessionCreated( 582 host_->OnSessionCreated(
583 session_id, kLoadableWebSessionId, strlen(kLoadableWebSessionId)); 583 session_id, kLoadableWebSessionId, strlen(kLoadableWebSessionId));
584 } 584 }
585 585
586 host_->OnSessionReady(session_id); 586 host_->OnSessionReady(session_id);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 665
666 void ClearKeyCdm::OnFileIOTestComplete(bool success) { 666 void ClearKeyCdm::OnFileIOTestComplete(bool success) {
667 DVLOG(1) << __FUNCTION__ << ": " << success; 667 DVLOG(1) << __FUNCTION__ << ": " << success;
668 std::string message = GetFileIOTestResultMessage(success); 668 std::string message = GetFileIOTestResultMessage(success);
669 host_->OnSessionMessage( 669 host_->OnSessionMessage(
670 last_session_id_, message.data(), message.size(), NULL, 0); 670 last_session_id_, message.data(), message.size(), NULL, 0);
671 file_io_test_runner_.reset(); 671 file_io_test_runner_.reset();
672 } 672 }
673 673
674 } // namespace media 674 } // namespace media
OLDNEW
« no previous file with comments | « media/cdm/ppapi/external_clear_key/clear_key_cdm.h ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698