summaryrefslogtreecommitdiffstats
path: root/base/process_util.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 20:45:22 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-29 20:45:22 +0000
commit91d91fac1db8f2f163e4873bd93a65f4fada37ee (patch)
treea128f7ef2b816771bc0a69fa025350992c4ba5b9 /base/process_util.h
parent666f40f61545af4f8f52d964c341d01630a352cd (diff)
downloadchromium_src-91d91fac1db8f2f163e4873bd93a65f4fada37ee.zip
chromium_src-91d91fac1db8f2f163e4873bd93a65f4fada37ee.tar.gz
chromium_src-91d91fac1db8f2f163e4873bd93a65f4fada37ee.tar.bz2
linux: components support for base/
This builds base_unittests using libbase as a component. Review URL: http://codereview.chromium.org/6904109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83583 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util.h')
-rw-r--r--base/process_util.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/base/process_util.h b/base/process_util.h
index bdf9b9e..bb8f30e 100644
--- a/base/process_util.h
+++ b/base/process_util.h
@@ -170,7 +170,7 @@ FilePath GetProcessExecutablePath(ProcessHandle process);
// Parse the data found in /proc/<pid>/stat and return the sum of the
// CPU-related ticks. Returns -1 on parse error.
// Exposed for testing.
-int ParseProcStatCPU(const std::string& input);
+BASE_API int ParseProcStatCPU(const std::string& input);
static const char kAdjustOOMScoreSwitch[] = "--adjust-oom-score";
@@ -182,7 +182,7 @@ bool AdjustOOMScore(ProcessId process, int score);
#if defined(OS_POSIX)
// Returns the ID for the parent of the given process.
-ProcessId GetParentProcessId(ProcessHandle process);
+BASE_API ProcessId GetParentProcessId(ProcessHandle process);
// Close all file descriptors, except those which are a destination in the
// given multimap. Only call this function in a child process where you know
@@ -264,17 +264,17 @@ BASE_API bool LaunchAppAsUser(UserTokenHandle token,
// Note that the first argument in argv must point to the executable filename.
// If the filename is not fully specified, PATH will be searched.
typedef std::vector<std::pair<int, int> > file_handle_mapping_vector;
-bool LaunchApp(const std::vector<std::string>& argv,
- const file_handle_mapping_vector& fds_to_remap,
- bool wait, ProcessHandle* process_handle);
+BASE_API bool LaunchApp(const std::vector<std::string>& argv,
+ const file_handle_mapping_vector& fds_to_remap,
+ bool wait, ProcessHandle* process_handle);
// Similar to the above, but also (un)set environment variables in child process
// through |environ|.
typedef std::vector<std::pair<std::string, std::string> > environment_vector;
-bool LaunchApp(const std::vector<std::string>& argv,
- const environment_vector& environ,
- const file_handle_mapping_vector& fds_to_remap,
- bool wait, ProcessHandle* process_handle);
+BASE_API bool LaunchApp(const std::vector<std::string>& argv,
+ const environment_vector& environ,
+ const file_handle_mapping_vector& fds_to_remap,
+ bool wait, ProcessHandle* process_handle);
// Similar to the above two methods, but starts the child process in a process
// group of its own, instead of allowing it to inherit the parent's process
@@ -291,8 +291,8 @@ bool LaunchAppInNewProcessGroup(const std::vector<std::string>& argv,
// the second is empty, in which case the key-value is removed.
//
// The returned array is allocated using new[] and must be freed by the caller.
-char** AlterEnvironment(const environment_vector& changes,
- const char* const* const env);
+BASE_API char** AlterEnvironment(const environment_vector& changes,
+ const char* const* const env);
#endif // defined(OS_POSIX)
// Executes the application specified by cl. This function delegates to one
@@ -310,8 +310,8 @@ BASE_API bool GetAppOutput(const CommandLine& cl, std::string* output);
// A restricted version of |GetAppOutput()| which (a) clears the environment,
// and (b) stores at most |max_output| bytes; also, it doesn't search the path
// for the command.
-bool GetAppOutputRestricted(const CommandLine& cl,
- std::string* output, size_t max_output);
+BASE_API bool GetAppOutputRestricted(const CommandLine& cl,
+ std::string* output, size_t max_output);
#endif
// Used to filter processes by process ID.
@@ -650,7 +650,7 @@ BASE_API void EnableTerminationOnHeapCorruption();
#if !defined(OS_WIN)
// Turns on process termination if memory runs out. This is handled on Windows
// inside RegisterInvalidParamHandler().
-void EnableTerminationOnOutOfMemory();
+BASE_API void EnableTerminationOnOutOfMemory();
#if defined(OS_MACOSX)
// Exposed for testing.
malloc_zone_t* GetPurgeableZone();