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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 #include "webkit/plugins/npapi/plugin_group.h" | 34 #include "webkit/plugins/npapi/plugin_group.h" |
35 #include "webkit/plugins/npapi/plugin_list.h" | 35 #include "webkit/plugins/npapi/plugin_list.h" |
36 #include "webkit/plugins/webplugininfo.h" | 36 #include "webkit/plugins/webplugininfo.h" |
37 | 37 |
38 using content::BrowserThread; | 38 using content::BrowserThread; |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 // Default state for a plug-in (not state of the default plug-in!). | 42 // Default state for a plug-in (not state of the default plug-in!). |
43 // Accessed only on the UI thread. | 43 // Accessed only on the UI thread. |
44 base::LazyInstance<std::map<FilePath, bool> > g_default_plugin_state( | 44 base::LazyInstance<std::map<FilePath, bool> > g_default_plugin_state = |
45 base::LINKER_INITIALIZED); | 45 LAZY_INSTANCE_INITIALIZER; |
46 | 46 |
47 } // namespace | 47 } // namespace |
48 | 48 |
49 // How long to wait to save the plugin enabled information, which might need to | 49 // How long to wait to save the plugin enabled information, which might need to |
50 // go to disk. | 50 // go to disk. |
51 #define kPluginUpdateDelayMs (60 * 1000) | 51 #define kPluginUpdateDelayMs (60 * 1000) |
52 | 52 |
53 // static | 53 // static |
54 PluginPrefs* PluginPrefs::GetForProfile(Profile* profile) { | 54 PluginPrefs* PluginPrefs::GetForProfile(Profile* profile) { |
55 PluginPrefsWrapper* wrapper = | 55 PluginPrefsWrapper* wrapper = |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 } | 532 } |
533 } | 533 } |
534 | 534 |
535 void PluginPrefs::NotifyPluginStatusChanged() { | 535 void PluginPrefs::NotifyPluginStatusChanged() { |
536 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 536 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
537 content::NotificationService::current()->Notify( | 537 content::NotificationService::current()->Notify( |
538 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, | 538 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, |
539 content::Source<Profile>(profile_), | 539 content::Source<Profile>(profile_), |
540 content::NotificationService::NoDetails()); | 540 content::NotificationService::NoDetails()); |
541 } | 541 } |
OLD | NEW |