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

Unified Diff: mojo/public/cpp/bindings/interface_ptr_info.cc

Issue 2205193002: WIP: Reduce code size of InterfacePtrState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@before-sharing
Patch Set: Add missing, new .cc file Created 4 years, 4 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/cpp/bindings/interface_ptr_info.h ('k') | mojo/public/cpp/bindings/lib/interface_ptr_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/interface_ptr_info.cc
diff --git a/mojo/public/cpp/bindings/interface_ptr_info.cc b/mojo/public/cpp/bindings/interface_ptr_info.cc
new file mode 100644
index 0000000000000000000000000000000000000000..19da4ced06884c024f22a9a4e3db9fd4e6646372
--- /dev/null
+++ b/mojo/public/cpp/bindings/interface_ptr_info.cc
@@ -0,0 +1,33 @@
+// Copyright 2016 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/cpp/bindings/interface_ptr_info.h"
+
+namespace mojo {
+
+InterfacePtrInfoBase::InterfacePtrInfoBase() : version_(0u) {}
+
+InterfacePtrInfoBase::InterfacePtrInfoBase(ScopedMessagePipeHandle handle,
+ uint32_t version)
+ : handle_(std::move(handle)), version_(version) {}
+
+InterfacePtrInfoBase::InterfacePtrInfoBase(InterfacePtrInfoBase&& other)
+ : handle_(std::move(other.handle_)), version_(other.version_) {
+ other.version_ = 0u;
+}
+
+InterfacePtrInfoBase::~InterfacePtrInfoBase() {}
+
+InterfacePtrInfoBase& InterfacePtrInfoBase::operator=(
+ InterfacePtrInfoBase&& other) {
+ if (this != &other) {
+ handle_ = std::move(other.handle_);
+ version_ = other.version_;
+ other.version_ = 0u;
+ }
+
+ return *this;
+}
+
+} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/interface_ptr_info.h ('k') | mojo/public/cpp/bindings/lib/interface_ptr_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698