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

Side by Side Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 616113002: Rename keyNeeded() to encrypted() in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/renderer/media/android/webmediaplayer_android.h" 5 #include "content/renderer/media/android/webmediaplayer_android.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1757 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 return; 1768 return;
1769 } 1769 }
1770 1770
1771 UMA_HISTOGRAM_COUNTS(kMediaEme + std::string("NeedKey"), 1); 1771 UMA_HISTOGRAM_COUNTS(kMediaEme + std::string("NeedKey"), 1);
1772 1772
1773 DCHECK(init_data_type_.empty() || type.empty() || type == init_data_type_); 1773 DCHECK(init_data_type_.empty() || type.empty() || type == init_data_type_);
1774 if (init_data_type_.empty()) 1774 if (init_data_type_.empty())
1775 init_data_type_ = type; 1775 init_data_type_ = type;
1776 1776
1777 const uint8* init_data_ptr = init_data.empty() ? NULL : &init_data[0]; 1777 const uint8* init_data_ptr = init_data.empty() ? NULL : &init_data[0];
1778 client_->keyNeeded( 1778 client_->encrypted(
1779 WebString::fromUTF8(type), init_data_ptr, init_data.size()); 1779 WebString::fromUTF8(type), init_data_ptr, init_data.size());
1780 } 1780 }
1781 1781
1782 void WebMediaPlayerAndroid::SetDecryptorReadyCB( 1782 void WebMediaPlayerAndroid::SetDecryptorReadyCB(
1783 const media::DecryptorReadyCB& decryptor_ready_cb) { 1783 const media::DecryptorReadyCB& decryptor_ready_cb) {
1784 DCHECK(main_thread_checker_.CalledOnValidThread()); 1784 DCHECK(main_thread_checker_.CalledOnValidThread());
1785 1785
1786 // Cancels the previous decryptor request. 1786 // Cancels the previous decryptor request.
1787 if (decryptor_ready_cb.is_null()) { 1787 if (decryptor_ready_cb.is_null()) {
1788 if (!decryptor_ready_cb_.is_null()) { 1788 if (!decryptor_ready_cb_.is_null()) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 1829
1830 bool WebMediaPlayerAndroid::IsHLSStream() const { 1830 bool WebMediaPlayerAndroid::IsHLSStream() const {
1831 std::string mime; 1831 std::string mime;
1832 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_; 1832 GURL url = redirected_url_.is_empty() ? url_ : redirected_url_;
1833 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime)) 1833 if (!net::GetMimeTypeFromFile(base::FilePath(url.path()), &mime))
1834 return false; 1834 return false;
1835 return !mime.compare("application/x-mpegurl"); 1835 return !mime.compare("application/x-mpegurl");
1836 } 1836 }
1837 1837
1838 } // namespace content 1838 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698