| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "dbus/object_manager.h" | 5 #include "dbus/object_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 MethodCall method_call(kObjectManagerInterface, | 140 MethodCall method_call(kObjectManagerInterface, |
| 141 kObjectManagerGetManagedObjects); | 141 kObjectManagerGetManagedObjects); |
| 142 | 142 |
| 143 object_proxy_->CallMethod( | 143 object_proxy_->CallMethod( |
| 144 &method_call, | 144 &method_call, |
| 145 ObjectProxy::TIMEOUT_USE_DEFAULT, | 145 ObjectProxy::TIMEOUT_USE_DEFAULT, |
| 146 base::Bind(&ObjectManager::OnGetManagedObjects, | 146 base::Bind(&ObjectManager::OnGetManagedObjects, |
| 147 weak_ptr_factory_.GetWeakPtr())); | 147 weak_ptr_factory_.GetWeakPtr())); |
| 148 } | 148 } |
| 149 | 149 |
| 150 bool ObjectManager::ServiceIsAvailable() { |
| 151 return object_proxy_->ServiceIsAvailable(); |
| 152 } |
| 153 |
| 150 void ObjectManager::CleanUp() { | 154 void ObjectManager::CleanUp() { |
| 151 DCHECK(bus_); | 155 DCHECK(bus_); |
| 152 bus_->AssertOnDBusThread(); | 156 bus_->AssertOnDBusThread(); |
| 153 DCHECK(!cleanup_called_); | 157 DCHECK(!cleanup_called_); |
| 154 | 158 |
| 155 cleanup_called_ = true; | 159 cleanup_called_ = true; |
| 156 | 160 |
| 157 if (!setup_success_) | 161 if (!setup_success_) |
| 158 return; | 162 return; |
| 159 | 163 |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 RemoveInterface(object_path, *iiter); | 530 RemoveInterface(object_path, *iiter); |
| 527 } | 531 } |
| 528 | 532 |
| 529 } | 533 } |
| 530 | 534 |
| 531 if (!new_owner.empty()) | 535 if (!new_owner.empty()) |
| 532 GetManagedObjects(); | 536 GetManagedObjects(); |
| 533 } | 537 } |
| 534 | 538 |
| 535 } // namespace dbus | 539 } // namespace dbus |
| OLD | NEW |