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

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

Issue 7775008: Enable sync for the settings from the Extension Settings API. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Review #2 against correct branch Created 9 years, 3 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) 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 <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // This is an interface class to encapsulate the dependencies that 69 // This is an interface class to encapsulate the dependencies that
70 // various classes have on ExtensionService. This allows easy mocking. 70 // various classes have on ExtensionService. This allows easy mocking.
71 class ExtensionServiceInterface : public SyncableService { 71 class ExtensionServiceInterface : public SyncableService {
72 public: 72 public:
73 // A function that returns true if the given extension should be 73 // A function that returns true if the given extension should be
74 // included and false if it should be filtered out. Identical to 74 // included and false if it should be filtered out. Identical to
75 // PendingExtensionInfo::ShouldAllowInstallPredicate. 75 // PendingExtensionInfo::ShouldAllowInstallPredicate.
76 typedef bool (*ExtensionFilter)(const Extension&); 76 typedef bool (*ExtensionFilter)(const Extension&);
77 77
78 virtual ~ExtensionServiceInterface() {} 78 virtual ~ExtensionServiceInterface() {}
79
80 // Gets the list of all installed extension IDs, including disabled and
81 // terminated extensions.
82 virtual const std::vector<std::string> GetAllExtensionIds() const = 0;
Ben Olmstead 2011/09/16 18:21:43 I'm entirely in favor of adding this method.
akalin 2011/09/17 08:44:47 const doesn't make sense in a return value
akalin 2011/09/17 08:44:47 May want to decomp this change out and check that
not at google - send to devlin 2011/09/19 07:10:47 No longer needed.
83
79 virtual const ExtensionList* extensions() const = 0; 84 virtual const ExtensionList* extensions() const = 0;
80 virtual PendingExtensionManager* pending_extension_manager() = 0; 85 virtual PendingExtensionManager* pending_extension_manager() = 0;
81 86
82 // Install an update. Return true if the install can be started. 87 // Install an update. Return true if the install can be started.
83 // Set out_crx_installer to the installer if one was started. 88 // Set out_crx_installer to the installer if one was started.
84 virtual bool UpdateExtension( 89 virtual bool UpdateExtension(
85 const std::string& id, 90 const std::string& id,
86 const FilePath& path, 91 const FilePath& path,
87 const GURL& download_url, 92 const GURL& download_url,
88 CrxInstaller** out_crx_installer) = 0; 93 CrxInstaller** out_crx_installer) = 0;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 ExtensionService(Profile* profile, 182 ExtensionService(Profile* profile,
178 const CommandLine* command_line, 183 const CommandLine* command_line,
179 const FilePath& install_directory, 184 const FilePath& install_directory,
180 ExtensionPrefs* extension_prefs, 185 ExtensionPrefs* extension_prefs,
181 ExtensionSettings* extension_settings, 186 ExtensionSettings* extension_settings,
182 bool autoupdate_enabled, 187 bool autoupdate_enabled,
183 bool extensions_enabled); 188 bool extensions_enabled);
184 189
185 virtual ~ExtensionService(); 190 virtual ~ExtensionService();
186 191
192 // Gets the list of all installed extension IDs, including disabled and
193 // terminated extensions.
194 virtual const std::vector<std::string> GetAllExtensionIds() const;
195
187 // Gets the list of currently installed extensions. 196 // Gets the list of currently installed extensions.
Ben Olmstead 2011/09/16 18:21:43 While you're in here, could you change this commen
not at google - send to devlin 2011/09/19 07:10:47 Maybe the GetAllExtensionIDs and/or the comment up
188 virtual const ExtensionList* extensions() const OVERRIDE; 197 virtual const ExtensionList* extensions() const OVERRIDE;
189 const ExtensionList* disabled_extensions() const; 198 const ExtensionList* disabled_extensions() const;
190 const ExtensionList* terminated_extensions() const; 199 const ExtensionList* terminated_extensions() const;
191 200
192 // Gets the object managing the set of pending extensions. 201 // Gets the object managing the set of pending extensions.
193 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE; 202 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE;
194 203
195 // Registers an extension to be loaded as a component extension. 204 // Registers an extension to be loaded as a component extension.
196 void register_component_extension(const ComponentExtensionInfo& info) { 205 void register_component_extension(const ComponentExtensionInfo& info) {
197 component_extension_manifests_.push_back(info); 206 component_extension_manifests_.push_back(info);
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 SyncBundle extension_sync_bundle_; 804 SyncBundle extension_sync_bundle_;
796 805
797 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 806 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
798 InstallAppsWithUnlimtedStorage); 807 InstallAppsWithUnlimtedStorage);
799 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 808 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
800 InstallAppsAndCheckStorageProtection); 809 InstallAppsAndCheckStorageProtection);
801 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 810 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
802 }; 811 };
803 812
804 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 813 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | chrome/browser/extensions/extension_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698