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

Unified Diff: content/browser/download/quarantine_mac.mm

Issue 2389123002: [Mac Fix-It] Use FSPathMakeRef instead of base::mac::FSRefFromPath. (Closed)
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/quarantine_mac.mm
diff --git a/content/browser/download/quarantine_mac.mm b/content/browser/download/quarantine_mac.mm
index e3351e2fb9c4230855b95e82b037ed3d6e0d58f4..2c0ea9777556054d1c5d4399adb6f5605d86c750 100644
--- a/content/browser/download/quarantine_mac.mm
+++ b/content/browser/download/quarantine_mac.mm
@@ -31,8 +31,9 @@ namespace {
bool GetQuarantinePropertiesDeprecated(
const base::FilePath& file,
base::scoped_nsobject<NSMutableDictionary>* properties) {
+ const UInt8* path = reinterpret_cast<const UInt8*>(file.value().c_str());
FSRef file_ref;
- if (!base::mac::FSRefFromPath(file.value(), &file_ref))
+ if (FSPathMakeRef(path, &file_ref, nullptr) != noErr)
return false;
base::ScopedCFTypeRef<CFTypeRef> quarantine_properties;
@@ -56,8 +57,9 @@ bool GetQuarantinePropertiesDeprecated(
bool SetQuarantinePropertiesDeprecated(const base::FilePath& file,
NSDictionary* properties) {
+ const UInt8* path = reinterpret_cast<const UInt8*>(file.value().c_str());
FSRef file_ref;
- if (!base::mac::FSRefFromPath(file.value(), &file_ref))
+ if (FSPathMakeRef(path, &file_ref, nullptr) != noErr)
return false;
OSStatus os_error = LSSetItemAttribute(
&file_ref, kLSRolesAll, kLSItemQuarantineProperties, properties);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698