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

Side by Side Diff: content/common/mojo/service_registry_impl.cc

Issue 1262613005: Remove interface_impl.h and error_handler.h usage from chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 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
« no previous file with comments | « content/common/mojo/service_registry_impl.h ('k') | device/serial/serial_service_unittest.cc » ('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 #include "content/common/mojo/service_registry_impl.h" 5 #include "content/common/mojo/service_registry_impl.h"
6 6
7 #include "mojo/common/common_type_converters.h" 7 #include "mojo/common/common_type_converters.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 ServiceRegistryImpl::ServiceRegistryImpl() 11 ServiceRegistryImpl::ServiceRegistryImpl()
12 : binding_(this), weak_factory_(this) { 12 : binding_(this), weak_factory_(this) {
13 binding_.set_error_handler(this); 13 binding_.set_connection_error_handler(
14 base::Bind(&ServiceRegistryImpl::OnConnectionError,
15 base::Unretained(this)));
14 } 16 }
15 17
16 ServiceRegistryImpl::~ServiceRegistryImpl() { 18 ServiceRegistryImpl::~ServiceRegistryImpl() {
17 while (!pending_connects_.empty()) { 19 while (!pending_connects_.empty()) {
18 mojo::CloseRaw(pending_connects_.front().second); 20 mojo::CloseRaw(pending_connects_.front().second);
19 pending_connects_.pop(); 21 pending_connects_.pop();
20 } 22 }
21 } 23 }
22 24
23 void ServiceRegistryImpl::Bind( 25 void ServiceRegistryImpl::Bind(
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 return; 79 return;
78 80
79 it->second.Run(client_handle.Pass()); 81 it->second.Run(client_handle.Pass());
80 } 82 }
81 83
82 void ServiceRegistryImpl::OnConnectionError() { 84 void ServiceRegistryImpl::OnConnectionError() {
83 binding_.Close(); 85 binding_.Close();
84 } 86 }
85 87
86 } // namespace content 88 } // namespace content
OLDNEW
« no previous file with comments | « content/common/mojo/service_registry_impl.h ('k') | device/serial/serial_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698