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

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

Issue 3172009: Cleanup Registry API: part 3. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: chrome fixes Created 10 years, 4 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/browser/importer/ie_importer.cc
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc
index 21b36d1a8da54e1106544f5b4d5072bb6ae5b6b8..ab0a61c259dabe96ea32a3d2c643956cbb7cc8d3 100644
--- a/chrome/browser/importer/ie_importer.cc
+++ b/chrome/browser/importer/ie_importer.cc
@@ -462,7 +462,8 @@ bool IEImporter::GetFavoritesInfo(IEImporter::FavoritesInfo *info) {
// The Link folder name is stored in the registry.
DWORD buffer_length = sizeof(buffer);
RegKey reg_key(HKEY_CURRENT_USER,
- L"Software\\Microsoft\\Internet Explorer\\Toolbar");
+ L"Software\\Microsoft\\Internet Explorer\\Toolbar",
+ KEY_READ);
if (!reg_key.ReadValue(L"LinksFolderName", buffer, &buffer_length, NULL))
return false;
info->links_folder = buffer;
@@ -571,7 +572,7 @@ int IEImporter::CurrentIEVersion() const {
wchar_t buffer[128];
DWORD buffer_length = sizeof(buffer);
RegKey reg_key(HKEY_LOCAL_MACHINE,
- L"Software\\Microsoft\\Internet Explorer");
+ L"Software\\Microsoft\\Internet Explorer", KEY_READ);
bool result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL);
version = (result ? _wtoi(buffer) : 0);
}
« no previous file with comments | « chrome/browser/importer/firefox_importer_utils_win.cc ('k') | chrome/browser/policy/configuration_policy_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698