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

Unified Diff: third_party/mojo/src/mojo/public/cpp/bindings/lib/union_accessor.h

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/union_accessor.h
diff --git a/third_party/mojo/src/mojo/public/cpp/bindings/lib/union_accessor.h b/third_party/mojo/src/mojo/public/cpp/bindings/lib/union_accessor.h
deleted file mode 100644
index 54ad2f8d92baac26b14d07f2a3a786dac4c48a04..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/public/cpp/bindings/lib/union_accessor.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2015 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 THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_UNION_ACCESSOR_H_
-#define THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_UNION_ACCESSOR_H_
-
-namespace mojo {
-namespace internal {
-
-// When serializing and deserializing Unions, it is necessary to access
-// the private fields and methods of the Union. This allows us to do that
-// without leaking those same fields and methods in the Union interface.
-// All Union wrappers are friends of this class allowing such access.
-template <typename U>
-class UnionAccessor {
- public:
- explicit UnionAccessor(U* u) : u_(u) {}
-
- typename U::Union_* data() { return &(u_->data_); }
-
- typename U::Tag* tag() { return &(u_->tag_); }
-
- void SwitchActive(typename U::Tag new_tag) { u_->SwitchActive(new_tag); }
-
- private:
- U* u_;
-};
-
-} // namespace internal
-} // namespace mojo
-
-#endif // THIRD_PARTY_MOJO_SRC_MOJO_PUBLIC_CPP_BINDINGS_LIB_UNION_ACCESSOR_H_

Powered by Google App Engine
This is Rietveld 408576698