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

Unified Diff: chrome/installer/setup/install.cc

Issue 542078: Adding a secondary mini_installer target for Chrome Frame. This will remove t... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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
Index: chrome/installer/setup/install.cc
===================================================================
--- chrome/installer/setup/install.cc (revision 36244)
+++ chrome/installer/setup/install.cc (working copy)
@@ -30,11 +30,6 @@
#include "installer_util_strings.h"
#include "registered_dlls.h"
-#if defined(CHROME_FRAME_BUILD)
-COMPILE_ASSERT(kNumDllsToRegister > 0,
- Chrome_Frame_DLL_must_be_built_before_setup);
-#endif
-
namespace {
std::wstring AppendPath(const std::wstring& parent_path,
@@ -372,31 +367,40 @@
}
}
- // Now we need to register any self registering components and unregister
- // any that were left from the old version that is being upgraded:
- if (!current_version.empty()) {
- std::wstring old_dll_path(install_path);
- file_util::AppendToPath(&old_dll_path, current_version);
- scoped_ptr<WorkItemList> old_dll_list(WorkItem::CreateWorkItemList());
- if (InstallUtil::BuildDLLRegistrationList(old_dll_path, kDllsToRegister,
- kNumDllsToRegister, false,
- old_dll_list.get())) {
- // Don't abort the install as a result of a failure to unregister old
- // DLLs.
- old_dll_list->Do();
+ if (InstallUtil::IsChromeFrameProcess()) {
+ // Chrome Frame instances of setup.exe should always have at least
+ // one DLL to register. Enforce that this is so.
+ if (kNumDllsToRegister <= 0) {
+ NOTREACHED();
+ return false;
}
- }
- std::wstring dll_path(install_path);
- file_util::AppendToPath(&dll_path, new_version.GetString());
- scoped_ptr<WorkItemList> dll_list(WorkItem::CreateWorkItemList());
- if (InstallUtil::BuildDLLRegistrationList(dll_path, kDllsToRegister,
- kNumDllsToRegister, true,
- dll_list.get())) {
- if (!dll_list->Do()) {
- dll_list->Rollback();
- return false;
+ // Now we need to register any self registering components and unregister
+ // any that were left from the old version that is being upgraded:
+ if (!current_version.empty()) {
+ std::wstring old_dll_path(install_path);
+ file_util::AppendToPath(&old_dll_path, current_version);
+ scoped_ptr<WorkItemList> old_dll_list(WorkItem::CreateWorkItemList());
+ if (InstallUtil::BuildDLLRegistrationList(old_dll_path, kDllsToRegister,
+ kNumDllsToRegister, false,
+ old_dll_list.get())) {
+ // Don't abort the install as a result of a failure to unregister old
+ // DLLs.
+ old_dll_list->Do();
+ }
}
+
+ std::wstring dll_path(install_path);
+ file_util::AppendToPath(&dll_path, new_version.GetString());
+ scoped_ptr<WorkItemList> dll_list(WorkItem::CreateWorkItemList());
+ if (InstallUtil::BuildDLLRegistrationList(dll_path, kDllsToRegister,
+ kNumDllsToRegister, true,
+ dll_list.get())) {
+ if (!dll_list->Do()) {
+ dll_list->Rollback();
+ return false;
+ }
+ }
}
return true;
« no previous file with comments | « chrome/installer/mini_installer/mini_installer.cc ('k') | chrome/tools/build/win/create_installer_archive.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698