Changeset 61558 in webkit


Ignore:
Timestamp:
Jun 21, 2010 11:02:37 AM (14 years ago)
Author:
andersca@apple.com
Message:

2010-06-21 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Remove unused dictionary ivars from WebBasePluginPackage
https://bugs.webkit.org/show_bug.cgi?id=40928

  • Plugins/WebBasePluginPackage.h:
  • Plugins/WebBasePluginPackage.mm: (-[WebBasePluginPackage getPluginInfoFromPLists]): (-[WebBasePluginPackage dealloc]):
  • Plugins/WebNetscapePluginPackage.mm: (-[WebNetscapePluginPackage getPluginInfoFromResources]):
Location:
trunk/WebKit/mac
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r61556 r61558  
     12010-06-21  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Remove unused dictionary ivars from WebBasePluginPackage
     6        https://bugs.webkit.org/show_bug.cgi?id=40928
     7
     8        * Plugins/WebBasePluginPackage.h:
     9        * Plugins/WebBasePluginPackage.mm:
     10        (-[WebBasePluginPackage getPluginInfoFromPLists]):
     11        (-[WebBasePluginPackage dealloc]):
     12        * Plugins/WebNetscapePluginPackage.mm:
     13        (-[WebNetscapePluginPackage getPluginInfoFromResources]):
     14
    1152010-06-21  Dan Bernstein  <mitz@apple.com>
    216
  • trunk/WebKit/mac/Plugins/WebBasePluginPackage.h

    r61525 r61558  
    6565    CFBundleRef cfBundle;
    6666
    67     NSDictionary *MIMEToDescription;
    68     NSDictionary *MIMEToExtensions;
    69    
    7067    BP_CreatePluginMIMETypesPreferencesFuncPtr BP_CreatePluginMIMETypesPreferences;
    7168}
     
    9188- (BOOL)supportsMIMEType:(const WebCore::String&)MIMEType;
    9289
    93 - (NSString *)descriptionForMIMEType:(NSString *)MIMEType;
    9490- (NSString *)MIMETypeForExtension:(const WebCore::String&)extension;
    95 
    96 - (void)setMIMEToDescriptionDictionary:(NSDictionary *)MIMEToDescriptionDictionary;
    97 - (void)setMIMEToExtensionsDictionary:(NSDictionary *)MIMEToExtensionsDictionary;
    9891
    9992- (BOOL)isQuickTimePlugIn;
  • trunk/WebKit/mac/Plugins/WebBasePluginPackage.mm

    r61525 r61558  
    207207    }
    208208
    209     NSMutableDictionary *MIMEToExtensionsDictionary = [NSMutableDictionary dictionary];
    210     NSMutableDictionary *MIMEToDescriptionDictionary = [NSMutableDictionary dictionary];
    211209    NSEnumerator *keyEnumerator = [MIMETypes keyEnumerator];
    212210    NSDictionary *MIMEDictionary;
     
    232230
    233231        mimeClassInfo.type = String(MIME).lower();
    234         MIME = [MIME lowercaseString];
    235 
    236         [MIMEToExtensionsDictionary setObject:extensions forKey:MIME];
    237232
    238233        description = [MIMEDictionary objectForKey:WebPluginTypeDescriptionKey];
     
    242237        if (!description)
    243238            description = @"";
    244 
    245         [MIMEToDescriptionDictionary setObject:description forKey:MIME];
    246     }
    247 
    248     [self setMIMEToExtensionsDictionary:MIMEToExtensionsDictionary];
    249     [self setMIMEToDescriptionDictionary:MIMEToDescriptionDictionary];
     239    }
    250240
    251241    NSString *filename = [self filename];
     
    277267    [pluginDatabases release];
    278268   
    279     [MIMEToDescription release];
    280     [MIMEToExtensions release];
    281 
    282269    if (cfBundle)
    283270        CFRelease(cfBundle);
     
    323310}
    324311
    325 - (NSArray *)MIMETypes
    326 {
    327     return [MIMEToExtensions allKeys];
    328 }
    329 
    330312- (BOOL)supportsExtension:(const String&)extension
    331313{
     
    354336}
    355337
    356 - (NSString *)descriptionForMIMEType:(NSString *)MIMEType
    357 {
    358     return [MIMEToDescription objectForKey:MIMEType];
    359 }
    360 
    361338- (NSString *)MIMETypeForExtension:(const String&)extension
    362339{
     
    372349
    373350    return nil;
    374 }
    375 
    376 - (NSArray *)extensionsForMIMEType:(NSString *)MIMEType
    377 {
    378     return [MIMEToExtensions objectForKey:MIMEType];
    379 }
    380 
    381 - (void)setMIMEToDescriptionDictionary:(NSDictionary *)MIMEToDescriptionDictionary
    382 {
    383     [MIMEToDescription release];
    384     MIMEToDescription = [MIMEToDescriptionDictionary retain];
    385 }
    386 
    387 - (void)setMIMEToExtensionsDictionary:(NSDictionary *)MIMEToExtensionsDictionary
    388 {
    389     [MIMEToExtensions release];
    390     MIMEToExtensions = [MIMEToExtensionsDictionary retain];
    391 }
    392 
    393 - (NSString *)description
    394 {
    395     return [NSString stringWithFormat:@"name: %@\npath: %@\nmimeTypes:\n%@\npluginDescription:%@",
    396         (NSString *)name, (NSString *)path, [MIMEToExtensions description], [MIMEToDescription description], (NSString *)pluginDescription];
    397351}
    398352
  • trunk/WebKit/mac/Plugins/WebNetscapePluginPackage.mm

    r61526 r61558  
    161161    unsigned i;
    162162   
    163     NSMutableDictionary *MIMEToExtensionsDictionary = [NSMutableDictionary dictionary];
    164     NSMutableDictionary *MIMEToDescriptionDictionary = [NSMutableDictionary dictionary];
    165 
    166163    for (i=1; 1; i+=2) {
    167164        MIME = [[self stringForStringListID:MIMEListStringStringNumber
     
    178175            for (NSUInteger j = 0; j < [extensions count]; ++j)
    179176                mimeClassInfo.extensions.append((NSString *)[extensions objectAtIndex:j]);
    180 
    181             [MIMEToExtensionsDictionary setObject:extensions forKey:MIME];
    182         } else
    183             // DRM and WMP claim MIMEs without extensions. Use a @"" extension in this case.
    184             [MIMEToExtensionsDictionary setObject:[NSArray arrayWithObject:@""] forKey:MIME];
     177        }
    185178       
    186179        description = [self stringForStringListID:MIMEDescriptionStringNumber
    187                                          andIndex:[MIMEToExtensionsDictionary count]];
     180                                         andIndex:mimeTypes.size()];
    188181        mimeClassInfo.desc = description;
    189182
    190         if (description)
    191             [MIMEToDescriptionDictionary setObject:description forKey:MIME];
    192         else
    193             [MIMEToDescriptionDictionary setObject:@"" forKey:MIME];
    194        
    195183        mimeTypes.append(mimeClassInfo);
    196184    }
    197 
    198     [self setMIMEToDescriptionDictionary:MIMEToDescriptionDictionary];
    199     [self setMIMEToExtensionsDictionary:MIMEToExtensionsDictionary];
    200185
    201186    NSString *filename = [self filename];
Note: See TracChangeset for help on using the changeset viewer.