Do not discount a MANUAL_SUBFRAME load just because it involved
some redirects.

R=brettw
BUG=21353
TEST=none

Review URL: http://codereview.chromium.org/246073

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27887 0039d316-1c4b-4281-b951-d872f2087c98
ObjectContentType WebFrameLoaderClient::objectContentType(
    const KURL& url,
    const String& explicit_mime_type) {

  String mime_type = explicit_mime_type;
  if (mime_type.isEmpty()) {
    String filename = url.lastPathComponent();
    int extension_pos = filename.reverseFind('.');
    if (extension_pos >= 0)
      mime_type = MIMETypeRegistry::getMIMETypeForPath(url.path());

    if (mime_type.isEmpty())
      return ObjectContentFrame;
  }

  if (MIMETypeRegistry::isSupportedImageMIMEType(mime_type))
    return ObjectContentImage;

  PluginData* plugin_data = webframe_->frame()->page()->pluginData();
  if (plugin_data && plugin_data->supportsMimeType(mime_type))
    return ObjectContentNetscapePlugin;

  if (MIMETypeRegistry::isSupportedNonImageMIMEType(mime_type))
    return ObjectContentFrame;

  return ObjectContentNone;
}

ObjectContentType WebFrameLoaderClient::objectContentType(
    const KURL& url,
    const String& explicit_mime_type) {

  String mime_type = explicit_mime_type;
  if (mime_type.isEmpty()) {
    String filename = url.lastPathComponent();
    int extension_pos = filename.reverseFind('.');
    if (extension_pos >= 0)
      mime_type = MIMETypeRegistry::getMIMETypeForPath(url.path());

    if (mime_type.isEmpty())
      return ObjectContentFrame;
  }

  if (MIMETypeRegistry::isSupportedImageMIMEType(mime_type))
    return ObjectContentImage;

  PluginData* plugin_data = webframe_->frame()->page()->pluginData();
  if (plugin_data && plugin_data->supportsMimeType(mime_type))
    return ObjectContentNetscapePlugin;

  if (MIMETypeRegistry::isSupportedNonImageMIMEType(mime_type))
    return ObjectContentFrame;

  return ObjectContentNone;
}
