• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4 
5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_
7 
8 #include <string>
9 
10 #include "base/compiler_specific.h"
11 #include "chrome/browser/extensions/external_loader.h"
12 
13 namespace extensions {
14 
15 // A specialization of the ExternalLoader that loads a hard-coded list of
16 // external extensions, that should be considered components of chrome (but
17 // unlike Component extensions, these extensions are installed from the webstore
18 // and don't get access to component only APIs.
19 // Instances of this class are expected to be created and destroyed on the UI
20 // thread and they are expecting public method calls from the UI thread.
21 class ExternalComponentLoader : public ExternalLoader {
22  public:
23   ExternalComponentLoader();
24 
25   static bool IsEnhancedBookmarksExperimentEnabled();
26 
27  protected:
28   virtual void StartLoading() OVERRIDE;
29 
30  private:
31   friend class base::RefCountedThreadSafe<ExternalLoader>;
32   virtual ~ExternalComponentLoader();
33 
34   DISALLOW_COPY_AND_ASSIGN(ExternalComponentLoader);
35 };
36 
37 }  // namespace extensions
38 
39 #endif  // CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_
40