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

Unified Diff: chrome/browser/importer/ie_importer.cc

Issue 2403001: Remove deprecated versions of Registry functions. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: fix typo Created 10 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/browser/importer/firefox_importer_utils_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/ie_importer.cc
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index cae26bae823bade9b1c1502e0c4cd4e5c5cef347..52a5803b1fdef9c531271a9306401fa987be2510 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -459,9 +459,9 @@ bool IEImporter::GetFavoritesInfo(IEImporter::FavoritesInfo *info) {
if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) {
// The Link folder name is stored in the registry.
DWORD buffer_length = sizeof(buffer);
- if (!ReadFromRegistry(HKEY_CURRENT_USER,
- L"Software\\Microsoft\\Internet Explorer\\Toolbar",
- L"LinksFolderName", buffer, &buffer_length))
+ RegKey reg_key(HKEY_CURRENT_USER,
+ L"Software\\Microsoft\\Internet Explorer\\Toolbar");
+ if (reg_key.ReadValue(L"LinksFolderName", buffer, &buffer_length, NULL))
return false;
info->links_folder = buffer;
} else {
@@ -568,9 +568,9 @@ int IEImporter::CurrentIEVersion() const {
if (version < 0) {
wchar_t buffer[128];
DWORD buffer_length = sizeof(buffer);
- bool result = ReadFromRegistry(HKEY_LOCAL_MACHINE,
- L"Software\\Microsoft\\Internet Explorer",
- L"Version", buffer, &buffer_length);
+ RegKey reg_key(HKEY_LOCAL_MACHINE,
+ L"Software\\Microsoft\\Internet Explorer");
+ bool result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL);
version = (result ? _wtoi(buffer) : 0);
}
return version;
« no previous file with comments | « chrome/browser/importer/firefox_importer_utils_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698