Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(964)

Side by Side Diff: chrome/browser/extensions/extension_service.h

Issue 9315010: RulesRegistry for declarative APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comiler errors Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class Profile; 67 class Profile;
68 class SyncData; 68 class SyncData;
69 class Version; 69 class Version;
70 70
71 namespace chromeos { 71 namespace chromeos {
72 class ExtensionInputMethodEventRouter; 72 class ExtensionInputMethodEventRouter;
73 } 73 }
74 74
75 namespace extensions { 75 namespace extensions {
76 class ComponentLoader; 76 class ComponentLoader;
77 class RulesRegistryService;
77 class SettingsFrontend; 78 class SettingsFrontend;
78 class SocketController; 79 class SocketController;
79 } 80 }
80 81
81 // This is an interface class to encapsulate the dependencies that 82 // This is an interface class to encapsulate the dependencies that
82 // various classes have on ExtensionService. This allows easy mocking. 83 // various classes have on ExtensionService. This allows easy mocking.
83 class ExtensionServiceInterface : public SyncableService { 84 class ExtensionServiceInterface : public SyncableService {
84 public: 85 public:
85 // A function that returns true if the given extension should be 86 // A function that returns true if the given extension should be
86 // included and false if it should be filtered out. Identical to 87 // included and false if it should be filtered out. Identical to
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 } 570 }
570 #endif 571 #endif
571 572
572 ExtensionWarningSet* extension_warnings() { 573 ExtensionWarningSet* extension_warnings() {
573 return &extension_warnings_; 574 return &extension_warnings_;
574 } 575 }
575 576
576 // Call only from IO thread. 577 // Call only from IO thread.
577 extensions::SocketController* socket_controller(); 578 extensions::SocketController* socket_controller();
578 579
580 extensions::RulesRegistryService* GetRulesRegistryService();
581
579 AppShortcutManager* app_shortcut_manager() { return &app_shortcut_manager_; } 582 AppShortcutManager* app_shortcut_manager() { return &app_shortcut_manager_; }
580 583
581 private: 584 private:
582 // Bundle of type (app or extension)-specific sync stuff. 585 // Bundle of type (app or extension)-specific sync stuff.
583 struct SyncBundle { 586 struct SyncBundle {
584 SyncBundle(); 587 SyncBundle();
585 ~SyncBundle(); 588 ~SyncBundle();
586 589
587 bool HasExtensionId(const std::string& id) const; 590 bool HasExtensionId(const std::string& id) const;
588 bool HasPendingExtensionId(const std::string& id) const; 591 bool HasPendingExtensionId(const std::string& id) const;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 scoped_ptr<ExtensionManagementEventRouter> management_event_router_; 803 scoped_ptr<ExtensionManagementEventRouter> management_event_router_;
801 804
802 scoped_ptr<ExtensionWebNavigationEventRouter> web_navigation_event_router_; 805 scoped_ptr<ExtensionWebNavigationEventRouter> web_navigation_event_router_;
803 806
804 #if defined(OS_CHROMEOS) 807 #if defined(OS_CHROMEOS)
805 scoped_ptr<ExtensionFileBrowserEventRouter> file_browser_event_router_; 808 scoped_ptr<ExtensionFileBrowserEventRouter> file_browser_event_router_;
806 scoped_ptr<chromeos::ExtensionInputMethodEventRouter> 809 scoped_ptr<chromeos::ExtensionInputMethodEventRouter>
807 input_method_event_router_; 810 input_method_event_router_;
808 #endif 811 #endif
809 812
813 scoped_ptr<extensions::RulesRegistryService> rules_registry_service_;
814
810 // A collection of external extension providers. Each provider reads 815 // A collection of external extension providers. Each provider reads
811 // a source of external extension information. Examples include the 816 // a source of external extension information. Examples include the
812 // windows registry and external_extensions.json. 817 // windows registry and external_extensions.json.
813 ProviderCollection external_extension_providers_; 818 ProviderCollection external_extension_providers_;
814 819
815 // Set to true by OnExternalExtensionUpdateUrlFound() when an external 820 // Set to true by OnExternalExtensionUpdateUrlFound() when an external
816 // extension URL is found. Used in CheckForExternalUpdates() to see 821 // extension URL is found. Used in CheckForExternalUpdates() to see
817 // if an update check is needed to install pending extensions. 822 // if an update check is needed to install pending extensions.
818 bool external_extension_url_added_; 823 bool external_extension_url_added_;
819 824
(...skipping 16 matching lines...) Expand all
836 scoped_ptr<ExtensionGlobalError> extension_global_error_; 841 scoped_ptr<ExtensionGlobalError> extension_global_error_;
837 842
838 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 843 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
839 InstallAppsWithUnlimtedStorage); 844 InstallAppsWithUnlimtedStorage);
840 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 845 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
841 InstallAppsAndCheckStorageProtection); 846 InstallAppsAndCheckStorageProtection);
842 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 847 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
843 }; 848 };
844 849
845 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 850 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/declarative/test_rules_registry.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698