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

Unified Diff: mojo/public/bindings/lib/array_internal.cc

Issue 220243007: Mojo: Move mojo/public/bindings/lib to mojo/public/cpp/bindings/lib. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/bindings/lib/array_internal.h ('k') | mojo/public/bindings/lib/bindings_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/bindings/lib/array_internal.cc
diff --git a/mojo/public/bindings/lib/array_internal.cc b/mojo/public/bindings/lib/array_internal.cc
deleted file mode 100644
index a10fe2378aee34fb24192cfb36048ec910250a65..0000000000000000000000000000000000000000
--- a/mojo/public/bindings/lib/array_internal.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 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.
-
-#include "mojo/public/bindings/lib/array_internal.h"
-
-namespace mojo {
-namespace internal {
-
-ArrayDataTraits<bool>::BitRef::~BitRef() {
-}
-
-ArrayDataTraits<bool>::BitRef::BitRef(uint8_t* storage, uint8_t mask)
- : storage_(storage),
- mask_(mask) {
-}
-
-ArrayDataTraits<bool>::BitRef&
-ArrayDataTraits<bool>::BitRef::operator=(bool value) {
- if (value) {
- *storage_ |= mask_;
- } else {
- *storage_ &= ~mask_;
- }
- return *this;
-}
-
-ArrayDataTraits<bool>::BitRef&
-ArrayDataTraits<bool>::BitRef::operator=(const BitRef& value) {
- return (*this) = static_cast<bool>(value);
-}
-
-ArrayDataTraits<bool>::BitRef::operator bool() const {
- return (*storage_ & mask_) != 0;
-}
-
-// static
-void ArraySerializationHelper<Handle>::EncodePointersAndHandles(
- const ArrayHeader* header,
- ElementType* elements,
- std::vector<Handle>* handles) {
- for (uint32_t i = 0; i < header->num_elements; ++i)
- EncodeHandle(&elements[i], handles);
-}
-
-// static
-bool ArraySerializationHelper<Handle>::DecodePointersAndHandles(
- const ArrayHeader* header,
- ElementType* elements,
- Message* message) {
- for (uint32_t i = 0; i < header->num_elements; ++i) {
- if (!DecodeHandle(&elements[i], message->mutable_handles()))
- return false;
- }
- return true;
-}
-
-} // namespace internal
-} // namespace mojo
« no previous file with comments | « mojo/public/bindings/lib/array_internal.h ('k') | mojo/public/bindings/lib/bindings_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698