OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 251 |
252 // Initialize and start all installed extensions. | 252 // Initialize and start all installed extensions. |
253 void Init(); | 253 void Init(); |
254 | 254 |
255 // Called when the associated Profile is going to be destroyed. | 255 // Called when the associated Profile is going to be destroyed. |
256 void Shutdown(); | 256 void Shutdown(); |
257 | 257 |
258 // Reloads the specified extension, sending the onLaunched() event to it if it | 258 // Reloads the specified extension, sending the onLaunched() event to it if it |
259 // currently has any window showing. | 259 // currently has any window showing. |
260 // Allows noisy failures. | 260 // Allows noisy failures. |
| 261 // NOTE: Reloading an extension can invalidate |extension_id| and Extension |
| 262 // pointers for the given extension. Consider making a copy of |extension_id| |
| 263 // first and retrieving a new Extension pointer afterwards. |
261 void ReloadExtension(const std::string& extension_id); | 264 void ReloadExtension(const std::string& extension_id); |
262 | 265 |
263 // Suppresses noisy failures. | 266 // Suppresses noisy failures. |
264 void ReloadExtensionWithQuietFailure(const std::string& extension_id); | 267 void ReloadExtensionWithQuietFailure(const std::string& extension_id); |
265 | 268 |
266 // Uninstalls the specified extension. Callers should only call this method | 269 // Uninstalls the specified extension. Callers should only call this method |
267 // with extensions that exist. |reason| lets the caller specify why the | 270 // with extensions that exist. |reason| lets the caller specify why the |
268 // extension is uninstalled. | 271 // extension is uninstalled. |
269 // | 272 // |
270 // If the return value is true, |deletion_done_callback| is invoked when data | 273 // If the return value is true, |deletion_done_callback| is invoked when data |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 GreylistedExtensionDisabled); | 730 GreylistedExtensionDisabled); |
728 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 731 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
729 GreylistDontEnableManuallyDisabled); | 732 GreylistDontEnableManuallyDisabled); |
730 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 733 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
731 GreylistUnknownDontChange); | 734 GreylistUnknownDontChange); |
732 | 735 |
733 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 736 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
734 }; | 737 }; |
735 | 738 |
736 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 739 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |