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

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

Issue 120863003: Convert ExtensionRegistry to a BrowserContextKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 extensions::Blacklist* blacklist, 154 extensions::Blacklist* blacklist,
155 bool autoupdate_enabled, 155 bool autoupdate_enabled,
156 bool extensions_enabled, 156 bool extensions_enabled,
157 extensions::OneShotEvent* ready); 157 extensions::OneShotEvent* ready);
158 158
159 virtual ~ExtensionService(); 159 virtual ~ExtensionService();
160 160
161 // Gets the list of currently installed extensions. 161 // Gets the list of currently installed extensions.
162 virtual const extensions::ExtensionSet* extensions() const OVERRIDE; 162 virtual const extensions::ExtensionSet* extensions() const OVERRIDE;
163 virtual const extensions::ExtensionSet* disabled_extensions() const OVERRIDE; 163 virtual const extensions::ExtensionSet* disabled_extensions() const OVERRIDE;
164
165 // DEPRECATED: Use extensions::ExtensionRegistry::terminated_extensions().
164 const extensions::ExtensionSet* terminated_extensions() const; 166 const extensions::ExtensionSet* terminated_extensions() const;
James Cook 2013/12/27 01:00:27 I'll get rid of this soon - doing it now would mak
165 const extensions::ExtensionSet* blacklisted_extensions() const; 167
166 const extensions::ExtensionSet* delayed_installs() const; 168 const extensions::ExtensionSet* delayed_installs() const;
167 169
168 // Returns a set of all installed, disabled, blacklisted, and terminated 170 // Returns a set of all installed, disabled, blacklisted, and terminated
169 // extensions. 171 // extensions.
170 scoped_ptr<extensions::ExtensionSet> GenerateInstalledExtensionsSet() const; 172 scoped_ptr<extensions::ExtensionSet> GenerateInstalledExtensionsSet() const;
171 173
172 // Gets the object managing the set of pending extensions. 174 // Gets the object managing the set of pending extensions.
173 virtual extensions::PendingExtensionManager* 175 virtual extensions::PendingExtensionManager*
174 pending_extension_manager() OVERRIDE; 176 pending_extension_manager() OVERRIDE;
175 177
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 734
733 // Blacklist for the owning profile. 735 // Blacklist for the owning profile.
734 extensions::Blacklist* blacklist_; 736 extensions::Blacklist* blacklist_;
735 737
736 // Settings for the owning profile. 738 // Settings for the owning profile.
737 scoped_ptr<extensions::SettingsFrontend> settings_frontend_; 739 scoped_ptr<extensions::SettingsFrontend> settings_frontend_;
738 740
739 // The ExtensionSyncService that is used by this ExtensionService. 741 // The ExtensionSyncService that is used by this ExtensionService.
740 ExtensionSyncService* extension_sync_service_; 742 ExtensionSyncService* extension_sync_service_;
741 743
742 // TODO(jamescook): Convert this to a BrowserContextKeyedService. 744 // Sets of enabled/disabled/terminated/blacklisted extensions. Not owned.
743 scoped_ptr<extensions::ExtensionRegistry> registry_; 745 extensions::ExtensionRegistry* registry_;
James Cook 2013/12/27 01:00:27 I decided to keep this pointer because there are a
744 746
745 // The list of extension installs delayed for various reasons. The reason 747 // The list of extension installs delayed for various reasons. The reason
746 // for delayed install is stored in ExtensionPrefs. These are not part of 748 // for delayed install is stored in ExtensionPrefs. These are not part of
747 // ExtensionRegistry because they are not yet installed. 749 // ExtensionRegistry because they are not yet installed.
748 extensions::ExtensionSet delayed_installs_; 750 extensions::ExtensionSet delayed_installs_;
749 751
750 // Hold the set of pending extensions. 752 // Hold the set of pending extensions.
751 extensions::PendingExtensionManager pending_extension_manager_; 753 extensions::PendingExtensionManager pending_extension_manager_;
752 754
753 // The map of extension IDs to their runtime data. 755 // The map of extension IDs to their runtime data.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 #endif 859 #endif
858 860
859 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 861 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
860 InstallAppsWithUnlimtedStorage); 862 InstallAppsWithUnlimtedStorage);
861 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 863 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
862 InstallAppsAndCheckStorageProtection); 864 InstallAppsAndCheckStorageProtection);
863 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 865 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
864 }; 866 };
865 867
866 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 868 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698