Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |