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

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: 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..45a386afebf482fca8b3bf2783230bba20ff32a7 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,8 +4,11 @@
#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"
@@ -13,8 +16,12 @@
namespace arc {
ArcBootPhaseMonitorBridge::ArcBootPhaseMonitorBridge(
- ArcBridgeService* bridge_service)
- : ArcService(bridge_service), binding_(this) {
+ ArcBridgeService* bridge_service,
+ Profile* profile)
+ : ArcService(bridge_service),
+ profile(profile),
+ binding_(this),
+ weak_ptr_factory_(this) {
DCHECK(thread_checker_.CalledOnValidThread());
arc_bridge_service()->boot_phase_monitor()->AddObserver(this);
}
@@ -42,11 +49,19 @@ void ArcBootPhaseMonitorBridge::OnBootCompleted() {
chromeos::SessionManagerClient* session_manager_client =
chromeos::DBusThreadManager::Get()->GetSessionManagerClient();
- session_manager_client->EmitArcBooted();
+ session_manager_client->EmitArcBooted(
+ cryptohome::Identification(
+ multi_user_util::GetAccountIdFromProfile(profile)),
+ base::Bind(&ArcBootPhaseMonitorBridge::OnEmitArcBooted,
+ weak_ptr_factory_.GetWeakPtr()));
// Start monitoring window activation changes to prioritize/throttle the
// container when needed.
throttle_ = base::MakeUnique<ArcInstanceThrottle>();
}
+void ArcBootPhaseMonitorBridge::OnEmitArcBooted(bool success) {
+ LOG_IF(ERROR, !success) << "Failed to emit arc booted signal.";
hidehiko 2017/02/15 18:48:09 Optional: how about VLOG on success?
Luis Héctor Chávez 2017/02/15 19:02:11 This does not touch any members, so please remove
xzhou 2017/02/16 18:34:49 Done.
xzhou 2017/02/16 18:34:49 Moved to Line 18. Done
xzhou 2017/02/16 18:34:49 Done.
xzhou 2017/02/16 18:34:49 Moved to Line 18. Done
+}
+
} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698