Chromium Code Reviews| Index: service.h |
| diff --git a/service.h b/service.h |
| index 1fa6fead4d0f2c9bec55afc1869d34b1fdc653bb..dff7baa84795bbdfacdfdf44674d1315f5bd2f27 100644 |
| --- a/service.h |
| +++ b/service.h |
| @@ -17,6 +17,7 @@ |
| #include "cryptohome_event_source.h" |
| #include "mount.h" |
| #include "mount_task.h" |
| +#include "lockbox.h" |
|
gauravsh
2011/04/11 04:03:20
nit: alpha
|
| #include "tpm_init.h" |
| namespace cryptohome { |
| @@ -42,6 +43,7 @@ class Service : public chromeos::dbus::AbstractDbusService, |
| // Setup the wrapped GObject and the GMainLoop |
| virtual bool Initialize(); |
| virtual bool SeedUrandom(); |
| + virtual void InitializeLockbox(); |
| virtual bool Reset(); |
| // Used internally during registration to set the |
| @@ -70,7 +72,9 @@ class Service : public chromeos::dbus::AbstractDbusService, |
| virtual void set_auto_cleanup_period(int value) { |
| auto_cleanup_period_ = value; |
| } |
| - |
| + virtual void set_lockbox(Lockbox* lockbox) { |
| + lockbox_ = lockbox; |
| + } |
| // MountTaskObserver |
| virtual void MountTaskObserve(const MountTaskResult& result); |
| @@ -149,6 +153,23 @@ class Service : public chromeos::dbus::AbstractDbusService, |
| virtual gboolean TpmClearStoredPassword(GError** error); |
| virtual gboolean GetStatusString(gchar** OUT_status, GError** error); |
| + // Lockbox methods |
| + virtual gboolean LockboxGet(gchar* name, |
| + GArray** OUT_value, |
| + gboolean* OUT_successful, |
| + GError** error); |
| + virtual gboolean LockboxSet(gchar* name, |
| + GArray* value, |
| + gboolean* OUT_successful, |
| + GError** error); |
| + virtual gboolean LockboxLock(gboolean* OUT_locked, GError** error); |
| + virtual gboolean LockboxCount(gint* OUT_count, GError** error); |
| + virtual gboolean LockboxIsReady(gboolean* OUT_ready, GError** error); |
| + virtual gboolean LockboxIsLocked(gboolean* OUT_locked, GError** error); |
| + virtual gboolean LockboxIsSecure(gboolean* OUT_secure, GError** error); |
| + virtual gboolean LockboxIsTampered(gboolean* OUT_tampered, GError** error); |
| + virtual gboolean LockboxIsLegacy(gboolean* OUT_legacy, GError** error); |
| + |
| protected: |
| virtual GMainLoop *main_loop() { return loop_; } |
| @@ -171,6 +192,8 @@ class Service : public chromeos::dbus::AbstractDbusService, |
| guint tpm_init_signal_; |
| CryptohomeEventSource event_source_; |
| int auto_cleanup_period_; |
| + scoped_ptr<cryptohome::Lockbox> default_lockbox_; |
| + cryptohome::Lockbox *lockbox_; |
|
gauravsh
2011/04/11 04:03:20
nit: * next to the type.
|
| DISALLOW_COPY_AND_ASSIGN(Service); |
| }; |