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

Side by Side Diff: components/nacl/zygote/nacl_fork_delegate_linux.cc

Issue 1234973004: Update SplitString calls in components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium 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 4
5 #include "components/nacl/zygote/nacl_fork_delegate_linux.h" 5 #include "components/nacl/zygote/nacl_fork_delegate_linux.h"
6 6
7 #include <signal.h> 7 #include <signal.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <sys/resource.h> 9 #include <sys/resource.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 return true; 440 return true;
441 } 441 }
442 442
443 // static 443 // static
444 void NaClForkDelegate::AddPassthroughEnvToOptions( 444 void NaClForkDelegate::AddPassthroughEnvToOptions(
445 base::LaunchOptions* options) { 445 base::LaunchOptions* options) {
446 scoped_ptr<base::Environment> env(base::Environment::Create()); 446 scoped_ptr<base::Environment> env(base::Environment::Create());
447 std::string pass_through_string; 447 std::string pass_through_string;
448 std::vector<std::string> pass_through_vars; 448 std::vector<std::string> pass_through_vars;
449 if (env->GetVar(kNaClEnvPassthrough, &pass_through_string)) { 449 if (env->GetVar(kNaClEnvPassthrough, &pass_through_string)) {
450 base::SplitString( 450 pass_through_vars = base::SplitString(
451 pass_through_string, kNaClEnvPassthroughDelimiter, &pass_through_vars); 451 pass_through_string, std::string(1, kNaClEnvPassthroughDelimiter),
452 base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
452 } 453 }
453 pass_through_vars.push_back(kNaClExeStderr); 454 pass_through_vars.push_back(kNaClExeStderr);
454 pass_through_vars.push_back(kNaClExeStdout); 455 pass_through_vars.push_back(kNaClExeStdout);
455 pass_through_vars.push_back(kNaClVerbosity); 456 pass_through_vars.push_back(kNaClVerbosity);
456 pass_through_vars.push_back(sandbox::kSandboxEnvironmentApiRequest); 457 pass_through_vars.push_back(sandbox::kSandboxEnvironmentApiRequest);
457 for (size_t i = 0; i < pass_through_vars.size(); ++i) { 458 for (size_t i = 0; i < pass_through_vars.size(); ++i) {
458 std::string temp; 459 std::string temp;
459 if (env->GetVar(pass_through_vars[i].c_str(), &temp)) 460 if (env->GetVar(pass_through_vars[i].c_str(), &temp))
460 options->environ[pass_through_vars[i]] = temp; 461 options->environ[pass_through_vars[i]] = temp;
461 } 462 }
462 } 463 }
463 464
464 } // namespace nacl 465 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | components/omnibox/browser/autocomplete_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698