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

Side by Side Diff: dbus/object_manager.cc

Issue 2239123002: dbus: Make Bus::GetManagedObjects skip unavailable services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « dbus/object_manager.h ('k') | dbus/object_proxy.h » ('j') | dbus/object_proxy.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698