| OLD | NEW |
| 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 Loading... |
| 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()).IsValid(); | 522 base::LaunchOptions(), |
| 523 NULL); |
| 523 } | 524 } |
| 524 | 525 |
| 525 if (impersonation_success) | 526 if (impersonation_success) |
| 526 ::RevertToSelf(); | 527 ::RevertToSelf(); |
| 527 return ret; | 528 return ret; |
| 528 } | 529 } |
| 529 | 530 |
| 530 BOOL __stdcall LaunchGoogleChromeWithDimensions(int x, | 531 BOOL __stdcall LaunchGoogleChromeWithDimensions(int x, |
| 531 int y, | 532 int y, |
| 532 int width, | 533 int width, |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 key.WriteValue(kRelaunchAllowedAfterValue, | 790 key.WriteValue(kRelaunchAllowedAfterValue, |
| 790 FormatDateOffsetByMonths(6)) != ERROR_SUCCESS || | 791 FormatDateOffsetByMonths(6)) != ERROR_SUCCESS || |
| 791 !SetRelaunchExperimentLabels(relaunch_brandcode, shell_mode)) { | 792 !SetRelaunchExperimentLabels(relaunch_brandcode, shell_mode)) { |
| 792 if (error_code) | 793 if (error_code) |
| 793 *error_code = RELAUNCH_ERROR_RELAUNCH_FAILED; | 794 *error_code = RELAUNCH_ERROR_RELAUNCH_FAILED; |
| 794 return FALSE; | 795 return FALSE; |
| 795 } | 796 } |
| 796 | 797 |
| 797 return TRUE; | 798 return TRUE; |
| 798 } | 799 } |
| OLD | NEW |