OLD | NEW |
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 #include "chrome/browser/plugin_prefs.h" | 5 #include "chrome/browser/plugin_prefs.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 return; | 433 return; |
434 notify_pending_ = true; | 434 notify_pending_ = true; |
435 MessageLoop::current()->PostTask( | 435 MessageLoop::current()->PostTask( |
436 FROM_HERE, | 436 FROM_HERE, |
437 NewRunnableMethod(this, &PluginPrefs::OnNotifyPluginStatusChanged)); | 437 NewRunnableMethod(this, &PluginPrefs::OnNotifyPluginStatusChanged)); |
438 } | 438 } |
439 | 439 |
440 void PluginPrefs::OnNotifyPluginStatusChanged() { | 440 void PluginPrefs::OnNotifyPluginStatusChanged() { |
441 notify_pending_ = false; | 441 notify_pending_ = false; |
442 NotificationService::current()->Notify( | 442 NotificationService::current()->Notify( |
443 content::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, | 443 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, |
444 Source<PluginPrefs>(this), | 444 Source<PluginPrefs>(this), |
445 NotificationService::NoDetails()); | 445 NotificationService::NoDetails()); |
446 } | 446 } |
447 | 447 |
448 /*static*/ | 448 /*static*/ |
449 void PluginPrefs::RegisterPrefs(PrefService* prefs) { | 449 void PluginPrefs::RegisterPrefs(PrefService* prefs) { |
450 FilePath internal_dir; | 450 FilePath internal_dir; |
451 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); | 451 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); |
452 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, | 452 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, |
453 internal_dir, | 453 internal_dir, |
454 PrefService::UNSYNCABLE_PREF); | 454 PrefService::UNSYNCABLE_PREF); |
455 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins, | 455 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins, |
456 PrefService::UNSYNCABLE_PREF); | 456 PrefService::UNSYNCABLE_PREF); |
457 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, | 457 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, |
458 PrefService::UNSYNCABLE_PREF); | 458 PrefService::UNSYNCABLE_PREF); |
459 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins, | 459 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins, |
460 PrefService::UNSYNCABLE_PREF); | 460 PrefService::UNSYNCABLE_PREF); |
461 } | 461 } |
OLD | NEW |