Chromium Code Reviews| Index: chrome/browser/policy/policy_browsertest.cc |
| diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc |
| index f696d0637eacd99c3c8612321e0dafd7949e8ffd..0e94e12f5aeb0567dd82dce3ac3d1f855197475b 100644 |
| --- a/chrome/browser/policy/policy_browsertest.cc |
| +++ b/chrome/browser/policy/policy_browsertest.cc |
| @@ -278,12 +278,24 @@ const webkit::WebPluginInfo* GetFlashPlugin( |
| return flash; |
| } |
| +void PostTaskEnablePlugin(PluginPrefs* plugin_prefs, |
| + const webkit::WebPluginInfo* plugin, |
| + bool enabled, |
| + bool* ok) { |
| + plugin_prefs->EnablePlugin(enabled, plugin->path, |
| + base::Bind(CopyValueAndQuit<bool>, ok)); |
| +} |
| + |
| bool SetPluginEnabled(PluginPrefs* plugin_prefs, |
| const webkit::WebPluginInfo* plugin, |
| bool enabled) { |
| bool ok = false; |
| - plugin_prefs->EnablePlugin(enabled, plugin->path, |
|
Bernhard Bauer
2012/09/24 18:06:04
Wait, I don't understand. We call the callback syn
ibraaaa
2012/09/24 18:18:36
Yes, that is the reason we are failing.
Do you me
Bernhard Bauer
2012/09/24 18:27:31
Hm, what I meant was that whether PluginPrefs::Ena
ibraaaa
2012/09/24 18:31:26
Well, I am fine but why do we add a needless callb
ibraaaa
2012/09/24 20:07:13
Done.
|
| - base::Bind(CopyValueAndQuit<bool>, &ok)); |
| + MessageLoop::current()->PostTask(FROM_HERE, |
| + base::Bind(&PostTaskEnablePlugin, |
| + base::Unretained(plugin_prefs), |
| + base::Unretained(plugin), |
| + enabled, |
| + base::Unretained(&ok))); |
| content::RunMessageLoop(); |
| return ok; |
| } |