OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 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 // Some portions Copyright (c) 2009 The Chromium Authors. |
| 5 // |
| 6 // Implements a simple jail that uses CommandLine heavily instead of |
| 7 // the Options class. It should act as a simple reference implementation |
| 8 // for all functionality. |
| 9 |
| 10 #ifndef __CHROMEOS_MINIJAIL_MINIJAIL_H |
| 11 #define __CHROMEOS_MINIJAIL_MINIJAIL_H |
| 12 |
| 13 #include <string> |
| 14 |
| 15 #include <base/basictypes.h> |
| 16 #include <base/logging.h> |
| 17 #include <base/scoped_ptr.h> |
| 18 |
| 19 #include "minijail/env.h" |
| 20 #include "minijail/options.h" |
| 21 #include "minijail/interface.h" |
| 22 |
| 23 namespace chromeos { |
| 24 |
| 25 |
| 26 class MiniJailOptions : public minijail::Options { |
| 27 public: |
| 28 MiniJailOptions() { } |
| 29 ~MiniJailOptions() { } |
| 30 // We can set some defaults here if desired. |
| 31 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(MiniJailOptions); |
| 33 }; |
| 34 |
| 35 class MiniJail : public minijail::Interface { |
| 36 public: |
| 37 MiniJail() { } |
| 38 ~MiniJail() { } |
| 39 bool Jail() const; |
| 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(MiniJail); |
| 42 }; |
| 43 |
| 44 } // namespace chromeos |
| 45 |
| 46 #endif // __CHROMEOS_MINIJAIL_MINIJAIL |
OLD | NEW |