 Chromium Code Reviews
 Chromium Code Reviews| Index: chrome/browser/plugin_service.cc | 
| diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc | 
| index cc6408fb02b186fbfb0dc887160b4df7e0d98236..86bed6239f3368d16e7110fe7ec27977c67941b2 100644 | 
| --- a/chrome/browser/plugin_service.cc | 
| +++ b/chrome/browser/plugin_service.cc | 
| @@ -226,26 +226,28 @@ PluginProcessHost* PluginService::FindOrStartPluginProcess( | 
| const FilePath& plugin_path) { | 
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 
| - PluginProcessHost *plugin_host = FindPluginProcess(plugin_path); | 
| + if (plugin_path.value().empty()) | 
| 
jam
2010/11/12 20:44:58
curious, any reason to change this logic?  it seem
 | 
| + return NULL; | 
| + | 
| + PluginProcessHost* plugin_host = FindPluginProcess(plugin_path); | 
| if (plugin_host) | 
| return plugin_host; | 
| WebPluginInfo info; | 
| if (!NPAPI::PluginList::Singleton()->GetPluginInfoByPath( | 
| - plugin_path, &info)) { | 
| - DCHECK(false); | 
| + plugin_path, &info)) { | 
| + NOTREACHED(); | 
| return NULL; | 
| } | 
| // This plugin isn't loaded by any plugin process, so create a new process. | 
| - plugin_host = new PluginProcessHost(); | 
| - if (!plugin_host->Init(info, ui_locale_)) { | 
| - DCHECK(false); // Init is not expected to fail | 
| - delete plugin_host; | 
| + scoped_ptr<PluginProcessHost> new_host(new PluginProcessHost()); | 
| + if (!new_host->Init(info, ui_locale_)) { | 
| + NOTREACHED(); // Init is not expected to fail | 
| return NULL; | 
| } | 
| - return plugin_host; | 
| + return new_host.release(); | 
| } | 
| void PluginService::OpenChannelToPlugin( |