| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 bool include_disabled) const = 0; | 114 bool include_disabled) const = 0; |
| 115 virtual const extensions::Extension* GetInstalledExtension( | 115 virtual const extensions::Extension* GetInstalledExtension( |
| 116 const std::string& id) const = 0; | 116 const std::string& id) const = 0; |
| 117 | 117 |
| 118 virtual bool IsExtensionEnabled(const std::string& extension_id) const = 0; | 118 virtual bool IsExtensionEnabled(const std::string& extension_id) const = 0; |
| 119 virtual bool IsExternalExtensionUninstalled( | 119 virtual bool IsExternalExtensionUninstalled( |
| 120 const std::string& extension_id) const = 0; | 120 const std::string& extension_id) const = 0; |
| 121 | 121 |
| 122 virtual void UpdateExtensionBlacklist( | 122 virtual void UpdateExtensionBlacklist( |
| 123 const std::vector<std::string>& blacklist) = 0; | 123 const std::vector<std::string>& blacklist) = 0; |
| 124 virtual void CheckAdminBlacklist() = 0; | 124 virtual void CheckManagementPolicy() = 0; |
| 125 | 125 |
| 126 // Safe to call multiple times in a row. | 126 // Safe to call multiple times in a row. |
| 127 // | 127 // |
| 128 // TODO(akalin): Remove this method (and others) once we refactor | 128 // TODO(akalin): Remove this method (and others) once we refactor |
| 129 // themes sync to not use it directly. | 129 // themes sync to not use it directly. |
| 130 virtual void CheckForUpdatesSoon() = 0; | 130 virtual void CheckForUpdatesSoon() = 0; |
| 131 | 131 |
| 132 virtual void AddExtension(const extensions::Extension* extension) = 0; | 132 virtual void AddExtension(const extensions::Extension* extension) = 0; |
| 133 | 133 |
| 134 virtual void UnloadExtension( | 134 virtual void UnloadExtension( |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 406 |
| 407 // Initializes the |extension|'s active permission set and disables the | 407 // Initializes the |extension|'s active permission set and disables the |
| 408 // extension if the privilege level has increased (e.g., due to an upgrade). | 408 // extension if the privilege level has increased (e.g., due to an upgrade). |
| 409 void InitializePermissions(const extensions::Extension* extension); | 409 void InitializePermissions(const extensions::Extension* extension); |
| 410 | 410 |
| 411 // Go through each extensions in pref, unload blacklisted extensions | 411 // Go through each extensions in pref, unload blacklisted extensions |
| 412 // and update the blacklist state in pref. | 412 // and update the blacklist state in pref. |
| 413 virtual void UpdateExtensionBlacklist( | 413 virtual void UpdateExtensionBlacklist( |
| 414 const std::vector<std::string>& blacklist) OVERRIDE; | 414 const std::vector<std::string>& blacklist) OVERRIDE; |
| 415 | 415 |
| 416 // Go through each extension and unload those that the network admin has | 416 // Go through each extension and unload those that are not allowed to run by |
| 417 // put on the blacklist (not to be confused with the Google-managed blacklist) | 417 // management policy providers (ie. network admin and Google-managed |
| 418 // set of extensions. | 418 // blacklist). |
| 419 virtual void CheckAdminBlacklist() OVERRIDE; | 419 virtual void CheckManagementPolicy() OVERRIDE; |
| 420 | 420 |
| 421 virtual void CheckForUpdatesSoon() OVERRIDE; | 421 virtual void CheckForUpdatesSoon() OVERRIDE; |
| 422 | 422 |
| 423 // syncer::SyncableService implementation. | 423 // syncer::SyncableService implementation. |
| 424 virtual syncer::SyncError MergeDataAndStartSyncing( | 424 virtual syncer::SyncError MergeDataAndStartSyncing( |
| 425 syncer::ModelType type, | 425 syncer::ModelType type, |
| 426 const syncer::SyncDataList& initial_sync_data, | 426 const syncer::SyncDataList& initial_sync_data, |
| 427 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 427 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
| 428 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE; | 428 scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE; |
| 429 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 429 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 #endif | 863 #endif |
| 864 | 864 |
| 865 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 865 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 866 InstallAppsWithUnlimtedStorage); | 866 InstallAppsWithUnlimtedStorage); |
| 867 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 867 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 868 InstallAppsAndCheckStorageProtection); | 868 InstallAppsAndCheckStorageProtection); |
| 869 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 869 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 870 }; | 870 }; |
| 871 | 871 |
| 872 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 872 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |