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

Unified Diff: chrome/browser/views/shell_dialogs_win.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/views/shell_dialogs_win.cc
diff --git a/chrome/browser/views/shell_dialogs_win.cc b/chrome/browser/views/shell_dialogs_win.cc
index 17d5b1e80d9e5931186cd9ccf3274c6d11460230..b4dde4dec4f508ffa02bc6da24ffd93eceb87cca 100644
--- a/chrome/browser/views/shell_dialogs_win.cc
+++ b/chrome/browser/views/shell_dialogs_win.cc
@@ -48,7 +48,7 @@ std::wstring AppendExtensionIfNeeded(const std::wstring& filename,
std::wstring file_extension(file_util::GetFileExtensionFromPath(filename));
std::wstring key(L"." + file_extension);
if (!(filter_selected.empty() || filter_selected == L"*.*") &&
- !RegKey(HKEY_CLASSES_ROOT, key.c_str()).Valid() &&
+ !RegKey(HKEY_CLASSES_ROOT, key.c_str(), KEY_READ).Valid() &&
file_extension != suggested_ext) {
if (return_value[return_value.length() - 1] != L'.')
return_value.append(L".");
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider_win_unittest.cc ('k') | chrome/installer/setup/uninstall.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698