diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-17 20:01:53 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-17 20:01:53 +0000 |
commit | 86ef1607660b7eb03afa15ea8cc5cfcbfa32ff2b (patch) | |
tree | a742d8c2683ec23bd009b5d50253c1089a299384 /third_party | |
parent | b74d21b3c259338797d1b722d74bae7fc540fb52 (diff) | |
download | chromium_src-86ef1607660b7eb03afa15ea8cc5cfcbfa32ff2b.zip chromium_src-86ef1607660b7eb03afa15ea8cc5cfcbfa32ff2b.tar.gz chromium_src-86ef1607660b7eb03afa15ea8cc5cfcbfa32ff2b.tar.bz2 |
Remove calls to deprecated APIs so that Chromium compiles on all currently-future versions of OS X.
BUG=none
TEST=compile on a future version of OS X. Should build.
Review URL: http://codereview.chromium.org/155704
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20984 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/mozilla/include/NSURL+Utils.m | 17 | ||||
-rw-r--r-- | third_party/mozilla/include/README.chromium | 7 |
2 files changed, 22 insertions, 2 deletions
diff --git a/third_party/mozilla/include/NSURL+Utils.m b/third_party/mozilla/include/NSURL+Utils.m index a3b9098..300facd 100644 --- a/third_party/mozilla/include/NSURL+Utils.m +++ b/third_party/mozilla/include/NSURL+Utils.m @@ -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 + error:nil]; + NSScanner *scanner = [NSScanner scannerWithString:fileString]; + // End Google Modified [scanner scanUpToString:@"[InternetShortcut]" intoString:nil]; if ([scanner scanString:@"[InternetShortcut]" intoString:nil]) { diff --git a/third_party/mozilla/include/README.chromium b/third_party/mozilla/include/README.chromium index d01fa6c..12c22a3 100644 --- a/third_party/mozilla/include/README.chromium +++ b/third_party/mozilla/include/README.chromium @@ -34,4 +34,11 @@ nspluginroot.h The following files come from mozilla/camino and are not part of the Gecko SDK: +NSPasteboard+Utils.h/m +NSScreen+Utils.h/m +NSString+Utils.h/m +NSURL+Utils.h/m NSWorkspace+Utils.h/m + +NSURL+Utils.m was modified to use non-deprecated Cocoa APIs to allow compilation +on future versions of Mac OS X. |