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

Unified Diff: third_party/mojo/src/mojo/public/cpp/bindings/lib/array_internal.cc

Issue 1410053006: Move third_party/mojo/src/mojo/public to mojo/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 1 month 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
Index: third_party/mojo/src/mojo/public/cpp/bindings/lib/array_internal.cc
diff --git a/third_party/mojo/src/mojo/public/cpp/bindings/lib/array_internal.cc b/third_party/mojo/src/mojo/public/cpp/bindings/lib/array_internal.cc
deleted file mode 100644
index a92911e7d14a0a73d6d16556bd132894c412f349..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/public/cpp/bindings/lib/array_internal.cc
+++ /dev/null
@@ -1,74 +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 "third_party/mojo/src/mojo/public/cpp/bindings/lib/array_internal.h"
-
-#include <sstream>
-
-namespace mojo {
-namespace internal {
-
-std::string MakeMessageWithArrayIndex(const char* message,
- size_t size,
- size_t index) {
- std::ostringstream stream;
- stream << message << ": array size - " << size << "; index - " << index;
- return stream.str();
-}
-
-std::string MakeMessageWithExpectedArraySize(const char* message,
- size_t size,
- size_t expected_size) {
- std::ostringstream stream;
- stream << message << ": array size - " << size << "; expected size - "
- << expected_size;
- return stream.str();
-}
-
-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, true>::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
-void ArraySerializationHelper<Handle, true>::DecodePointersAndHandles(
- const ArrayHeader* header,
- ElementType* elements,
- std::vector<Handle>* handles) {
- for (uint32_t i = 0; i < header->num_elements; ++i)
- DecodeHandle(&elements[i], handles);
-}
-
-} // namespace internal
-} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698