Index: chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc |
diff --git a/chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc b/chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc |
index 458e823042e212fdafd7e11ee45f463e70d0bcb8..365a5a1f610cd3f513cc71c1d3da6e3e928e8ff1 100644 |
--- a/chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc |
+++ b/chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc |
@@ -4,17 +4,30 @@ |
#include "chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.h" |
+#include "base/bind.h" |
#include "base/logging.h" |
#include "chrome/browser/chromeos/arc/boot_phase_monitor/arc_instance_throttle.h" |
+#include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
+#include "chromeos/cryptohome/cryptohome_parameters.h" |
#include "chromeos/dbus/dbus_thread_manager.h" |
#include "chromeos/dbus/session_manager_client.h" |
#include "components/arc/arc_bridge_service.h" |
+namespace { |
+ |
+void OnEmitArcBooted(bool success) { |
+ if (!success) |
+ VLOG(1) << "Failed to emit arc booted signal."; |
+} |
+ |
+} // namespace |
+ |
namespace arc { |
ArcBootPhaseMonitorBridge::ArcBootPhaseMonitorBridge( |
- ArcBridgeService* bridge_service) |
- : ArcService(bridge_service), binding_(this) { |
+ ArcBridgeService* bridge_service, |
+ const AccountId& account_id) |
+ : ArcService(bridge_service), account_id_(account_id), binding_(this) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
arc_bridge_service()->boot_phase_monitor()->AddObserver(this); |
} |
@@ -42,11 +55,11 @@ void ArcBootPhaseMonitorBridge::OnBootCompleted() { |
chromeos::SessionManagerClient* session_manager_client = |
chromeos::DBusThreadManager::Get()->GetSessionManagerClient(); |
- session_manager_client->EmitArcBooted(); |
+ session_manager_client->EmitArcBooted(cryptohome::Identification(account_id_), |
+ base::Bind(&OnEmitArcBooted)); |
// Start monitoring window activation changes to prioritize/throttle the |
// container when needed. |
throttle_ = base::MakeUnique<ArcInstanceThrottle>(); |
} |
- |
} // namespace arc |
Luis Héctor Chávez
2017/02/16 20:23:46
nit: keep the newline above (for symmetry with L26
xzhou
2017/02/16 21:48:25
Done.
|