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

Unified Diff: chrome/browser/chromeos/arc/boot_phase_monitor/arc_boot_phase_monitor_bridge.cc

Issue 2693013006: arc: Add cryptohome_id to EmitArcBooted. (Closed)
Patch Set: Address Luis's comments. Created 3 years, 10 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
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..9792fdf55c3a1c5169db30d2a41f09ec05cf145e 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,7 +55,8 @@ 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.

Powered by Google App Engine
This is Rietveld 408576698