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

Unified Diff: net/base/platform_mime_util_mac.cc

Issue 3855001: Move scoped_cftyperef from base to base/mac, use the new namespace, and name ... (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 | « net/base/network_config_watcher_mac.cc ('k') | net/base/ssl_config_service_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/platform_mime_util_mac.cc
===================================================================
--- net/base/platform_mime_util_mac.cc (revision 62861)
+++ net/base/platform_mime_util_mac.cc (working copy)
@@ -5,7 +5,7 @@
#include <CoreServices/CoreServices.h>
#include <string>
-#include "base/scoped_cftyperef.h"
+#include "base/mac/scoped_cftyperef.h"
#include "base/sys_string_conversions.h"
#include "net/base/platform_mime_util.h"
@@ -16,16 +16,17 @@
std::string ext_nodot = ext;
if (ext_nodot.length() >= 1 && ext_nodot[0] == L'.')
ext_nodot.erase(ext_nodot.begin());
- scoped_cftyperef<CFStringRef> ext_ref(base::SysUTF8ToCFStringRef(ext_nodot));
+ base::mac::ScopedCFTypeRef<CFStringRef> ext_ref(
+ base::SysUTF8ToCFStringRef(ext_nodot));
if (!ext_ref)
return false;
- scoped_cftyperef<CFStringRef> uti(
+ base::mac::ScopedCFTypeRef<CFStringRef> uti(
UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension,
ext_ref,
NULL));
if (!uti)
return false;
- scoped_cftyperef<CFStringRef> mime_ref(
+ base::mac::ScopedCFTypeRef<CFStringRef> mime_ref(
UTTypeCopyPreferredTagWithClass(uti, kUTTagClassMIMEType));
if (!mime_ref)
return false;
@@ -36,16 +37,17 @@
bool PlatformMimeUtil::GetPreferredExtensionForMimeType(
const std::string& mime_type, FilePath::StringType* ext) const {
- scoped_cftyperef<CFStringRef> mime_ref(base::SysUTF8ToCFStringRef(mime_type));
+ base::mac::ScopedCFTypeRef<CFStringRef> mime_ref(
+ base::SysUTF8ToCFStringRef(mime_type));
if (!mime_ref)
return false;
- scoped_cftyperef<CFStringRef> uti(
+ base::mac::ScopedCFTypeRef<CFStringRef> uti(
UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType,
mime_ref,
NULL));
if (!uti)
return false;
- scoped_cftyperef<CFStringRef> ext_ref(
+ base::mac::ScopedCFTypeRef<CFStringRef> ext_ref(
UTTypeCopyPreferredTagWithClass(uti, kUTTagClassFilenameExtension));
if (!ext_ref)
return false;
« no previous file with comments | « net/base/network_config_watcher_mac.cc ('k') | net/base/ssl_config_service_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698