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

Side by Side Diff: src/platform/minijail/interface.h

Issue 466049: Baseline minijail with a commandline switch driven main. (Closed)
Patch Set: fix overly long lines Created 11 years 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
« no previous file with comments | « src/platform/minijail/env.cc ('k') | src/platform/minijail/interface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 // Abstract interface for implementing minijails
7
8 #ifndef __CHROMEOS_MINIJAIL_INTERFACE_H
9 #define __CHROMEOS_MINIJAIL_INTERFACE_H
10
11 #include <base/basictypes.h>
12 #include <base/scoped_ptr.h>
13
14 namespace chromeos {
15 namespace minijail {
16
17 class Options;
18
19 class Interface {
20 public:
21 Interface() : options_(NULL) { } // new default
22 virtual ~Interface() { }
23 virtual bool Initialize(const Options *options)
24 { set_options(options); return true; }
25 virtual const Options *options() const { return options_; }
26 virtual void set_options(const Options *options) { options_ = options; }
27
28 // To be overriden.
29 virtual const char *name() { return "minijail::Interface"; }
30 // Implements the jail logic
31 virtual bool Jail() const = 0;
32 // Performs the execution step. It isn't required to return.
33 virtual bool Run() const;
34
35 private:
36 const Options *options_;
37
38 DISALLOW_COPY_AND_ASSIGN(Interface);
39 };
40
41 } // namespace minijail
42 } // namespace chromeos
43
44 #endif // __CHROMEOS_MINIJAIL_INTERFACE_H
OLDNEW
« no previous file with comments | « src/platform/minijail/env.cc ('k') | src/platform/minijail/interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698