Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / extensions / installed_loader.h
blob8d8ec7f166e2c6e71bedb26cefb259a5a5705804
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_
8 class ExtensionService;
10 namespace extensions {
12 class ExtensionPrefs;
13 class ExtensionRegistry;
14 struct ExtensionInfo;
16 // Loads installed extensions from the prefs.
17 class InstalledLoader {
18 public:
19 explicit InstalledLoader(ExtensionService* extension_service);
20 virtual ~InstalledLoader();
22 // Loads extension from prefs.
23 void Load(const ExtensionInfo& info, bool write_to_prefs);
25 // Loads all installed extensions (used by startup and testing code).
26 void LoadAllExtensions();
28 private:
29 // Returns the flags that should be used with Extension::Create() for an
30 // extension that is already installed.
31 int GetCreationFlags(const ExtensionInfo* info);
33 // Record metrics related to the loaded extensions.
34 void RecordExtensionsMetrics();
36 ExtensionService* extension_service_;
37 ExtensionRegistry* extension_registry_;
39 ExtensionPrefs* extension_prefs_;
42 } // namespace extensions
44 #endif // CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_