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

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

Issue 465106: Add build and package support to minijail (Closed)
Patch Set: 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/debian/rules ('k') | src/platform/minijail/make_pkg.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // Some portions Copyright (c) 2009 The Chromium Authors. 4 // Some portions Copyright (c) 2009 The Chromium Authors.
5 // 5 //
6 // Default Interface implementation 6 // Default Interface implementation
7 7
8 #include "minijail/env.h" 8 #include "minijail/env.h"
9 #include "minijail/options.h" 9 #include "minijail/options.h"
10 #include "minijail/interface.h" 10 #include "minijail/interface.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 namespace minijail { 13 namespace minijail {
14 14
15 bool Interface::Run() const { 15 bool Interface::Run() const {
16 LOG_IF(FATAL, !options()->executable_path()) << "No executable path given."; 16 if (!options() || !options()->env()) {
17 LOG(ERROR) << "Initialize() not called or called with bad Env";
18 return false;
19 }
20 if (!options()->executable_path()) {
21 LOG(ERROR) << "No executable path given.";
22 return false;
23 }
17 return options()->env()->Run(options()->executable_path(), 24 return options()->env()->Run(options()->executable_path(),
18 options()->arguments(), 25 options()->arguments(),
19 options()->environment()); 26 options()->environment());
20 } 27 }
21 28
22 } // namespace minijail 29 } // namespace minijail
23 } // namespace chromeos 30 } // namespace chromeos
OLDNEW
« no previous file with comments | « src/platform/minijail/debian/rules ('k') | src/platform/minijail/make_pkg.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698