| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 // Called when the initial extensions load has completed. | 366 // Called when the initial extensions load has completed. |
| 367 virtual void OnLoadedInstalledExtensions(); | 367 virtual void OnLoadedInstalledExtensions(); |
| 368 | 368 |
| 369 // Adds |extension| to this ExtensionService and notifies observers than an | 369 // Adds |extension| to this ExtensionService and notifies observers than an |
| 370 // extension has been loaded. Called by the backend after an extension has | 370 // extension has been loaded. Called by the backend after an extension has |
| 371 // been loaded from a file and installed. | 371 // been loaded from a file and installed. |
| 372 virtual void AddExtension(const Extension* extension) OVERRIDE; | 372 virtual void AddExtension(const Extension* extension) OVERRIDE; |
| 373 | 373 |
| 374 // Called by the backend when an extension has been installed. | 374 // Called by the backend when an extension has been installed. |
| 375 void OnExtensionInstalled( | 375 void OnExtensionInstalled( |
| 376 const Extension* extension, bool from_webstore, int page_index); | 376 const Extension* extension, |
| 377 bool from_webstore, |
| 378 const StringOrdinal& page_ordinal); |
| 377 | 379 |
| 378 // Initializes the |extension|'s active permission set and disables the | 380 // Initializes the |extension|'s active permission set and disables the |
| 379 // extension if the privilege level has increased (e.g., due to an upgrade). | 381 // extension if the privilege level has increased (e.g., due to an upgrade). |
| 380 void InitializePermissions(const Extension* extension); | 382 void InitializePermissions(const Extension* extension); |
| 381 | 383 |
| 382 // Go through each extensions in pref, unload blacklisted extensions | 384 // Go through each extensions in pref, unload blacklisted extensions |
| 383 // and update the blacklist state in pref. | 385 // and update the blacklist state in pref. |
| 384 virtual void UpdateExtensionBlacklist( | 386 virtual void UpdateExtensionBlacklist( |
| 385 const std::vector<std::string>& blacklist) OVERRIDE; | 387 const std::vector<std::string>& blacklist) OVERRIDE; |
| 386 | 388 |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 extensions::ProcessMap process_map_; | 805 extensions::ProcessMap process_map_; |
| 804 | 806 |
| 805 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 807 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 806 InstallAppsWithUnlimtedStorage); | 808 InstallAppsWithUnlimtedStorage); |
| 807 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 809 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 808 InstallAppsAndCheckStorageProtection); | 810 InstallAppsAndCheckStorageProtection); |
| 809 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 811 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 810 }; | 812 }; |
| 811 | 813 |
| 812 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 814 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |