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

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

Issue 7848025: Store plug-in enabled/disabled state in PluginPrefs instead of WebPluginInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 3 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) 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 <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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 std::string error; 155 std::string error;
156 void* dl = base::LoadNativeLibrary(filename, &error); 156 void* dl = base::LoadNativeLibrary(filename, &error);
157 if (!dl) { 157 if (!dl) {
158 LOG_IF(ERROR, PluginList::DebugPluginLoading()) 158 LOG_IF(ERROR, PluginList::DebugPluginLoading())
159 << "While reading plugin info, unable to load library " 159 << "While reading plugin info, unable to load library "
160 << filename.value() << " (" << error << "), skipping."; 160 << filename.value() << " (" << error << "), skipping.";
161 return false; 161 return false;
162 } 162 }
163 163
164 info->path = filename; 164 info->path = filename;
165 info->enabled = WebPluginInfo::USER_ENABLED;
166 165
167 // Attempt to swap in the wrapped plugin if this is nspluginwrapper. 166 // Attempt to swap in the wrapped plugin if this is nspluginwrapper.
168 UnwrapNSPluginWrapper(&dl, &info->path); 167 UnwrapNSPluginWrapper(&dl, &info->path);
169 168
170 // See comments in plugin_lib_mac regarding this symbol. 169 // See comments in plugin_lib_mac regarding this symbol.
171 typedef const char* (*NP_GetMimeDescriptionType)(); 170 typedef const char* (*NP_GetMimeDescriptionType)();
172 NP_GetMimeDescriptionType NP_GetMIMEDescription = 171 NP_GetMimeDescriptionType NP_GetMIMEDescription =
173 reinterpret_cast<NP_GetMimeDescriptionType>( 172 reinterpret_cast<NP_GetMimeDescriptionType>(
174 dlsym(dl, "NP_GetMIMEDescription")); 173 dlsym(dl, "NP_GetMIMEDescription"));
175 const char* mime_description = NULL; 174 const char* mime_description = NULL;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 break; 289 break;
291 } 290 }
292 } 291 }
293 if (!version.empty()) { 292 if (!version.empty()) {
294 info->version = UTF8ToUTF16(version); 293 info->version = UTF8ToUTF16(version);
295 } 294 }
296 } 295 }
297 296
298 } // namespace npapi 297 } // namespace npapi
299 } // namespace webkit 298 } // 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