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

Unified Diff: media/cdm/proxy_decryptor.cc

Issue 1544313002: Convert Pass()→std::move() in //media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: media/cdm/proxy_decryptor.cc
diff --git a/media/cdm/proxy_decryptor.cc b/media/cdm/proxy_decryptor.cc
index 4aea6b3d7b7fb464e5ded4901109c3fc9da18278..8d0085b58513ef1848f0c8cc33a3ed0862f25703 100644
--- a/media/cdm/proxy_decryptor.cc
+++ b/media/cdm/proxy_decryptor.cc
@@ -5,8 +5,8 @@
#include "media/cdm/proxy_decryptor.h"
#include <stddef.h>
-
#include <cstring>
+#include <utility>
#include "base/bind.h"
#include "base/callback_helpers.h"
@@ -185,7 +185,7 @@ void ProxyDecryptor::GenerateKeyRequestInternal(
MediaKeys::PERSISTENT_LICENSE_SESSION,
std::string(reinterpret_cast<const char*>(stripped_init_data.data()),
stripped_init_data.size()),
- promise.Pass());
+ std::move(promise));
return;
}
@@ -199,7 +199,7 @@ void ProxyDecryptor::GenerateKeyRequestInternal(
DCHECK(!key_system_.empty());
if (CanUseAesDecryptor(key_system_) || IsExternalClearKey(key_system_)) {
OnPermissionStatus(session_type, init_data_type, stripped_init_data,
- promise.Pass(), true /* granted */);
+ std::move(promise), true /* granted */);
return;
}
@@ -211,7 +211,7 @@ void ProxyDecryptor::GenerateKeyRequestInternal(
stripped_init_data, base::Passed(&promise)));
#else
OnPermissionStatus(session_type, init_data_type, stripped_init_data,
- promise.Pass(), true /* granted */);
+ std::move(promise), true /* granted */);
#endif
}
@@ -228,7 +228,7 @@ void ProxyDecryptor::OnPermissionStatus(
DVLOG_IF(1, !granted) << "Permission request rejected.";
media_keys_->CreateSessionAndGenerateRequest(session_type, init_data_type,
- init_data, promise.Pass());
+ init_data, std::move(promise));
}
void ProxyDecryptor::AddKey(const uint8_t* key,
@@ -282,13 +282,13 @@ void ProxyDecryptor::AddKey(const uint8_t* key,
DCHECK(!jwk.empty());
media_keys_->UpdateSession(new_session_id,
std::vector<uint8_t>(jwk.begin(), jwk.end()),
- promise.Pass());
+ std::move(promise));
return;
}
media_keys_->UpdateSession(new_session_id,
std::vector<uint8_t>(key, key + key_length),
- promise.Pass());
+ std::move(promise));
}
void ProxyDecryptor::CancelKeyRequest(const std::string& session_id) {
@@ -305,7 +305,7 @@ void ProxyDecryptor::CancelKeyRequest(const std::string& session_id) {
weak_ptr_factory_.GetWeakPtr(), session_id),
base::Bind(&ProxyDecryptor::OnLegacySessionError,
weak_ptr_factory_.GetWeakPtr(), session_id)));
- media_keys_->RemoveSession(session_id, promise.Pass());
+ media_keys_->RemoveSession(session_id, std::move(promise));
}
void ProxyDecryptor::OnSessionMessage(const std::string& session_id,
« no previous file with comments | « media/cdm/ppapi/external_clear_key/clear_key_cdm.cc ('k') | media/filters/audio_decoder_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698