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

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

Issue 9718028: Allow autoupdate to update disabled extensions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Synced Created 8 years, 8 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
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // various classes have on ExtensionService. This allows easy mocking. 83 // various classes have on ExtensionService. This allows easy mocking.
84 class ExtensionServiceInterface : public SyncableService { 84 class ExtensionServiceInterface : public SyncableService {
85 public: 85 public:
86 // A function that returns true if the given extension should be 86 // A function that returns true if the given extension should be
87 // included and false if it should be filtered out. Identical to 87 // included and false if it should be filtered out. Identical to
88 // PendingExtensionInfo::ShouldAllowInstallPredicate. 88 // PendingExtensionInfo::ShouldAllowInstallPredicate.
89 typedef bool (*ExtensionFilter)(const Extension&); 89 typedef bool (*ExtensionFilter)(const Extension&);
90 90
91 virtual ~ExtensionServiceInterface() {} 91 virtual ~ExtensionServiceInterface() {}
92 virtual const ExtensionSet* extensions() const = 0; 92 virtual const ExtensionSet* extensions() const = 0;
93 virtual const ExtensionSet* disabled_extensions() const = 0;
93 virtual PendingExtensionManager* pending_extension_manager() = 0; 94 virtual PendingExtensionManager* pending_extension_manager() = 0;
94 95
95 // Install an update. Return true if the install can be started. 96 // Install an update. Return true if the install can be started.
96 // Set out_crx_installer to the installer if one was started. 97 // Set out_crx_installer to the installer if one was started.
97 virtual bool UpdateExtension( 98 virtual bool UpdateExtension(
98 const std::string& id, 99 const std::string& id,
99 const FilePath& path, 100 const FilePath& path,
100 const GURL& download_url, 101 const GURL& download_url,
101 CrxInstaller** out_crx_installer) = 0; 102 CrxInstaller** out_crx_installer) = 0;
102 virtual const Extension* GetExtensionById(const std::string& id, 103 virtual const Extension* GetExtensionById(const std::string& id,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 const CommandLine* command_line, 193 const CommandLine* command_line,
193 const FilePath& install_directory, 194 const FilePath& install_directory,
194 ExtensionPrefs* extension_prefs, 195 ExtensionPrefs* extension_prefs,
195 bool autoupdate_enabled, 196 bool autoupdate_enabled,
196 bool extensions_enabled); 197 bool extensions_enabled);
197 198
198 virtual ~ExtensionService(); 199 virtual ~ExtensionService();
199 200
200 // Gets the list of currently installed extensions. 201 // Gets the list of currently installed extensions.
201 virtual const ExtensionSet* extensions() const OVERRIDE; 202 virtual const ExtensionSet* extensions() const OVERRIDE;
202 const ExtensionSet* disabled_extensions() const; 203 virtual const ExtensionSet* disabled_extensions() const OVERRIDE;
203 const ExtensionSet* terminated_extensions() const; 204 const ExtensionSet* terminated_extensions() const;
204 205
205 // Retuns a set of all installed, disabled, and terminated extensions and 206 // Retuns a set of all installed, disabled, and terminated extensions and
206 // transfers ownership to caller. 207 // transfers ownership to caller.
207 const ExtensionSet* GenerateInstalledExtensionsSet() const; 208 const ExtensionSet* GenerateInstalledExtensionsSet() const;
208 209
209 // Gets the object managing the set of pending extensions. 210 // Gets the object managing the set of pending extensions.
210 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE; 211 virtual PendingExtensionManager* pending_extension_manager() OVERRIDE;
211 212
212 const FilePath& install_directory() const { return install_directory_; } 213 const FilePath& install_directory() const { return install_directory_; }
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 scoped_ptr<ExtensionGlobalError> extension_global_error_; 845 scoped_ptr<ExtensionGlobalError> extension_global_error_;
845 846
846 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 847 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
847 InstallAppsWithUnlimtedStorage); 848 InstallAppsWithUnlimtedStorage);
848 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, 849 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
849 InstallAppsAndCheckStorageProtection); 850 InstallAppsAndCheckStorageProtection);
850 DISALLOW_COPY_AND_ASSIGN(ExtensionService); 851 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
851 }; 852 };
852 853
853 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ 854 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management_browsertest.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698