Chromium Code Reviews| Index: content/browser/plugin_service_impl.cc |
| diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc |
| index 5a79f7dcc845e43f15a74ca7e3b6a4bcd7b0eb06..52b3c0bf6edb74ec9625adfcdcb10c403f7d82ee 100644 |
| --- a/content/browser/plugin_service_impl.cc |
| +++ b/content/browser/plugin_service_impl.cc |
| @@ -681,6 +681,20 @@ PepperPluginInfo* PluginServiceImpl::GetRegisteredPpapiPluginInfo( |
| return &ppapi_plugins_[ppapi_plugins_.size() - 1]; |
| } |
| +bool PluginServiceImpl::IsPepperPluginRegisteredForMimeType( |
| + const std::string& mime_type) { |
| + for (size_t i = 0; i < ppapi_plugins_.size(); i++) { |
|
scherkus (not reviewing)
2013/09/16 17:42:05
nit: ++i (rest of this file is consistent with tha
ddorwin
2013/09/16 18:28:58
Done.
|
| + const std::vector<WebPluginMimeType> & mime_types = |
|
scherkus (not reviewing)
2013/09/16 17:42:05
nit: remove space before &
ddorwin
2013/09/16 18:28:58
Done.
|
| + ppapi_plugins_[i].mime_types; |
| + for (size_t j = 0; j < mime_types.size(); j++) { |
|
scherkus (not reviewing)
2013/09/16 17:42:05
nit: ++j
ddorwin
2013/09/16 18:28:58
Done.
|
| + if (mime_types[j].mime_type == mime_type) |
| + return true; |
| + } |
| + } |
| + |
| + return false; |
| +} |
| + |
| #if defined(OS_POSIX) && !defined(OS_OPENBSD) && !defined(OS_ANDROID) |
| // static |
| void PluginServiceImpl::RegisterFilePathWatcher(FilePathWatcher* watcher, |