Chromium Code Reviews| 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 EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
| 6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 | 71 |
| 72 // Invokes the observer method OnExtensionUnloaded(). The extension must not | 72 // Invokes the observer method OnExtensionUnloaded(). The extension must not |
| 73 // be enabled at the time of the call. | 73 // be enabled at the time of the call. |
| 74 void TriggerOnUnloaded(const Extension* extension, | 74 void TriggerOnUnloaded(const Extension* extension, |
| 75 UnloadedExtensionInfo::Reason reason); | 75 UnloadedExtensionInfo::Reason reason); |
| 76 | 76 |
| 77 // If this is a fresh install then |is_update| is false and there must not be | 77 // If this is a fresh install then |is_update| is false and there must not be |
| 78 // any installed extension with |extension|'s ID. If this is an update then | 78 // any installed extension with |extension|'s ID. If this is an update then |
| 79 // |is_update| is true and must be an installed extension with |extension|'s | 79 // |is_update| is true and must be an installed extension with |extension|'s |
| 80 // ID, and |old_name| must be non-empty. | 80 // ID, and |old_name| must be non-empty. |
| 81 // If true, |from_ephemeral| indicates that the extension was previously | |
| 82 // installed ephemerally and has been promoted to a regular installed | |
| 83 // extension. |is_update| should also be true. | |
|
benwells
2014/05/27 01:42:56
Please add a TODO to remove these historical param
tmdiep
2014/05/27 07:46:05
Done.
| |
| 81 void TriggerOnWillBeInstalled(const Extension* extension, | 84 void TriggerOnWillBeInstalled(const Extension* extension, |
| 82 bool is_update, | 85 bool is_update, |
| 86 bool from_ephemeral, | |
| 83 const std::string& old_name); | 87 const std::string& old_name); |
| 84 | 88 |
| 85 // Invokes the observer method OnExtensionUninstalled(). The extension must | 89 // Invokes the observer method OnExtensionUninstalled(). The extension must |
| 86 // not be any installed extension with |extension|'s ID. | 90 // not be any installed extension with |extension|'s ID. |
| 87 void TriggerOnUninstalled(const Extension* extension); | 91 void TriggerOnUninstalled(const Extension* extension); |
| 88 | 92 |
| 89 // Find an extension by ID using |include_mask| to pick the sets to search: | 93 // Find an extension by ID using |include_mask| to pick the sets to search: |
| 90 // * enabled_extensions() --> ExtensionRegistry::ENABLED | 94 // * enabled_extensions() --> ExtensionRegistry::ENABLED |
| 91 // * disabled_extensions() --> ExtensionRegistry::DISABLED | 95 // * disabled_extensions() --> ExtensionRegistry::DISABLED |
| 92 // * terminated_extensions() --> ExtensionRegistry::TERMINATED | 96 // * terminated_extensions() --> ExtensionRegistry::TERMINATED |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 ObserverList<ExtensionRegistryObserver> observers_; | 155 ObserverList<ExtensionRegistryObserver> observers_; |
| 152 | 156 |
| 153 content::BrowserContext* const browser_context_; | 157 content::BrowserContext* const browser_context_; |
| 154 | 158 |
| 155 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); | 159 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); |
| 156 }; | 160 }; |
| 157 | 161 |
| 158 } // namespace extensions | 162 } // namespace extensions |
| 159 | 163 |
| 160 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ | 164 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ |
| OLD | NEW |