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

Unified Diff: chrome/browser/chromeos/cros/login_library.h

Issue 3141031: [Chrome OS] Wire up ownership API from libcros (Closed)
Patch Set: address davemoore comments Created 10 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 | « no previous file | chrome/browser/chromeos/cros/login_library.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros/login_library.h
diff --git a/chrome/browser/chromeos/cros/login_library.h b/chrome/browser/chromeos/cros/login_library.h
index c6bd9e5c7b307b94d370020c29c15456ba4714a0..0628e2f3b68cba50a656e00726ade950697c3588 100644
--- a/chrome/browser/chromeos/cros/login_library.h
+++ b/chrome/browser/chromeos/cros/login_library.h
@@ -16,10 +16,24 @@ namespace chromeos {
// This interface defines the interaction with the ChromeOS login library APIs.
class LoginLibrary {
public:
+ template <class T>
+ class Delegate {
+ public:
+ virtual void Run(T value) = 0;
+ };
+
virtual ~LoginLibrary() {}
// Requests that the Upstart signal login-prompt-ready be emitted.
virtual bool EmitLoginPromptReady() = 0;
+ // Attempts to asynchronously set the provided public key as the
+ // Owner's public key for this device. |public_key_der| should be a
+ // DER-encoded PKCS11 SubjectPublicKeyInfo structure.
+ // Returns true if the attempt was successfully started.
+ // callback->Run() will be called when the operation is complete.
+ virtual bool SetOwnerKey(const std::vector<uint8>& public_key_der,
+ Delegate<bool>* callback) = 0;
+
// Tells the session manager to start a logged-in session for the user
// |user_email|. |unique_id| is meant to be used when we have a non-human-
// readable unique identifier by which we distinguish users (to deal with
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/login_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698