Removing uses of X11 native key events.
[chromium-blink-merge.git] / content / child / webcrypto / crypto_data.cc
blob29736418ae5b1de0716b530b631da8604453237e
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.
5 #include "content/child/webcrypto/crypto_data.h"
7 namespace content {
9 namespace webcrypto {
11 CryptoData::CryptoData() : bytes_(NULL), byte_length_(0) {}
13 CryptoData::CryptoData(const unsigned char* bytes, unsigned int byte_length)
14 : bytes_(bytes), byte_length_(byte_length) {}
16 CryptoData::CryptoData(const std::vector<unsigned char>& bytes)
17 : bytes_(bytes.size() ? &bytes[0] : NULL), byte_length_(bytes.size()) {}
19 CryptoData::CryptoData(const std::string& bytes)
20 : bytes_(bytes.size() ? reinterpret_cast<const unsigned char*>(bytes.data())
21 : NULL),
22 byte_length_(bytes.size()) {}
24 CryptoData::CryptoData(const blink::WebVector<unsigned char>& bytes)
25 : bytes_(bytes.data()), byte_length_(bytes.size()) {}
27 } // namespace webcrypto
29 } // namespace content