Commit 572212de authored by Robert Sesek's avatar Robert Sesek Committed by Chromium LUCI CQ

mac: Avoid deprecated APIs in //third_party/mozilla.

Add local modifications to remove one unused method, and reimplement
another using a non-deprecated API.

Bug: 1153883
Change-Id: Iad59c5e798e440aa256e81f9f4ee79cfa05310e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2566154Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#832076}
parent 74f86119
......@@ -95,7 +95,11 @@ typedef enum
// Returns true if the string represents a "blank" URL ("" or "about:blank")
- (BOOL)isBlankURL;
// Begin Google Modified
#if 0
// Returns a URI that looks good in a location field
- (NSString *)unescapedURI;
#endif
// End Google Modified
@end
......@@ -350,6 +350,8 @@
return ([self isEqualToString:@"about:blank"] || [self isEqualToString:@""]);
}
// Begin Google Modified
#if 0
// Excluded character list comes from RFC2396 and by examining Safari's behaviour
- (NSString*)unescapedURI
{
......@@ -359,5 +361,7 @@
kCFStringEncodingUTF8);
return unescapedURI ? [unescapedURI autorelease] : self;
}
#endif
// End Google Modified
@end
......@@ -111,9 +111,9 @@
- (NSString*)displayNameForFile:(NSURL*)inFileURL
{
NSString *name;
LSCopyDisplayNameForURL((CFURLRef)inFileURL, (CFStringRef *)&name);
return [name autorelease];
NSString *name = nil;
[inFileURL getResourceValue:&name forKey:NSURLLocalizedNameKey error:nil];
return name;
}
//
......
......@@ -37,3 +37,8 @@ Local modifications:
- NSWorkspace(CaminoDefaultBrowserAdditions) methods defaultBrowserURL,
defaultFeedViewerURL, and urlOfApplicationWithIdentifier: removed since they
are unused in Chrome and rely on deprecated APIs as of 10.10.
- -[NSWorkspace(CaminoDefaultBrowserAdditions) displayNameForFile] was modified
to use the NSURLLocalizedNameKey rather than LSCopyDisplayNameForURL(), which
is deprecated as of 10.11.
- -[NString(CaminoURLStringUtils) unescapedURI] was removed because it used
a deprecated CFString function.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment