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

Side by Side Diff: third_party/WebKit/Source/modules/crypto/CryptoUtilities.h

Issue 2972023002: Deduplicate CopyBytes in modules/crypto (Closed)
Patch Set: Dropped the "test in jumbo" code Created 3 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CryptoUtilities_h
6 #define CryptoUtilities_h
7
8 #include "core/dom/DOMArrayPiece.h"
9 #include "public/platform/WebVector.h"
10
11 namespace blink {
12 inline WebVector<uint8_t> CopyBytes(const DOMArrayPiece& source) {
13 return WebVector<uint8_t>(static_cast<const uint8_t*>(source.Data()),
14 source.ByteLength());
15 }
16 } // namespace blink
17
18 #endif // CryptoUtilities_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/crypto/BUILD.gn ('k') | third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698