Chromium Code Reviews| 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 #include "chrome/installer/setup/install.h" | 5 #include "chrome/installer/setup/install.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shlobj.h> | 8 #include <shlobj.h> |
| 9 #include <time.h> | 9 #include <time.h> |
| 10 | 10 |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 500 InstallStatus InstallOrUpdateProduct( | 500 InstallStatus InstallOrUpdateProduct( |
| 501 const InstallationState& original_state, | 501 const InstallationState& original_state, |
| 502 const InstallerState& installer_state, | 502 const InstallerState& installer_state, |
| 503 const base::FilePath& setup_path, | 503 const base::FilePath& setup_path, |
| 504 const base::FilePath& archive_path, | 504 const base::FilePath& archive_path, |
| 505 const base::FilePath& install_temp_path, | 505 const base::FilePath& install_temp_path, |
| 506 const base::FilePath& src_path, | 506 const base::FilePath& src_path, |
| 507 const base::FilePath& prefs_path, | 507 const base::FilePath& prefs_path, |
| 508 const MasterPreferences& prefs, | 508 const MasterPreferences& prefs, |
| 509 const Version& new_version) { | 509 const Version& new_version) { |
| 510 // TODO(robertshield): Removing the pending on-reboot moves should be done | 510 DCHECK(installer_state.products().size()); |
|
gab
2013/12/19 01:18:31
Replace check for foo.size(), but !foo.empty()
grt (UTC plus 2)
2013/12/19 20:57:06
Done.
| |
| 511 // elsewhere. | |
| 512 // TODO(erikwright): Understand why this is Chrome Frame only and whether | |
| 513 // it also applies to App Host. Shouldn't it apply to any multi-install too? | |
| 514 const Products& products = installer_state.products(); | |
| 515 DCHECK(products.size()); | |
| 516 if (installer_state.FindProduct(BrowserDistribution::CHROME_FRAME)) { | |
| 517 // Make sure that we don't end up deleting installed files on next reboot. | |
| 518 if (!RemoveFromMovesPendingReboot(installer_state.target_path())) | |
|
gab
2013/12/19 01:18:31
This appears to have been the only remaining call
grt (UTC plus 2)
2013/12/19 20:57:06
I've re-added Erik's TODO since I think it still a
gab
2013/12/20 19:05:54
Hmmm... so we're going to leave a call that's used
grt (UTC plus 2)
2013/12/23 17:58:34
Well, when you put it that way...
| |
| 519 LOG(ERROR) << "Error accessing pending moves value."; | |
| 520 } | |
| 521 | 511 |
| 522 // Create VisualElementManifest.xml in |src_path| (if required) so that it | 512 // Create VisualElementManifest.xml in |src_path| (if required) so that it |
| 523 // looks as if it had been extracted from the archive when calling | 513 // looks as if it had been extracted from the archive when calling |
| 524 // InstallNewVersion() below. | 514 // InstallNewVersion() below. |
| 525 installer_state.UpdateStage(installer::CREATING_VISUAL_MANIFEST); | 515 installer_state.UpdateStage(installer::CREATING_VISUAL_MANIFEST); |
| 526 CreateVisualElementsManifest(src_path, new_version); | 516 CreateVisualElementsManifest(src_path, new_version); |
| 527 | 517 |
| 528 scoped_ptr<Version> existing_version; | 518 scoped_ptr<Version> existing_version; |
| 529 InstallStatus result = InstallNewVersion(original_state, installer_state, | 519 InstallStatus result = InstallNewVersion(original_state, installer_state, |
| 530 setup_path, archive_path, src_path, install_temp_path, new_version, | 520 setup_path, archive_path, src_path, install_temp_path, new_version, |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 703 if (app_host_path.empty()) | 693 if (app_host_path.empty()) |
| 704 return false; | 694 return false; |
| 705 | 695 |
| 706 CommandLine cmd(app_host_path); | 696 CommandLine cmd(app_host_path); |
| 707 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code); | 697 cmd.AppendSwitchASCII(::switches::kInstallFromWebstore, app_code); |
| 708 VLOG(1) << "App install command: " << cmd.GetCommandLineString(); | 698 VLOG(1) << "App install command: " << cmd.GetCommandLineString(); |
| 709 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL); | 699 return base::LaunchProcess(cmd, base::LaunchOptions(), NULL); |
| 710 } | 700 } |
| 711 | 701 |
| 712 } // namespace installer | 702 } // namespace installer |
| OLD | NEW |