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

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

Issue 12211029: Sanity tweaks to the extension blacklist: check all extensions at once on (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ready for review Created 7 years, 10 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 | Annotate | Revision Log
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_INSTALLED_LOADER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_
7 7
8 #include "base/memory/ref_counted.h"
9
8 class ExtensionService; 10 class ExtensionService;
9 11
10 namespace extensions { 12 namespace extensions {
11 13
14 class Extension;
12 class ExtensionPrefs; 15 class ExtensionPrefs;
13 struct ExtensionInfo; 16 struct ExtensionInfo;
14 17
15 // Loads installed extensions from the prefs. 18 // Loads installed extensions from the prefs.
16 class InstalledLoader { 19 class InstalledLoader {
17 public: 20 public:
18 explicit InstalledLoader(ExtensionService* extension_service); 21 explicit InstalledLoader(ExtensionService* extension_service);
19 virtual ~InstalledLoader(); 22 virtual ~InstalledLoader();
20 23
21 // Loads extension from prefs. 24 // Loads extension from prefs.
22 void Load(const ExtensionInfo& info, bool write_to_prefs); 25 scoped_refptr<const Extension> Load(const ExtensionInfo& info,
26 bool write_to_prefs);
23 27
24 // Loads all installed extensions (used by startup and testing code). 28 // Loads all installed extensions (used by startup and testing code).
25 void LoadAllExtensions(); 29 void LoadAllExtensions();
26 30
27 private: 31 private:
28 // Returns the flags that should be used with Extension::Create() for an 32 // Returns the flags that should be used with Extension::Create() for an
29 // extension that is already installed. 33 // extension that is already installed.
30 int GetCreationFlags(const ExtensionInfo* info); 34 int GetCreationFlags(const ExtensionInfo* info);
31 35
32 ExtensionService* extension_service_; 36 ExtensionService* extension_service_;
33 37
34 ExtensionPrefs* extension_prefs_; 38 ExtensionPrefs* extension_prefs_;
35 }; 39 };
36 40
37 } // namespace extensions 41 } // namespace extensions
38 42
39 #endif // CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_ 43 #endif // CHROME_BROWSER_EXTENSIONS_INSTALLED_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698