blob: dfb1a7ecee4bf00060980d775c6e856f2653ceba [file] [log] [blame]
[email protected]c333e792012-01-06 16:57:391// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]6014d672008-12-05 00:38:252// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]eaa7dd182010-12-14 11:09:005#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
6#define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_
[email protected]6014d672008-12-05 00:38:257
[email protected]669b2372013-10-17 15:04:588#include <list>
[email protected]da50530a2009-06-15 17:43:019#include <map>
[email protected]31bb5ee62012-09-12 22:58:4010#include <set>
[email protected]b0beaa662009-02-26 00:04:1511#include <string>
[email protected]6014d672008-12-05 00:38:2512#include <vector>
13
[email protected]e0785902011-05-19 23:34:1714#include "base/compiler_specific.h"
[email protected]57999812013-02-24 05:40:5215#include "base/files/file_path.h"
[email protected]a918f872010-06-01 14:30:5116#include "base/gtest_prod_util.h"
[email protected]3b63f8f42011-03-28 01:54:1517#include "base/memory/ref_counted.h"
[email protected]14908b72011-04-20 06:54:3618#include "base/memory/weak_ptr.h"
[email protected]1ab137b2013-03-21 03:33:1819#include "base/prefs/pref_change_registrar.h"
[email protected]00e7bef2013-06-10 20:35:1720#include "base/strings/string16.h"
[email protected]fdd679b2012-11-15 20:49:3921#include "chrome/browser/extensions/blacklist.h"
[email protected]906a9982014-03-19 00:39:3622#include "chrome/browser/extensions/extension_sync_service.h"
[email protected]f3d3b382014-03-14 21:19:2823#include "chrome/browser/extensions/pending_extension_manager.h"
[email protected]04ea1bb2013-07-10 09:26:0924#include "content/public/browser/devtools_agent_host.h"
[email protected]6c2381d2011-10-19 02:52:5325#include "content/public/browser/notification_observer.h"
26#include "content/public/browser/notification_registrar.h"
[email protected]1ee7f892014-03-04 06:04:2527#include "extensions/browser/extension_function_histogram_value.h"
[email protected]489db0842014-01-22 18:20:0328#include "extensions/browser/extension_prefs.h"
[email protected]301116c62013-11-26 10:37:4529#include "extensions/browser/external_provider_interface.h"
30#include "extensions/browser/management_policy.h"
[email protected]98b6d942013-11-10 00:34:0731#include "extensions/browser/process_manager.h"
[email protected]e4452d32013-11-15 23:07:4132#include "extensions/common/extension.h"
[email protected]289c44b2013-12-17 03:26:5733#include "extensions/common/extension_set.h"
[email protected]d42c11152013-08-22 19:36:3234#include "extensions/common/manifest.h"
[email protected]4a10006a2013-05-17 23:18:3535#include "extensions/common/one_shot_event.h"
[email protected]6014d672008-12-05 00:38:2536
[email protected]69f1be82009-04-16 22:27:2137class GURL;
[email protected]81e63782009-02-27 19:35:0938class Profile;
[email protected]aa142702010-03-26 01:26:3339
[email protected]7f8f24f2012-11-15 19:40:1440namespace base {
[email protected]2f3b1cc2014-03-17 23:07:1541class CommandLine;
[email protected]7f8f24f2012-11-15 19:40:1442class SequencedTaskRunner;
[email protected]1f04ef42013-04-22 07:35:5043class Version;
[email protected]7f8f24f2012-11-15 19:40:1444}
45
[email protected]9c70e0d92012-07-16 08:39:4446namespace extensions {
[email protected]5a38dfd2012-07-23 23:22:1047class BrowserEventRouter;
[email protected]d8c8f25f2011-11-02 18:18:0148class ComponentLoader;
[email protected]bf3d9df2012-07-24 23:20:2749class CrxInstaller;
[email protected]c77f2352012-08-08 22:07:5850class ExtensionActionStorageManager;
[email protected]373daf972014-04-10 01:50:4451class ExtensionErrorController;
[email protected]e5f8fffe2014-04-02 00:30:4452class ExtensionGarbageCollector;
[email protected]bb1bc9b32013-12-21 03:09:1453class ExtensionRegistry;
[email protected]bd306722012-07-11 20:43:5954class ExtensionSystem;
[email protected]a74569b2014-03-25 02:56:3055class ExtensionToolbarModel;
[email protected]42a08162012-03-16 18:09:1156class ExtensionUpdater;
[email protected]3f213ad2012-07-26 23:39:4157class PendingExtensionManager;
[email protected]44366da12014-01-28 01:38:4158class RendererStartupHelper;
[email protected]90878c52014-04-04 18:21:0259class SharedModuleService;
[email protected]a9aa62b312013-11-29 05:35:0660class UpdateObserver;
[email protected]9f4e4f082013-06-21 07:11:1961} // namespace extensions
[email protected]163ed192012-07-24 19:31:0762
[email protected]2d19eb6e2014-01-27 17:30:0063using extensions::ExtensionIdSet;
64
[email protected]163ed192012-07-24 19:31:0765namespace syncer {
[email protected]163ed192012-07-24 19:31:0766class SyncErrorFactory;
[email protected]d8c8f25f2011-11-02 18:18:0167}
[email protected]771a6182011-10-05 16:32:5268
[email protected]d1ca0ed12009-07-01 18:24:3269// This is an interface class to encapsulate the dependencies that
[email protected]2859946f2011-04-04 18:18:0670// various classes have on ExtensionService. This allows easy mocking.
[email protected]f8aefb132013-10-30 09:29:5271class ExtensionServiceInterface
72 : public base::SupportsWeakPtr<ExtensionServiceInterface> {
[email protected]d1ca0ed12009-07-01 18:24:3273 public:
[email protected]2859946f2011-04-04 18:18:0674 virtual ~ExtensionServiceInterface() {}
[email protected]ca975942014-01-07 12:06:4775
76 // DEPRECATED: Use ExtensionRegistry::enabled_extensions() instead.
77 // ExtensionRegistry also has the disabled, terminated and blacklisted sets.
[email protected]289c44b2013-12-17 03:26:5778 virtual const extensions::ExtensionSet* extensions() const = 0;
[email protected]ca975942014-01-07 12:06:4779
[email protected]3f213ad2012-07-26 23:39:4180 virtual extensions::PendingExtensionManager* pending_extension_manager() = 0;
[email protected]420a0ec2011-06-01 01:07:0381
82 // Install an update. Return true if the install can be started.
83 // Set out_crx_installer to the installer if one was started.
84 virtual bool UpdateExtension(
85 const std::string& id,
[email protected]650b2d52013-02-10 03:41:4586 const base::FilePath& path,
[email protected]044e86992014-01-24 22:59:1187 bool file_ownership_passed,
[email protected]420a0ec2011-06-01 01:07:0388 const GURL& download_url,
[email protected]bf3d9df2012-07-24 23:20:2789 extensions::CrxInstaller** out_crx_installer) = 0;
[email protected]f574c402012-12-04 23:20:3190 virtual const extensions::Extension* GetExtensionById(
91 const std::string& id,
92 bool include_disabled) const = 0;
[email protected]1c321ee2012-05-21 03:02:3493 virtual const extensions::Extension* GetInstalledExtension(
[email protected]8001df22011-04-28 19:59:4794 const std::string& id) const = 0;
[email protected]2859946f2011-04-04 18:18:0695
[email protected]76b65442012-11-17 14:11:4896 virtual const extensions::Extension* GetPendingExtensionUpdate(
97 const std::string& extension_id) const = 0;
[email protected]6f6101832012-11-27 22:10:4898 virtual void FinishDelayedInstallation(const std::string& extension_id) = 0;
[email protected]76b65442012-11-17 14:11:4899
[email protected]c3cfb012011-04-06 22:07:35100 virtual bool IsExtensionEnabled(const std::string& extension_id) const = 0;
[email protected]2859946f2011-04-04 18:18:06101
[email protected]4ee07c62012-08-21 12:40:42102 virtual void CheckManagementPolicy() = 0;
[email protected]5ef47ec2010-01-28 05:58:05103
[email protected]31206602011-04-13 23:07:32104 // Safe to call multiple times in a row.
105 //
[email protected]90310d92011-04-17 07:35:04106 // TODO(akalin): Remove this method (and others) once we refactor
107 // themes sync to not use it directly.
[email protected]31206602011-04-13 23:07:32108 virtual void CheckForUpdatesSoon() = 0;
[email protected]25ae0152011-11-18 14:40:02109
[email protected]1c321ee2012-05-21 03:02:34110 virtual void AddExtension(const extensions::Extension* extension) = 0;
[email protected]8c484b742012-11-29 06:05:36111 virtual void AddComponentExtension(
112 const extensions::Extension* extension) = 0;
[email protected]25ae0152011-11-18 14:40:02113
114 virtual void UnloadExtension(
115 const std::string& extension_id,
[email protected]b0af4792013-10-23 09:12:13116 extensions::UnloadedExtensionInfo::Reason reason) = 0;
[email protected]8b1ec202013-09-05 02:09:50117 virtual void RemoveComponentExtension(const std::string& extension_id) = 0;
[email protected]25ae0152011-11-18 14:40:02118
119 virtual bool is_ready() = 0;
[email protected]7f8f24f2012-11-15 19:40:14120
121 // Returns task runner for crx installation file I/O operations.
122 virtual base::SequencedTaskRunner* GetFileTaskRunner() = 0;
[email protected]d1ca0ed12009-07-01 18:24:32123};
[email protected]fbcc40302009-06-12 20:45:45124
[email protected]fafdc842014-01-17 18:09:08125// Manages installed and running Chromium extensions. An instance is shared
126// between normal and incognito profiles.
[email protected]eaa7dd182010-12-14 11:09:00127class ExtensionService
[email protected]14908b72011-04-20 06:54:36128 : public ExtensionServiceInterface,
[email protected]5df038b2012-07-16 19:03:27129 public extensions::ExternalProviderInterface::VisitorInterface,
[email protected]fdd679b2012-11-15 20:49:39130 public content::NotificationObserver,
131 public extensions::Blacklist::Observer {
[email protected]4f313d52009-05-21 00:42:29132 public:
[email protected]d9696672011-03-15 22:45:09133 // Returns the Extension of hosted or packaged apps, NULL otherwise.
[email protected]dc9a74f72012-08-17 18:07:21134 const extensions::Extension* GetInstalledApp(const GURL& url) const;
[email protected]d9696672011-03-15 22:45:09135
[email protected]ffb204f22010-12-05 23:20:27136 // Returns whether the URL is from either a hosted or packaged app.
[email protected]dc9a74f72012-08-17 18:07:21137 bool IsInstalledApp(const GURL& url) const;
[email protected]ffb204f22010-12-05 23:20:27138
[email protected]6aeac8342010-10-01 20:21:18139 // Attempts to uninstall an extension from a given ExtensionService. Returns
140 // true iff the target extension exists.
[email protected]eaa7dd182010-12-14 11:09:00141 static bool UninstallExtensionHelper(ExtensionService* extensions_service,
[email protected]6aeac8342010-10-01 20:21:18142 const std::string& extension_id);
143
[email protected]73c47932010-12-06 18:13:43144 // Constructor stores pointers to |profile| and |extension_prefs| but
145 // ownership remains at caller.
[email protected]eaa7dd182010-12-14 11:09:00146 ExtensionService(Profile* profile,
[email protected]2f3b1cc2014-03-17 23:07:15147 const base::CommandLine* command_line,
[email protected]650b2d52013-02-10 03:41:45148 const base::FilePath& install_directory,
[email protected]45759612012-07-10 17:21:23149 extensions::ExtensionPrefs* extension_prefs,
[email protected]fdd679b2012-11-15 20:49:39150 extensions::Blacklist* blacklist,
[email protected]0436b102011-04-15 18:30:03151 bool autoupdate_enabled,
[email protected]4a10006a2013-05-17 23:18:35152 bool extensions_enabled,
153 extensions::OneShotEvent* ready);
[email protected]6014d672008-12-05 00:38:25154
[email protected]14908b72011-04-20 06:54:36155 virtual ~ExtensionService();
156
[email protected]ca975942014-01-07 12:06:47157 // DEPRECATED: Use ExtensionRegistry::enabled_extensions() instead.
158 // ExtensionRegistry also has the disabled, terminated and blacklisted sets.
[email protected]289c44b2013-12-17 03:26:57159 virtual const extensions::ExtensionSet* extensions() const OVERRIDE;
[email protected]5fdfa562013-12-27 17:43:59160
[email protected]289c44b2013-12-17 03:26:57161 const extensions::ExtensionSet* delayed_installs() const;
[email protected]6014d672008-12-05 00:38:25162
[email protected]b2907fd2011-03-25 16:43:37163 // Gets the object managing the set of pending extensions.
[email protected]3f213ad2012-07-26 23:39:41164 virtual extensions::PendingExtensionManager*
165 pending_extension_manager() OVERRIDE;
[email protected]aa142702010-03-26 01:26:33166
[email protected]650b2d52013-02-10 03:41:45167 const base::FilePath& install_directory() const { return install_directory_; }
[email protected]ec5b50d2010-10-09 16:35:18168
[email protected]e178ad92013-06-28 02:29:25169 // Getter and setter for the flag that specifies whether the extension is
170 // being reloaded.
[email protected]5b3ee852013-09-26 06:33:10171 bool IsBeingReloaded(const std::string& extension_id) const;
[email protected]e178ad92013-06-28 02:29:25172 void SetBeingReloaded(const std::string& extension_id, bool value);
173
[email protected]6014d672008-12-05 00:38:25174 // Initialize and start all installed extensions.
[email protected]9f1087e2009-06-15 17:29:32175 void Init();
[email protected]6014d672008-12-05 00:38:25176
[email protected]47b896562012-08-22 23:55:15177 // Called when the associated Profile is going to be destroyed.
178 void Shutdown();
179
[email protected]695b5712012-12-06 23:55:28180 // Look up an extension by ID. Does not include terminated
[email protected]8001df22011-04-28 19:59:47181 // extensions.
[email protected]1c321ee2012-05-21 03:02:34182 virtual const extensions::Extension* GetExtensionById(
[email protected]b05fb9ff2011-04-23 00:07:56183 const std::string& id, bool include_disabled) const OVERRIDE;
[email protected]0c6da502009-08-14 22:32:39184
[email protected]8001df22011-04-28 19:59:47185 // Looks up an extension by ID, regardless of whether it's enabled,
[email protected]695b5712012-12-06 23:55:28186 // disabled, blacklisted, or terminated.
[email protected]599539802014-01-07 23:06:00187 // DEPRECATED: Replace with:
188 // ExtensionRegistry::GetExtensionById(id, ExtensionRegistry::EVERYTHING).
[email protected]1c321ee2012-05-21 03:02:34189 virtual const extensions::Extension* GetInstalledExtension(
[email protected]8001df22011-04-28 19:59:47190 const std::string& id) const OVERRIDE;
[email protected]0dfe05c2011-02-23 23:03:36191
[email protected]e957fe52009-06-23 16:51:05192 // Updates a currently-installed extension with the contents from
[email protected]7577a5c52009-07-30 06:21:58193 // |extension_path|.
[email protected]2a464a92009-08-01 17:58:35194 // TODO(aa): This method can be removed. ExtensionUpdater could use
195 // CrxInstaller directly instead.
[email protected]420a0ec2011-06-01 01:07:03196 virtual bool UpdateExtension(
197 const std::string& id,
[email protected]650b2d52013-02-10 03:41:45198 const base::FilePath& extension_path,
[email protected]044e86992014-01-24 22:59:11199 bool file_ownership_passed,
[email protected]420a0ec2011-06-01 01:07:03200 const GURL& download_url,
[email protected]bf3d9df2012-07-24 23:20:27201 extensions::CrxInstaller** out_crx_installer) OVERRIDE;
[email protected]e957fe52009-06-23 16:51:05202
[email protected]2380c6b2013-01-09 02:33:13203 // Reloads the specified extension, sending the onLaunched() event to it if it
204 // currently has any window showing.
[email protected]e178ad92013-06-28 02:29:25205 void ReloadExtension(const std::string extension_id);
[email protected]9cddd4702009-07-27 22:09:40206
[email protected]631cf822009-05-15 07:01:25207 // Uninstalls the specified extension. Callers should only call this method
[email protected]17c4f3c2009-07-04 16:36:25208 // with extensions that exist. |external_uninstall| is a magical parameter
209 // that is only used to send information to ExtensionPrefs, which external
210 // callers should never set to true.
[email protected]a12c706e2011-12-01 00:58:08211 //
212 // We pass the |extension_id| by value to avoid having it deleted from under
213 // us incase someone calls it with Extension::id() or another string that we
214 // are going to delete in this function.
215 //
[email protected]17c4f3c2009-07-04 16:36:25216 // TODO(aa): Remove |external_uninstall| -- this information should be passed
217 // to ExtensionPrefs some other way.
[email protected]a12c706e2011-12-01 00:58:08218 virtual bool UninstallExtension(std::string extension_id,
[email protected]d6ebc9792011-04-07 18:18:33219 bool external_uninstall,
[email protected]439f1e32013-12-09 20:09:09220 base::string16* error);
[email protected]631cf822009-05-15 07:01:25221
[email protected]b05fb9ff2011-04-23 00:07:56222 virtual bool IsExtensionEnabled(
223 const std::string& extension_id) const OVERRIDE;
[email protected]c3cfb012011-04-06 22:07:35224
[email protected]06f92562011-04-29 19:27:31225 // Enables the extension. If the extension is already enabled, does
226 // nothing.
[email protected]2859946f2011-04-04 18:18:06227 virtual void EnableExtension(const std::string& extension_id);
[email protected]06f92562011-04-29 19:27:31228
229 // Disables the extension. If the extension is already disabled, or
230 // cannot be disabled, does nothing.
[email protected]44d62b62012-04-11 00:06:03231 virtual void DisableExtension(const std::string& extension_id,
[email protected]1c321ee2012-05-21 03:02:34232 extensions::Extension::DisableReason disable_reason);
[email protected]0c6da502009-08-14 22:32:39233
[email protected]3082fe32013-08-06 11:12:38234 // Disable non-default and non-managed extensions with ids not in
235 // |except_ids|. Default extensions are those from the Web Store with
236 // |was_installed_by_default| flag.
[email protected]1abf05e2013-07-09 17:04:36237 void DisableUserExtensions(const std::vector<std::string>& except_ids);
[email protected]e516e4c2013-06-12 17:41:14238
[email protected]8d888c12010-11-30 00:00:25239 // Updates the |extension|'s granted permissions lists to include all
[email protected]8d888c12010-11-30 00:00:25240 // permissions in the |extension|'s manifest and re-enables the
241 // extension.
[email protected]1c321ee2012-05-21 03:02:34242 void GrantPermissionsAndEnableExtension(
[email protected]009633c2013-03-07 22:08:28243 const extensions::Extension* extension);
[email protected]8d888c12010-11-30 00:00:25244
[email protected]be083862012-09-01 03:53:45245 // Updates the |extension|'s granted permissions lists to include all
246 // permissions in the |extensions|'s manifest.
247 void GrantPermissions(
[email protected]009633c2013-03-07 22:08:28248 const extensions::Extension* extension);
[email protected]be083862012-09-01 03:53:45249
[email protected]9f1087e2009-06-15 17:29:32250 // Check for updates (or potentially new extensions from external providers)
[email protected]93fd78f42009-07-10 16:43:17251 void CheckForExternalUpdates();
[email protected]9f1087e2009-06-15 17:29:32252
253 // Unload the specified extension.
[email protected]25ae0152011-11-18 14:40:02254 virtual void UnloadExtension(
255 const std::string& extension_id,
[email protected]b0af4792013-10-23 09:12:13256 extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
[email protected]9f1087e2009-06-15 17:29:32257
[email protected]8b1ec202013-09-05 02:09:50258 // Remove the specified component extension.
259 virtual void RemoveComponentExtension(const std::string& extension_id)
260 OVERRIDE;
261
[email protected]bb1bc9b32013-12-21 03:09:14262 // Unload all extensions. Does not send notifications.
263 void UnloadAllExtensionsForTest();
[email protected]9f1087e2009-06-15 17:29:32264
[email protected]bb1bc9b32013-12-21 03:09:14265 // Reloads all extensions. Does not notify that extensions are ready.
266 void ReloadExtensionsForTest();
[email protected]9f1087e2009-06-15 17:29:32267
[email protected]c6d474f82009-12-16 21:11:06268 // Called when the initial extensions load has completed.
269 virtual void OnLoadedInstalledExtensions();
[email protected]7577a5c52009-07-30 06:21:58270
[email protected]bc151cf92013-02-12 04:57:26271 // Adds |extension| to this ExtensionService and notifies observers that the
272 // extensions have been loaded.
[email protected]1c321ee2012-05-21 03:02:34273 virtual void AddExtension(const extensions::Extension* extension) OVERRIDE;
[email protected]7577a5c52009-07-30 06:21:58274
[email protected]8c484b742012-11-29 06:05:36275 // Check if we have preferences for the component extension and, if not or if
276 // the stored version differs, install the extension (without requirements
277 // checking) before calling AddExtension.
278 virtual void AddComponentExtension(const extensions::Extension* extension)
279 OVERRIDE;
280
[email protected]bc151cf92013-02-12 04:57:26281 // Informs the service that an extension's files are in place for loading.
282 //
[email protected]9f3c8532013-07-31 19:52:07283 // |page_ordinal| is the location of the extension in the app launcher.
284 // |has_requirement_errors| is true if requirements of the extension weren't
285 // met (for example graphics capabilities).
286 // |blacklist_state| will be BLACKLISTED if the extension is blacklisted.
287 // |wait_for_idle| may be false to install the extension immediately.
[email protected]8266d662011-07-12 21:53:26288 void OnExtensionInstalled(
[email protected]1c321ee2012-05-21 03:02:34289 const extensions::Extension* extension,
[email protected]98270432012-09-11 20:51:24290 const syncer::StringOrdinal& page_ordinal,
[email protected]0db124b02012-11-07 04:55:05291 bool has_requirement_errors,
[email protected]8e289f0b2013-12-17 17:49:07292 extensions::BlacklistState blacklist_state,
[email protected]0db124b02012-11-07 04:55:05293 bool wait_for_idle);
294
[email protected]9f4e4f082013-06-21 07:11:19295 // Checks for delayed installation for all pending installs.
296 void MaybeFinishDelayedInstallations();
297
[email protected]6f6101832012-11-27 22:10:48298 // Similar to FinishInstallation, but first checks if there still is an update
299 // pending for the extension, and makes sure the extension is still idle.
300 void MaybeFinishDelayedInstallation(const std::string& extension_id);
301
[email protected]0db124b02012-11-07 04:55:05302 // Finishes installation of an update for an extension with the specified id,
303 // when installation of that extension was previously delayed because the
304 // extension was in use.
[email protected]6f6101832012-11-27 22:10:48305 virtual void FinishDelayedInstallation(
306 const std::string& extension_id) OVERRIDE;
[email protected]7577a5c52009-07-30 06:21:58307
[email protected]76b65442012-11-17 14:11:48308 // Returns an update for an extension with the specified id, if installation
309 // of that update was previously delayed because the extension was in use. If
310 // no updates are pending for the extension returns NULL.
311 virtual const extensions::Extension* GetPendingExtensionUpdate(
312 const std::string& extension_id) const OVERRIDE;
313
[email protected]4ee07c62012-08-21 12:40:42314 // Go through each extension and unload those that are not allowed to run by
315 // management policy providers (ie. network admin and Google-managed
316 // blacklist).
317 virtual void CheckManagementPolicy() OVERRIDE;
[email protected]aa96d3a2010-08-21 08:45:25318
[email protected]b05fb9ff2011-04-23 00:07:56319 virtual void CheckForUpdatesSoon() OVERRIDE;
[email protected]c3cfb012011-04-06 22:07:35320
[email protected]7577a5c52009-07-30 06:21:58321 void set_extensions_enabled(bool enabled) { extensions_enabled_ = enabled; }
[email protected]abe7a8942009-06-23 05:14:29322 bool extensions_enabled() { return extensions_enabled_; }
323
[email protected]0e34d7892009-06-05 19:17:40324 void set_show_extensions_prompts(bool enabled) {
325 show_extensions_prompts_ = enabled;
[email protected]e2eb43112009-05-29 21:19:54326 }
327
[email protected]0e34d7892009-06-05 19:17:40328 bool show_extensions_prompts() {
329 return show_extensions_prompts_;
[email protected]e2eb43112009-05-29 21:19:54330 }
331
[email protected]c3cfb012011-04-06 22:07:35332 Profile* profile();
[email protected]24e7a9d2009-11-04 11:11:34333
[email protected]599539802014-01-07 23:06:00334 // Returns profile_ as a BrowserContext.
335 content::BrowserContext* GetBrowserContext() const;
336
[email protected]f8aefb132013-10-30 09:29:52337 void set_extension_sync_service(
338 ExtensionSyncService* extension_sync_service) {
339 extension_sync_service_ = extension_sync_service;
340 }
341
[email protected]3ecda252010-11-18 19:50:55342 // Whether the extension service is ready.
[email protected]25ae0152011-11-18 14:40:02343 virtual bool is_ready() OVERRIDE;
[email protected]3ecda252010-11-18 19:50:55344
[email protected]7f8f24f2012-11-15 19:40:14345 virtual base::SequencedTaskRunner* GetFileTaskRunner() OVERRIDE;
346
[email protected]d8c8f25f2011-11-02 18:18:01347 extensions::ComponentLoader* component_loader() {
348 return component_loader_.get();
349 }
350
[email protected]1fab8452009-09-03 02:23:39351 // Note that this may return NULL if autoupdate is not turned on.
[email protected]42a08162012-03-16 18:09:11352 extensions::ExtensionUpdater* updater();
[email protected]1fab8452009-09-03 02:23:39353
[email protected]d11c8e92009-10-20 23:26:40354 // Notify the frontend that there was an error loading an extension.
[email protected]d8c8f25f2011-11-02 18:18:01355 // This method is public because UnpackedInstaller and InstalledLoader
356 // can post to here.
357 // TODO(aa): Remove this. It doesn't do enough to be worth the dependency
358 // of these classes on ExtensionService.
[email protected]650b2d52013-02-10 03:41:45359 void ReportExtensionLoadError(const base::FilePath& extension_path,
[email protected]d11c8e92009-10-20 23:26:40360 const std::string& error,
[email protected]d11c8e92009-10-20 23:26:40361 bool be_noisy);
362
[email protected]add57db72014-04-01 23:25:22363 // Notifies ExtensionSettingsHandler whether or not to retry installation for
364 // given |extension_path|.
365 void NotifyLoadRetry(bool retry, const base::FilePath& extension_path);
366
[email protected]406027c02010-09-27 08:03:18367 // ExtensionHost of background page calls this method right after its render
368 // view has been created.
[email protected]3a1dc572012-07-31 22:25:13369 void DidCreateRenderViewForBackgroundPage(extensions::ExtensionHost* host);
[email protected]406027c02010-09-27 08:03:18370
[email protected]8e4560b62011-01-14 10:09:14371 // For the extension in |version_path| with |id|, check to see if it's an
372 // externally managed extension. If so, uninstall it.
373 void CheckExternalUninstall(const std::string& id);
374
[email protected]7f8f24f2012-11-15 19:40:14375 // Changes sequenced task runner for crx installation tasks to |task_runner|.
376 void SetFileTaskRunnerForTesting(base::SequencedTaskRunner* task_runner);
377
[email protected]5df038b2012-07-16 19:03:27378 // Clear all ExternalProviders.
[email protected]8e4560b62011-01-14 10:09:14379 void ClearProvidersForTesting();
380
[email protected]5df038b2012-07-16 19:03:27381 // Adds an ExternalProviderInterface for the service to use during testing.
382 // Takes ownership of |test_provider|.
383 void AddProviderForTesting(
384 extensions::ExternalProviderInterface* test_provider);
[email protected]8e4560b62011-01-14 10:09:14385
[email protected]5df038b2012-07-16 19:03:27386 // ExternalProvider::Visitor implementation.
[email protected]1c321ee2012-05-21 03:02:34387 virtual bool OnExternalExtensionFileFound(
388 const std::string& id,
[email protected]1f04ef42013-04-22 07:35:50389 const base::Version* version,
[email protected]650b2d52013-02-10 03:41:45390 const base::FilePath& path,
[email protected]1d5e58b2013-01-31 08:41:40391 extensions::Manifest::Location location,
[email protected]1c321ee2012-05-21 03:02:34392 int creation_flags,
393 bool mark_acknowledged) OVERRIDE;
[email protected]8e4560b62011-01-14 10:09:14394
[email protected]1c321ee2012-05-21 03:02:34395 virtual bool OnExternalExtensionUpdateUrlFound(
396 const std::string& id,
[email protected]d8fd0fd2014-03-24 13:16:06397 const std::string& install_parameter,
[email protected]1c321ee2012-05-21 03:02:34398 const GURL& update_url,
[email protected]464213a2013-10-15 01:06:48399 extensions::Manifest::Location location,
400 int creation_flags,
401 bool mark_acknowledged) OVERRIDE;
[email protected]8e4560b62011-01-14 10:09:14402
[email protected]50067e52011-10-20 23:17:07403 virtual void OnExternalProviderReady(
[email protected]5df038b2012-07-16 19:03:27404 const extensions::ExternalProviderInterface* provider) OVERRIDE;
[email protected]50067e52011-10-20 23:17:07405
[email protected]94fde232012-04-27 10:22:30406 // Returns true when all the external extension providers are ready.
407 bool AreAllExternalProvidersReady() const;
408
[email protected]50067e52011-10-20 23:17:07409 void OnAllExternalProvidersReady();
[email protected]8e4560b62011-01-14 10:09:14410
[email protected]612a1cb12012-10-17 13:18:03411 // Checks if there are any new external extensions to notify the user about.
412 void UpdateExternalExtensionAlert();
[email protected]e5af875f2011-10-10 21:09:14413
[email protected]47fc70c2011-12-06 07:29:51414 // Given a (presumably just-installed) extension id, mark that extension as
415 // acknowledged.
416 void AcknowledgeExternalExtension(const std::string& id);
417
[email protected]d96eb512012-11-01 23:44:08418 // Returns true if this extension is an external one that has yet to be
419 // marked as acknowledged.
420 bool IsUnacknowledgedExternalExtension(
421 const extensions::Extension* extension);
422
[email protected]59ee99d2013-10-11 15:46:16423 // Disable extensions that are known to be disabled yet are currently enabled.
424 void ReconcileKnownDisabled();
425
[email protected]6c2381d2011-10-19 02:52:53426 // content::NotificationObserver
[email protected]432115822011-07-10 15:52:27427 virtual void Observe(int type,
[email protected]6c2381d2011-10-19 02:52:53428 const content::NotificationSource& source,
429 const content::NotificationDetails& details) OVERRIDE;
[email protected]4814b512009-11-07 00:12:29430
[email protected]e5f8fffe2014-04-02 00:30:44431 // Postpone installations so that we don't have to worry about race
432 // conditions.
433 void OnGarbageCollectIsolatedStorageStart();
434
435 // Restart any extension installs which were delayed for isolated storage
436 // garbage collection.
437 void OnGarbageCollectIsolatedStorageFinished();
438
[email protected]fe2dd7742011-04-19 22:52:49439 // Record a histogram using the PermissionMessage enum values for each
440 // permission in |e|.
441 // NOTE: If this is ever called with high frequency, the implementation may
442 // need to be made more efficient.
443 static void RecordPermissionMessagesHistogram(
[email protected]1c321ee2012-05-21 03:02:34444 const extensions::Extension* e, const char* histogram);
[email protected]fe2dd7742011-04-19 22:52:49445
[email protected]fa2416f2011-05-03 08:41:20446#if defined(UNIT_TEST)
[email protected]1c321ee2012-05-21 03:02:34447 void TrackTerminatedExtensionForTest(const extensions::Extension* extension) {
[email protected]fa2416f2011-05-03 08:41:20448 TrackTerminatedExtension(extension);
449 }
[email protected]a51c9e92012-12-09 09:19:20450
451 void FinishInstallationForTest(const extensions::Extension* extension) {
452 FinishInstallation(extension);
453 }
[email protected]fa2416f2011-05-03 08:41:20454#endif
455
[email protected]77e4dc0882012-06-20 18:53:50456 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); }
457
[email protected]e5f8fffe2014-04-02 00:30:44458 extensions::ExtensionGarbageCollector* garbage_collector() {
459 return garbage_collector_.get();
460 }
461
[email protected]3c4abc82012-10-22 22:25:54462 bool browser_terminating() const { return browser_terminating_; }
463
[email protected]90878c52014-04-04 18:21:02464 extensions::SharedModuleService* shared_module_service() {
465 return shared_module_service_.get();
466 }
467
[email protected]3c4abc82012-10-22 22:25:54468 // For testing.
469 void set_browser_terminating_for_test(bool value) {
470 browser_terminating_ = value;
471 }
472
[email protected]fc332ae2012-11-14 20:17:33473 // By default ExtensionService will wait with installing an updated extension
474 // until the extension is idle. Tests might not like this behavior, so you can
475 // disable it with this method.
476 void set_install_updates_when_idle_for_test(bool value) {
477 install_updates_when_idle_ = value;
478 }
479
[email protected]4e9b59d2013-12-18 06:47:14480 // Set a callback to be called when all external providers are ready and their
481 // extensions have been installed.
482 void set_external_updates_finished_callback_for_test(
483 const base::Closure& callback) {
484 external_updates_finished_callback_ = callback;
485 }
486
[email protected]75bdcb872013-03-13 00:41:45487 // Adds/Removes update observers.
488 void AddUpdateObserver(extensions::UpdateObserver* observer);
489 void RemoveUpdateObserver(extensions::UpdateObserver* observer);
490
[email protected]14908b72011-04-20 06:54:36491 private:
[email protected]2d19eb6e2014-01-27 17:30:00492 // Populates greylist_.
493 void LoadGreylistFromPrefs();
494
[email protected]4a10006a2013-05-17 23:18:35495 // Signals *ready_ and sends a notification to the listeners.
[email protected]820d9bd2013-04-03 03:46:03496 void SetReadyAndNotifyListeners();
497
[email protected]5db9ada2012-04-11 13:48:20498 // Return true if the sync type of |extension| matches |type|.
[email protected]90bb38d2012-11-14 18:36:03499 void OnExtensionInstallPrefChanged();
500
[email protected]fa2416f2011-05-03 08:41:20501 // Adds the given extension to the list of terminated extensions if
502 // it is not already there and unloads it.
[email protected]1c321ee2012-05-21 03:02:34503 void TrackTerminatedExtension(const extensions::Extension* extension);
[email protected]fa2416f2011-05-03 08:41:20504
505 // Removes the extension with the given id from the list of
506 // terminated extensions if it is there.
[email protected]bb7f40952011-01-13 00:21:20507 void UntrackTerminatedExtension(const std::string& id);
508
[email protected]8c484b742012-11-29 06:05:36509 // Update preferences for a new or updated extension; notify observers that
510 // the extension is installed, e.g., to update event handlers on background
511 // pages; and perform other extension install tasks before calling
512 // AddExtension.
[email protected]d8fd0fd2014-03-24 13:16:06513 void AddNewOrUpdatedExtension(const extensions::Extension* extension,
514 extensions::Extension::State initial_state,
515 extensions::BlacklistState blacklist_state,
516 const syncer::StringOrdinal& page_ordinal,
517 const std::string& install_parameter);
[email protected]8c484b742012-11-29 06:05:36518
[email protected]62d30f42009-10-01 22:36:06519 // Handles sending notification that |extension| was loaded.
[email protected]1c321ee2012-05-21 03:02:34520 void NotifyExtensionLoaded(const extensions::Extension* extension);
[email protected]62d30f42009-10-01 22:36:06521
522 // Handles sending notification that |extension| was unloaded.
[email protected]b0af4792013-10-23 09:12:13523 void NotifyExtensionUnloaded(
524 const extensions::Extension* extension,
525 extensions::UnloadedExtensionInfo::Reason reason);
[email protected]62d30f42009-10-01 22:36:06526
[email protected]6f6101832012-11-27 22:10:48527 // Common helper to finish installing the given extension.
528 void FinishInstallation(const extensions::Extension* extension);
529
[email protected]b914e2952013-04-26 07:10:03530 // Updates the |extension|'s active permission set to include only permissions
531 // currently requested by the extension and all the permissions required by
532 // the extension.
533 void UpdateActivePermissions(const extensions::Extension* extension);
534
535 // Disables the extension if the privilege level has increased
536 // (e.g., due to an upgrade).
537 void CheckPermissionsIncrease(const extensions::Extension* extension,
[email protected]116d40e2013-08-08 17:23:17538 bool is_extension_installed);
[email protected]b914e2952013-04-26 07:10:03539
[email protected]aab98a52009-12-02 03:22:35540 // Helper that updates the active extension list used for crash reporting.
541 void UpdateActiveExtensionsInCrashReporter();
542
[email protected]612a1cb12012-10-17 13:18:03543 // Helper to determine whether we should initially enable an installed
544 // (or upgraded) extension.
545 bool ShouldEnableOnInstall(const extensions::Extension* extension);
546
[email protected]e7aa7b7e2012-11-27 04:51:22547 // Helper to determine if updating an extensions should proceed immediately,
548 // or if we should delay the update until further notice.
549 bool ShouldDelayExtensionUpdate(const std::string& extension_id,
550 bool wait_for_idle) const;
551
[email protected]fdd679b2012-11-15 20:49:39552 // extensions::Blacklist::Observer implementation.
553 virtual void OnBlacklistUpdated() OVERRIDE;
554
[email protected]695b5712012-12-06 23:55:28555 // Manages the blacklisted extensions, intended as callback from
556 // Blacklist::GetBlacklistedIDs.
[email protected]2d19eb6e2014-01-27 17:30:00557 void ManageBlacklist(
558 const extensions::Blacklist::BlacklistStateMap& blacklisted_ids);
559
560 // Add extensions in |blocked| to blacklisted_extensions, remove extensions
561 // that are neither in |blocked|, nor in |unchanged|.
562 void UpdateBlockedExtensions(const ExtensionIdSet& blocked,
563 const ExtensionIdSet& unchanged);
564
565 void UpdateGreylistedExtensions(
566 const ExtensionIdSet& greylist,
567 const ExtensionIdSet& unchanged,
568 const extensions::Blacklist::BlacklistStateMap& state_map);
[email protected]695b5712012-12-06 23:55:28569
[email protected]bb1bc9b32013-12-21 03:09:14570 // Used only by test code.
571 void UnloadAllExtensionsInternal();
572
[email protected]31d8f5f22012-04-02 15:22:08573 // The normal profile associated with this ExtensionService.
[email protected]6ef635e42009-07-26 06:16:12574 Profile* profile_;
575
[email protected]31d8f5f22012-04-02 15:22:08576 // The ExtensionSystem for the profile above.
[email protected]bd306722012-07-11 20:43:59577 extensions::ExtensionSystem* system_;
[email protected]31d8f5f22012-04-02 15:22:08578
[email protected]695b5712012-12-06 23:55:28579 // Preferences for the owning profile.
[email protected]45759612012-07-10 17:21:23580 extensions::ExtensionPrefs* extension_prefs_;
[email protected]894bb502009-05-21 22:39:57581
[email protected]695b5712012-12-06 23:55:28582 // Blacklist for the owning profile.
583 extensions::Blacklist* blacklist_;
584
[email protected]f8aefb132013-10-30 09:29:52585 // The ExtensionSyncService that is used by this ExtensionService.
586 ExtensionSyncService* extension_sync_service_;
587
[email protected]5fdfa562013-12-27 17:43:59588 // Sets of enabled/disabled/terminated/blacklisted extensions. Not owned.
589 extensions::ExtensionRegistry* registry_;
[email protected]695b5712012-12-06 23:55:28590
[email protected]2d19eb6e2014-01-27 17:30:00591 // Set of greylisted extensions. These extensions are disabled if they are
592 // already installed in Chromium at the time when they are added to
593 // the greylist. Unlike blacklisted extensions, greylisted ones are visible
594 // to the user and if user re-enables such an extension, they remain enabled.
595 //
596 // These extensions should appear in registry_.
597 extensions::ExtensionSet greylist_;
598
[email protected]9f4e4f082013-06-21 07:11:19599 // The list of extension installs delayed for various reasons. The reason
[email protected]bb1bc9b32013-12-21 03:09:14600 // for delayed install is stored in ExtensionPrefs. These are not part of
601 // ExtensionRegistry because they are not yet installed.
[email protected]289c44b2013-12-17 03:26:57602 extensions::ExtensionSet delayed_installs_;
[email protected]0db124b02012-11-07 04:55:05603
[email protected]b2907fd2011-03-25 16:43:37604 // Hold the set of pending extensions.
[email protected]3f213ad2012-07-26 23:39:41605 extensions::PendingExtensionManager pending_extension_manager_;
[email protected]aa142702010-03-26 01:26:33606
[email protected]6014d672008-12-05 00:38:25607 // The full path to the directory where extensions are installed.
[email protected]650b2d52013-02-10 03:41:45608 base::FilePath install_directory_;
[email protected]6014d672008-12-05 00:38:25609
[email protected]e2eb43112009-05-29 21:19:54610 // Whether or not extensions are enabled.
611 bool extensions_enabled_;
612
[email protected]0e34d7892009-06-05 19:17:40613 // Whether to notify users when they attempt to install an extension.
614 bool show_extensions_prompts_;
[email protected]e2eb43112009-05-29 21:19:54615
[email protected]fc332ae2012-11-14 20:17:33616 // Whether to delay installing of extension updates until the extension is
617 // idle.
618 bool install_updates_when_idle_;
619
[email protected]4a10006a2013-05-17 23:18:35620 // Signaled when all extensions are loaded.
621 extensions::OneShotEvent* const ready_;
[email protected]e81dba32009-06-19 20:19:13622
[email protected]93fd78f42009-07-10 16:43:17623 // Our extension updater, if updates are turned on.
[email protected]42a08162012-03-16 18:09:11624 scoped_ptr<extensions::ExtensionUpdater> updater_;
[email protected]93fd78f42009-07-10 16:43:17625
[email protected]1eb175082010-02-10 09:26:16626 // Map unloaded extensions' ids to their paths. When a temporarily loaded
[email protected]5fb889382011-06-03 00:29:20627 // extension is unloaded, we lose the information about it and don't have
[email protected]1eb175082010-02-10 09:26:16628 // any in the extension preferences file.
[email protected]650b2d52013-02-10 03:41:45629 typedef std::map<std::string, base::FilePath> UnloadedExtensionPathMap;
[email protected]1eb175082010-02-10 09:26:16630 UnloadedExtensionPathMap unloaded_extension_paths_;
631
[email protected]b914e2952013-04-26 07:10:03632 // Store the ids of reloading extensions.
633 std::set<std::string> reloading_extensions_;
[email protected]f17dbd42010-08-16 23:21:10634
[email protected]04ea1bb2013-07-10 09:26:09635 // Map of DevToolsAgentHost instances that are detached,
636 // waiting for an extension to be reloaded.
637 typedef std::map<std::string, scoped_refptr<content::DevToolsAgentHost> >
638 OrphanedDevTools;
[email protected]4814b512009-11-07 00:12:29639 OrphanedDevTools orphaned_dev_tools_;
640
[email protected]6c2381d2011-10-19 02:52:53641 content::NotificationRegistrar registrar_;
[email protected]2fb7dc982010-09-29 12:24:28642 PrefChangeRegistrar pref_change_registrar_;
[email protected]4814b512009-11-07 00:12:29643
[email protected]d8c8f25f2011-11-02 18:18:01644 // Keeps track of loading and unloading component extensions.
645 scoped_ptr<extensions::ComponentLoader> component_loader_;
646
[email protected]8e4560b62011-01-14 10:09:14647 // A collection of external extension providers. Each provider reads
648 // a source of external extension information. Examples include the
649 // windows registry and external_extensions.json.
[email protected]5df038b2012-07-16 19:03:27650 extensions::ProviderCollection external_extension_providers_;
[email protected]8e4560b62011-01-14 10:09:14651
652 // Set to true by OnExternalExtensionUpdateUrlFound() when an external
[email protected]94fde232012-04-27 10:22:30653 // extension URL is found, and by CheckForUpdatesSoon() when an update check
654 // has to wait for the external providers. Used in
655 // OnAllExternalProvidersReady() to determine if an update check is needed to
656 // install pending extensions.
657 bool update_once_all_providers_are_ready_;
[email protected]8e4560b62011-01-14 10:09:14658
[email protected]4e9b59d2013-12-18 06:47:14659 // A callback to be called when all external providers are ready and their
660 // extensions have been installed. Normally this is a null callback, but
661 // is used in external provider related tests.
662 base::Closure external_updates_finished_callback_;
663
[email protected]3c4abc82012-10-22 22:25:54664 // Set when the browser is terminating. Prevents us from installing or
665 // updating additional extensions and allows in-progress installations to
666 // decide to abort.
667 bool browser_terminating_;
668
[email protected]9f4e4f082013-06-21 07:11:19669 // Set to true to delay all new extension installations. Acts as a lock to
670 // allow background processing of garbage collection of on-disk state without
671 // needing to worry about race conditions caused by extension installation and
672 // reinstallation.
673 bool installs_delayed_for_gc_;
[email protected]399583b2012-12-11 09:33:42674
[email protected]460c6712013-04-24 07:20:01675 // Set to true if this is the first time this ExtensionService has run.
676 // Used for specially handling external extensions that are installed the
677 // first time.
678 bool is_first_run_;
679
[email protected]e178ad92013-06-28 02:29:25680 // A set of the extension ids currently being reloaded. We use this to
681 // avoid showing a "new install" notice for an extension reinstall.
682 std::set<std::string> extensions_being_reloaded_;
683
[email protected]3964e572014-02-13 21:57:41684 // A set of the extension ids currently being terminated. We use this to
685 // avoid trying to unload the same extension twice.
686 std::set<std::string> extensions_being_terminated_;
687
[email protected]373daf972014-04-10 01:50:44688 // The controller for the UI that alerts the user about any blacklisted
689 // extensions.
690 scoped_ptr<extensions::ExtensionErrorController> error_controller_;
691
[email protected]7f8f24f2012-11-15 19:40:14692 // Sequenced task runner for extension related file operations.
693 scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
[email protected]a9aa5932012-01-25 08:27:40694
[email protected]9ce11d22012-08-08 23:20:13695#if defined(ENABLE_EXTENSIONS)
[email protected]c77f2352012-08-08 22:07:58696 scoped_ptr<extensions::ExtensionActionStorageManager>
697 extension_action_storage_manager_;
[email protected]9ce11d22012-08-08 23:20:13698#endif
[email protected]4c9201c42013-08-16 04:56:21699 scoped_ptr<extensions::ManagementPolicy::Provider>
700 shared_module_policy_provider_;
[email protected]c77f2352012-08-08 22:07:58701
[email protected]e5f8fffe2014-04-02 00:30:44702 // The ExtensionGarbageCollector to clean up all the garbage that leaks into
703 // the extensions directory.
704 scoped_ptr<extensions::ExtensionGarbageCollector> garbage_collector_;
[email protected]c04fd3dd2013-09-05 08:20:10705
[email protected]90878c52014-04-04 18:21:02706 // The SharedModuleService used to check for import dependencies.
707 scoped_ptr<extensions::SharedModuleService> shared_module_service_;
708
[email protected]e5f8fffe2014-04-02 00:30:44709 ObserverList<extensions::UpdateObserver, true> update_observers_;
[email protected]efdb7f1a2014-03-28 20:43:38710
[email protected]eaa7dd182010-12-14 11:09:00711 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
[email protected]c2c263c2010-08-13 21:59:48712 InstallAppsWithUnlimtedStorage);
[email protected]eaa7dd182010-12-14 11:09:00713 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
[email protected]654512b2010-09-01 02:09:42714 InstallAppsAndCheckStorageProtection);
[email protected]f71b582c2014-01-10 17:03:15715 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, SetUnsetBlacklistInPrefs);
716 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
717 BlacklistedExtensionWillNotInstall);
718 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
719 UnloadBlacklistedExtensionPolicy);
720 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
721 WillNotLoadBlacklistedExtensionsFromDirectory);
722 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
723 BlacklistedInPrefsFromStartup);
[email protected]2d19eb6e2014-01-27 17:30:00724 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
725 GreylistedExtensionDisabled);
726 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
727 GreylistDontEnableManuallyDisabled);
728 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
729 GreylistUnknownDontChange);
[email protected]eaa7dd182010-12-14 11:09:00730 DISALLOW_COPY_AND_ASSIGN(ExtensionService);
[email protected]6014d672008-12-05 00:38:25731};
732
[email protected]eaa7dd182010-12-14 11:09:00733#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_