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

Side by Side Diff: content/child/webcrypto/crypto_data.cc

Issue 1077273002: html_viewer: Move webcrypto to a place where html_viewer can use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 years, 8 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
« no previous file with comments | « content/child/webcrypto/crypto_data.h ('k') | content/child/webcrypto/generate_key_result.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "content/child/webcrypto/crypto_data.h"
6 #include "base/stl_util.h"
7
8 namespace content {
9
10 namespace webcrypto {
11
12 CryptoData::CryptoData() : bytes_(NULL), byte_length_(0) {
13 }
14
15 CryptoData::CryptoData(const unsigned char* bytes, unsigned int byte_length)
16 : bytes_(bytes), byte_length_(byte_length) {
17 }
18
19 CryptoData::CryptoData(const std::vector<unsigned char>& bytes)
20 : bytes_(vector_as_array(&bytes)), byte_length_(bytes.size()) {
21 }
22
23 CryptoData::CryptoData(const std::string& bytes)
24 : bytes_(bytes.size() ? reinterpret_cast<const unsigned char*>(bytes.data())
25 : NULL),
26 byte_length_(bytes.size()) {
27 }
28
29 CryptoData::CryptoData(const blink::WebVector<unsigned char>& bytes)
30 : bytes_(bytes.data()), byte_length_(bytes.size()) {
31 }
32
33 } // namespace webcrypto
34
35 } // namespace content
OLDNEW
« no previous file with comments | « content/child/webcrypto/crypto_data.h ('k') | content/child/webcrypto/generate_key_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698