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

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 #1 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 virtual const ExtensionList* extensions() const = 0; 79 virtual const ExtensionList* extensions() const = 0;
80 virtual const ExtensionList* disabled_extensions() const = 0;
81 virtual const ExtensionList* terminated_extensions() const = 0;
80 virtual PendingExtensionManager* pending_extension_manager() = 0; 82 virtual PendingExtensionManager* pending_extension_manager() = 0;
81 83
82 // Install an update. Return true if the install can be started. 84 // Install an update. Return true if the install can be started.
83 // Set out_crx_installer to the installer if one was started. 85 // Set out_crx_installer to the installer if one was started.
84 virtual bool UpdateExtension( 86 virtual bool UpdateExtension(
85 const std::string& id, 87 const std::string& id,
86 const FilePath& path, 88 const FilePath& path,
87 const GURL& download_url, 89 const GURL& download_url,
88 CrxInstaller** out_crx_installer) = 0; 90 CrxInstaller** out_crx_installer) = 0;
89 virtual const Extension* GetExtensionById(const std::string& id, 91 virtual const Extension* GetExtensionById(const std::string& id,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 const FilePath& install_directory, 181 const FilePath& install_directory,
180 ExtensionPrefs* extension_prefs, 182 ExtensionPrefs* extension_prefs,
181 ExtensionSettings* extension_settings, 183 ExtensionSettings* extension_settings,
182 bool autoupdate_enabled, 184 bool autoupdate_enabled,
183 bool extensions_enabled); 185 bool extensions_enabled);
184 186
185 virtual ~ExtensionService(); 187 virtual ~ExtensionService();
186 188
187 // Gets the list of currently installed extensions. 189 // Gets the list of currently installed extensions.
188 virtual const ExtensionList* extensions() const OVERRIDE; 190 virtual const ExtensionList* extensions() const OVERRIDE;
189 const ExtensionList* disabled_extensions() const; 191 virtual const ExtensionList* disabled_extensions() const OVERRIDE;
190 const ExtensionList* terminated_extensions() const; 192 virtual const ExtensionList* terminated_extensions() const OVERRIDE;
191 193
192 // Gets the object managing the set of pending extensions. 194 // Gets the object managing the set of pending extensions.
193 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE; 195 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE;
194 196
195 // Registers an extension to be loaded as a component extension. 197 // Registers an extension to be loaded as a component extension.
196 void register_component_extension(const ComponentExtensionInfo& info) { 198 void register_component_extension(const ComponentExtensionInfo& info) {
197 component_extension_manifests_.push_back(info); 199 component_extension_manifests_.push_back(info);
198 } 200 }
199 201
200 // Unregisters a component extension from the list of extensions to be loaded 202 // Unregisters a component extension from the list of extensions to be loaded
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 SyncBundle extension_sync_bundle_; 797 SyncBundle extension_sync_bundle_;
796 798
797 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 799 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
798 InstallAppsWithUnlimtedStorage); 800 InstallAppsWithUnlimtedStorage);
799 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 801 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
800 InstallAppsAndCheckStorageProtection); 802 InstallAppsAndCheckStorageProtection);
801 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 803 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
802 }; 804 };
803 805
804 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 806 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698