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

Side by Side Diff: chrome/browser/dom_ui/plugins_ui.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
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 localized_strings.SetString("pluginDisabled", 76 localized_strings.SetString("pluginDisabled",
77 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN)); 77 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN));
78 localized_strings.SetString("pluginDisabledByPolicy", 78 localized_strings.SetString("pluginDisabledByPolicy",
79 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_BY_POLICY_PLUGIN)); 79 l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_BY_POLICY_PLUGIN));
80 localized_strings.SetString("pluginCannotBeEnabledDueToPolicy", 80 localized_strings.SetString("pluginCannotBeEnabledDueToPolicy",
81 l10n_util::GetStringUTF16(IDS_PLUGINS_CANNOT_ENABLE_DUE_TO_POLICY)); 81 l10n_util::GetStringUTF16(IDS_PLUGINS_CANNOT_ENABLE_DUE_TO_POLICY));
82 localized_strings.SetString("pluginDownload", 82 localized_strings.SetString("pluginDownload",
83 l10n_util::GetStringUTF16(IDS_PLUGINS_DOWNLOAD)); 83 l10n_util::GetStringUTF16(IDS_PLUGINS_DOWNLOAD));
84 localized_strings.SetString("pluginName", 84 localized_strings.SetString("pluginName",
85 l10n_util::GetStringUTF16(IDS_PLUGINS_NAME)); 85 l10n_util::GetStringUTF16(IDS_PLUGINS_NAME));
86 localized_strings.SetString("pluginPriority",
87 l10n_util::GetStringUTF16(IDS_PLUGINS_PRIORITY));
88 localized_strings.SetString("pluginVersion", 86 localized_strings.SetString("pluginVersion",
89 l10n_util::GetStringUTF16(IDS_PLUGINS_VERSION)); 87 l10n_util::GetStringUTF16(IDS_PLUGINS_VERSION));
90 localized_strings.SetString("pluginDescription", 88 localized_strings.SetString("pluginDescription",
91 l10n_util::GetStringUTF16(IDS_PLUGINS_DESCRIPTION)); 89 l10n_util::GetStringUTF16(IDS_PLUGINS_DESCRIPTION));
92 localized_strings.SetString("pluginPath", 90 localized_strings.SetString("pluginPath",
93 l10n_util::GetStringUTF16(IDS_PLUGINS_PATH)); 91 l10n_util::GetStringUTF16(IDS_PLUGINS_PATH));
94 localized_strings.SetString("pluginMimeTypes", 92 localized_strings.SetString("pluginMimeTypes",
95 l10n_util::GetStringUTF16(IDS_PLUGINS_MIME_TYPES)); 93 l10n_util::GetStringUTF16(IDS_PLUGINS_MIME_TYPES));
96 localized_strings.SetString("pluginMimeTypesMimeType", 94 localized_strings.SetString("pluginMimeTypesMimeType",
97 l10n_util::GetStringUTF16(IDS_PLUGINS_MIME_TYPES_MIME_TYPE)); 95 l10n_util::GetStringUTF16(IDS_PLUGINS_MIME_TYPES_MIME_TYPE));
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 plugin_updater->EnablePluginGroup(false, internalpdf); 228 plugin_updater->EnablePluginGroup(false, internalpdf);
231 } else if (group_name == internalpdf) { 229 } else if (group_name == internalpdf) {
232 plugin_updater->EnablePluginGroup(false, adobereader); 230 plugin_updater->EnablePluginGroup(false, adobereader);
233 } 231 }
234 } 232 }
235 } else { 233 } else {
236 FilePath::StringType file_path; 234 FilePath::StringType file_path;
237 if (!args->GetString(0, &file_path)) 235 if (!args->GetString(0, &file_path))
238 return; 236 return;
239 237
240 plugin_updater->EnablePluginFile(enable, file_path); 238 plugin_updater->EnablePlugin(enable, file_path);
241 } 239 }
242 240
243 // TODO(viettrungluu): We might also want to ensure that the plugins 241 // TODO(viettrungluu): We might also want to ensure that the plugins
244 // list is always written to prefs even when the user hasn't disabled a 242 // list is always written to prefs even when the user hasn't disabled a
245 // plugin. <http://crbug.com/39101> 243 // plugin. <http://crbug.com/39101>
246 plugin_updater->UpdatePreferences(dom_ui_->GetProfile(), 0); 244 plugin_updater->UpdatePreferences(dom_ui_->GetProfile(), 0);
247 } 245 }
248 246
249 void PluginsDOMHandler::HandleShowTermsOfServiceMessage(const ListValue* args) { 247 void PluginsDOMHandler::HandleShowTermsOfServiceMessage(const ListValue* args) {
250 // Show it in a new browser window.... 248 // Show it in a new browser window....
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 void PluginsUI::RegisterUserPrefs(PrefService* prefs) { 329 void PluginsUI::RegisterUserPrefs(PrefService* prefs) {
332 FilePath internal_dir; 330 FilePath internal_dir;
333 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); 331 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir);
334 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, 332 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory,
335 internal_dir); 333 internal_dir);
336 334
337 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist); 335 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist);
338 prefs->RegisterListPref(prefs::kPluginsPluginsList); 336 prefs->RegisterListPref(prefs::kPluginsPluginsList);
339 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false); 337 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false);
340 } 338 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gview_request_interceptor_unittest.cc ('k') | chrome/browser/plugin_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698