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

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

Issue 8417012: Refactor loading out of ExtensionService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aa's 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_EXTENSION_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALLED_EXTENSION_LOADER_H_
7 #pragma once
8
9 #include "base/memory/ref_counted.h"
10
11 class Extension;
12 class ExtensionInfo;
13 class ExtensionPrefs;
14 class ExtensionService;
15
16 namespace extensions {
17
18 // Loads installed extensions from the prefs.
19 class InstalledExtensionLoader
Aaron Boodman 2011/10/31 22:33:25 You could get rid of the "Extension" from the clas
Yoyo Zhou 2011/11/01 21:50:57 Done.
20 : public base::RefCountedThreadSafe<InstalledExtensionLoader> {
21 public:
22 InstalledExtensionLoader(ExtensionService* extension_service,
23 ExtensionPrefs* extension_prefs);
24 virtual ~InstalledExtensionLoader();
25
26 ExtensionService* extension_service() { return extension_service_; }
27
28 ExtensionPrefs* extension_prefs() { return extension_prefs_; }
29
30 // Loads extension from prefs.
31 void Load(const ExtensionInfo& info, bool write_to_prefs);
32
33 // Loads all installed extensions (used by startup and testing code).
34 void LoadAllExtensions();
35
36 private:
37 // Returns the flags that should be used with Extension::Create() for an
38 // extension that is already installed.
39 int GetCreationFlags(const ExtensionInfo* info);
40
41 ExtensionService* extension_service_;
42
43 ExtensionPrefs* extension_prefs_;
44 };
45
46 } // namespace extensions
47
48 #endif // CHROME_BROWSER_EXTENSIONS_INSTALLED_EXTENSION_LOADER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/installed_extension_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698