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

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

Issue 10692168: Moved ExternalExtensionLoaders/Providers into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Even later master Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2011 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_EXTERNAL_POLICY_EXTENSION_LOADER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_LOADER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_LOADER_H_
7 7
8 #include "chrome/browser/extensions/external_extension_loader.h" 8 #include "chrome/browser/extensions/external_loader.h"
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "chrome/browser/prefs/pref_change_registrar.h" 11 #include "chrome/browser/prefs/pref_change_registrar.h"
12 #include "content/public/browser/notification_observer.h" 12 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 13 #include "content/public/browser/notification_registrar.h"
14 14
15 class Profile; 15 class Profile;
16 16
17 // A specialization of the ExternalExtensionProvider that uses 17 namespace extensions {
18
19 // A specialization of the ExternalProvider that uses
18 // prefs::kExtensionInstallForceList to look up which external extensions are 20 // prefs::kExtensionInstallForceList to look up which external extensions are
19 // registered. 21 // registered.
20 class ExternalPolicyExtensionLoader 22 class ExternalPolicyLoader
21 : public ExternalExtensionLoader, 23 : public ExternalLoader,
22 public content::NotificationObserver { 24 public content::NotificationObserver {
23 public: 25 public:
24 explicit ExternalPolicyExtensionLoader(Profile* profile); 26 explicit ExternalPolicyLoader(Profile* profile);
25 27
26 // content::NotificationObserver implementation 28 // content::NotificationObserver implementation
27 virtual void Observe(int type, 29 virtual void Observe(int type,
28 const content::NotificationSource& source, 30 const content::NotificationSource& source,
29 const content::NotificationDetails& details) OVERRIDE; 31 const content::NotificationDetails& details) OVERRIDE;
30 32
31 protected: 33 protected:
32 virtual void StartLoading() OVERRIDE; 34 virtual void StartLoading() OVERRIDE;
33 35
34 private: 36 private:
35 friend class base::RefCountedThreadSafe<ExternalExtensionLoader>; 37 friend class base::RefCountedThreadSafe<ExternalLoader>;
36 38
37 virtual ~ExternalPolicyExtensionLoader() {} 39 virtual ~ExternalPolicyLoader() {}
38 40
39 PrefChangeRegistrar pref_change_registrar_; 41 PrefChangeRegistrar pref_change_registrar_;
40 content::NotificationRegistrar notification_registrar_; 42 content::NotificationRegistrar notification_registrar_;
41 43
42 Profile* profile_; 44 Profile* profile_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(ExternalPolicyExtensionLoader); 46 DISALLOW_COPY_AND_ASSIGN(ExternalPolicyLoader);
45 }; 47 };
46 48
47 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_LOADER_H_ 49 } // namespace extensions
50
51 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698