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

Side by Side 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, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <vector>
6
7 #include <base/basictypes.h>
8 #include <chromeos/dbus/dbus.h>
9 #include <glib.h>
10
11 namespace chromeos { // NOLINT
12
13 struct CryptoBlob;
14 struct Property;
15 struct UserList;
16
17 class ChromeOSLoginHelpers {
18 public:
19 static dbus::Proxy CreateProxy();
20 static uint8* NewBufferCopy(const uint8* x, int len);
21 static GArray* CreateGArrayFromBytes(const uint8* in, const int in_len);
22 static bool CheckWhitelistHelper(const char* email, GArray** sig);
23 static bool EnumerateWhitelistedHelper(gchar*** whitelisted);
24 static bool RetrievePropertyHelper(const char* name,
25 gchar** value,
26 GArray** sig);
27 static bool SetOwnerKeyHelper(GArray* key_der);
28 static bool StorePropertyHelper(const char* name,
29 const char* value,
30 GArray* sig);
31 static bool WhitelistOpHelper(const char* op,
32 const char* email,
33 const std::vector<uint8>& signature);
34 // Constructors, Destructors for useful structs
35 static CryptoBlob* CreateCryptoBlob(GArray* in);
36 static Property* CreateProperty(const char* name,
37 const gchar* value,
38 GArray* sig);
39 static UserList* CreateUserList(const char* const* users);
40 static void FreeCryptoBlob(CryptoBlob* blob);
41 static void FreeProperty(Property* property);
42 static void FreeUserList(UserList* userlist);
43
44 private:
45 ChromeOSLoginHelpers();
46 ~ChromeOSLoginHelpers();
47 DISALLOW_COPY_AND_ASSIGN(ChromeOSLoginHelpers);
48 };
49
50 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698