OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_UPDATE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_UPDATE_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_UPDATE_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_UPDATE_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void set_app_id(const std::string& app_id) { app_id_ = app_id; } | 43 void set_app_id(const std::string& app_id) { app_id_ = app_id; } |
44 std::string get_app_id() const { return app_id_; } | 44 std::string get_app_id() const { return app_id_; } |
45 | 45 |
46 private: | 46 private: |
47 friend class KioskAppUpdateServiceTest; | 47 friend class KioskAppUpdateServiceTest; |
48 | 48 |
49 void StartAppUpdateRestartTimer(); | 49 void StartAppUpdateRestartTimer(); |
50 void ForceAppUpdateRestart(); | 50 void ForceAppUpdateRestart(); |
51 | 51 |
52 // KeyedService overrides: | 52 // KeyedService overrides: |
53 virtual void Shutdown() OVERRIDE; | 53 virtual void Shutdown() override; |
54 | 54 |
55 // extensions::UpdateObserver overrides: | 55 // extensions::UpdateObserver overrides: |
56 virtual void OnAppUpdateAvailable( | 56 virtual void OnAppUpdateAvailable( |
57 const extensions::Extension* extension) OVERRIDE; | 57 const extensions::Extension* extension) override; |
58 virtual void OnChromeUpdateAvailable() OVERRIDE {} | 58 virtual void OnChromeUpdateAvailable() override {} |
59 | 59 |
60 // system::AutomaticRebootManagerObserver overrides: | 60 // system::AutomaticRebootManagerObserver overrides: |
61 virtual void OnRebootScheduled(Reason reason) OVERRIDE; | 61 virtual void OnRebootScheduled(Reason reason) override; |
62 virtual void WillDestroyAutomaticRebootManager() OVERRIDE; | 62 virtual void WillDestroyAutomaticRebootManager() override; |
63 | 63 |
64 // KioskAppManagerObserver overrides: | 64 // KioskAppManagerObserver overrides: |
65 virtual void OnKioskAppCacheUpdated(const std::string& app_id) OVERRIDE; | 65 virtual void OnKioskAppCacheUpdated(const std::string& app_id) override; |
66 | 66 |
67 Profile* profile_; | 67 Profile* profile_; |
68 std::string app_id_; | 68 std::string app_id_; |
69 | 69 |
70 // After we detect an upgrade we start a one-short timer to force restart. | 70 // After we detect an upgrade we start a one-short timer to force restart. |
71 base::OneShotTimer<KioskAppUpdateService> restart_timer_; | 71 base::OneShotTimer<KioskAppUpdateService> restart_timer_; |
72 | 72 |
73 system::AutomaticRebootManager* automatic_reboot_manager_; // Not owned. | 73 system::AutomaticRebootManager* automatic_reboot_manager_; // Not owned. |
74 | 74 |
75 DISALLOW_COPY_AND_ASSIGN(KioskAppUpdateService); | 75 DISALLOW_COPY_AND_ASSIGN(KioskAppUpdateService); |
(...skipping 11 matching lines...) Expand all Loading... |
87 static KioskAppUpdateServiceFactory* GetInstance(); | 87 static KioskAppUpdateServiceFactory* GetInstance(); |
88 | 88 |
89 private: | 89 private: |
90 friend struct DefaultSingletonTraits<KioskAppUpdateServiceFactory>; | 90 friend struct DefaultSingletonTraits<KioskAppUpdateServiceFactory>; |
91 | 91 |
92 KioskAppUpdateServiceFactory(); | 92 KioskAppUpdateServiceFactory(); |
93 virtual ~KioskAppUpdateServiceFactory(); | 93 virtual ~KioskAppUpdateServiceFactory(); |
94 | 94 |
95 // BrowserContextKeyedServiceFactory overrides: | 95 // BrowserContextKeyedServiceFactory overrides: |
96 virtual KeyedService* BuildServiceInstanceFor( | 96 virtual KeyedService* BuildServiceInstanceFor( |
97 content::BrowserContext* profile) const OVERRIDE; | 97 content::BrowserContext* profile) const override; |
98 }; | 98 }; |
99 | 99 |
100 } // namespace chromeos | 100 } // namespace chromeos |
101 | 101 |
102 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_UPDATE_SERVICE_H_ | 102 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_UPDATE_SERVICE_H_ |
OLD | NEW |