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

Side by Side Diff: chrome/installer/util/google_chrome_distribution.cc

Issue 10832031: Fix system-level toast regression. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This file defines specific implementation of BrowserDistribution class for 5 // This file defines specific implementation of BrowserDistribution class for
6 // Google Chrome. 6 // Google Chrome.
7 7
8 #include "chrome/installer/util/google_chrome_distribution.h" 8 #include "chrome/installer/util/google_chrome_distribution.h"
9 9
10 #include <vector> 10 #include <vector>
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 if (!::WTSQueryUserToken(console_id, &user_token)) { 273 if (!::WTSQueryUserToken(console_id, &user_token)) {
274 PLOG(ERROR) << __FUNCTION__ << " failed to get user token for console_id " 274 PLOG(ERROR) << __FUNCTION__ << " failed to get user token for console_id "
275 << console_id; 275 << console_id;
276 return false; 276 return false;
277 } 277 }
278 // Note: Handle inheritance must be true in order for the child process to be 278 // Note: Handle inheritance must be true in order for the child process to be
279 // able to use the duplicated handle above (Google Update results). 279 // able to use the duplicated handle above (Google Update results).
280 base::LaunchOptions options; 280 base::LaunchOptions options;
281 options.as_user = user_token; 281 options.as_user = user_token;
282 options.inherit_handles = true; 282 options.inherit_handles = true;
283 options.empty_desktop_name = true;
283 VLOG(1) << __FUNCTION__ << " launching " << cmd_line.GetCommandLineString(); 284 VLOG(1) << __FUNCTION__ << " launching " << cmd_line.GetCommandLineString();
284 bool launched = base::LaunchProcess(cmd_line, options, NULL); 285 bool launched = base::LaunchProcess(cmd_line, options, NULL);
285 ::CloseHandle(user_token); 286 ::CloseHandle(user_token);
286 VLOG(1) << __FUNCTION__ << " result: " << launched; 287 VLOG(1) << __FUNCTION__ << " result: " << launched;
287 return launched; 288 return launched;
288 } 289 }
289 290
290 } // namespace 291 } // namespace
291 292
292 GoogleChromeDistribution::GoogleChromeDistribution() 293 GoogleChromeDistribution::GoogleChromeDistribution()
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 // we waited for chrome to exit so the uninstall would not detect chrome 863 // we waited for chrome to exit so the uninstall would not detect chrome
863 // running. 864 // running.
864 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( 865 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch(
865 installer::switches::kSystemLevelToast); 866 installer::switches::kSystemLevelToast);
866 867
867 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, 868 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast,
868 GetType())); 869 GetType()));
869 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); 870 base::LaunchProcess(cmd, base::LaunchOptions(), NULL);
870 } 871 }
871 #endif 872 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698