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

Unified Diff: dbus/test_service.h

Issue 1559873005: dbus: Use randomly generated string as a TestService's service name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/signal_sender_verification_unittest.cc ('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 de4aa720ac76a931ebf4811c89c966484aae037a..e2ed480e9d340ee2c91395e52e03b15bb094688a 100644
--- a/dbus/test_service.h
+++ b/dbus/test_service.h
@@ -40,6 +40,9 @@ class TestService : public base::Thread {
// Flags governing parameters of service ownership request.
Bus::ServiceOwnershipOptions request_ownership_options;
+
+ // Name of this service (randomly generated name will be used if empty).
+ std::string service_name;
};
// The number of methods we'll export.
@@ -78,6 +81,9 @@ class TestService : public base::Thread {
// |callback| will be called when the ownership has been released.
void ReleaseOwnership(base::Closure callback);
+ // Returns the name of this service.
+ const std::string& service_name() const { return service_name_; }
+
// Returns whether this instance has the name ownership or not.
bool has_ownership() const { return has_ownership_; }
@@ -199,6 +205,9 @@ class TestService : public base::Thread {
dbus::ExportedObject::ResponseSender response_sender,
bool success);
+ // Name of this service.
+ std::string service_name_;
+
// Options to use when requesting service ownership.
Bus::ServiceOwnershipOptions request_ownership_options_;
« no previous file with comments | « dbus/signal_sender_verification_unittest.cc ('k') | dbus/test_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698