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

Unified Diff: service.h

Issue 6801020: service,cryptohome: wire up lockbox to dbus (Closed)
Patch Set: fix spaces Created 9 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
« no previous file with comments | « interface.cc ('k') | service.cc » ('j') | service.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « interface.cc ('k') | service.cc » ('j') | service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698