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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "mojo/public/cpp/bindings/interface_ptr_info.h"
6
7 namespace mojo {
8
9 InterfacePtrInfoBase::InterfacePtrInfoBase() : version_(0u) {}
10
11 InterfacePtrInfoBase::InterfacePtrInfoBase(ScopedMessagePipeHandle handle,
12 uint32_t version)
13 : handle_(std::move(handle)), version_(version) {}
14
15 InterfacePtrInfoBase::InterfacePtrInfoBase(InterfacePtrInfoBase&& other)
16 : handle_(std::move(other.handle_)), version_(other.version_) {
17 other.version_ = 0u;
18 }
19
20 InterfacePtrInfoBase::~InterfacePtrInfoBase() {}
21
22 InterfacePtrInfoBase& InterfacePtrInfoBase::operator=(
23 InterfacePtrInfoBase&& other) {
24 if (this != &other) {
25 handle_ = std::move(other.handle_);
26 version_ = other.version_;
27 other.version_ = 0u;
28 }
29
30 return *this;
31 }
32
33 } // namespace mojo
OLDNEW
« 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