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..af37240a40b278638b9489abb0b88b20c89d0934 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,29 @@ |
#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" |
+#include "components/signin/core/account_id/account_id.h" |
Yusuke Sato
2017/02/16 18:42:58
remove. you already did it in .h (and not using fo
xzhou
2017/02/16 20:17:32
Done. Thanks for the link.
|
+ |
+namespace { |
+void OnEmitArcBooted(bool success) { |
Yusuke Sato
2017/02/16 18:42:58
space between L17/L18
xzhou
2017/02/16 20:17:31
Done.
|
+ if (!success) |
+ VLOG(1) << "Failed to emit arc booted signal."; |
+} |
Yusuke Sato
2017/02/16 18:42:58
same as above
xzhou
2017/02/16 20:17:32
Done.
|
+} |
Yusuke Sato
2017/02/16 18:42:58
} // namespace
xzhou
2017/02/16 20:17:31
Done.
|
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 +54,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 |