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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_app_update_service.h

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void OnRebootRequested(Reason reason) override; 61 void OnRebootRequested(Reason reason) override;
62 void WillDestroyAutomaticRebootManager() override; 62 void WillDestroyAutomaticRebootManager() override;
63 63
64 // KioskAppManagerObserver overrides: 64 // KioskAppManagerObserver overrides:
65 void OnKioskAppCacheUpdated(const std::string& app_id) override; 65 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 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);
76 }; 76 };
77 77
78 // Singleton that owns all KioskAppUpdateServices and associates them with 78 // Singleton that owns all KioskAppUpdateServices and associates them with
79 // profiles. 79 // profiles.
80 class KioskAppUpdateServiceFactory : public BrowserContextKeyedServiceFactory { 80 class KioskAppUpdateServiceFactory : public BrowserContextKeyedServiceFactory {
81 public: 81 public:
(...skipping 11 matching lines...) Expand all
93 ~KioskAppUpdateServiceFactory() override; 93 ~KioskAppUpdateServiceFactory() override;
94 94
95 // BrowserContextKeyedServiceFactory overrides: 95 // BrowserContextKeyedServiceFactory overrides:
96 KeyedService* BuildServiceInstanceFor( 96 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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698