OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009-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 #ifndef TPM_INIT_PLATFORM_H_ |
| 6 #define TPM_INIT_PLATFORM_H_ |
| 7 |
| 8 #include <base/basictypes.h> |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 12 namespace tpm_init { |
| 13 |
| 14 // Default umask |
| 15 extern const int kDefaultUmask; |
| 16 |
| 17 // Class Platform exists to be able to mock platform calls (in this case, just |
| 18 // umask). |
| 19 // TODO(fes): Remove this class altogether if tpm_init is merged with |
| 20 // cryptohome, or put it in a separate, common library. |
| 21 class Platform { |
| 22 public: |
| 23 |
| 24 Platform(); |
| 25 |
| 26 virtual ~Platform(); |
| 27 |
| 28 // Sets the current umask, returning the old mask |
| 29 // |
| 30 // Parameters |
| 31 // new_mask - The mask to set |
| 32 virtual int SetMask(int new_mask); |
| 33 |
| 34 private: |
| 35 int umask_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(Platform); |
| 38 }; |
| 39 |
| 40 } // namespace tpm_init |
| 41 |
| 42 #endif // TPM_INIT_PLATFORM_H_ |
OLD | NEW |