OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 const ExternalInstallError* error() { return error_.get(); } | 52 const ExternalInstallError* error() { return error_.get(); } |
53 | 53 |
54 // Returns a mutable copy of the error for testing purposes. | 54 // Returns a mutable copy of the error for testing purposes. |
55 ExternalInstallError* error_for_testing() { return error_.get(); } | 55 ExternalInstallError* error_for_testing() { return error_.get(); } |
56 | 56 |
57 private: | 57 private: |
58 // ExtensionRegistryObserver implementation. | 58 // ExtensionRegistryObserver implementation. |
59 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, | 59 virtual void OnExtensionLoaded(content::BrowserContext* browser_context, |
60 const Extension* extension) OVERRIDE; | 60 const Extension* extension) OVERRIDE; |
61 virtual void OnExtensionInstalled(content::BrowserContext* browser_context, | 61 virtual void OnExtensionInstalled(content::BrowserContext* browser_context, |
62 const Extension* extension) OVERRIDE; | 62 const Extension* extension, |
| 63 bool is_update) OVERRIDE; |
63 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, | 64 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, |
64 const Extension* extension) OVERRIDE; | 65 const Extension* extension) OVERRIDE; |
65 | 66 |
66 // content::NotificationObserver implementation. | 67 // content::NotificationObserver implementation. |
67 virtual void Observe(int type, | 68 virtual void Observe(int type, |
68 const content::NotificationSource& source, | 69 const content::NotificationSource& source, |
69 const content::NotificationDetails& details) OVERRIDE; | 70 const content::NotificationDetails& details) OVERRIDE; |
70 | 71 |
71 // Adds a global error informing the user that an external extension was | 72 // Adds a global error informing the user that an external extension was |
72 // installed. If |is_new_profile| is true, then this error is from the first | 73 // installed. If |is_new_profile| is true, then this error is from the first |
(...skipping 20 matching lines...) Expand all Loading... |
93 | 94 |
94 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 95 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
95 extension_registry_observer_; | 96 extension_registry_observer_; |
96 | 97 |
97 DISALLOW_COPY_AND_ASSIGN(ExternalInstallManager); | 98 DISALLOW_COPY_AND_ASSIGN(ExternalInstallManager); |
98 }; | 99 }; |
99 | 100 |
100 } // namespace extensions | 101 } // namespace extensions |
101 | 102 |
102 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ | 103 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_MANAGER_H_ |
OLD | NEW |