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

Unified Diff: media/webm/webm_content_encodings.cc

Issue 10826098: Use std::string for decryption key ID in webm parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/webm/webm_content_encodings.h ('k') | media/webm/webm_content_encodings_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/webm/webm_content_encodings.cc
diff --git a/media/webm/webm_content_encodings.cc b/media/webm/webm_content_encodings.cc
index 540ac99c6d7850781ba747bea836892e647d153c..9789c0f3028f0f7cf2f5420f4f2f74420526a458 100644
--- a/media/webm/webm_content_encodings.cc
+++ b/media/webm/webm_content_encodings.cc
@@ -12,7 +12,6 @@ ContentEncoding::ContentEncoding()
scope_(kScopeInvalid),
type_(kTypeInvalid),
encryption_algo_(kEncAlgoInvalid),
- encryption_key_id_size_(0),
cipher_mode_(kCipherModeInvalid) {
}
@@ -22,9 +21,8 @@ void ContentEncoding::SetEncryptionKeyId(const uint8* encryption_key_id,
int size) {
DCHECK(encryption_key_id);
DCHECK_GT(size, 0);
- encryption_key_id_.reset(new uint8[size]);
- memcpy(encryption_key_id_.get(), encryption_key_id, size);
- encryption_key_id_size_ = size;
+ encryption_key_id_.assign(reinterpret_cast<const char*>(encryption_key_id),
+ size);
}
} // namespace media
« no previous file with comments | « media/webm/webm_content_encodings.h ('k') | media/webm/webm_content_encodings_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698