diff options
author | robertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 20:30:06 +0000 |
---|---|---|
committer | robertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 20:30:06 +0000 |
commit | e06b745eb745c7e3bd177f76869c04dfc1efaa94 (patch) | |
tree | 67873f2afcd893c058414180a06df5929072d2a8 /chrome/installer/util/install_util.cc | |
parent | 4a9717e2030aadf15cb62275ed0f4ff1a37e869f (diff) | |
download | chromium_src-e06b745eb745c7e3bd177f76869c04dfc1efaa94.zip chromium_src-e06b745eb745c7e3bd177f76869c04dfc1efaa94.tar.gz chromium_src-e06b745eb745c7e3bd177f76869c04dfc1efaa94.tar.bz2 |
Second stab at applying http://codereview.chromium.org/43138/show.
Removing the (not really needed) dependency on chrome\VERSION which works on the try server but breaks on buildbot.
Review URL: http://codereview.chromium.org/42289
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/install_util.cc')
-rw-r--r-- | chrome/installer/util/install_util.cc | 23 |
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; +} |