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_APPS_EPHEMERAL_APP_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_APPS_EPHEMERAL_APP_SERVICE_H_ |
6 #define CHROME_BROWSER_APPS_EPHEMERAL_APP_SERVICE_H_ | 6 #define CHROME_BROWSER_APPS_EPHEMERAL_APP_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 // extensions::ExtensionRegistryObserver. | 61 // extensions::ExtensionRegistryObserver. |
62 virtual void OnExtensionWillBeInstalled( | 62 virtual void OnExtensionWillBeInstalled( |
63 content::BrowserContext* browser_context, | 63 content::BrowserContext* browser_context, |
64 const extensions::Extension* extension, | 64 const extensions::Extension* extension, |
65 bool is_update, | 65 bool is_update, |
66 bool from_ephemeral, | 66 bool from_ephemeral, |
67 const std::string& old_name) OVERRIDE; | 67 const std::string& old_name) OVERRIDE; |
68 virtual void OnExtensionUninstalled( | 68 virtual void OnExtensionUninstalled( |
69 content::BrowserContext* browser_context, | 69 content::BrowserContext* browser_context, |
70 const extensions::Extension* extension) OVERRIDE; | 70 const extensions::Extension* extension, |
| 71 extensions::UninstallReason reason) OVERRIDE; |
71 | 72 |
72 void Init(); | 73 void Init(); |
73 void InitEphemeralAppCount(); | 74 void InitEphemeralAppCount(); |
74 | 75 |
75 // Garbage collect ephemeral apps. | 76 // Garbage collect ephemeral apps. |
76 void TriggerGarbageCollect(const base::TimeDelta& delay); | 77 void TriggerGarbageCollect(const base::TimeDelta& delay); |
77 void GarbageCollectApps(); | 78 void GarbageCollectApps(); |
78 static void GetAppsToRemove(int app_count, | 79 static void GetAppsToRemove(int app_count, |
79 const LaunchTimeAppMap& app_launch_times, | 80 const LaunchTimeAppMap& app_launch_times, |
80 std::set<std::string>* remove_app_ids); | 81 std::set<std::string>* remove_app_ids); |
(...skipping 10 matching lines...) Expand all Loading... |
91 // The count of cached ephemeral apps. | 92 // The count of cached ephemeral apps. |
92 int ephemeral_app_count_; | 93 int ephemeral_app_count_; |
93 | 94 |
94 friend class EphemeralAppServiceTest; | 95 friend class EphemeralAppServiceTest; |
95 friend class EphemeralAppServiceBrowserTest; | 96 friend class EphemeralAppServiceBrowserTest; |
96 | 97 |
97 DISALLOW_COPY_AND_ASSIGN(EphemeralAppService); | 98 DISALLOW_COPY_AND_ASSIGN(EphemeralAppService); |
98 }; | 99 }; |
99 | 100 |
100 #endif // CHROME_BROWSER_APPS_EPHEMERAL_APP_SERVICE_H_ | 101 #endif // CHROME_BROWSER_APPS_EPHEMERAL_APP_SERVICE_H_ |
OLD | NEW |