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

Side by Side Diff: mojo/public/cpp/bindings/interface_ptr.h

Issue 1408793006: Convert "return local_var.Pass();" to "return local_var;". (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « mojo/public/cpp/bindings/binding.h ('k') | mojo/public/cpp/bindings/interface_request.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "mojo/public/cpp/bindings/callback.h" 10 #include "mojo/public/cpp/bindings/callback.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // If |info| is valid (containing a valid message pipe handle), returns an 171 // If |info| is valid (containing a valid message pipe handle), returns an
172 // InterfacePtr bound to it. Otherwise, returns an unbound InterfacePtr. The 172 // InterfacePtr bound to it. Otherwise, returns an unbound InterfacePtr. The
173 // specified |waiter| will be used as in the InterfacePtr::Bind() method. 173 // specified |waiter| will be used as in the InterfacePtr::Bind() method.
174 template <typename Interface> 174 template <typename Interface>
175 InterfacePtr<Interface> MakeProxy( 175 InterfacePtr<Interface> MakeProxy(
176 InterfacePtrInfo<Interface> info, 176 InterfacePtrInfo<Interface> info,
177 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) { 177 const MojoAsyncWaiter* waiter = Environment::GetDefaultAsyncWaiter()) {
178 InterfacePtr<Interface> ptr; 178 InterfacePtr<Interface> ptr;
179 if (info.is_valid()) 179 if (info.is_valid())
180 ptr.Bind(info.Pass(), waiter); 180 ptr.Bind(info.Pass(), waiter);
181 return ptr.Pass(); 181 return ptr;
182 } 182 }
183 183
184 } // namespace mojo 184 } // namespace mojo
185 185
186 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ 186 #endif // MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/binding.h ('k') | mojo/public/cpp/bindings/interface_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698