| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/service_manager/service_manager_connection_impl.h" | 5 #include "content/common/service_manager/service_manager_connection_impl.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 } | 206 } |
| 207 | 207 |
| 208 void ClearConnectionFiltersOnIOThread() { | 208 void ClearConnectionFiltersOnIOThread() { |
| 209 base::AutoLock lock(lock_); | 209 base::AutoLock lock(lock_); |
| 210 connection_filters_.clear(); | 210 connection_filters_.clear(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 void RemoveConnectionFilterOnIOThread(int filter_id) { | 213 void RemoveConnectionFilterOnIOThread(int filter_id) { |
| 214 base::AutoLock lock(lock_); | 214 base::AutoLock lock(lock_); |
| 215 auto it = connection_filters_.find(filter_id); | 215 auto it = connection_filters_.find(filter_id); |
| 216 // TODO(crbug.com/687247): This DCHECK is hit when the browser is shut down | 216 // During shutdown the connection filters might have been cleared already |
| 217 // by the service manager (e.g. in response to an ash crash under mash). | 217 // by ClearConnectionFiltersOnIOThread() above, so this id might not exist. |
| 218 // Figure out why. | 218 if (it != connection_filters_.end()) |
| 219 DCHECK(it != connection_filters_.end()); | 219 connection_filters_.erase(it); |
| 220 connection_filters_.erase(it); | |
| 221 } | 220 } |
| 222 | 221 |
| 223 void OnBrowserConnectionLost() { | 222 void OnBrowserConnectionLost() { |
| 224 DCHECK(io_thread_checker_.CalledOnValidThread()); | 223 DCHECK(io_thread_checker_.CalledOnValidThread()); |
| 225 has_browser_connection_ = false; | 224 has_browser_connection_ = false; |
| 226 } | 225 } |
| 227 | 226 |
| 228 ///////////////////////////////////////////////////////////////////////////// | 227 ///////////////////////////////////////////////////////////////////////////// |
| 229 // service_manager::Service implementation | 228 // service_manager::Service implementation |
| 230 | 229 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 | 542 |
| 544 void ServiceManagerConnectionImpl::GetInterface( | 543 void ServiceManagerConnectionImpl::GetInterface( |
| 545 service_manager::mojom::InterfaceProvider* provider, | 544 service_manager::mojom::InterfaceProvider* provider, |
| 546 const std::string& interface_name, | 545 const std::string& interface_name, |
| 547 mojo::ScopedMessagePipeHandle request_handle) { | 546 mojo::ScopedMessagePipeHandle request_handle) { |
| 548 provider->GetInterface(interface_name, std::move(request_handle)); | 547 provider->GetInterface(interface_name, std::move(request_handle)); |
| 549 } | 548 } |
| 550 | 549 |
| 551 } // namespace content | 550 } // namespace content |
| 552 | 551 |
| OLD | NEW |