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

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

Issue 2062333002: mojo::Callback -> base::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/interface_endpoint_client.h" 5 #include "mojo/public/cpp/bindings/lib/interface_endpoint_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 return payload_validator_->Accept(message); 259 return payload_validator_->Accept(message);
260 } 260 }
261 261
262 void InterfaceEndpointClient::NotifyError() { 262 void InterfaceEndpointClient::NotifyError() {
263 DCHECK(thread_checker_.CalledOnValidThread()); 263 DCHECK(thread_checker_.CalledOnValidThread());
264 264
265 if (encountered_error_) 265 if (encountered_error_)
266 return; 266 return;
267 encountered_error_ = true; 267 encountered_error_ = true;
268 error_handler_.Run(); 268 if (!error_handler_.is_null())
269 error_handler_.Run();
269 } 270 }
270 271
271 bool InterfaceEndpointClient::HandleValidatedMessage(Message* message) { 272 bool InterfaceEndpointClient::HandleValidatedMessage(Message* message) {
272 DCHECK_EQ(handle_.id(), message->interface_id()); 273 DCHECK_EQ(handle_.id(), message->interface_id());
273 274
274 if (message->has_flag(kMessageExpectsResponse)) { 275 if (message->has_flag(kMessageExpectsResponse)) {
275 if (!incoming_receiver_) 276 if (!incoming_receiver_)
276 return false; 277 return false;
277 278
278 MessageReceiverWithStatus* responder = 279 MessageReceiverWithStatus* responder =
(...skipping 24 matching lines...) Expand all
303 } else { 304 } else {
304 if (!incoming_receiver_) 305 if (!incoming_receiver_)
305 return false; 306 return false;
306 307
307 return incoming_receiver_->Accept(message); 308 return incoming_receiver_->Accept(message);
308 } 309 }
309 } 310 }
310 311
311 } // namespace internal 312 } // namespace internal
312 } // namespace mojo 313 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/lib/control_message_proxy.cc ('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