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 <string> | |
| 10 | |
| 11 #include "base/memory/ref_counted.h" | |
| 12 #include "base/memory/scoped_ptr.h" | |
|
Aaron Boodman
2011/10/28 22:21:58
Double check that all these includes and forward d
Yoyo Zhou
2011/10/31 21:58:15
Done.
| |
| 13 | |
| 14 class ComponentLoader; | |
| 15 class Extension; | |
| 16 class ExtensionInfo; | |
| 17 class ExtensionPrefs; | |
| 18 class ExtensionService; | |
| 19 class FilePath; | |
| 20 | |
| 21 // Loads installed extensions from the . | |
|
Aaron Boodman
2011/10/28 22:21:58
Ooohh, suspense. Loads them from where?? I must kn
Yoyo Zhou
2011/10/31 21:58:15
leave 'em hanging.
| |
| 22 class InstalledExtensionLoader | |
| 23 : public base::RefCountedThreadSafe<InstalledExtensionLoader> { | |
| 24 public: | |
| 25 InstalledExtensionLoader(ExtensionService* extension_service, | |
| 26 ExtensionPrefs* extension_prefs); | |
| 27 virtual ~InstalledExtensionLoader(); | |
| 28 | |
| 29 ExtensionService* extension_service() { return extension_service_; } | |
| 30 | |
| 31 ExtensionPrefs* extension_prefs() { return extension_prefs_; } | |
| 32 | |
| 33 // Loads extension from prefs. | |
| 34 void Load(const ExtensionInfo& info, bool write_to_prefs); | |
| 35 | |
| 36 // Loads all installed extensions (used by startup and testing code). | |
| 37 void LoadAllExtensions(); | |
| 38 | |
| 39 private: | |
| 40 // Returns the flags that should be used with Extension::Create() for an | |
| 41 // extension that is already installed. | |
| 42 int GetExtensionCreateFlagsForInstalledExtension( | |
| 43 const ExtensionInfo* info); | |
| 44 | |
| 45 ExtensionService* extension_service_; | |
| 46 | |
| 47 ExtensionPrefs* extension_prefs_; | |
| 48 }; | |
| 49 | |
| 50 #endif // CHROME_BROWSER_EXTENSIONS_INSTALLED_EXTENSION_LOADER_H_ | |
| OLD | NEW |