| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 // Called when the initial extensions load has completed. | 374 // Called when the initial extensions load has completed. |
| 375 virtual void OnLoadedInstalledExtensions(); | 375 virtual void OnLoadedInstalledExtensions(); |
| 376 | 376 |
| 377 // Adds |extension| to this ExtensionService and notifies observers than an | 377 // Adds |extension| to this ExtensionService and notifies observers than an |
| 378 // extension has been loaded. Called by the backend after an extension has | 378 // extension has been loaded. Called by the backend after an extension has |
| 379 // been loaded from a file and installed. | 379 // been loaded from a file and installed. |
| 380 virtual void AddExtension(const Extension* extension) OVERRIDE; | 380 virtual void AddExtension(const Extension* extension) OVERRIDE; |
| 381 | 381 |
| 382 // Called by the backend when an extension has been installed. | 382 // Called by the backend when an extension has been installed. |
| 383 void OnExtensionInstalled( | 383 void OnExtensionInstalled( |
| 384 const Extension* extension, bool from_webstore, int page_index); | 384 const Extension* extension, |
| 385 bool from_webstore, |
| 386 const StringOrdinal& page_ordinal); |
| 385 | 387 |
| 386 // Initializes the |extension|'s active permission set and disables the | 388 // Initializes the |extension|'s active permission set and disables the |
| 387 // extension if the privilege level has increased (e.g., due to an upgrade). | 389 // extension if the privilege level has increased (e.g., due to an upgrade). |
| 388 void InitializePermissions(const Extension* extension); | 390 void InitializePermissions(const Extension* extension); |
| 389 | 391 |
| 390 // Go through each extensions in pref, unload blacklisted extensions | 392 // Go through each extensions in pref, unload blacklisted extensions |
| 391 // and update the blacklist state in pref. | 393 // and update the blacklist state in pref. |
| 392 virtual void UpdateExtensionBlacklist( | 394 virtual void UpdateExtensionBlacklist( |
| 393 const std::vector<std::string>& blacklist) OVERRIDE; | 395 const std::vector<std::string>& blacklist) OVERRIDE; |
| 394 | 396 |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 extensions::ProcessMap process_map_; | 813 extensions::ProcessMap process_map_; |
| 812 | 814 |
| 813 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 815 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 814 InstallAppsWithUnlimtedStorage); | 816 InstallAppsWithUnlimtedStorage); |
| 815 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 817 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 816 InstallAppsAndCheckStorageProtection); | 818 InstallAppsAndCheckStorageProtection); |
| 817 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 819 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 818 }; | 820 }; |
| 819 | 821 |
| 820 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 822 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |