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

Side by Side Diff: chrome/browser/plugin_updater.cc

Issue 3023037: Remove Value/StringValue's ...UTF16() methods in favour of overloading. (Closed)
Patch Set: I'm an idiot. Created 10 years, 4 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
« no previous file with comments | « chrome/browser/geolocation/access_token_store.cc ('k') | no next file » | 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 "chrome/browser/plugin_updater.h" 5 #include "chrome/browser/plugin_updater.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Build the set of policy-disabled plugins once and cache it. 166 // Build the set of policy-disabled plugins once and cache it.
167 // Don't do this in the constructor, there's no profile available there. 167 // Don't do this in the constructor, there's no profile available there.
168 std::set<string16> policy_disabled_plugins; 168 std::set<string16> policy_disabled_plugins;
169 const ListValue* plugin_blacklist = 169 const ListValue* plugin_blacklist =
170 profile->GetPrefs()->GetList(prefs::kPluginsPluginsBlacklist); 170 profile->GetPrefs()->GetList(prefs::kPluginsPluginsBlacklist);
171 if (plugin_blacklist) { 171 if (plugin_blacklist) {
172 ListValue::const_iterator end(plugin_blacklist->end()); 172 ListValue::const_iterator end(plugin_blacklist->end());
173 for (ListValue::const_iterator current(plugin_blacklist->begin()); 173 for (ListValue::const_iterator current(plugin_blacklist->begin());
174 current != end; ++current) { 174 current != end; ++current) {
175 string16 plugin_name; 175 string16 plugin_name;
176 if ((*current)->GetAsUTF16(&plugin_name)) { 176 if ((*current)->GetAsString(&plugin_name)) {
177 policy_disabled_plugins.insert(plugin_name); 177 policy_disabled_plugins.insert(plugin_name);
178 } 178 }
179 } 179 }
180 } 180 }
181 PluginGroup::SetPolicyDisabledPluginSet(policy_disabled_plugins); 181 PluginGroup::SetPolicyDisabledPluginSet(policy_disabled_plugins);
182 182
183 // Disable all of the plugins and plugin groups that are disabled by policy. 183 // Disable all of the plugins and plugin groups that are disabled by policy.
184 std::vector<WebPluginInfo> plugins; 184 std::vector<WebPluginInfo> plugins;
185 NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins); 185 NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
186 for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin(); 186 for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 it != plugin_groups.end(); 233 it != plugin_groups.end();
234 ++it) { 234 ++it) {
235 // Don't save preferences for vulnerable pugins. 235 // Don't save preferences for vulnerable pugins.
236 if (!(*it)->IsVulnerable()) { 236 if (!(*it)->IsVulnerable()) {
237 plugins_list->Append((*it)->GetSummary()); 237 plugins_list->Append((*it)->GetSummary());
238 } 238 }
239 } 239 }
240 } 240 }
241 241
242 } // namespace plugin_updater 242 } // namespace plugin_updater
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/access_token_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698