summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 16:30:27 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 16:30:27 +0000
commite22cf993eae0a94e08df91255a46557623b9f6d4 (patch)
tree0368ac171b565c431198f1c938db2bbc685ef5ee
parenta1ed44a4da1ef5d3466814d4e0256d1248251b42 (diff)
downloadchromium_src-e22cf993eae0a94e08df91255a46557623b9f6d4.zip
chromium_src-e22cf993eae0a94e08df91255a46557623b9f6d4.tar.gz
chromium_src-e22cf993eae0a94e08df91255a46557623b9f6d4.tar.bz2
Remove LaunchAppAsUser().
This is the last of the LaunchApp family. BUG=88990 Review URL: http://codereview.chromium.org/7409004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@93034 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/process_util.h24
-rw-r--r--base/process_util_unittest.cc4
-rw-r--r--chrome/installer/util/google_chrome_distribution.cc7
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor.cc7
4 files changed, 10 insertions, 32 deletions
diff --git a/base/process_util.h b/base/process_util.h
index 2a3e82c..e55b610 100644
--- a/base/process_util.h
+++ b/base/process_util.h
@@ -295,30 +295,6 @@ BASE_API bool LaunchProcess(const string16& cmdline,
const LaunchOptions& options,
ProcessHandle* process_handle);
-// TODO(evan): deprecated; change callers to use LaunchProcess, remove.
-inline bool LaunchAppAsUser(UserTokenHandle token,
- const std::wstring& cmdline,
- bool start_hidden,
- ProcessHandle* process_handle) {
- LaunchOptions options;
- options.start_hidden = start_hidden;
- options.as_user = token;
- return LaunchProcess(cmdline, options, process_handle);
-}
-
-// TODO(evan): deprecated; change callers to use LaunchProcess, remove.
-inline bool LaunchAppAsUser(UserTokenHandle token,
- const std::wstring& cmdline,
- bool start_hidden, ProcessHandle* process_handle,
- bool empty_desktop_name, bool inherit_handles) {
- LaunchOptions options;
- options.start_hidden = start_hidden;
- options.as_user = token;
- options.empty_desktop_name = empty_desktop_name;
- options.inherit_handles = inherit_handles;
- return LaunchProcess(cmdline, options, process_handle);
-}
-
#elif defined(OS_POSIX)
// A POSIX-specific version of LaunchProcess that takes an argv array
// instead of a CommandLine. Useful for situations where you need to
diff --git a/base/process_util_unittest.cc b/base/process_util_unittest.cc
index 09d3b50..c2200db 100644
--- a/base/process_util_unittest.cc
+++ b/base/process_util_unittest.cc
@@ -390,7 +390,9 @@ TEST_F(ProcessUtilTest, LaunchAsUser) {
ASSERT_TRUE(OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &token));
std::wstring cmdline =
this->MakeCmdLine("SimpleChildProcess", false).command_line_string();
- EXPECT_TRUE(base::LaunchAppAsUser(token, cmdline, false, NULL));
+ base::LaunchOptions options;
+ options.as_user = token;
+ EXPECT_TRUE(base::LaunchProcess(cmdline, options, NULL));
}
#endif // defined(OS_WIN)
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index 433e7f3..6d5dd8f 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -231,9 +231,10 @@ bool LaunchSetupAsConsoleUser(const FilePath& setup_path,
return false;
// Note: Handle inheritance must be true in order for the child process to be
// able to use the duplicated handle above (Google Update results).
- bool launched = base::LaunchAppAsUser(user_token,
- cmd_line.command_line_string(),
- false, NULL, true, true);
+ base::LaunchOptions options;
+ options.as_user = user_token;
+ options.inherit_handles = true;
+ bool launched = base::LaunchProcess(cmd_line, options, NULL);
::CloseHandle(user_token);
return launched;
}
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
index 562d0b8..b27bbf0 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
@@ -230,10 +230,9 @@ bool LaunchPrintDialog(const string16& xps_path,
command_line.AppendSwitchNative(switches::kCloudPrintJobTitle,
job_title);
command_line.AppendSwitch(switches::kCloudPrintDeleteFile);
- base::LaunchAppAsUser(primary_token_scoped,
- command_line.command_line_string(),
- false,
- NULL);
+ base::LaunchOptions options;
+ options.as_user = primary_token_scoped;
+ base::LaunchProcess(command_line, options, NULL);
return true;
}