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/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/scoped_observer.h" | 9 #include "base/scoped_observer.h" |
10 #include "chrome/browser/profiles/profile_info_cache_observer.h" | 10 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // extensions::ExtensionRegistryObserver. | 41 // extensions::ExtensionRegistryObserver. |
42 virtual void OnExtensionWillBeInstalled( | 42 virtual void OnExtensionWillBeInstalled( |
43 content::BrowserContext* browser_context, | 43 content::BrowserContext* browser_context, |
44 const extensions::Extension* extension, | 44 const extensions::Extension* extension, |
45 bool is_update, | 45 bool is_update, |
46 bool from_ephemeral, | 46 bool from_ephemeral, |
47 const std::string& old_name) OVERRIDE; | 47 const std::string& old_name) OVERRIDE; |
48 virtual void OnExtensionUninstalled( | 48 virtual void OnExtensionUninstalled( |
49 content::BrowserContext* browser_context, | 49 content::BrowserContext* browser_context, |
50 const extensions::Extension* extension) OVERRIDE; | 50 const extensions::Extension* extension, |
| 51 extensions::UninstallReason reason) OVERRIDE; |
51 | 52 |
52 // ProfileInfoCacheObserver. | 53 // ProfileInfoCacheObserver. |
53 virtual void OnProfileWillBeRemoved( | 54 virtual void OnProfileWillBeRemoved( |
54 const base::FilePath& profile_path) OVERRIDE; | 55 const base::FilePath& profile_path) OVERRIDE; |
55 | 56 |
56 private: | 57 private: |
57 void DeleteApplicationShortcuts(const extensions::Extension* extension); | 58 void DeleteApplicationShortcuts(const extensions::Extension* extension); |
58 | 59 |
59 Profile* profile_; | 60 Profile* profile_; |
60 bool is_profile_info_cache_observer_; | 61 bool is_profile_info_cache_observer_; |
61 PrefService* prefs_; | 62 PrefService* prefs_; |
62 | 63 |
63 ScopedObserver<extensions::ExtensionRegistry, | 64 ScopedObserver<extensions::ExtensionRegistry, |
64 extensions::ExtensionRegistryObserver> | 65 extensions::ExtensionRegistryObserver> |
65 extension_registry_observer_; | 66 extension_registry_observer_; |
66 | 67 |
67 base::WeakPtrFactory<AppShortcutManager> weak_ptr_factory_; | 68 base::WeakPtrFactory<AppShortcutManager> weak_ptr_factory_; |
68 | 69 |
69 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); | 70 DISALLOW_COPY_AND_ASSIGN(AppShortcutManager); |
70 }; | 71 }; |
71 | 72 |
72 #endif // CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ | 73 #endif // CHROME_BROWSER_APPS_SHORTCUT_MANAGER_H_ |
OLD | NEW |