Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: webkit/plugins/npapi/plugin_lib_posix.cc

Issue 5699005: Policy: Re-enabled plugin still disabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fixes only. Trybot happiness still applies. Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/plugins/npapi/plugin_lib_mac.mm ('k') | webkit/plugins/npapi/plugin_lib_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <dlfcn.h> 7 #include <dlfcn.h>
8 #if defined(OS_OPENBSD) 8 #if defined(OS_OPENBSD)
9 #include <sys/exec_elf.h> 9 #include <sys/exec_elf.h>
10 #else 10 #else
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 void* dl = base::LoadNativeLibrary(filename); 153 void* dl = base::LoadNativeLibrary(filename);
154 if (!dl) { 154 if (!dl) {
155 LOG_IF(ERROR, PluginList::DebugPluginLoading()) 155 LOG_IF(ERROR, PluginList::DebugPluginLoading())
156 << "While reading plugin info, unable to load library " 156 << "While reading plugin info, unable to load library "
157 << filename.value() << ", skipping."; 157 << filename.value() << ", skipping.";
158 return false; 158 return false;
159 } 159 }
160 160
161 info->path = filename; 161 info->path = filename;
162 info->enabled = true; 162 info->enabled = WebPluginInfo::USER_ENABLED;
163 163
164 // Attempt to swap in the wrapped plugin if this is nspluginwrapper. 164 // Attempt to swap in the wrapped plugin if this is nspluginwrapper.
165 UnwrapNSPluginWrapper(&dl, &info->path); 165 UnwrapNSPluginWrapper(&dl, &info->path);
166 166
167 // See comments in plugin_lib_mac regarding this symbol. 167 // See comments in plugin_lib_mac regarding this symbol.
168 typedef const char* (*NP_GetMimeDescriptionType)(); 168 typedef const char* (*NP_GetMimeDescriptionType)();
169 NP_GetMimeDescriptionType NP_GetMIMEDescription = 169 NP_GetMimeDescriptionType NP_GetMIMEDescription =
170 reinterpret_cast<NP_GetMimeDescriptionType>( 170 reinterpret_cast<NP_GetMimeDescriptionType>(
171 dlsym(dl, "NP_GetMIMEDescription")); 171 dlsym(dl, "NP_GetMIMEDescription"));
172 const char* mime_description = NULL; 172 const char* mime_description = NULL;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 break; 287 break;
288 } 288 }
289 } 289 }
290 if (!version.empty()) { 290 if (!version.empty()) {
291 info->version = UTF8ToUTF16(version); 291 info->version = UTF8ToUTF16(version);
292 } 292 }
293 } 293 }
294 294
295 } // namespace npapi 295 } // namespace npapi
296 } // namespace webkit 296 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_lib_mac.mm ('k') | webkit/plugins/npapi/plugin_lib_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698