| Index: components/rappor/bytevector.h
|
| diff --git a/components/rappor/bytevector.h b/components/rappor/bytevector.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..062b074368b8e633bf2e5ebbd95fd4225a3bf940
|
| --- /dev/null
|
| +++ b/components/rappor/bytevector.h
|
| @@ -0,0 +1,32 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_RAPPOR_BYTEVECTOR_H_
|
| +#define CHROME_BROWSER_RAPPOR_BYTEVECTOR_H_
|
| +
|
| +#include <stddef.h>
|
| +#include <stdint.h>
|
| +#include <vector>
|
| +
|
| +// ByteVector is a class that extends a vector of one byte integers with
|
| +// methods for manipulating it's content as a set of binary bits.
|
| +
|
| +namespace rappor {
|
| +
|
| +class ByteVector : public std::vector<uint8_t> {
|
| + public:
|
| + explicit ByteVector(size_t bytes_size);
|
| + explicit ByteVector(const std::vector<uint8_t>& v);
|
| + ByteVector(const char* bytes, int bytes_size);
|
| +
|
| + ByteVector operator&(ByteVector rhs) const;
|
| +
|
| + ByteVector operator|(ByteVector rhs) const;
|
| +
|
| + ByteVector operator~() const;
|
| +};
|
| +
|
| +} // namespace rappor
|
| +
|
| +#endif // CHROME_BROWSER_RAPPOR_BYTEVECTOR_H_
|
|
|