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

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

Issue 8417012: Refactor loading out of ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: components Created 9 years, 1 month 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_
7 #pragma once
8
9 class Extension;
10 class ExtensionInfo;
11 class ExtensionPrefs;
12 class ExtensionService;
13
14 namespace extensions {
15
16 // Loads installed extensions from the prefs.
17 class InstalledLoader {
18 public:
19 explicit InstalledLoader(ExtensionService* extension_service);
20 virtual ~InstalledLoader();
21
22 ExtensionService* extension_service() { return extension_service_; }
23
24 ExtensionPrefs* extension_prefs() { return extension_prefs_; }
25
26 // Loads extension from prefs.
27 void Load(const ExtensionInfo& info, bool write_to_prefs);
28
29 // Loads all installed extensions (used by startup and testing code).
30 void LoadAllExtensions();
31
32 private:
33 // Returns the flags that should be used with Extension::Create() for an
34 // extension that is already installed.
35 int GetCreationFlags(const ExtensionInfo* info);
36
37 ExtensionService* extension_service_;
38
39 ExtensionPrefs* extension_prefs_;
40 };
41
42 } // namespace extensions
43
44 #endif // CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698