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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // SyncableService implementation. | 423 // SyncableService implementation. |
424 virtual SyncError MergeDataAndStartSyncing( | 424 virtual SyncError MergeDataAndStartSyncing( |
425 syncable::ModelType type, | 425 syncable::ModelType type, |
426 const SyncDataList& initial_sync_data, | 426 const SyncDataList& initial_sync_data, |
427 SyncChangeProcessor* sync_processor) OVERRIDE; | 427 scoped_ptr<SyncChangeProcessor> sync_processor) OVERRIDE; |
428 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; | 428 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; |
429 virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE; | 429 virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE; |
430 virtual SyncError ProcessSyncChanges( | 430 virtual SyncError ProcessSyncChanges( |
431 const tracked_objects::Location& from_here, | 431 const tracked_objects::Location& from_here, |
432 const SyncChangeList& change_list) OVERRIDE; | 432 const SyncChangeList& change_list) OVERRIDE; |
433 | 433 |
434 void set_extensions_enabled(bool enabled) { extensions_enabled_ = enabled; } | 434 void set_extensions_enabled(bool enabled) { extensions_enabled_ = enabled; } |
435 bool extensions_enabled() { return extensions_enabled_; } | 435 bool extensions_enabled() { return extensions_enabled_; } |
436 | 436 |
437 void set_show_extensions_prompts(bool enabled) { | 437 void set_show_extensions_prompts(bool enabled) { |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 extensions::RulesRegistryService* GetRulesRegistryService(); | 589 extensions::RulesRegistryService* GetRulesRegistryService(); |
590 | 590 |
591 AppShortcutManager* app_shortcut_manager() { return &app_shortcut_manager_; } | 591 AppShortcutManager* app_shortcut_manager() { return &app_shortcut_manager_; } |
592 | 592 |
593 private: | 593 private: |
594 // Bundle of type (app or extension)-specific sync stuff. | 594 // Bundle of type (app or extension)-specific sync stuff. |
595 struct SyncBundle { | 595 struct SyncBundle { |
596 SyncBundle(); | 596 SyncBundle(); |
597 ~SyncBundle(); | 597 ~SyncBundle(); |
598 | 598 |
| 599 void Reset(); |
| 600 |
599 bool HasExtensionId(const std::string& id) const; | 601 bool HasExtensionId(const std::string& id) const; |
600 bool HasPendingExtensionId(const std::string& id) const; | 602 bool HasPendingExtensionId(const std::string& id) const; |
601 | 603 |
602 ExtensionFilter filter; | 604 ExtensionFilter filter; |
603 std::set<std::string> synced_extensions; | 605 std::set<std::string> synced_extensions; |
604 std::map<std::string, ExtensionSyncData> pending_sync_data; | 606 std::map<std::string, ExtensionSyncData> pending_sync_data; |
605 SyncChangeProcessor* sync_processor; | 607 scoped_ptr<SyncChangeProcessor> sync_processor; |
606 }; | 608 }; |
607 | 609 |
608 // Contains Extension data that can change during the life of the process, | 610 // Contains Extension data that can change during the life of the process, |
609 // but does not persist across restarts. | 611 // but does not persist across restarts. |
610 struct ExtensionRuntimeData { | 612 struct ExtensionRuntimeData { |
611 // True if the background page is ready. | 613 // True if the background page is ready. |
612 bool background_page_ready; | 614 bool background_page_ready; |
613 | 615 |
614 // True while the extension is being upgraded. | 616 // True while the extension is being upgraded. |
615 bool being_upgraded; | 617 bool being_upgraded; |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 scoped_ptr<ExtensionGlobalError> extension_global_error_; | 852 scoped_ptr<ExtensionGlobalError> extension_global_error_; |
851 | 853 |
852 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
853 InstallAppsWithUnlimtedStorage); | 855 InstallAppsWithUnlimtedStorage); |
854 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 856 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
855 InstallAppsAndCheckStorageProtection); | 857 InstallAppsAndCheckStorageProtection); |
856 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 858 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
857 }; | 859 }; |
858 | 860 |
859 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 861 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |