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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 9030004: Merge 115468 - Missing plugin : Fix null mimetype issue in embed tag (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src/
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 WebPluginParams params(original_params); 351 WebPluginParams params(original_params);
352 for (size_t i = 0; i < plugin.mime_types.size(); ++i) { 352 for (size_t i = 0; i < plugin.mime_types.size(); ++i) {
353 if (plugin.mime_types[i].mime_type == actual_mime_type) { 353 if (plugin.mime_types[i].mime_type == actual_mime_type) {
354 AppendParams(plugin.mime_types[i].additional_param_names, 354 AppendParams(plugin.mime_types[i].additional_param_names,
355 plugin.mime_types[i].additional_param_values, 355 plugin.mime_types[i].additional_param_values,
356 &params.attributeNames, 356 &params.attributeNames,
357 &params.attributeValues); 357 &params.attributeValues);
358 break; 358 break;
359 } 359 }
360 } 360 }
361
362 if (params.mimeType.isNull() && (actual_mime_type.size() > 0)) {
363 // Webkit might say that mime type is null while we already know the
364 // actual mime type via ChromeViewHostMsg_GetPluginInfo. In that case
365 // we should use what we know since WebpluginDelegateProxy does some
366 // specific initializations based on this information.
367 params.mimeType = WebString::fromUTF8(actual_mime_type.c_str());
368 }
361 369
362 ContentSetting outdated_policy = CONTENT_SETTING_ASK; 370 ContentSetting outdated_policy = CONTENT_SETTING_ASK;
363 ContentSetting authorize_policy = CONTENT_SETTING_ASK; 371 ContentSetting authorize_policy = CONTENT_SETTING_ASK;
364 if (group->IsVulnerable(plugin) || 372 if (group->IsVulnerable(plugin) ||
365 group->RequiresAuthorization(plugin)) { 373 group->RequiresAuthorization(plugin)) {
366 // These policies are dynamic and can changed at runtime, so they aren't 374 // These policies are dynamic and can changed at runtime, so they aren't
367 // cached here. 375 // cached here.
368 render_view->Send(new ChromeViewHostMsg_GetPluginPolicies( 376 render_view->Send(new ChromeViewHostMsg_GetPluginPolicies(
369 &outdated_policy, &authorize_policy)); 377 &outdated_policy, &authorize_policy));
370 } 378 }
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 865
858 bool ChromeContentRendererClient::IsAdblockPlusWithWebRequestInstalled() { 866 bool ChromeContentRendererClient::IsAdblockPlusWithWebRequestInstalled() {
859 return extension_dispatcher_->IsAdblockPlusWithWebRequestInstalled(); 867 return extension_dispatcher_->IsAdblockPlusWithWebRequestInstalled();
860 } 868 }
861 869
862 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 870 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
863 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 871 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
864 } 872 }
865 873
866 } // namespace chrome 874 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698