summaryrefslogtreecommitdiffstats
path: root/webkit/media/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/media/crypto')
-rw-r--r--webkit/media/crypto/key_systems.cc5
-rw-r--r--webkit/media/crypto/key_systems_unittest.cc24
-rw-r--r--webkit/media/crypto/ppapi/cdm_wrapper.cc2
-rw-r--r--webkit/media/crypto/ppapi/clear_key_cdm.cc9
-rw-r--r--webkit/media/crypto/ppapi_decryptor.cc2
-rw-r--r--webkit/media/crypto/proxy_decryptor.cc3
6 files changed, 26 insertions, 19 deletions
diff --git a/webkit/media/crypto/key_systems.cc b/webkit/media/crypto/key_systems.cc
index b9c79d0..0ffe951 100644
--- a/webkit/media/crypto/key_systems.cc
+++ b/webkit/media/crypto/key_systems.cc
@@ -66,7 +66,7 @@ KeySystems::KeySystems() {
for (size_t j = 0; j < mime_type_codecs.size(); ++j)
codecs.insert(mime_type_codecs[j]);
// Support the MIME type string alone, without codec(s) specified.
- codecs.insert("");
+ codecs.insert(std::string());
// Key systems can be repeated, so there may already be an entry.
KeySystemMappings::iterator key_system_iter =
@@ -113,7 +113,8 @@ bool KeySystems::IsSupportedKeySystemWithMediaMimeType(
const std::vector<std::string>& codecs,
const std::string& key_system) {
if (codecs.empty())
- return IsSupportedKeySystemWithContainerAndCodec(mime_type, "", key_system);
+ return IsSupportedKeySystemWithContainerAndCodec(
+ mime_type, std::string(), key_system);
for (size_t i = 0; i < codecs.size(); ++i) {
if (!IsSupportedKeySystemWithContainerAndCodec(
diff --git a/webkit/media/crypto/key_systems_unittest.cc b/webkit/media/crypto/key_systems_unittest.cc
index 0c25196..4b28ec9 100644
--- a/webkit/media/crypto/key_systems_unittest.cc
+++ b/webkit/media/crypto/key_systems_unittest.cc
@@ -233,14 +233,14 @@ TEST_F(KeySystemsTest, ClearKey_IsSupportedKeySystem_InvalidVariants) {
TEST_F(KeySystemsTest, IsSupportedKeySystemWithMediaMimeType_ClearKey_NoType) {
// These two should be true. See http://crbug.com/164303.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), kClearKey));
+ std::string(), no_codecs(), kClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), "webkit-org.w3"));
+ std::string(), no_codecs(), "webkit-org.w3"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), "webkit-org.w3.foo"));
+ std::string(), no_codecs(), "webkit-org.w3.foo"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), "webkit-org.w3.clearkey.foo"));
+ std::string(), no_codecs(), "webkit-org.w3.clearkey.foo"));
}
TEST_F(KeySystemsTest, IsSupportedKeySystemWithMediaMimeType_ClearKey_WebM) {
@@ -419,14 +419,14 @@ TEST_F(KeySystemsTest,
IsSupportedKeySystemWithMediaMimeType_ExternalClearKey_NoType) {
// These two should be true. See http://crbug.com/164303.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), kExternalClearKey));
+ std::string(), no_codecs(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), "org.chromium"));
+ std::string(), no_codecs(), "org.chromium"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), "org.chromium.foo"));
+ std::string(), no_codecs(), "org.chromium.foo"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), "org.chromium.externalclearkey.foo"));
+ std::string(), no_codecs(), "org.chromium.externalclearkey.foo"));
}
TEST_F(KeySystemsTest,
@@ -606,14 +606,14 @@ TEST_F(KeySystemsTest, Widevine_IsSupportedKeySystem_InvalidVariants) {
TEST_F(KeySystemsTest, IsSupportedKeySystemWithMediaMimeType_Widevine_NoType) {
// These two should be true. See http://crbug.com/164303.
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), kWidevineAlpha));
+ std::string(), no_codecs(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), kWidevine));
+ std::string(), no_codecs(), kWidevine));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), "com.widevine.foo"));
+ std::string(), no_codecs(), "com.widevine.foo"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- "", no_codecs(), "com.widevine.alpha.foo"));
+ std::string(), no_codecs(), "com.widevine.alpha.foo"));
}
TEST_F(KeySystemsTest, IsSupportedKeySystemWithMediaMimeType_Widevine_WebM) {
diff --git a/webkit/media/crypto/ppapi/cdm_wrapper.cc b/webkit/media/crypto/ppapi/cdm_wrapper.cc
index 25eadb0..cd5b917 100644
--- a/webkit/media/crypto/ppapi/cdm_wrapper.cc
+++ b/webkit/media/crypto/ppapi/cdm_wrapper.cc
@@ -652,7 +652,7 @@ void CdmWrapper::GenerateKeyRequest(const std::string& key_system,
if (!cdm_) {
if (!CreateCdmInstance(key_system)) {
- SendUnknownKeyError(key_system, "");
+ SendUnknownKeyError(key_system, std::string());
return;
}
}
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc
index 4c0e2d5..faa6635 100644
--- a/webkit/media/crypto/ppapi/clear_key_cdm.cc
+++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc
@@ -249,7 +249,11 @@ cdm::Status ClearKeyCdm::AddKey(const char* session_id,
DVLOG(1) << "AddKey()";
base::AutoLock auto_lock(client_lock_);
ScopedResetter<Client> auto_resetter(&client_);
- decryptor_.AddKey("", key, key_size, key_id, key_id_size,
+ decryptor_.AddKey(std::string(),
+ key,
+ key_size,
+ key_id,
+ key_id_size,
std::string(session_id, session_id_size));
if (client_.status() != Client::kKeyAdded)
@@ -268,7 +272,8 @@ cdm::Status ClearKeyCdm::CancelKeyRequest(const char* session_id,
DVLOG(1) << "CancelKeyRequest()";
base::AutoLock auto_lock(client_lock_);
ScopedResetter<Client> auto_resetter(&client_);
- decryptor_.CancelKeyRequest("", std::string(session_id, session_id_size));
+ decryptor_.CancelKeyRequest(std::string(),
+ std::string(session_id, session_id_size));
return cdm::kSuccess;
}
diff --git a/webkit/media/crypto/ppapi_decryptor.cc b/webkit/media/crypto/ppapi_decryptor.cc
index 580c5a3..7b9c334 100644
--- a/webkit/media/crypto/ppapi_decryptor.cc
+++ b/webkit/media/crypto/ppapi_decryptor.cc
@@ -68,7 +68,7 @@ bool PpapiDecryptor::GenerateKeyRequest(const std::string& key_system,
if (!plugin_cdm_delegate_->GenerateKeyRequest(
key_system, type, init_data, init_data_length)) {
- ReportFailureToCallPlugin(key_system, "");
+ ReportFailureToCallPlugin(key_system, std::string());
return false;
}
diff --git a/webkit/media/crypto/proxy_decryptor.cc b/webkit/media/crypto/proxy_decryptor.cc
index bd0328a..dafc955 100644
--- a/webkit/media/crypto/proxy_decryptor.cc
+++ b/webkit/media/crypto/proxy_decryptor.cc
@@ -117,7 +117,8 @@ bool ProxyDecryptor::GenerateKeyRequest(const std::string& key_system,
if (!decryptor_) {
decryptor_ = CreateDecryptor(key_system);
if (!decryptor_) {
- key_error_cb_.Run(key_system, "", media::Decryptor::kClientError, 0);
+ key_error_cb_.Run(
+ key_system, std::string(), media::Decryptor::kClientError, 0);
return false;
}
}