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

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

Issue 2157143002: Move interface registration to OnConnect in RPH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 | « chrome/browser/chrome_content_browser_client.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..0c6b6430f05045da12e8e6890ad5fd1b684beb52 100644
--- a/content/browser/battery_status/battery_monitor_integration_browsertest.cc
+++ b/content/browser/battery_status/battery_monitor_integration_browsertest.cc
@@ -20,6 +20,7 @@
#include "content/shell/browser/shell_content_browser_client.h"
#include "device/battery/battery_monitor.mojom.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "services/shell/public/cpp/connection.h"
#include "services/shell/public/cpp/interface_registry.h"
// These tests run against a dummy implementation of the BatteryMonitor service.
@@ -90,9 +91,11 @@ class FakeBatteryMonitor : public device::BatteryMonitor {
class TestContentBrowserClient : public ContentBrowserClient {
public:
void ExposeInterfacesToRenderer(
- shell::InterfaceRegistry* registry,
- RenderProcessHost* render_process_host) override {
- registry->AddInterface(base::Bind(&FakeBatteryMonitor::Create));
+ shell::Connection* connection) override {
+ connection->GetInterfaceRegistry()->AddInterface(
+ base::Bind(&FakeBatteryMonitor::Create),
+ content::BrowserThread::GetTaskRunnerForThread(
+ content::BrowserThread::UI));
}
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/browser/browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698