| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 | 415 |
| 416 // Go through each extension and unload those that the network admin has | 416 // Go through each extension and unload those that the network admin has |
| 417 // put on the blacklist (not to be confused with the Google-managed blacklist) | 417 // put on the blacklist (not to be confused with the Google-managed blacklist) |
| 418 // set of extensions. | 418 // set of extensions. |
| 419 virtual void CheckAdminBlacklist() OVERRIDE; | 419 virtual void CheckAdminBlacklist() 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 syncable::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(syncable::ModelType type) OVERRIDE; | 429 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; |
| 430 virtual syncer::SyncDataList GetAllSyncData( | 430 virtual syncer::SyncDataList GetAllSyncData( |
| 431 syncable::ModelType type) const OVERRIDE; | 431 syncer::ModelType type) const OVERRIDE; |
| 432 virtual syncer::SyncError ProcessSyncChanges( | 432 virtual syncer::SyncError ProcessSyncChanges( |
| 433 const tracked_objects::Location& from_here, | 433 const tracked_objects::Location& from_here, |
| 434 const syncer::SyncChangeList& change_list) OVERRIDE; | 434 const syncer::SyncChangeList& change_list) OVERRIDE; |
| 435 | 435 |
| 436 // Gets the sync data for the given extension, assuming that the extension is | 436 // Gets the sync data for the given extension, assuming that the extension is |
| 437 // syncable. | 437 // syncable. |
| 438 extensions::ExtensionSyncData GetExtensionSyncData( | 438 extensions::ExtensionSyncData GetExtensionSyncData( |
| 439 const extensions::Extension& extension) const; | 439 const extensions::Extension& extension) const; |
| 440 | 440 |
| 441 // Gets the sync data for the given app, assuming that the app is | 441 // Gets the sync data for the given app, assuming that the app is |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 NaClModuleInfo(); | 646 NaClModuleInfo(); |
| 647 ~NaClModuleInfo(); | 647 ~NaClModuleInfo(); |
| 648 | 648 |
| 649 GURL url; | 649 GURL url; |
| 650 std::string mime_type; | 650 std::string mime_type; |
| 651 }; | 651 }; |
| 652 typedef std::list<NaClModuleInfo> NaClModuleInfoList; | 652 typedef std::list<NaClModuleInfo> NaClModuleInfoList; |
| 653 | 653 |
| 654 // Return true if the sync type of |extension| matches |type|. | 654 // Return true if the sync type of |extension| matches |type|. |
| 655 bool IsCorrectSyncType(const extensions::Extension& extension, | 655 bool IsCorrectSyncType(const extensions::Extension& extension, |
| 656 syncable::ModelType type) | 656 syncer::ModelType type) |
| 657 const; | 657 const; |
| 658 | 658 |
| 659 // Handles setting the extension specific values in |extension_sync_data| to | 659 // Handles setting the extension specific values in |extension_sync_data| to |
| 660 // the current system. | 660 // the current system. |
| 661 // Returns false if the changes were not completely applied and need to be | 661 // Returns false if the changes were not completely applied and need to be |
| 662 // tried again later. | 662 // tried again later. |
| 663 bool ProcessExtensionSyncDataHelper( | 663 bool ProcessExtensionSyncDataHelper( |
| 664 const extensions::ExtensionSyncData& extension_sync_data, | 664 const extensions::ExtensionSyncData& extension_sync_data, |
| 665 syncable::ModelType type); | 665 syncer::ModelType type); |
| 666 | 666 |
| 667 // Look up an extension by ID, optionally including either or both of enabled | 667 // Look up an extension by ID, optionally including either or both of enabled |
| 668 // and disabled extensions. | 668 // and disabled extensions. |
| 669 const extensions::Extension* GetExtensionByIdInternal( | 669 const extensions::Extension* GetExtensionByIdInternal( |
| 670 const std::string& id, | 670 const std::string& id, |
| 671 bool include_enabled, | 671 bool include_enabled, |
| 672 bool include_disabled, | 672 bool include_disabled, |
| 673 bool include_terminated) const; | 673 bool include_terminated) const; |
| 674 | 674 |
| 675 // Adds the given extension to the list of terminated extensions if | 675 // Adds the given extension to the list of terminated extensions if |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 scoped_ptr<ExtensionGlobalError> extension_global_error_; | 852 scoped_ptr<ExtensionGlobalError> extension_global_error_; |
| 853 | 853 |
| 854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 855 InstallAppsWithUnlimtedStorage); | 855 InstallAppsWithUnlimtedStorage); |
| 856 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 856 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
| 857 InstallAppsAndCheckStorageProtection); | 857 InstallAppsAndCheckStorageProtection); |
| 858 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 858 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
| 859 }; | 859 }; |
| 860 | 860 |
| 861 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 861 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
| OLD | NEW |