Chromium Code Reviews| Index: chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h |
| diff --git a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h |
| index 79ed66a9176dc73f39f7f37ef5662a5d3c64513b..1ef2b9825f22d286a83678c4fb18d6ee611da8b7 100644 |
| --- a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h |
| +++ b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h |
| @@ -8,7 +8,9 @@ |
| #include "base/macros.h" |
| #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_launcher.h" |
| #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h" |
| +#include "chrome/browser/profiles/profile.h" |
|
Luis Héctor Chávez
2016/12/16 16:33:46
nit: You can remove this (as well as L16) since yo
Sergey Poromov
2016/12/16 17:00:30
Can't get rid of including profile.h as I need to
hidehiko
2016/12/19 13:53:33
You can use forward decl in the header file, and t
Sergey Poromov
2016/12/19 17:28:38
In that case I get
../../chrome/browser/chromeos/a
hidehiko
2016/12/19 17:39:18
Profile lives in a global namespace.
https://cs.ch
Sergey Poromov
2016/12/20 10:56:51
I realized that the problem was originally because
|
| #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| +#include "components/arc/kiosk/arc_kiosk_bridge.h" |
| #include "components/keyed_service/core/keyed_service.h" |
| #include "components/prefs/pref_change_registrar.h" |
| #include "content/public/browser/browser_context.h" |
| @@ -24,11 +26,15 @@ namespace chromeos { |
| class ArcKioskAppService |
| : public KeyedService, |
| public ArcAppListPrefs::Observer, |
| - public ArcKioskAppManager::ArcKioskAppManagerObserver { |
| + public ArcKioskAppManager::ArcKioskAppManagerObserver, |
| + public arc::ArcKioskBridge::Delegate { |
| public: |
| - static ArcKioskAppService* Create(Profile* profile, ArcAppListPrefs* prefs); |
| + static ArcKioskAppService* Create(Profile* profile); |
| static ArcKioskAppService* Get(content::BrowserContext* context); |
| + // KeyedService overrides |
| + void Shutdown() override; |
| + |
| // ArcAppListPrefs::Observer overrides |
| void OnAppRegistered(const std::string& app_id, |
| const ArcAppListPrefs::AppInfo& app_info) override; |
| @@ -43,8 +49,12 @@ class ArcKioskAppService |
| // ArcKioskAppManager::Observer overrides |
| void OnArcKioskAppsChanged() override; |
| + // ArcKioskBridge::Delegate overrides |
| + void OnMaintenanceSessionCreated() override; |
| + void OnMaintenanceSessionFinished() override; |
| + |
| private: |
| - ArcKioskAppService(Profile* profile, ArcAppListPrefs* prefs); |
| + explicit ArcKioskAppService(Profile* profile); |
| ~ArcKioskAppService() override; |
| std::string GetAppId(); |
| @@ -52,7 +62,7 @@ class ArcKioskAppService |
| void PreconditionsChanged(); |
| Profile* const profile_; |
| - ArcAppListPrefs* const prefs_; |
| + bool maintenance_session_running_; |
| ArcKioskAppManager* app_manager_; |
| std::string app_id_; |
| std::unique_ptr<ArcAppListPrefs::AppInfo> app_info_; |