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 <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
186 // TODO(aa): This method can be removed. ExtensionUpdater could use | 186 // TODO(aa): This method can be removed. ExtensionUpdater could use |
187 // CrxInstaller directly instead. | 187 // CrxInstaller directly instead. |
188 virtual bool UpdateExtension( | 188 virtual bool UpdateExtension( |
189 const std::string& id, | 189 const std::string& id, |
190 const base::FilePath& extension_path, | 190 const base::FilePath& extension_path, |
191 bool file_ownership_passed, | 191 bool file_ownership_passed, |
192 extensions::CrxInstaller** out_crx_installer) OVERRIDE; | 192 extensions::CrxInstaller** out_crx_installer) OVERRIDE; |
193 | 193 |
194 // Reloads the specified extension, sending the onLaunched() event to it if it | 194 // Reloads the specified extension, sending the onLaunched() event to it if it |
195 // currently has any window showing. | 195 // currently has any window showing. |
196 void ReloadExtension(const std::string extension_id); | 196 void ReloadExtension(const std::string& extension_id); |
Marijn Kruisselbrink
2014/05/19 20:10:32
Is this safe? Presumably the same comment as in Un
not at google - send to devlin
2014/05/19 20:32:10
Ah. Good point, very subtle.
"const std::string"
| |
197 | 197 |
198 // Uninstalls the specified extension. Callers should only call this method | 198 // Uninstalls the specified extension. Callers should only call this method |
199 // with extensions that exist. |external_uninstall| is a magical parameter | 199 // with extensions that exist. |external_uninstall| is a magical parameter |
200 // that is only used to send information to ExtensionPrefs, which external | 200 // that is only used to send information to ExtensionPrefs, which external |
201 // callers should never set to true. | 201 // callers should never set to true. |
202 // | 202 // |
203 // We pass the |extension_id| by value to avoid having it deleted from under | 203 // We pass the |extension_id| by value to avoid having it deleted from under |
204 // us incase someone calls it with Extension::id() or another string that we | 204 // us incase someone calls it with Extension::id() or another string that we |
205 // are going to delete in this function. | 205 // are going to delete in this function. |
206 // | 206 // |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
700 InstallAppsWithUnlimtedStorage); | 700 InstallAppsWithUnlimtedStorage); |
701 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 701 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
702 InstallAppsAndCheckStorageProtection); | 702 InstallAppsAndCheckStorageProtection); |
703 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, SetUnsetBlacklistInPrefs); | 703 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, SetUnsetBlacklistInPrefs); |
704 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 704 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
705 BlacklistedExtensionWillNotInstall); | 705 BlacklistedExtensionWillNotInstall); |
706 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 706 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
707 UnloadBlacklistedExtensionPolicy); | 707 UnloadBlacklistedExtensionPolicy); |
708 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 708 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
709 WillNotLoadBlacklistedExtensionsFromDirectory); | 709 WillNotLoadBlacklistedExtensionsFromDirectory); |
710 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 710 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, ReloadBlacklistedExtension); |
711 BlacklistedInPrefsFromStartup); | 711 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, BlacklistedInPrefsFromStartup); |
712 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 712 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
713 GreylistedExtensionDisabled); | 713 GreylistedExtensionDisabled); |
714 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 714 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
715 GreylistDontEnableManuallyDisabled); | 715 GreylistDontEnableManuallyDisabled); |
716 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 716 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
717 GreylistUnknownDontChange); | 717 GreylistUnknownDontChange); |
718 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 718 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
719 }; | 719 }; |
720 | 720 |
721 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 721 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |