diff options
author | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-11 16:54:26 +0000 |
---|---|---|
committer | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-11 16:54:26 +0000 |
commit | 78b1722653b794a0a68f0cc473fc1855b95517ae (patch) | |
tree | d56b107781e612599a0cf04b1745b988645bff9e /chrome/installer/util | |
parent | 4d0cd7ce8c91a2c0157ecf9e0a5153712ff43d10 (diff) | |
download | chromium_src-78b1722653b794a0a68f0cc473fc1855b95517ae.zip chromium_src-78b1722653b794a0a68f0cc473fc1855b95517ae.tar.gz chromium_src-78b1722653b794a0a68f0cc473fc1855b95517ae.tar.bz2 |
Cleanup setup.exe:
- Remove various migration code for shortcuts (now 149.13 has been pushed to everybody)
- Cleanup error messages that will show up in log file with the default logging level
- Remove junk error messages that haven't been helpful at all (delete registry key/valye errors)
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@655 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util')
-rw-r--r-- | chrome/installer/util/create_reg_key_work_item.cc | 3 | ||||
-rw-r--r-- | chrome/installer/util/install_util.cc | 19 | ||||
-rw-r--r-- | chrome/installer/util/install_util.h | 8 |
3 files changed, 1 insertions, 29 deletions
diff --git a/chrome/installer/util/create_reg_key_work_item.cc b/chrome/installer/util/create_reg_key_work_item.cc index 719a4207a..9acd86c 100644 --- a/chrome/installer/util/create_reg_key_work_item.cc +++ b/chrome/installer/util/create_reg_key_work_item.cc @@ -80,8 +80,7 @@ bool CreateRegKeyWorkItem::Do() { return false; } } else { - LOG(ERROR) << "fail to create " << key_path << " and the error is: " - << InstallUtil::FormatLastWin32Error(); + LOG(ERROR) << "Failed to create " << key_path; return false; } } diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc index 6424bd6..087589b 100644 --- a/chrome/installer/util/install_util.cc +++ b/chrome/installer/util/install_util.cc @@ -40,25 +40,6 @@ #include "chrome/installer/util/google_update_constants.h" -std::wstring InstallUtil::FormatLastWin32Error() { - unsigned messageid = GetLastError(); - wchar_t* string_buffer = NULL; - unsigned string_length = ::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | - FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, messageid, 0, reinterpret_cast<wchar_t *>(&string_buffer), 0, NULL); - - std::wstring formatted_string; - if (string_buffer) { - formatted_string = string_buffer; - LocalFree(reinterpret_cast<HLOCAL>(string_buffer)); - } else { - // The formating failed. simply convert the message value into a string. - SStringPrintf(&formatted_string, L"message number %d", messageid); - } - return formatted_string; -} - - std::wstring InstallUtil::GetChromeGoogleUpdateKey() { std::wstring chrome_google_update_key(google_update::kRegPathClients); chrome_google_update_key.append(L"\\"); diff --git a/chrome/installer/util/install_util.h b/chrome/installer/util/install_util.h index 8ef79bf..69884e9 100644 --- a/chrome/installer/util/install_util.h +++ b/chrome/installer/util/install_util.h @@ -45,14 +45,6 @@ // independently. class InstallUtil { public: - // Gets the last Win32 error and generates a human readable message string. - // Uses the Win32 API GetLastError() to get the last error and API - // FormatMessage() to generate a string. This function has been copied - // from chrome\common\win_util.{h.cc} to avoid making setup.exe dependent - // on all the other libs (base_gfx, libjpeg, libpng and others) that we - // need to pull in and the size of setup.exe goes up by ~140KB. - static std::wstring FormatLastWin32Error(); - // This method gets the Google Update registry key path for Chrome. // i.e. - Software\Google\Update\Clients\<chrome-guid>"; static std::wstring GetChromeGoogleUpdateKey(); |