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

Side by Side Diff: base/process_util.h

Issue 7258005: Clean up users of a deprecated base::LaunchApp API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/process_util_unittest.cc » ('j') | content/browser/child_process_launcher.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This file/namespace contains utility functions for enumerating, ending and 5 // This file/namespace contains utility functions for enumerating, ending and
6 // computing statistics of processes. 6 // computing statistics of processes.
7 7
8 #ifndef BASE_PROCESS_UTIL_H_ 8 #ifndef BASE_PROCESS_UTIL_H_
9 #define BASE_PROCESS_UTIL_H_ 9 #define BASE_PROCESS_UTIL_H_
10 #pragma once 10 #pragma once
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 inline bool LaunchApp(const std::vector<std::string>& argv, 351 inline bool LaunchApp(const std::vector<std::string>& argv,
352 const file_handle_mapping_vector& fds_to_remap, 352 const file_handle_mapping_vector& fds_to_remap,
353 bool wait, ProcessHandle* process_handle) { 353 bool wait, ProcessHandle* process_handle) {
354 LaunchOptions options; 354 LaunchOptions options;
355 options.fds_to_remap = &fds_to_remap; 355 options.fds_to_remap = &fds_to_remap;
356 options.wait = wait; 356 options.wait = wait;
357 options.process_handle = process_handle; 357 options.process_handle = process_handle;
358 return LaunchProcess(argv, options); 358 return LaunchProcess(argv, options);
359 } 359 }
360 360
361 // TODO(evan): deprecated; change callers to use LaunchProcess, remove.
362 inline bool LaunchApp(const std::vector<std::string>& argv,
363 const environment_vector& environ,
364 const file_handle_mapping_vector& fds_to_remap,
365 bool wait, ProcessHandle* process_handle) {
366 LaunchOptions options;
367 options.environ = &environ;
368 options.fds_to_remap = &fds_to_remap;
369 options.wait = wait;
370 options.process_handle = process_handle;
371 return LaunchProcess(argv, options);
372 }
373
374 // AlterEnvironment returns a modified environment vector, constructed from the 361 // AlterEnvironment returns a modified environment vector, constructed from the
375 // given environment and the list of changes given in |changes|. Each key in 362 // given environment and the list of changes given in |changes|. Each key in
376 // the environment is matched against the first element of the pairs. In the 363 // the environment is matched against the first element of the pairs. In the
377 // event of a match, the value is replaced by the second of the pair, unless 364 // event of a match, the value is replaced by the second of the pair, unless
378 // the second is empty, in which case the key-value is removed. 365 // the second is empty, in which case the key-value is removed.
379 // 366 //
380 // The returned array is allocated using new[] and must be freed by the caller. 367 // The returned array is allocated using new[] and must be freed by the caller.
381 BASE_API char** AlterEnvironment(const environment_vector& changes, 368 BASE_API char** AlterEnvironment(const environment_vector& changes,
382 const char* const* const env); 369 const char* const* const env);
383 #endif // defined(OS_POSIX) 370 #endif // defined(OS_POSIX)
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 // instance running inside the parent. The parent's Breakpad instance should 761 // instance running inside the parent. The parent's Breakpad instance should
775 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler 762 // not handle the child's exceptions. Calling RestoreDefaultExceptionHandler
776 // in the child after forking will restore the standard exception handler. 763 // in the child after forking will restore the standard exception handler.
777 // See http://crbug.com/20371/ for more details. 764 // See http://crbug.com/20371/ for more details.
778 void RestoreDefaultExceptionHandler(); 765 void RestoreDefaultExceptionHandler();
779 #endif // defined(OS_MACOSX) 766 #endif // defined(OS_MACOSX)
780 767
781 } // namespace base 768 } // namespace base
782 769
783 #endif // BASE_PROCESS_UTIL_H_ 770 #endif // BASE_PROCESS_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | base/process_util_unittest.cc » ('j') | content/browser/child_process_launcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698