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

Side by Side Diff: chrome/browser/dom_ui/plugins_ui.cc

Issue 5621006: Merge PluginGroups for Adobe Reader (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 10 years 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 | « no previous file | chrome/browser/plugin_exceptions_table_model.h » ('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 "chrome/browser/dom_ui/plugins_ui.h" 5 #include "chrome/browser/dom_ui/plugins_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 PluginUpdater* plugin_updater = PluginUpdater::GetPluginUpdater(); 217 PluginUpdater* plugin_updater = PluginUpdater::GetPluginUpdater();
218 if (is_group_str == "true") { 218 if (is_group_str == "true") {
219 string16 group_name; 219 string16 group_name;
220 if (!args->GetString(0, &group_name)) 220 if (!args->GetString(0, &group_name))
221 return; 221 return;
222 222
223 plugin_updater->EnablePluginGroup(enable, group_name); 223 plugin_updater->EnablePluginGroup(enable, group_name);
224 if (enable) { 224 if (enable) {
225 // See http://crbug.com/50105 for background. 225 // See http://crbug.com/50105 for background.
226 string16 reader8 = ASCIIToUTF16(PluginGroup::kAdobeReader8GroupName); 226 string16 adobereader = ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName);
227 string16 reader9 = ASCIIToUTF16(PluginGroup::kAdobeReader9GroupName);
228 string16 internalpdf = ASCIIToUTF16(PepperPluginRegistry::kPDFPluginName); 227 string16 internalpdf = ASCIIToUTF16(PepperPluginRegistry::kPDFPluginName);
229 if (group_name == reader8 || group_name == reader9) { 228 if (group_name == adobereader) {
230 plugin_updater->EnablePluginGroup(false, internalpdf); 229 plugin_updater->EnablePluginGroup(false, internalpdf);
231 } else if (group_name == internalpdf) { 230 } else if (group_name == internalpdf) {
232 plugin_updater->EnablePluginGroup(false, reader8); 231 plugin_updater->EnablePluginGroup(false, adobereader);
233 plugin_updater->EnablePluginGroup(false, reader9);
234 } 232 }
235 } 233 }
236 } else { 234 } else {
237 FilePath::StringType file_path; 235 FilePath::StringType file_path;
238 if (!args->GetString(0, &file_path)) 236 if (!args->GetString(0, &file_path))
239 return; 237 return;
240 238
241 plugin_updater->EnablePluginFile(enable, file_path); 239 plugin_updater->EnablePluginFile(enable, file_path);
242 } 240 }
243 241
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 void PluginsUI::RegisterUserPrefs(PrefService* prefs) { 330 void PluginsUI::RegisterUserPrefs(PrefService* prefs) {
333 FilePath internal_dir; 331 FilePath internal_dir;
334 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); 332 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir);
335 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, 333 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
336 internal_dir); 334 internal_dir);
337 335
338 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist); 336 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist);
339 prefs->RegisterListPref(prefs::kPluginsPluginsList); 337 prefs->RegisterListPref(prefs::kPluginsPluginsList);
340 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false); 338 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false);
341 } 339 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/plugin_exceptions_table_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698