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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 return; | 400 return; |
401 notify_pending_ = true; | 401 notify_pending_ = true; |
402 MessageLoop::current()->PostTask( | 402 MessageLoop::current()->PostTask( |
403 FROM_HERE, | 403 FROM_HERE, |
404 NewRunnableMethod(this, &PluginPrefs::OnNotifyPluginStatusChanged)); | 404 NewRunnableMethod(this, &PluginPrefs::OnNotifyPluginStatusChanged)); |
405 } | 405 } |
406 | 406 |
407 void PluginPrefs::OnNotifyPluginStatusChanged() { | 407 void PluginPrefs::OnNotifyPluginStatusChanged() { |
408 notify_pending_ = false; | 408 notify_pending_ = false; |
409 NotificationService::current()->Notify( | 409 NotificationService::current()->Notify( |
410 content::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, | 410 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, |
411 Source<PluginPrefs>(this), | 411 Source<PluginPrefs>(this), |
412 NotificationService::NoDetails()); | 412 NotificationService::NoDetails()); |
413 } | 413 } |
414 | 414 |
415 /*static*/ | 415 /*static*/ |
416 void PluginPrefs::RegisterPrefs(PrefService* prefs) { | 416 void PluginPrefs::RegisterPrefs(PrefService* prefs) { |
417 FilePath internal_dir; | 417 FilePath internal_dir; |
418 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); | 418 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); |
419 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, | 419 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, |
420 internal_dir, | 420 internal_dir, |
421 PrefService::UNSYNCABLE_PREF); | 421 PrefService::UNSYNCABLE_PREF); |
422 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins, | 422 prefs->RegisterListPref(prefs::kPluginsDisabledPlugins, |
423 PrefService::UNSYNCABLE_PREF); | 423 PrefService::UNSYNCABLE_PREF); |
424 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, | 424 prefs->RegisterListPref(prefs::kPluginsDisabledPluginsExceptions, |
425 PrefService::UNSYNCABLE_PREF); | 425 PrefService::UNSYNCABLE_PREF); |
426 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins, | 426 prefs->RegisterListPref(prefs::kPluginsEnabledPlugins, |
427 PrefService::UNSYNCABLE_PREF); | 427 PrefService::UNSYNCABLE_PREF); |
428 } | 428 } |
OLD | NEW |