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/plugins/plugin_prefs.h" | 5 #include "chrome/browser/plugins/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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 can_enable = false; | 157 can_enable = false; |
158 } else { | 158 } else { |
159 if (plugin_status == POLICY_ENABLED || group_status == POLICY_ENABLED) | 159 if (plugin_status == POLICY_ENABLED || group_status == POLICY_ENABLED) |
160 can_enable = false; | 160 can_enable = false; |
161 } | 161 } |
162 } else { | 162 } else { |
163 NOTREACHED(); | 163 NOTREACHED(); |
164 } | 164 } |
165 | 165 |
166 if (!can_enable) { | 166 if (!can_enable) { |
167 MessageLoop::current()->PostTask(FROM_HERE, | 167 base::MessageLoop::current()->PostTask(FROM_HERE, |
168 base::Bind(callback, false)); | 168 base::Bind(callback, false)); |
169 return; | 169 return; |
170 } | 170 } |
171 | 171 |
172 PluginService::GetInstance()->GetPlugins( | 172 PluginService::GetInstance()->GetPlugins( |
173 base::Bind(&PluginPrefs::EnablePluginInternal, this, | 173 base::Bind(&PluginPrefs::EnablePluginInternal, this, |
174 enabled, path, finder, callback)); | 174 enabled, path, finder, callback)); |
175 } | 175 } |
176 | 176 |
177 void PluginPrefs::EnablePluginInternal( | 177 void PluginPrefs::EnablePluginInternal( |
178 bool enabled, | 178 bool enabled, |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 } | 665 } |
666 } | 666 } |
667 | 667 |
668 void PluginPrefs::NotifyPluginStatusChanged() { | 668 void PluginPrefs::NotifyPluginStatusChanged() { |
669 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 669 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
670 content::NotificationService::current()->Notify( | 670 content::NotificationService::current()->Notify( |
671 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, | 671 chrome::NOTIFICATION_PLUGIN_ENABLE_STATUS_CHANGED, |
672 content::Source<Profile>(profile_), | 672 content::Source<Profile>(profile_), |
673 content::NotificationService::NoDetails()); | 673 content::NotificationService::NoDetails()); |
674 } | 674 } |
OLD | NEW |