diff options
author | Brett Wilson <brettw@chromium.org> | 2015-07-07 16:38:09 -0700 |
---|---|---|
committer | Brett Wilson <brettw@chromium.org> | 2015-07-07 23:39:16 +0000 |
commit | e3c4d1a1228e00b190ad743a83f88a2266f45238 (patch) | |
tree | 3923b42b43c9b7a8a689d0468688b30bf9ea8f83 /crypto/encryptor_openssl.cc | |
parent | 1c33a26e56880fbf058fd796aa004e097e07b691 (diff) | |
download | chromium_src-e3c4d1a1228e00b190ad743a83f88a2266f45238.zip chromium_src-e3c4d1a1228e00b190ad743a83f88a2266f45238.tar.gz chromium_src-e3c4d1a1228e00b190ad743a83f88a2266f45238.tar.bz2 |
Move WriteInto to base namespace.
Update all callers.
De-inlines the template. For some reason touching the namespaces started givin errors about DCHECK not being defined. Indeed, this header does not include logging.h. Rather than include logging in this very common header, it seems preferable to move the implementation to the .cc file.
This removes support for the wstring variant and updates the callers that used it.
R=ben@chromium.org, ben
TBR=jschuh (sandbox_win.cc)
NOPRESUBMIT=true
(this patch touches code using legacy wstrings)
Review URL: https://codereview.chromium.org/1223983002.
Cr-Commit-Position: refs/heads/master@{#337703}
Diffstat (limited to 'crypto/encryptor_openssl.cc')
-rw-r--r-- | crypto/encryptor_openssl.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/encryptor_openssl.cc b/crypto/encryptor_openssl.cc index 0504adb..4f0e511 100644 --- a/crypto/encryptor_openssl.cc +++ b/crypto/encryptor_openssl.cc @@ -113,8 +113,8 @@ bool Encryptor::Crypt(bool do_encrypt, const size_t output_size = input.size() + (do_encrypt ? iv_.size() : 0); CHECK_GT(output_size, 0u); CHECK_GT(output_size + 1, input.size()); - uint8* out_ptr = reinterpret_cast<uint8*>(WriteInto(&result, - output_size + 1)); + uint8* out_ptr = + reinterpret_cast<uint8*>(base::WriteInto(&result, output_size + 1)); int out_len; if (!EVP_CipherUpdate(ctx.get(), out_ptr, &out_len, reinterpret_cast<const uint8*>(input.data()), @@ -154,7 +154,8 @@ bool Encryptor::CryptCTR(bool do_encrypt, CHECK_GT(out_size + 1, input.size()); std::string result; - uint8* out_ptr = reinterpret_cast<uint8*>(WriteInto(&result, out_size + 1)); + uint8* out_ptr = + reinterpret_cast<uint8*>(base::WriteInto(&result, out_size + 1)); uint8_t ivec[AES_BLOCK_SIZE] = { 0 }; uint8_t ecount_buf[AES_BLOCK_SIZE] = { 0 }; |