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

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

Issue 291583005: Change FilterChain::Append() to a template method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
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 namespace mojo { 7 namespace mojo {
8 namespace internal { 8 namespace internal {
9 9
10 // ---------------------------------------------------------------------------- 10 // ----------------------------------------------------------------------------
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 Router::Router(ScopedMessagePipeHandle message_pipe, 65 Router::Router(ScopedMessagePipeHandle message_pipe,
66 FilterChain filters, 66 FilterChain filters,
67 MojoAsyncWaiter* waiter) 67 MojoAsyncWaiter* waiter)
68 : thunk_(this), 68 : thunk_(this),
69 filters_(filters.Pass()), 69 filters_(filters.Pass()),
70 connector_(message_pipe.Pass(), waiter), 70 connector_(message_pipe.Pass(), waiter),
71 weak_self_(this), 71 weak_self_(this),
72 incoming_receiver_(NULL), 72 incoming_receiver_(NULL),
73 next_request_id_(0) { 73 next_request_id_(0) {
74 filters_.set_sink(&thunk_); 74 filters_.SetSink(&thunk_);
75 connector_.set_incoming_receiver(filters_.GetHead()); 75 connector_.set_incoming_receiver(filters_.GetHead());
76 } 76 }
77 77
78 Router::~Router() { 78 Router::~Router() {
79 weak_self_.set_value(NULL); 79 weak_self_.set_value(NULL);
80 80
81 for (ResponderMap::const_iterator i = responders_.begin(); 81 for (ResponderMap::const_iterator i = responders_.begin();
82 i != responders_.end(); ++i) { 82 i != responders_.end(); ++i) {
83 delete i->second; 83 delete i->second;
84 } 84 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // OK to drop message on the floor. 138 // OK to drop message on the floor.
139 } 139 }
140 140
141 return false; 141 return false;
142 } 142 }
143 143
144 // ---------------------------------------------------------------------------- 144 // ----------------------------------------------------------------------------
145 145
146 } // namespace internal 146 } // namespace internal
147 } // namespace mojo 147 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/interface_ptr_internal.h ('k') | mojo/public/cpp/bindings/sync_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698