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

Unified Diff: platform.h

Issue 3475009: Adds the necessary changes to tpm_init to allow triggered initialization. (Closed) Base URL: http://git.chromium.org/git/tpm_init.git
Patch Set: Address feedback. 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
« no previous file with comments | « SConstruct ('k') | platform.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform.h
diff --git a/platform.h b/platform.h
new file mode 100644
index 0000000000000000000000000000000000000000..e94412ae42b0ee080b145d8faea6c42ba29c929a
--- /dev/null
+++ b/platform.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2009-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.
+
+#ifndef TPM_INIT_PLATFORM_H_
+#define TPM_INIT_PLATFORM_H_
+
+#include <base/basictypes.h>
+#include <string>
+#include <vector>
+
+namespace tpm_init {
+
+// Default umask
+extern const int kDefaultUmask;
+
+// Class Platform exists to be able to mock platform calls (in this case, just
+// umask).
+// TODO(fes): Remove this class altogether if tpm_init is merged with
+// cryptohome, or put it in a separate, common library.
+class Platform {
+ public:
+
+ Platform();
+
+ virtual ~Platform();
+
+ // Sets the current umask, returning the old mask
+ //
+ // Parameters
+ // new_mask - The mask to set
+ virtual int SetMask(int new_mask);
+
+ private:
+ int umask_;
+
+ DISALLOW_COPY_AND_ASSIGN(Platform);
+};
+
+} // namespace tpm_init
+
+#endif // TPM_INIT_PLATFORM_H_
« no previous file with comments | « SConstruct ('k') | platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698