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

Side by Side Diff: content/public/common/service_registry.h

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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 CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_
6 #define CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_ 6 #define CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility>
9 10
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "base/strings/string_piece.h" 13 #include "base/strings/string_piece.h"
13 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
14 #include "mojo/public/cpp/bindings/interface_ptr.h" 15 #include "mojo/public/cpp/bindings/interface_ptr.h"
15 #include "mojo/public/cpp/bindings/interface_request.h" 16 #include "mojo/public/cpp/bindings/interface_request.h"
16 #include "mojo/public/cpp/system/core.h" 17 #include "mojo/public/cpp/system/core.h"
17 18
18 namespace content { 19 namespace content {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 59 }
59 virtual void ConnectToRemoteService(const base::StringPiece& name, 60 virtual void ConnectToRemoteService(const base::StringPiece& name,
60 mojo::ScopedMessagePipeHandle handle) = 0; 61 mojo::ScopedMessagePipeHandle handle) = 0;
61 62
62 private: 63 private:
63 template <typename Interface> 64 template <typename Interface>
64 static void ForwardToServiceFactory( 65 static void ForwardToServiceFactory(
65 const base::Callback<void(mojo::InterfaceRequest<Interface>)> 66 const base::Callback<void(mojo::InterfaceRequest<Interface>)>
66 service_factory, 67 service_factory,
67 mojo::ScopedMessagePipeHandle handle) { 68 mojo::ScopedMessagePipeHandle handle) {
68 service_factory.Run(mojo::MakeRequest<Interface>(handle.Pass())); 69 service_factory.Run(mojo::MakeRequest<Interface>(std::move(handle)));
69 } 70 }
70 }; 71 };
71 72
72 } // namespace content 73 } // namespace content
73 74
74 #endif // CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_ 75 #endif // CONTENT_PUBLIC_COMMON_SERVICE_REGISTRY_H_
OLDNEW
« no previous file with comments | « content/public/browser/navigation_handle.cc ('k') | content/public/renderer/media_stream_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698