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

Unified Diff: third_party/mozilla/include/NSURL+Utils.m

Issue 155704: Remove calls to deprecated APIs so that Chromium compiles on all currently-fu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | third_party/mozilla/include/README.chromium » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/mozilla/include/NSURL+Utils.m
===================================================================
--- third_party/mozilla/include/NSURL+Utils.m (revision 20947)
+++ third_party/mozilla/include/NSURL+Utils.m (working copy)
@@ -79,7 +79,14 @@
long size;
size = GetMaxResourceSize(urlResHandle);
- ret = [NSURL URLWithString:[NSString stringWithCString:(char *)*urlResHandle length:size]];
+// Begin Google Modified
+// ret = [NSURL URLWithString:[NSString stringWithCString:(char *)*urlResHandle length:size]];
+ NSString *urlString = [[[NSString alloc] initWithBytes:(void *)*urlResHandle
+ length:size
+ encoding:NSMacOSRomanStringEncoding] // best guess here
+ autorelease];
+ ret = [NSURL URLWithString:urlString];
+// End Google Modified
}
CloseResFile(resRef);
@@ -108,7 +115,13 @@
// Is this really an IE .url file?
if (inFile) {
NSCharacterSet *newlines = [NSCharacterSet characterSetWithCharactersInString:@"\r\n"];
- NSScanner *scanner = [NSScanner scannerWithString:[NSString stringWithContentsOfFile:inFile]];
+ // Begin Google Modified
+// NSScanner *scanner = [NSScanner scannerWithString:[NSString stringWithContentsOfFile:inFile]];
+ NSString *fileString = [NSString stringWithContentsOfFile:inFile
+ encoding:NSWindowsCP1252StringEncoding // best guess here
pink (ping after 24hrs) 2009/07/17 19:36:57 IE here is Mac IE 5, not winIE. The encoding is pr
Avi (use Gerrit) 2009/07/17 19:52:18 Really, though? Mac IE 5 hasn't been around since
+ error:nil];
+ NSScanner *scanner = [NSScanner scannerWithString:fileString];
+ // End Google Modified
[scanner scanUpToString:@"[InternetShortcut]" intoString:nil];
if ([scanner scanString:@"[InternetShortcut]" intoString:nil]) {
« no previous file with comments | « no previous file | third_party/mozilla/include/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698