summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/install_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/installer/util/install_util.cc')
-rw-r--r--chrome/installer/util/install_util.cc23
1 files changed, 20 insertions, 3 deletions
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index 6fc0328..86f0847 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -5,12 +5,14 @@
// See the corresponding header file for description of the functions in this
// file.
-#include "install_util.h"
+#include "chrome/installer/util/install_util.h"
-#include <algorithm>
#include <shellapi.h>
#include <shlobj.h>
+#include <algorithm>
+
+#include "base/file_util.h"
#include "base/logging.h"
#include "base/registry.h"
#include "base/scoped_ptr.h"
@@ -115,7 +117,6 @@ void InstallUtil::WriteInstallerResult(bool system_install,
}
bool InstallUtil::IsPerUserInstall(const wchar_t* const exe_path) {
-
wchar_t program_files_path[MAX_PATH] = {0};
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL,
SHGFP_TYPE_CURRENT, program_files_path))) {
@@ -125,3 +126,19 @@ bool InstallUtil::IsPerUserInstall(const wchar_t* const exe_path) {
}
return true;
}
+
+bool InstallUtil::BuildDLLRegistrationList(const std::wstring& install_path,
+ const wchar_t** const dll_names,
+ int dll_names_count,
+ bool do_register,
+ WorkItemList* registration_list) {
+ DCHECK(NULL != registration_list);
+ bool success = true;
+ for (int i = 0; i < dll_names_count; i++) {
+ std::wstring dll_file_path(install_path);
+ file_util::AppendToPath(&dll_file_path, dll_names[i]);
+ success = registration_list->AddSelfRegWorkItem(dll_file_path,
+ do_register) && success;
+ }
+ return (dll_names_count > 0) && success;
+}