| OLD | NEW |
| 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/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 true); | 334 true); |
| 335 | 335 |
| 336 std::wstring rename_cmd(installer::GetInstallerPathUnderChrome( | 336 std::wstring rename_cmd(installer::GetInstallerPathUnderChrome( |
| 337 install_path, new_version.GetString())); | 337 install_path, new_version.GetString())); |
| 338 file_util::AppendToPath(&rename_cmd, | 338 file_util::AppendToPath(&rename_cmd, |
| 339 file_util::GetFilenameFromPath(exe_path)); | 339 file_util::GetFilenameFromPath(exe_path)); |
| 340 rename_cmd = L"\"" + rename_cmd + | 340 rename_cmd = L"\"" + rename_cmd + |
| 341 L"\" --" + installer_util::switches::kRenameChromeExe; | 341 L"\" --" + installer_util::switches::kRenameChromeExe; |
| 342 if (reg_root == HKEY_LOCAL_MACHINE) | 342 if (reg_root == HKEY_LOCAL_MACHINE) |
| 343 rename_cmd = rename_cmd + L" --" + installer_util::switches::kSystemLevel; | 343 rename_cmd = rename_cmd + L" --" + installer_util::switches::kSystemLevel; |
| 344 |
| 345 if (InstallUtil::IsChromeFrameProcess()) { |
| 346 rename_cmd += L" --"; |
| 347 rename_cmd += installer_util::switches::kChromeFrame; |
| 348 } |
| 349 |
| 344 inuse_list->AddSetRegValueWorkItem(reg_root, | 350 inuse_list->AddSetRegValueWorkItem(reg_root, |
| 345 version_key, | 351 version_key, |
| 346 google_update::kRegRenameCmdField, | 352 google_update::kRegRenameCmdField, |
| 347 rename_cmd.c_str(), | 353 rename_cmd.c_str(), |
| 348 true); | 354 true); |
| 349 if (!inuse_list->Do()) { | 355 if (!inuse_list->Do()) { |
| 350 LOG(ERROR) << "Couldn't write opv/cmd values to registry."; | 356 LOG(ERROR) << "Couldn't write opv/cmd values to registry."; |
| 351 inuse_list->Rollback(); | 357 inuse_list->Rollback(); |
| 352 return false; | 358 return false; |
| 353 } | 359 } |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 } | 663 } |
| 658 | 664 |
| 659 std::wstring latest_version_to_keep(new_version.GetString()); | 665 std::wstring latest_version_to_keep(new_version.GetString()); |
| 660 if (!current_version.empty()) | 666 if (!current_version.empty()) |
| 661 latest_version_to_keep.assign(current_version); | 667 latest_version_to_keep.assign(current_version); |
| 662 RemoveOldVersionDirs(install_path, latest_version_to_keep); | 668 RemoveOldVersionDirs(install_path, latest_version_to_keep); |
| 663 } | 669 } |
| 664 | 670 |
| 665 return result; | 671 return result; |
| 666 } | 672 } |
| OLD | NEW |