Revert of Don't install OEM default apps for enterprise users (patchset #1 id:1 of...
[chromium-blink-merge.git] / chrome / browser / extensions / external_component_loader.h
blob3a5d53c9cea3aef364821f6f32c96e66bdb01255
1 // Copyright (c) 2013 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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_
8 #include <string>
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/extensions/external_loader.h"
12 #include "chrome/browser/profiles/profile.h"
14 namespace extensions {
16 class Extension;
18 // A specialization of the ExternalLoader that loads a hard-coded list of
19 // external extensions, that should be considered components of chrome (but
20 // unlike Component extensions, these extensions are installed from the webstore
21 // and don't get access to component only APIs.
22 // Instances of this class are expected to be created and destroyed on the UI
23 // thread and they are expecting public method calls from the UI thread.
24 class ExternalComponentLoader : public ExternalLoader {
25 public:
26 explicit ExternalComponentLoader(Profile* profile);
28 // True if |extension| should be modifiable by the user.
29 static bool IsModifiable(const extensions::Extension* extension);
31 protected:
32 void StartLoading() override;
34 private:
35 friend class base::RefCountedThreadSafe<ExternalLoader>;
36 ~ExternalComponentLoader() override;
38 // The profile that this loader is associated with. It listens for
39 // preference changes for that profile.
40 Profile* profile_;
41 DISALLOW_COPY_AND_ASSIGN(ExternalComponentLoader);
44 } // namespace extensions
46 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_