OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/plugins_ui.h" | 5 #include "chrome/browser/ui/webui/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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 string16 group_name; | 243 string16 group_name; |
244 if (!args->GetString(0, &group_name)) { | 244 if (!args->GetString(0, &group_name)) { |
245 NOTREACHED(); | 245 NOTREACHED(); |
246 return; | 246 return; |
247 } | 247 } |
248 | 248 |
249 plugin_prefs->EnablePluginGroup(enable, group_name); | 249 plugin_prefs->EnablePluginGroup(enable, group_name); |
250 if (enable) { | 250 if (enable) { |
251 // See http://crbug.com/50105 for background. | 251 // See http://crbug.com/50105 for background. |
252 string16 adobereader = ASCIIToUTF16( | 252 string16 adobereader = ASCIIToUTF16( |
253 PluginMetadata::kAdobeReaderGroupName); | 253 PluginMetadata::kAdobeReaderGroupName); |
254 string16 internalpdf = | 254 string16 internalpdf = ASCIIToUTF16(ChromeContentClient::kPDFPluginName); |
255 ASCIIToUTF16(chrome::ChromeContentClient::kPDFPluginName); | |
256 if (group_name == adobereader) | 255 if (group_name == adobereader) |
257 plugin_prefs->EnablePluginGroup(false, internalpdf); | 256 plugin_prefs->EnablePluginGroup(false, internalpdf); |
258 else if (group_name == internalpdf) | 257 else if (group_name == internalpdf) |
259 plugin_prefs->EnablePluginGroup(false, adobereader); | 258 plugin_prefs->EnablePluginGroup(false, adobereader); |
260 } | 259 } |
261 } else { | 260 } else { |
262 base::FilePath::StringType file_path; | 261 base::FilePath::StringType file_path; |
263 if (!args->GetString(0, &file_path)) { | 262 if (!args->GetString(0, &file_path)) { |
264 NOTREACHED(); | 263 NOTREACHED(); |
265 return; | 264 return; |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 void PluginsUI::RegisterProfilePrefs( | 493 void PluginsUI::RegisterProfilePrefs( |
495 user_prefs::PrefRegistrySyncable* registry) { | 494 user_prefs::PrefRegistrySyncable* registry) { |
496 registry->RegisterBooleanPref( | 495 registry->RegisterBooleanPref( |
497 prefs::kPluginsShowDetails, | 496 prefs::kPluginsShowDetails, |
498 false, | 497 false, |
499 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 498 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
500 registry->RegisterDictionaryPref( | 499 registry->RegisterDictionaryPref( |
501 prefs::kContentSettingsPluginWhitelist, | 500 prefs::kContentSettingsPluginWhitelist, |
502 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 501 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
503 } | 502 } |
OLD | NEW |