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

Side by Side Diff: chrome/installer/setup/install.cc

Issue 242025: Cleaning up after the initial Chrome Frame commit. Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/installer.gyp ('k') | chrome/installer/util/browser_distribution.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #include <shlobj.h> 5 #include <shlobj.h>
6 #include <time.h> 6 #include <time.h>
7 7
8 #include "chrome/installer/setup/install.h" 8 #include "chrome/installer/setup/install.h"
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const std::wstring& new_version, 88 const std::wstring& new_version,
89 WorkItemList* install_list) { 89 WorkItemList* install_list) {
90 std::wstring uninstall_cmd(L"\""); 90 std::wstring uninstall_cmd(L"\"");
91 uninstall_cmd.append(installer::GetInstallerPathUnderChrome(install_path, 91 uninstall_cmd.append(installer::GetInstallerPathUnderChrome(install_path,
92 new_version)); 92 new_version));
93 file_util::AppendToPath(&uninstall_cmd, 93 file_util::AppendToPath(&uninstall_cmd,
94 file_util::GetFilenameFromPath(exe_path)); 94 file_util::GetFilenameFromPath(exe_path));
95 uninstall_cmd.append(L"\" --"); 95 uninstall_cmd.append(L"\" --");
96 uninstall_cmd.append(installer_util::switches::kUninstall); 96 uninstall_cmd.append(installer_util::switches::kUninstall);
97 97
98 #ifdef CHROME_EXP_BUILD 98 #ifdef CHROME_FRAME_BUILD
99 uninstall_cmd.append(L" --"); 99 uninstall_cmd.append(L" --");
100 uninstall_cmd.append(installer_util::switches::kForceUninstall); 100 uninstall_cmd.append(installer_util::switches::kForceUninstall);
101 uninstall_cmd.append(L" --"); 101 uninstall_cmd.append(L" --");
102 uninstall_cmd.append(installer_util::switches::kDeleteProfile); 102 uninstall_cmd.append(installer_util::switches::kDeleteProfile);
103 #endif 103 #endif
104 104
105 if (reg_root == HKEY_LOCAL_MACHINE) { 105 if (reg_root == HKEY_LOCAL_MACHINE) {
106 uninstall_cmd.append(L" --"); 106 uninstall_cmd.append(L" --");
107 uninstall_cmd.append(installer_util::switches::kSystemLevel); 107 uninstall_cmd.append(installer_util::switches::kSystemLevel);
108 } 108 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 (file_util::PathExists(uninstall_link))) { 239 (file_util::PathExists(uninstall_link))) {
240 if (!file_util::PathExists(shortcut_path)) 240 if (!file_util::PathExists(shortcut_path))
241 file_util::CreateDirectoryW(shortcut_path); 241 file_util::CreateDirectoryW(shortcut_path);
242 std::wstring setup_exe(installer::GetInstallerPathUnderChrome(install_path, 242 std::wstring setup_exe(installer::GetInstallerPathUnderChrome(install_path,
243 new_version)); 243 new_version));
244 file_util::AppendToPath(&setup_exe, 244 file_util::AppendToPath(&setup_exe,
245 file_util::GetFilenameFromPath(exe_path)); 245 file_util::GetFilenameFromPath(exe_path));
246 std::wstring arguments(L" --"); 246 std::wstring arguments(L" --");
247 arguments.append(installer_util::switches::kUninstall); 247 arguments.append(installer_util::switches::kUninstall);
248 248
249 #ifdef CHROME_EXP_BUILD 249 #ifdef CHROME_FRAME_BUILD
250 arguments.append(L" --"); 250 arguments.append(L" --");
251 arguments.append(installer_util::switches::kForceUninstall); 251 arguments.append(installer_util::switches::kForceUninstall);
252 arguments.append(L" --"); 252 arguments.append(L" --");
253 arguments.append(installer_util::switches::kDeleteProfile); 253 arguments.append(installer_util::switches::kDeleteProfile);
254 #endif 254 #endif
255 255
256 if (system_install) { 256 if (system_install) {
257 arguments.append(L" --"); 257 arguments.append(L" --");
258 arguments.append(installer_util::switches::kSystemLevel); 258 arguments.append(installer_util::switches::kSystemLevel);
259 } 259 }
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 } 626 }
627 627
628 std::wstring latest_version_to_keep(new_version.GetString()); 628 std::wstring latest_version_to_keep(new_version.GetString());
629 if (!current_version.empty()) 629 if (!current_version.empty())
630 latest_version_to_keep.assign(current_version); 630 latest_version_to_keep.assign(current_version);
631 RemoveOldVersionDirs(install_path, latest_version_to_keep); 631 RemoveOldVersionDirs(install_path, latest_version_to_keep);
632 } 632 }
633 633
634 return result; 634 return result;
635 } 635 }
OLDNEW
« no previous file with comments | « chrome/installer/installer.gyp ('k') | chrome/installer/util/browser_distribution.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698