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

Unified Diff: content/browser/battery_status/battery_monitor_integration_browsertest.cc

Issue 2183703005: Renderers should obtain browser InterfaceProvider by connecting to browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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
« no previous file with comments | « content/browser/android/interface_registry_android_impl.cc ('k') | content/browser/browser_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/battery_status/battery_monitor_integration_browsertest.cc
diff --git a/content/browser/battery_status/battery_monitor_integration_browsertest.cc b/content/browser/battery_status/battery_monitor_integration_browsertest.cc
index e8c6c8523c35b9cdf2988acb2420d8ed95ff3eca..9a8a23485006b754b7461ddcb1ae1576a84a15cb 100644
--- a/content/browser/battery_status/battery_monitor_integration_browsertest.cc
+++ b/content/browser/battery_status/battery_monitor_integration_browsertest.cc
@@ -92,7 +92,10 @@ class TestContentBrowserClient : public ContentBrowserClient {
void ExposeInterfacesToRenderer(
shell::InterfaceRegistry* registry,
RenderProcessHost* render_process_host) override {
- registry->AddInterface(base::Bind(&FakeBatteryMonitor::Create));
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner =
+ BrowserThread::GetTaskRunnerForThread(BrowserThread::UI);
+ registry->AddInterface(base::Bind(&FakeBatteryMonitor::Create),
+ ui_task_runner);
}
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
« no previous file with comments | « content/browser/android/interface_registry_android_impl.cc ('k') | content/browser/browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698