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

Unified Diff: net/base/platform_mime_util_win.cc

Issue 3836005: Move pe_image and registry from base to base/win and use the namespace. It re... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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_frame/utils.cc ('k') | net/base/ssl_config_service_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/platform_mime_util_win.cc
===================================================================
--- net/base/platform_mime_util_win.cc (revision 62848)
+++ net/base/platform_mime_util_win.cc (working copy)
@@ -6,8 +6,8 @@
#include "net/base/platform_mime_util.h"
-#include "base/registry.h"
#include "base/utf_string_conversions.h"
+#include "base/win/registry.h"
namespace net {
@@ -16,8 +16,8 @@
// check windows registry for file extension's mime type (registry key
// names are not case-sensitive).
std::wstring value, key = L"." + ext;
- RegKey(HKEY_CLASSES_ROOT, key.c_str(), KEY_READ).ReadValue(L"Content Type",
- &value);
+ base::win::RegKey(HKEY_CLASSES_ROOT, key.c_str(), KEY_READ).ReadValue(
+ L"Content Type", &value);
if (!value.empty()) {
*result = WideToUTF8(value);
return true;
@@ -28,8 +28,8 @@
bool PlatformMimeUtil::GetPreferredExtensionForMimeType(
const std::string& mime_type, FilePath::StringType* ext) const {
std::wstring key(L"MIME\\Database\\Content Type\\" + UTF8ToWide(mime_type));
- if (!RegKey(HKEY_CLASSES_ROOT, key.c_str(), KEY_READ).ReadValue(L"Extension",
- ext)) {
+ if (!base::win::RegKey(HKEY_CLASSES_ROOT, key.c_str(), KEY_READ).ReadValue(
+ L"Extension", ext)) {
return false;
}
// Strip off the leading dot, this should always be the case.
« no previous file with comments | « chrome_frame/utils.cc ('k') | net/base/ssl_config_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698