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

Side by Side Diff: components/webcrypto/algorithms/sha.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <openssl/evp.h> 5 #include <openssl/evp.h>
6 #include <openssl/sha.h> 6 #include <openssl/sha.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 // digest, so none of the subsequent errors are spec compliant. 118 // digest, so none of the subsequent errors are spec compliant.
119 if (!error.IsSuccess()) 119 if (!error.IsSuccess())
120 return error; 120 return error;
121 return digestor.FinishWithVectorAndStatus(buffer); 121 return digestor.FinishWithVectorAndStatus(buffer);
122 } 122 }
123 }; 123 };
124 124
125 } // namespace 125 } // namespace
126 126
127 std::unique_ptr<AlgorithmImplementation> CreateShaImplementation() { 127 std::unique_ptr<AlgorithmImplementation> CreateShaImplementation() {
128 return base::WrapUnique(new ShaImplementation()); 128 return base::MakeUnique<ShaImplementation>();
129 } 129 }
130 130
131 std::unique_ptr<blink::WebCryptoDigestor> CreateDigestorImplementation( 131 std::unique_ptr<blink::WebCryptoDigestor> CreateDigestorImplementation(
132 blink::WebCryptoAlgorithmId algorithm) { 132 blink::WebCryptoAlgorithmId algorithm) {
133 return std::unique_ptr<blink::WebCryptoDigestor>(new DigestorImpl(algorithm)); 133 return std::unique_ptr<blink::WebCryptoDigestor>(new DigestorImpl(algorithm));
134 } 134 }
135 135
136 } // namespace webcrypto 136 } // namespace webcrypto
OLDNEW
« no previous file with comments | « components/web_resource/web_resource_service.cc ('k') | components/wifi_sync/wifi_config_delegate_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698