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_SHORTCUT_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ |
6 #define CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ | 6 #define CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ |
7 | 7 |
8 #include "base/scoped_observer.h" | 8 #include "base/scoped_observer.h" |
9 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 9 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
10 #include "components/keyed_service/core/keyed_service.h" | 10 #include "components/keyed_service/core/keyed_service.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // content::NotificationObserver. | 43 // content::NotificationObserver. |
44 virtual void Observe(int type, | 44 virtual void Observe(int type, |
45 const content::NotificationSource& source, | 45 const content::NotificationSource& source, |
46 const content::NotificationDetails& details) OVERRIDE; | 46 const content::NotificationDetails& details) OVERRIDE; |
47 | 47 |
48 // extensions::ExtensionRegistryObserver. | 48 // extensions::ExtensionRegistryObserver. |
49 virtual void OnExtensionWillBeInstalled( | 49 virtual void OnExtensionWillBeInstalled( |
50 content::BrowserContext* browser_context, | 50 content::BrowserContext* browser_context, |
51 const extensions::Extension* extension, | 51 const extensions::Extension* extension, |
52 bool is_update, | 52 bool is_update, |
| 53 bool from_ephemeral, |
53 const std::string& old_name) OVERRIDE; | 54 const std::string& old_name) OVERRIDE; |
54 virtual void OnExtensionUninstalled( | 55 virtual void OnExtensionUninstalled( |
55 content::BrowserContext* browser_context, | 56 content::BrowserContext* browser_context, |
56 const extensions::Extension* extension) OVERRIDE; | 57 const extensions::Extension* extension) OVERRIDE; |
57 | 58 |
58 // ProfileInfoCacheObserver. | 59 // ProfileInfoCacheObserver. |
59 virtual void OnProfileWillBeRemoved( | 60 virtual void OnProfileWillBeRemoved( |
60 const base::FilePath& profile_path) OVERRIDE; | 61 const base::FilePath& profile_path) OVERRIDE; |
61 | 62 |
62 private: | 63 private: |
63 void DeleteApplicationShortcuts(const extensions::Extension* extension); | 64 void DeleteApplicationShortcuts(const extensions::Extension* extension); |
64 | 65 |
65 content::NotificationRegistrar registrar_; | 66 content::NotificationRegistrar registrar_; |
66 Profile* profile_; | 67 Profile* profile_; |
67 bool is_profile_info_cache_observer_; | 68 bool is_profile_info_cache_observer_; |
68 PrefService* prefs_; | 69 PrefService* prefs_; |
69 | 70 |
70 ScopedObserver<extensions::ExtensionRegistry, | 71 ScopedObserver<extensions::ExtensionRegistry, |
71 extensions::ExtensionRegistryObserver> | 72 extensions::ExtensionRegistryObserver> |
72 extension_registry_observer_; | 73 extension_registry_observer_; |
73 | 74 |
74 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); | 75 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); |
75 }; | 76 }; |
76 | 77 |
77 #endif // CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ | 78 #endif // CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ |
OLD | NEW |