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

Unified Diff: chromeos_login_helpers.h

Issue 4132006: [cros] Add *Safe methods to the ownership API (Closed) Base URL: http://git.chromium.org/git/cros.git
Patch Set: comment out NOTREACHED Created 10 years, 2 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_login_helpers.h
diff --git a/chromeos_login_helpers.h b/chromeos_login_helpers.h
new file mode 100644
index 0000000000000000000000000000000000000000..d19c269a88e501441bac99d4379cca6b8414cd45
--- /dev/null
+++ b/chromeos_login_helpers.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <vector>
+
+#include <base/basictypes.h>
+#include <chromeos/dbus/dbus.h>
+#include <glib.h>
+
+namespace chromeos { // NOLINT
+
+struct CryptoBlob;
+struct Property;
+struct UserList;
+
+class ChromeOSLoginHelpers {
+ public:
+ static dbus::Proxy CreateProxy();
+ static uint8* NewBufferCopy(const uint8* x, int len);
+ static GArray* CreateGArrayFromBytes(const uint8* in, const int in_len);
+ static bool CheckWhitelistHelper(const char* email, GArray** sig);
+ static bool EnumerateWhitelistedHelper(gchar*** whitelisted);
+ static bool RetrievePropertyHelper(const char* name,
+ gchar** value,
+ GArray** sig);
+ static bool SetOwnerKeyHelper(GArray* key_der);
+ static bool StorePropertyHelper(const char* name,
+ const char* value,
+ GArray* sig);
+ static bool WhitelistOpHelper(const char* op,
+ const char* email,
+ const std::vector<uint8>& signature);
+ // Constructors, Destructors for useful structs
+ static CryptoBlob* CreateCryptoBlob(GArray* in);
+ static Property* CreateProperty(const char* name,
+ const gchar* value,
+ GArray* sig);
+ static UserList* CreateUserList(const char* const* users);
+ static void FreeCryptoBlob(CryptoBlob* blob);
+ static void FreeProperty(Property* property);
+ static void FreeUserList(UserList* userlist);
+
+ private:
+ ChromeOSLoginHelpers();
+ ~ChromeOSLoginHelpers();
+ DISALLOW_COPY_AND_ASSIGN(ChromeOSLoginHelpers);
+};
+
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698