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

Unified Diff: minijail_main.cc

Issue 3173010: [minijail] Update to new libchrome API (Closed) Base URL: http://src.chromium.org/git/minijail.git
Patch Set: Created 10 years, 4 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minijail_main.cc
diff --git a/minijail_main.cc b/minijail_main.cc
index 01dd582cfe6110cba81d5d9611fbdc009f693e4c..a40397ce53526da80a5a13fdfa8576ea0104ade5 100644
--- a/minijail_main.cc
+++ b/minijail_main.cc
@@ -116,16 +116,13 @@ static void ProcessSwitches(CommandLine *cl,
// Grab the loose args to use as the command line.
// We have to wstring->argv[][] manually. Ugh.
- std::vector<std::wstring> loose_wide_args = cl->GetLooseValues();
- std::vector<std::string> loose_args(loose_wide_args.size());
- char const* *jailed_argv = new char const*[loose_wide_args.size() + 1];
- std::vector<std::wstring>::const_iterator arg_it = loose_wide_args.begin();
+ std::vector<std::string> loose_args = cl->args();
+ char const* *jailed_argv = new char const*[loose_args.size() + 1];
+ std::vector<std::string>::const_iterator arg_it = loose_args.begin();
char const* *ja = jailed_argv;
- for (; arg_it != loose_wide_args.end(); ++arg_it) {
- std::string arg = WideToASCII(*arg_it);
- loose_args.push_back(arg);
+ for (; arg_it != loose_args.end(); ++arg_it) {
// XXX: clean up this leak even though it doesn't matter.
- *ja++ = strdup(arg.c_str());
+ *ja++ = strdup(arg_it->c_str());
}
*ja = 0;
@@ -155,4 +152,3 @@ int main(int argc, char *argv[], char **envp) {
bool ok = jail.Jail() && jail.Run();
return !ok;
}
-
« no previous file with comments | « SConstruct ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698