OLD | NEW |
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 "webkit/plugins/npapi/plugin_lib.h" | 5 #include "webkit/plugins/npapi/plugin_lib.h" |
6 | 6 |
7 #include "base/file_version_info.h" | 7 #include "base/file_version_info.h" |
8 #include "base/file_version_info_win.h" | 8 #include "base/file_version_info_win.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "webkit/plugins/npapi/plugin_constants_win.h" | 12 #include "webkit/plugins/npapi/plugin_constants_win.h" |
13 #include "webkit/plugins/npapi/plugin_list.h" | 13 #include "webkit/plugins/npapi/plugin_list.h" |
14 | 14 |
15 namespace webkit { | 15 namespace webkit { |
16 namespace npapi { | 16 namespace npapi { |
17 | 17 |
18 bool PluginLib::ReadWebPluginInfo(const FilePath &filename, | 18 bool PluginLib::ReadWebPluginInfo(const base::FilePath &filename, |
19 WebPluginInfo* info) { | 19 WebPluginInfo* info) { |
20 // On windows, the way we get the mime types for the library is | 20 // On windows, the way we get the mime types for the library is |
21 // to check the version information in the DLL itself. This | 21 // to check the version information in the DLL itself. This |
22 // will be a string of the format: <type1>|<type2>|<type3>|... | 22 // will be a string of the format: <type1>|<type2>|<type3>|... |
23 // For example: | 23 // For example: |
24 // video/quicktime|audio/aiff|image/jpeg | 24 // video/quicktime|audio/aiff|image/jpeg |
25 scoped_ptr<FileVersionInfo> version_info( | 25 scoped_ptr<FileVersionInfo> version_info( |
26 FileVersionInfo::CreateFileVersionInfo(filename)); | 26 FileVersionInfo::CreateFileVersionInfo(filename)); |
27 if (!version_info.get()) { | 27 if (!version_info.get()) { |
28 LOG_IF(ERROR, PluginList::DebugPluginLoading()) | 28 LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
(...skipping 19 matching lines...) Expand all Loading... |
48 LOG_IF(ERROR, PluginList::DebugPluginLoading()) | 48 LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
49 << "Plugin " << info->name << " has bad MIME types, skipping"; | 49 << "Plugin " << info->name << " has bad MIME types, skipping"; |
50 return false; | 50 return false; |
51 } | 51 } |
52 | 52 |
53 return true; | 53 return true; |
54 } | 54 } |
55 | 55 |
56 } // namespace npapi | 56 } // namespace npapi |
57 } // namespace webkit | 57 } // namespace webkit |
OLD | NEW |