OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 10 #include <windows.h> |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 options.AppendSwitchNative(switches::kTryChromeAgain, | 760 options.AppendSwitchNative(switches::kTryChromeAgain, |
761 base::IntToString16(flavor)); | 761 base::IntToString16(flavor)); |
762 if (has_welcome_url) { | 762 if (has_welcome_url) { |
763 // Prepend the url with a space. | 763 // Prepend the url with a space. |
764 std::wstring url(GetWelcomeBackUrl()); | 764 std::wstring url(GetWelcomeBackUrl()); |
765 options.AppendArg("--"); | 765 options.AppendArg("--"); |
766 options.AppendArgNative(url); | 766 options.AppendArgNative(url); |
767 // The command line should now have the url added as: | 767 // The command line should now have the url added as: |
768 // "chrome.exe -- <url>" | 768 // "chrome.exe -- <url>" |
769 DCHECK_NE(std::wstring::npos, | 769 DCHECK_NE(std::wstring::npos, |
770 options.command_line_string().find(L" -- " + url)); | 770 options.GetCommandLineString().find(L" -- " + url)); |
771 } | 771 } |
772 // Launch chrome now. It will show the toast UI. | 772 // Launch chrome now. It will show the toast UI. |
773 int32 exit_code = 0; | 773 int32 exit_code = 0; |
774 if (!installation.LaunchChromeAndWait(application_path, options, &exit_code)) | 774 if (!installation.LaunchChromeAndWait(application_path, options, &exit_code)) |
775 return; | 775 return; |
776 | 776 |
777 // The chrome process has exited, figure out what happened. | 777 // The chrome process has exited, figure out what happened. |
778 const wchar_t* outcome = NULL; | 778 const wchar_t* outcome = NULL; |
779 switch (exit_code) { | 779 switch (exit_code) { |
780 case ResultCodes::NORMAL_EXIT: | 780 case ResultCodes::NORMAL_EXIT: |
(...skipping 19 matching lines...) Expand all Loading... |
800 // we waited for chrome to exit so the uninstall would not detect chrome | 800 // we waited for chrome to exit so the uninstall would not detect chrome |
801 // running. | 801 // running. |
802 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( | 802 bool system_level_toast = CommandLine::ForCurrentProcess()->HasSwitch( |
803 installer::switches::kSystemLevelToast); | 803 installer::switches::kSystemLevelToast); |
804 | 804 |
805 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, | 805 CommandLine cmd(InstallUtil::GetChromeUninstallCmd(system_level_toast, |
806 GetType())); | 806 GetType())); |
807 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 807 base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
808 } | 808 } |
809 #endif | 809 #endif |
OLD | NEW |