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

Side by Side Diff: mojo/public/cpp/bindings/lib/router.cc

Issue 1535943002: Convert Pass()→std::move() in //mojo/public/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Regenerate correctly Created 4 years, 11 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 #include "mojo/public/cpp/bindings/lib/router.h" 5 #include "mojo/public/cpp/bindings/lib/router.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility>
8 9
9 #include "mojo/public/cpp/environment/logging.h" 10 #include "mojo/public/cpp/environment/logging.h"
10 11
11 namespace mojo { 12 namespace mojo {
12 namespace internal { 13 namespace internal {
13 14
14 // ---------------------------------------------------------------------------- 15 // ----------------------------------------------------------------------------
15 16
16 namespace { 17 namespace {
17 18
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 bool Router::HandleIncomingMessageThunk::Accept(Message* message) { 73 bool Router::HandleIncomingMessageThunk::Accept(Message* message) {
73 return router_->HandleIncomingMessage(message); 74 return router_->HandleIncomingMessage(message);
74 } 75 }
75 76
76 // ---------------------------------------------------------------------------- 77 // ----------------------------------------------------------------------------
77 78
78 Router::Router(ScopedMessagePipeHandle message_pipe, 79 Router::Router(ScopedMessagePipeHandle message_pipe,
79 FilterChain filters, 80 FilterChain filters,
80 const MojoAsyncWaiter* waiter) 81 const MojoAsyncWaiter* waiter)
81 : thunk_(this), 82 : thunk_(this),
82 filters_(filters.Pass()), 83 filters_(std::move(filters)),
83 connector_(message_pipe.Pass(), Connector::SINGLE_THREADED_SEND, waiter), 84 connector_(std::move(message_pipe),
85 Connector::SINGLE_THREADED_SEND,
86 waiter),
84 weak_self_(this), 87 weak_self_(this),
85 incoming_receiver_(nullptr), 88 incoming_receiver_(nullptr),
86 next_request_id_(0), 89 next_request_id_(0),
87 testing_mode_(false) { 90 testing_mode_(false) {
88 filters_.SetSink(&thunk_); 91 filters_.SetSink(&thunk_);
89 connector_.set_incoming_receiver(filters_.GetHead()); 92 connector_.set_incoming_receiver(filters_.GetHead());
90 } 93 }
91 94
92 Router::~Router() { 95 Router::~Router() {
93 weak_self_.set_value(nullptr); 96 weak_self_.set_value(nullptr);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return false; 158 return false;
156 159
157 return incoming_receiver_->Accept(message); 160 return incoming_receiver_->Accept(message);
158 } 161 }
159 } 162 }
160 163
161 // ---------------------------------------------------------------------------- 164 // ----------------------------------------------------------------------------
162 165
163 } // namespace internal 166 } // namespace internal
164 } // namespace mojo 167 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/pipe_control_message_proxy.cc ('k') | mojo/public/cpp/bindings/map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698