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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 // Or don't, because it's probably not something you ever need to know. | 108 // Or don't, because it's probably not something you ever need to know. |
109 virtual const extensions::Extension* GetExtensionById( | 109 virtual const extensions::Extension* GetExtensionById( |
110 const std::string& id, | 110 const std::string& id, |
111 bool include_disabled) const = 0; | 111 bool include_disabled) const = 0; |
112 | 112 |
113 // DEPRECATED: Use ExtensionRegistry instead. | 113 // DEPRECATED: Use ExtensionRegistry instead. |
114 // | 114 // |
115 // Looks up an extension by ID, regardless of whether it's enabled, | 115 // Looks up an extension by ID, regardless of whether it's enabled, |
116 // disabled, blacklisted, or terminated. Use instead: | 116 // disabled, blacklisted, or terminated. Use instead: |
117 // | 117 // |
118 // ExtensionRegistry::GetExtensionById(id, ExtensionRegistry::EVERYTHING). | 118 // ExtensionRegistry::GetInstalledExtension(id). |
119 virtual const extensions::Extension* GetInstalledExtension( | 119 virtual const extensions::Extension* GetInstalledExtension( |
120 const std::string& id) const = 0; | 120 const std::string& id) const = 0; |
121 | 121 |
122 // Returns an update for an extension with the specified id, if installation | 122 // Returns an update for an extension with the specified id, if installation |
123 // of that update was previously delayed because the extension was in use. If | 123 // of that update was previously delayed because the extension was in use. If |
124 // no updates are pending for the extension returns NULL. | 124 // no updates are pending for the extension returns NULL. |
125 virtual const extensions::Extension* GetPendingExtensionUpdate( | 125 virtual const extensions::Extension* GetPendingExtensionUpdate( |
126 const std::string& extension_id) const = 0; | 126 const std::string& extension_id) const = 0; |
127 | 127 |
128 // Finishes installation of an update for an extension with the specified id, | 128 // Finishes installation of an update for an extension with the specified id, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
173 // Manages installed and running Chromium extensions. An instance is shared | 173 // Manages installed and running Chromium extensions. An instance is shared |
174 // between normal and incognito profiles. | 174 // between normal and incognito profiles. |
175 class ExtensionService | 175 class ExtensionService |
176 : public ExtensionServiceInterface, | 176 : public ExtensionServiceInterface, |
177 public extensions::ExternalProviderInterface::VisitorInterface, | 177 public extensions::ExternalProviderInterface::VisitorInterface, |
178 public content::NotificationObserver, | 178 public content::NotificationObserver, |
179 public extensions::Blacklist::Observer, | 179 public extensions::Blacklist::Observer, |
180 public extensions::ExtensionManagement::Observer { | 180 public extensions::ExtensionManagement::Observer { |
181 public: | 181 public: |
182 // Attempts to uninstall an extension from a given ExtensionService. Returns | 182 // Attempts to uninstall an extension from a given ExtensionService. Returns |
183 // true iff the target extension exists. | 183 // true if the target extension exists. |
not at google - send to devlin
2015/06/04 17:41:32
"iff" is correct, it means "if and only if".
babu
2015/06/05 11:16:25
Acknowledged. Thanks!
| |
184 static bool UninstallExtensionHelper(ExtensionService* extensions_service, | 184 static bool UninstallExtensionHelper(ExtensionService* extensions_service, |
185 const std::string& extension_id, | 185 const std::string& extension_id, |
186 extensions::UninstallReason reason); | 186 extensions::UninstallReason reason); |
187 | 187 |
188 // Constructor stores pointers to |profile| and |extension_prefs| but | 188 // Constructor stores pointers to |profile| and |extension_prefs| but |
189 // ownership remains at caller. | 189 // ownership remains at caller. |
190 ExtensionService(Profile* profile, | 190 ExtensionService(Profile* profile, |
191 const base::CommandLine* command_line, | 191 const base::CommandLine* command_line, |
192 const base::FilePath& install_directory, | 192 const base::FilePath& install_directory, |
193 extensions::ExtensionPrefs* extension_prefs, | 193 extensions::ExtensionPrefs* extension_prefs, |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
764 GreylistUnknownDontChange); | 764 GreylistUnknownDontChange); |
765 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 765 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
766 ManagementPolicyProhibitsEnableOnInstalled); | 766 ManagementPolicyProhibitsEnableOnInstalled); |
767 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 767 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
768 BlockAndUnblockBlacklistedExtension); | 768 BlockAndUnblockBlacklistedExtension); |
769 | 769 |
770 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 770 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
771 }; | 771 }; |
772 | 772 |
773 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 773 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |