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

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

Powered by Google App Engine
This is Rietveld 408576698