| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 // Called when the initial extensions load has completed. | 372 // Called when the initial extensions load has completed. |
| 373 virtual void OnLoadedInstalledExtensions(); | 373 virtual void OnLoadedInstalledExtensions(); |
| 374 | 374 |
| 375 // Adds |extension| to this ExtensionService and notifies observers than an | 375 // Adds |extension| to this ExtensionService and notifies observers than an |
| 376 // extension has been loaded. Called by the backend after an extension has | 376 // extension has been loaded. Called by the backend after an extension has |
| 377 // been loaded from a file and installed. | 377 // been loaded from a file and installed. |
| 378 virtual void AddExtension(const Extension* extension) OVERRIDE; | 378 virtual void AddExtension(const Extension* extension) OVERRIDE; |
| 379 | 379 |
| 380 // Called by the backend when an extension has been installed. | 380 // Called by the backend when an extension has been installed. |
| 381 void OnExtensionInstalled( | 381 void OnExtensionInstalled( |
| 382 const Extension* extension, | 382 const Extension* extension, bool from_webstore, int page_index); |
| 383 bool from_webstore, | |
| 384 const StringOrdinal& page_ordinal); | |
| 385 | 383 |
| 386 // Initializes the |extension|'s active permission set and disables the | 384 // Initializes the |extension|'s active permission set and disables the |
| 387 // extension if the privilege level has increased (e.g., due to an upgrade). | 385 // extension if the privilege level has increased (e.g., due to an upgrade). |
| 388 void InitializePermissions(const Extension* extension); | 386 void InitializePermissions(const Extension* extension); |
| 389 | 387 |
| 390 // Go through each extensions in pref, unload blacklisted extensions | 388 // Go through each extensions in pref, unload blacklisted extensions |
| 391 // and update the blacklist state in pref. | 389 // and update the blacklist state in pref. |
| 392 virtual void UpdateExtensionBlacklist( | 390 virtual void UpdateExtensionBlacklist( |
| 393 const std::vector<std::string>& blacklist) OVERRIDE; | 391 const std::vector<std::string>& blacklist) OVERRIDE; |
| 394 | 392 |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 ImageLoadingTracker tracker_; | 834 ImageLoadingTracker tracker_; |
| 837 | 835 |
| 838 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 836 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 839 InstallAppsWithUnlimtedStorage); | 837 InstallAppsWithUnlimtedStorage); |
| 840 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 838 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 841 InstallAppsAndCheckStorageProtection); | 839 InstallAppsAndCheckStorageProtection); |
| 842 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 840 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 843 }; | 841 }; |
| 844 | 842 |
| 845 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 843 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |