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

Side by Side Diff: webkit/plugins/npapi/plugin_lib_mac.mm

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_group_unittest.cc ('k') | webkit/plugins/npapi/plugin_lib_posix.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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 6
7 #include "webkit/plugins/npapi/plugin_lib.h" 7 #include "webkit/plugins/npapi/plugin_lib.h"
8 8
9 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 info->name = base::SysNSStringToUTF16(plugin_name); 118 info->name = base::SysNSStringToUTF16(plugin_name);
119 else 119 else
120 info->name = UTF8ToUTF16(filename.BaseName().value()); 120 info->name = UTF8ToUTF16(filename.BaseName().value());
121 info->path = filename; 121 info->path = filename;
122 if (plugin_vers) 122 if (plugin_vers)
123 info->version = base::SysNSStringToUTF16(plugin_vers); 123 info->version = base::SysNSStringToUTF16(plugin_vers);
124 if (plugin_desc) 124 if (plugin_desc)
125 info->desc = base::SysNSStringToUTF16(plugin_desc); 125 info->desc = base::SysNSStringToUTF16(plugin_desc);
126 else 126 else
127 info->desc = UTF8ToUTF16(filename.BaseName().value()); 127 info->desc = UTF8ToUTF16(filename.BaseName().value());
128 info->enabled = WebPluginInfo::USER_ENABLED;
129 128
130 return true; 129 return true;
131 } 130 }
132 131
133 } // anonymous namespace 132 } // anonymous namespace
134 133
135 bool PluginLib::ReadWebPluginInfo(const FilePath &filename, 134 bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
136 WebPluginInfo* info) { 135 WebPluginInfo* info) {
137 // There are three ways to get information about plugin capabilities: 136 // There are three ways to get information about plugin capabilities:
138 // 1) a set of Info.plist keys, documented at 137 // 1) a set of Info.plist keys, documented at
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 if (ReadPlistPluginInfo(filename, bundle.get(), info)) 200 if (ReadPlistPluginInfo(filename, bundle.get(), info))
202 return true; 201 return true;
203 202
204 // ... or not 203 // ... or not
205 204
206 return false; 205 return false;
207 } 206 }
208 207
209 } // namespace npapi 208 } // namespace npapi
210 } // namespace webkit 209 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/plugin_group_unittest.cc ('k') | webkit/plugins/npapi/plugin_lib_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698