Chromium Code Reviews| Index: chrome/browser/chromeos/arc/kiosk/arc_kiosk_bridge.cc |
| diff --git a/components/arc/kiosk/arc_kiosk_bridge.cc b/chrome/browser/chromeos/arc/kiosk/arc_kiosk_bridge.cc |
| similarity index 61% |
| rename from components/arc/kiosk/arc_kiosk_bridge.cc |
| rename to chrome/browser/chromeos/arc/kiosk/arc_kiosk_bridge.cc |
| index bb915bb984c3e7a9427f917bb39cb58ea19cbc4d..c7d54c5258e0d34f106e573ca7f58129895e3c8e 100644 |
| --- a/components/arc/kiosk/arc_kiosk_bridge.cc |
| +++ b/chrome/browser/chromeos/arc/kiosk/arc_kiosk_bridge.cc |
| @@ -2,10 +2,24 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "components/arc/kiosk/arc_kiosk_bridge.h" |
| +#include "chrome/browser/chromeos/arc/kiosk/arc_kiosk_bridge.h" |
| +#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h" |
| +#include "chrome/browser/chromeos/profiles/profile_helper.h" |
| +#include "chrome/browser/profiles/profile.h" |
| #include "components/arc/arc_bridge_service.h" |
| #include "components/arc/arc_service_manager.h" |
| +#include "components/user_manager/user.h" |
| + |
| +namespace { |
| + |
| +Profile* GetProfile() { |
| + const user_manager::User* const primary_user = |
| + user_manager::UserManager::Get()->GetPrimaryUser(); |
| + return chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user); |
| +} |
| + |
| +} // namespace |
| namespace arc { |
| @@ -26,12 +40,13 @@ void ArcKioskBridge::OnInstanceReady() { |
| } |
| void ArcKioskBridge::OnMaintenanceSessionCreated(int32_t session_id) { |
| + chromeos::ArcKioskAppService::Get(GetProfile())->MaintenanceSessionCreated(); |
|
Luis Héctor Chávez
2016/11/22 21:15:30
Seems like you don't *need* the real Profile. A Br
Sergey Poromov
2016/11/23 13:45:33
There can't be any BrowserContext in components/ar
|
| // TODO(poromov@) Show appropriate splash screen. |
| } |
| void ArcKioskBridge::OnMaintenanceSessionFinished(int32_t session_id, |
| bool success) { |
| - // TODO(poromov@) Start kiosk app. |
| + chromeos::ArcKioskAppService::Get(GetProfile())->MaintenanceSessionFinished(); |
| } |
| } // namespace arc |