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

Unified Diff: extensions/browser/content_verify_job.cc

Issue 2095523002: Make //crypto factories return std::unique_ptr<>s (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: I'm blind Created 4 years, 6 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 | « crypto/wincrypt_shim.h ('k') | media/cast/common/transport_encryption_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/content_verify_job.cc
diff --git a/extensions/browser/content_verify_job.cc b/extensions/browser/content_verify_job.cc
index 80dfcf0d240c046ed76bcb5ecf08a74fe8cd4d9b..e10f8637420d8fc6d0bb79b5f22f39d92ccb927d 100644
--- a/extensions/browser/content_verify_job.cc
+++ b/extensions/browser/content_verify_job.cc
@@ -96,10 +96,9 @@ void ContentVerifyJob::BytesRead(int count, const char* data) {
if (current_block_ >= hash_reader_->block_count())
return DispatchFailureCallback(HASH_MISMATCH);
- if (!current_hash_.get()) {
+ if (!current_hash_) {
current_hash_byte_count_ = 0;
- current_hash_.reset(
- crypto::SecureHash::Create(crypto::SecureHash::SHA256));
+ current_hash_ = crypto::SecureHash::Create(crypto::SecureHash::SHA256);
}
// Compute how many bytes we should hash, and add them to the current hash.
int bytes_to_hash =
« no previous file with comments | « crypto/wincrypt_shim.h ('k') | media/cast/common/transport_encryption_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698