Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1091)

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 10910168: Separate plugin_metadata from plugin_installer, thread-safe plugin_finder (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix policy tests Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698