summaryrefslogtreecommitdiffstats
path: root/webkit/media
diff options
context:
space:
mode:
authordcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 06:41:12 +0000
committerdcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-09 06:41:12 +0000
commit69d7f89d6a93e0fbce451960287066195c6d4ea0 (patch)
tree51c8c1f971d39d652ec38ed76070539bb33e85c7 /webkit/media
parente3748a79b523a8d365d4a33ef986eebb4186fa78 (diff)
downloadchromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.zip
chromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.tar.gz
chromium_src-69d7f89d6a93e0fbce451960287066195c6d4ea0.tar.bz2
Revert "Rewrite std::string("") to std::string(), Linux edition."
This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6. Revert "Fix build after r193020." This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a. Revert "Really fix build after r193020." This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media')
-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, 19 insertions, 26 deletions
diff --git a/webkit/media/crypto/key_systems.cc b/webkit/media/crypto/key_systems.cc
index 0ffe951..b9c79d0 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(std::string());
+ codecs.insert("");
// Key systems can be repeated, so there may already be an entry.
KeySystemMappings::iterator key_system_iter =
@@ -113,8 +113,7 @@ bool KeySystems::IsSupportedKeySystemWithMediaMimeType(
const std::vector<std::string>& codecs,
const std::string& key_system) {
if (codecs.empty())
- return IsSupportedKeySystemWithContainerAndCodec(
- mime_type, std::string(), key_system);
+ return IsSupportedKeySystemWithContainerAndCodec(mime_type, "", 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 4b28ec9..0c25196 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(
- std::string(), no_codecs(), kClearKey));
+ "", no_codecs(), kClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- std::string(), no_codecs(), "webkit-org.w3"));
+ "", no_codecs(), "webkit-org.w3"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- std::string(), no_codecs(), "webkit-org.w3.foo"));
+ "", no_codecs(), "webkit-org.w3.foo"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- std::string(), no_codecs(), "webkit-org.w3.clearkey.foo"));
+ "", 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(
- std::string(), no_codecs(), kExternalClearKey));
+ "", no_codecs(), kExternalClearKey));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- std::string(), no_codecs(), "org.chromium"));
+ "", no_codecs(), "org.chromium"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- std::string(), no_codecs(), "org.chromium.foo"));
+ "", no_codecs(), "org.chromium.foo"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- std::string(), no_codecs(), "org.chromium.externalclearkey.foo"));
+ "", 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(
- std::string(), no_codecs(), kWidevineAlpha));
+ "", no_codecs(), kWidevineAlpha));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- std::string(), no_codecs(), kWidevine));
+ "", no_codecs(), kWidevine));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- std::string(), no_codecs(), "com.widevine.foo"));
+ "", no_codecs(), "com.widevine.foo"));
EXPECT_FALSE(IsSupportedKeySystemWithMediaMimeType(
- std::string(), no_codecs(), "com.widevine.alpha.foo"));
+ "", 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 cd5b917..25eadb0 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, std::string());
+ SendUnknownKeyError(key_system, "");
return;
}
}
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc
index faa6635..4c0e2d5 100644
--- a/webkit/media/crypto/ppapi/clear_key_cdm.cc
+++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc
@@ -249,11 +249,7 @@ cdm::Status ClearKeyCdm::AddKey(const char* session_id,
DVLOG(1) << "AddKey()";
base::AutoLock auto_lock(client_lock_);
ScopedResetter<Client> auto_resetter(&client_);
- decryptor_.AddKey(std::string(),
- key,
- key_size,
- key_id,
- key_id_size,
+ decryptor_.AddKey("", key, key_size, key_id, key_id_size,
std::string(session_id, session_id_size));
if (client_.status() != Client::kKeyAdded)
@@ -272,8 +268,7 @@ 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(),
- std::string(session_id, session_id_size));
+ decryptor_.CancelKeyRequest("", 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 7b9c334..580c5a3 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, std::string());
+ ReportFailureToCallPlugin(key_system, "");
return false;
}
diff --git a/webkit/media/crypto/proxy_decryptor.cc b/webkit/media/crypto/proxy_decryptor.cc
index dafc955..bd0328a 100644
--- a/webkit/media/crypto/proxy_decryptor.cc
+++ b/webkit/media/crypto/proxy_decryptor.cc
@@ -117,8 +117,7 @@ bool ProxyDecryptor::GenerateKeyRequest(const std::string& key_system,
if (!decryptor_) {
decryptor_ = CreateDecryptor(key_system);
if (!decryptor_) {
- key_error_cb_.Run(
- key_system, std::string(), media::Decryptor::kClientError, 0);
+ key_error_cb_.Run(key_system, "", media::Decryptor::kClientError, 0);
return false;
}
}