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

Unified Diff: chrome/installer/util/installer_state.cc

Issue 7036017: Write installer results in all relevant registry keys so that we're sure that Google Update will ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/installer/util/installer_state.h ('k') | chrome/installer/util/installer_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/installer_state.cc
===================================================================
--- chrome/installer/util/installer_state.cc (revision 85625)
+++ chrome/installer/util/installer_state.cc (working copy)
@@ -23,6 +23,7 @@
#include "chrome/installer/util/master_preferences_constants.h"
#include "chrome/installer/util/product.h"
#include "chrome/installer/util/work_item.h"
+#include "chrome/installer/util/work_item_list.h"
namespace installer {
@@ -532,4 +533,32 @@
}
}
+void InstallerState::WriteInstallerResult(
+ InstallStatus status,
+ int string_resource_id,
+ const std::wstring* const launch_cmd) const {
+ DWORD installer_result =
+ (InstallUtil::GetInstallReturnCode(status) == 0) ? 0 : 1;
+ // Use a no-rollback list since this is a best-effort deal.
+ scoped_ptr<WorkItemList> install_list(
+ WorkItem::CreateNoRollbackWorkItemList());
+ const bool system_install = this->system_install();
+ // Write the value for all products upon which we're operating.
+ Products::const_iterator end = products().end();
+ for (Products::const_iterator scan = products().begin(); scan != end;
+ ++scan) {
+ InstallUtil::AddInstallerResultItems(
+ system_install, (*scan)->distribution()->GetStateKey(), status,
+ string_resource_id, launch_cmd, install_list.get());
+ }
+ // And for the binaries if this is a multi-install.
+ if (is_multi_install()) {
+ InstallUtil::AddInstallerResultItems(
+ system_install, multi_package_binaries_distribution()->GetStateKey(),
+ status, string_resource_id, launch_cmd, install_list.get());
+ }
+ if (!install_list->Do())
+ LOG(ERROR) << "Failed to record installer error information in registry.";
+}
+
} // namespace installer
« no previous file with comments | « chrome/installer/util/installer_state.h ('k') | chrome/installer/util/installer_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698