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

Unified Diff: chromeos/dbus/permission_broker_client.h

Issue 1681383002: Add path open errors from the permission broker to the device log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_request_access
Patch Set: Addresses stevenjb@'s comments. Created 4 years, 10 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 | « chromeos/dbus/mock_permission_broker_client.h ('k') | chromeos/dbus/permission_broker_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/permission_broker_client.h
diff --git a/chromeos/dbus/permission_broker_client.h b/chromeos/dbus/permission_broker_client.h
index 276bfba46cd630c727bdec0501a626a6dc40b1dd..f56bfcc64d4239c85dbe05a711a481d514ed5f23 100644
--- a/chromeos/dbus/permission_broker_client.h
+++ b/chromeos/dbus/permission_broker_client.h
@@ -34,6 +34,12 @@ class CHROMEOS_EXPORT PermissionBrokerClient : public DBusClient {
// An OpenPathCallback callback is run when an OpenPath request is completed.
typedef base::Callback<void(dbus::FileDescriptor)> OpenPathCallback;
+ // An ErrorCallback callback is run when an error is returned by the
+ // permission broker.
+ typedef base::Callback<void(const std::string& error_name,
+ const std::string& message)>
+ ErrorCallback;
+
~PermissionBrokerClient() override;
static PermissionBrokerClient* Create();
@@ -46,9 +52,11 @@ class CHROMEOS_EXPORT PermissionBrokerClient : public DBusClient {
const ResultCallback& callback) = 0;
// OpenPath requests that the permission broker open the device node
- // identified by |path| and return the resulting file descriptor.
+ // identified by |path| and return the resulting file descriptor. One of
+ // |callback| or |error_callback| is called.
virtual void OpenPath(const std::string& path,
- const OpenPathCallback& callback) = 0;
+ const OpenPathCallback& callback,
+ const ErrorCallback& error_callback) = 0;
// Requests the |port| be opened on the firewall for incoming TCP/IP
// connections received on |interface| (an empty string indicates all
« no previous file with comments | « chromeos/dbus/mock_permission_broker_client.h ('k') | chromeos/dbus/permission_broker_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698