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

Unified Diff: chromeos/dbus/session_manager_client.h

Issue 2801993002: Abandon user sign in when policy is retrieved before session started (Closed)
Patch Set: Added comments to new functions Created 3 years, 8 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
Index: chromeos/dbus/session_manager_client.h
diff --git a/chromeos/dbus/session_manager_client.h b/chromeos/dbus/session_manager_client.h
index b294b761c8b9c692d7414f78e8432d46d663ec21..6a161cee5ff675e8e1e5458a2e48b94d1aba1ef4 100644
--- a/chromeos/dbus/session_manager_client.h
+++ b/chromeos/dbus/session_manager_client.h
@@ -147,6 +147,11 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient {
using RetrievePolicyCallback =
base::Callback<void(const std::string& protobuf)>;
+ // Used to RetrievePolicyForUserWithErrorCallback. Triggered when the
+ // D-Bus request fails.
+ using ErrorCallback = base::Callback<void(const std::string& error_name,
Daniel Erat 2017/04/10 18:59:26 mentioned earlier, but this should pass an enum ra
Andrew T Wilson (Slow) 2017/04/11 13:35:04 +1 as this lets us log UMA stats for it.
igorcov 2017/04/18 10:23:18 Done.
+ const std::string& error_message)>;
+
// Fetches the device policy blob stored by the session manager. Upon
// completion of the retrieve attempt, we will call the provided callback.
virtual void RetrieveDevicePolicy(const RetrievePolicyCallback& callback) = 0;
@@ -167,6 +172,13 @@ class CHROMEOS_EXPORT SessionManagerClient : public DBusClient {
const cryptohome::Identification& cryptohome_id,
const RetrievePolicyCallback& callback) = 0;
+ // Same as RetrievePolicyForUser() but the error_callback is invoked in case
+ // of an error.
+ virtual void RetrievePolicyForUserWithErrorCallback(
Daniel Erat 2017/04/10 18:59:26 please use a single method and update callers inst
igorcov 2017/04/18 10:23:18 Done.
+ const cryptohome::Identification& cryptohome_id,
+ const RetrievePolicyCallback& callback,
+ const ErrorCallback& error_callback) = 0;
+
// Same as RetrievePolicyForUser() but blocks until a reply is received, and
// returns the policy synchronously. Returns an empty string if the method
// call fails.

Powered by Google App Engine
This is Rietveld 408576698