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

Unified Diff: content/child/child_thread_impl.cc

Issue 2460823002: Decouple Power Monitor from //content. (Closed)
Patch Set: code rebase Created 4 years, 1 month 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/child/BUILD.gn ('k') | content/child/power_monitor_broadcast_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 927427d2d59ebb1036ed206723f3800312d0f9f4..e05b623a8526f4be4b77533414cd2cd0e4601b26 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -42,7 +42,6 @@
#include "content/child/fileapi/webfilesystem_impl.h"
#include "content/child/memory/child_memory_message_filter.h"
#include "content/child/notifications/notification_dispatcher.h"
-#include "content/child/power_monitor_broadcast_source.h"
#include "content/child/push_messaging/push_dispatcher.h"
#include "content/child/quota_dispatcher.h"
#include "content/child/quota_message_filter.h"
@@ -56,6 +55,7 @@
#include "content/public/common/mojo_channel_switches.h"
#include "content/public/common/service_manager_connection.h"
#include "content/public/common/service_names.h"
+#include "device/power_monitor/public/cpp/power_monitor_broadcast_source.h"
#include "ipc/ipc_channel_mojo.h"
#include "ipc/ipc_logging.h"
#include "ipc/ipc_platform_file.h"
@@ -538,8 +538,9 @@ void ChildThreadImpl::Init(const Options& options) {
// In single process mode we may already have a power monitor
if (!base::PowerMonitor::Get()) {
- std::unique_ptr<PowerMonitorBroadcastSource> power_monitor_source(
- new PowerMonitorBroadcastSource());
+ std::unique_ptr<device::PowerMonitorBroadcastSource> power_monitor_source(
+ new device::PowerMonitorBroadcastSource(GetRemoteInterfaces()));
+
power_monitor_.reset(
new base::PowerMonitor(std::move(power_monitor_source)));
}
« no previous file with comments | « content/child/BUILD.gn ('k') | content/child/power_monitor_broadcast_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698