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

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

Issue 5742008: Clean up threading model of external extension providers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: final rebase Created 9 years, 11 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 | Annotate | Revision Log
OLDNEW
(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 #pragma once
8
9 #include "chrome/browser/extensions/external_extension_loader.h"
10
11 #include "chrome/browser/prefs/pref_change_registrar.h"
12 #include "chrome/common/notification_observer.h"
13 #include "chrome/common/notification_registrar.h"
14
15 class ListValue;
16 class MockExternalPolicyExtensionProviderVisitor;
17 class Profile;
18
19 // A specialization of the ExternalExtensionProvider that uses
20 // prefs::kExtensionInstallForceList to look up which external extensions are
21 // registered.
22 class ExternalPolicyExtensionLoader
23 : public ExternalExtensionLoader,
24 public NotificationObserver {
25 public:
26 explicit ExternalPolicyExtensionLoader(Profile* profile);
27
28 // NotificationObserver implementation
29 virtual void Observe(NotificationType type,
30 const NotificationSource& source,
31 const NotificationDetails& details);
32
33 protected:
34 virtual void StartLoading();
35
36 private:
37 friend class base::RefCountedThreadSafe<ExternalExtensionLoader>;
38
39 virtual ~ExternalPolicyExtensionLoader() {}
40
41 PrefChangeRegistrar pref_change_registrar_;
42 NotificationRegistrar notification_registrar_;
43
44 Profile* profile_;
45
46 DISALLOW_COPY_AND_ASSIGN(ExternalPolicyExtensionLoader);
47 };
48
49 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_POLICY_EXTENSION_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698