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

Unified Diff: dbus/test_service.h

Issue 7830009: Add Bus::ShutdownOnDBusThreadAndBlock() and remove bus::Shutdown() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dbus/mock_bus.h ('k') | dbus/test_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/test_service.h
diff --git a/dbus/test_service.h b/dbus/test_service.h
index 0ed846229c88382ec853aa71d9f39ef020622508..348aa7389631733e9524612882a9226fc3bd53c4 100644
--- a/dbus/test_service.h
+++ b/dbus/test_service.h
@@ -49,12 +49,8 @@ class TestService : public base::Thread {
// Returns true on success.
bool WaitUntilServiceIsStarted() WARN_UNUSED_RESULT;
- // Shuts down the service.
- void Shutdown();
-
- // Waits until the service is shut down.
- // Returns true on success.
- bool WaitUntilServiceIsShutdown() WARN_UNUSED_RESULT;
+ // Shuts down the service and blocks until it's done.
+ void ShutdownAndBlock();
// Returns true if the bus has the D-Bus thread.
bool HasDBusThread();
@@ -66,17 +62,14 @@ class TestService : public base::Thread {
// Helper function for SendTestSignal().
void SendTestSignalInternal(const std::string& message);
- // Helper function for Shutdown().
- void ShutdownInternal();
+ // Helper function for ShutdownAndBlock().
+ void ShutdownAndBlockInternal();
// Called when a method is exported.
void OnExported(const std::string& interface_name,
const std::string& method_name,
bool success);
- // Called when the bus is shut down.
- void OnShutdown();
-
// base::Thread override.
virtual void Run(MessageLoop* message_loop);
@@ -95,7 +88,6 @@ class TestService : public base::Thread {
Response* BrokenMethod(MethodCall* method_call);
base::Thread* dbus_thread_;
- base::WaitableEvent on_shutdown_;
base::WaitableEvent on_all_methods_exported_;
// The number of methods actually exported.
int num_exported_methods_;
« no previous file with comments | « dbus/mock_bus.h ('k') | dbus/test_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698