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

Side by Side Diff: chrome/installer/gcapi/gcapi.cc

Issue 759903002: Upgrade the windows specific version of LaunchProcess to avoid raw handles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chrome build Created 6 years 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 // NOTE: This code is a legacy utility API for partners to check whether 5 // NOTE: This code is a legacy utility API for partners to check whether
6 // Chrome can be installed and launched. Recent updates are being made 6 // Chrome can be installed and launched. Recent updates are being made
7 // to add new functionality. These updates use code from Chromium, the old 7 // to add new functionality. These updates use code from Chromium, the old
8 // coded against the win32 api directly. If you have an itch to shave a 8 // coded against the win32 api directly. If you have an itch to shave a
9 // yak, feel free to re-write the old code too. 9 // yak, feel free to re-write the old code too.
10 10
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 NULL, 512 NULL,
513 CLSCTX_LOCAL_SERVER))) { 513 CLSCTX_LOCAL_SERVER))) {
514 if (SUCCEEDED(ipl->LaunchCmdLine( 514 if (SUCCEEDED(ipl->LaunchCmdLine(
515 chrome_command.GetCommandLineString().c_str()))) 515 chrome_command.GetCommandLineString().c_str())))
516 ret = true; 516 ret = true;
517 ipl.Release(); 517 ipl.Release();
518 } else { 518 } else {
519 // Couldn't get Omaha's process launcher, Omaha may not be installed at 519 // Couldn't get Omaha's process launcher, Omaha may not be installed at
520 // system level. Try just running Chrome instead. 520 // system level. Try just running Chrome instead.
521 ret = base::LaunchProcess(chrome_command.GetCommandLineString(), 521 ret = base::LaunchProcess(chrome_command.GetCommandLineString(),
522 base::LaunchOptions(), 522 base::LaunchOptions()).IsValid();
523 NULL);
524 } 523 }
525 524
526 if (impersonation_success) 525 if (impersonation_success)
527 ::RevertToSelf(); 526 ::RevertToSelf();
528 return ret; 527 return ret;
529 } 528 }
530 529
531 BOOL __stdcall LaunchGoogleChromeWithDimensions(int x, 530 BOOL __stdcall LaunchGoogleChromeWithDimensions(int x,
532 int y, 531 int y,
533 int width, 532 int width,
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 key.WriteValue(kRelaunchAllowedAfterValue, 789 key.WriteValue(kRelaunchAllowedAfterValue,
791 FormatDateOffsetByMonths(6)) != ERROR_SUCCESS || 790 FormatDateOffsetByMonths(6)) != ERROR_SUCCESS ||
792 !SetRelaunchExperimentLabels(relaunch_brandcode, shell_mode)) { 791 !SetRelaunchExperimentLabels(relaunch_brandcode, shell_mode)) {
793 if (error_code) 792 if (error_code)
794 *error_code = RELAUNCH_ERROR_RELAUNCH_FAILED; 793 *error_code = RELAUNCH_ERROR_RELAUNCH_FAILED;
795 return FALSE; 794 return FALSE;
796 } 795 }
797 796
798 return TRUE; 797 return TRUE;
799 } 798 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/uninstall_view.cc ('k') | chrome/installer/test/alternate_version_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698