OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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" |
(...skipping 20 matching lines...) Expand all Loading... |
31 return false; | 31 return false; |
32 } | 32 } |
33 | 33 |
34 FileVersionInfoWin* version_info_win = | 34 FileVersionInfoWin* version_info_win = |
35 static_cast<FileVersionInfoWin*>(version_info.get()); | 35 static_cast<FileVersionInfoWin*>(version_info.get()); |
36 | 36 |
37 info->name = version_info->product_name(); | 37 info->name = version_info->product_name(); |
38 info->desc = version_info->file_description(); | 38 info->desc = version_info->file_description(); |
39 info->version = version_info->file_version(); | 39 info->version = version_info->file_version(); |
40 info->path = filename; | 40 info->path = filename; |
41 info->enabled = true; | 41 info->enabled = WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; |
42 | 42 |
43 // TODO(evan): Move the ParseMimeTypes code inline once Pepper is updated. | 43 // TODO(evan): Move the ParseMimeTypes code inline once Pepper is updated. |
44 if (!PluginList::ParseMimeTypes( | 44 if (!PluginList::ParseMimeTypes( |
45 UTF16ToASCII(version_info_win->GetStringValue(L"MIMEType")), | 45 UTF16ToASCII(version_info_win->GetStringValue(L"MIMEType")), |
46 UTF16ToASCII(version_info_win->GetStringValue(L"FileExtents")), | 46 UTF16ToASCII(version_info_win->GetStringValue(L"FileExtents")), |
47 version_info_win->GetStringValue(L"FileOpenName"), | 47 version_info_win->GetStringValue(L"FileOpenName"), |
48 &info->mime_types)) { | 48 &info->mime_types)) { |
49 LOG_IF(ERROR, PluginList::DebugPluginLoading()) | 49 LOG_IF(ERROR, PluginList::DebugPluginLoading()) |
50 << "Plugin " << info->name << " has bad MIME types, skipping"; | 50 << "Plugin " << info->name << " has bad MIME types, skipping"; |
51 return false; | 51 return false; |
52 } | 52 } |
53 | 53 |
54 return true; | 54 return true; |
55 } | 55 } |
56 | 56 |
57 } // namespace npapi | 57 } // namespace npapi |
58 } // namespace webkit | 58 } // namespace webkit |
OLD | NEW |