Chromium Code Reviews| Index: content/browser/plugin_service_impl.cc |
| =================================================================== |
| --- content/browser/plugin_service_impl.cc (revision 238091) |
| +++ content/browser/plugin_service_impl.cc (working copy) |
| @@ -298,7 +298,12 @@ |
| START_NPAPI_FLASH_AT_LEAST_ONCE, |
| FLASH_USAGE_ENUM_COUNT); |
| } |
| - |
| +#if defined(OS_CHROMEOS) |
| + // TODO(ihf): Move to an earlier place once crbug.com/314301 is fixed. For now |
| + // we still want Plugin.FlashUsage recorded if we end up here. |
| + LOG(WARNING) << "Refusing to start npapi plugin on ChromeOS."; |
| + return NULL; |
| +#endif |
| // This plugin isn't loaded by any plugin process, so create a new process. |
| scoped_ptr<PluginProcessHost> new_host(new PluginProcessHost()); |
| if (!new_host->Init(info)) { |
| @@ -314,8 +319,11 @@ |
| const base::FilePath& profile_data_directory) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| - if (filter_ && !filter_->CanLoadPlugin(render_process_id, plugin_path)) |
| + if (filter_ && !filter_->CanLoadPlugin(render_process_id, plugin_path)) { |
| + LOG(WARNING) << "Unable to load ppapi plugin. " |
| + << plugin_path.MaybeAsASCII(); |
| return NULL; |
| + } |
| PpapiPluginProcessHost* plugin_host = |
| FindPpapiPluginProcess(plugin_path, profile_data_directory); |
| @@ -324,8 +332,11 @@ |
| // Validate that the plugin is actually registered. |
| PepperPluginInfo* info = GetRegisteredPpapiPluginInfo(plugin_path); |
| - if (!info) |
| + if (!info) { |
| + LOG(WARNING) << "Unable to find ppapi plugin registration." |
|
piman
2013/12/09 22:39:06
nit: space after .
Scott Hess - ex-Googler
2013/12/09 23:47:45
Or rewrite "Unable to ... for: " << path. And bel
ilja
2013/12/10 05:55:31
Done.
ilja
2013/12/10 05:55:31
Done.
|
| + << plugin_path.MaybeAsASCII(); |
| return NULL; |
| + } |
| // Record when PPAPI Flash process is started for the first time. |
| static bool counted = false; |
| @@ -337,8 +348,13 @@ |
| } |
| // This plugin isn't loaded by any plugin process, so create a new process. |
| - return PpapiPluginProcessHost::CreatePluginHost( |
| + plugin_host = PpapiPluginProcessHost::CreatePluginHost( |
| *info, profile_data_directory); |
| + if (!plugin_host) |
|
piman
2013/12/09 22:39:06
nit: needs braces per style.
ilja
2013/12/10 05:55:31
Done.
|
| + LOG(WARNING) << "Unable to create ppapi plugin process." |
|
piman
2013/12/09 22:39:06
nit: space after .
ilja
2013/12/10 05:55:31
Done.
|
| + << plugin_path.MaybeAsASCII(); |
| + |
| + return plugin_host; |
| } |
| PpapiPluginProcessHost* PluginServiceImpl::FindOrStartPpapiBrokerProcess( |