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

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

Issue 7386002: Rename CommandLine::GetCommandLineString(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge. Created 9 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 | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/install_util.cc » ('j') | 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) 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
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
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
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_main.cc ('k') | chrome/installer/util/install_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698