| 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_EXTERNAL_POLICY_EXTENSION_LOADER_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_LOADER_H_ | |
| 7 | |
| 8 #include "chrome/browser/extensions/external_extension_loader.h" | |
| 9 | |
| 10 #include "base/compiler_specific.h" | |
| 11 #include "chrome/browser/prefs/pref_change_registrar.h" | |
| 12 #include "content/public/browser/notification_observer.h" | |
| 13 #include "content/public/browser/notification_registrar.h" | |
| 14 | |
| 15 class Profile; | |
| 16 | |
| 17 // A specialization of the ExternalExtensionProvider that uses | |
| 18 // prefs::kExtensionInstallForceList to look up which external extensions are | |
| 19 // registered. | |
| 20 class ExternalPolicyExtensionLoader | |
| 21 : public ExternalExtensionLoader, | |
| 22 public content::NotificationObserver { | |
| 23 public: | |
| 24 explicit ExternalPolicyExtensionLoader(Profile* profile); | |
| 25 | |
| 26 // content::NotificationObserver implementation | |
| 27 virtual void Observe(int type, | |
| 28 const content::NotificationSource& source, | |
| 29 const content::NotificationDetails& details) OVERRIDE; | |
| 30 | |
| 31 protected: | |
| 32 virtual void StartLoading() OVERRIDE; | |
| 33 | |
| 34 private: | |
| 35 friend class base::RefCountedThreadSafe<ExternalExtensionLoader>; | |
| 36 | |
| 37 virtual ~ExternalPolicyExtensionLoader() {} | |
| 38 | |
| 39 PrefChangeRegistrar pref_change_registrar_; | |
| 40 content::NotificationRegistrar notification_registrar_; | |
| 41 | |
| 42 Profile* profile_; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(ExternalPolicyExtensionLoader); | |
| 45 }; | |
| 46 | |
| 47 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_LOADER_H_ | |
| OLD | NEW |