Revert 285173 "Removed InProcessBrowserTest::CleanUpOnMainThread()"
[chromium-blink-merge.git] / chrome / browser / extensions / external_component_loader.h
blob0312d5b42c43adb027f1af0e3bb9c910c7f24682
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 // A specialization of the ExternalLoader that loads a hard-coded list of
17 // external extensions, that should be considered components of chrome (but
18 // unlike Component extensions, these extensions are installed from the webstore
19 // and don't get access to component only APIs.
20 // Instances of this class are expected to be created and destroyed on the UI
21 // thread and they are expecting public method calls from the UI thread.
22 class ExternalComponentLoader : public ExternalLoader {
23 public:
24 explicit ExternalComponentLoader(Profile* profile);
26 protected:
27 virtual void StartLoading() OVERRIDE;
29 private:
30 friend class base::RefCountedThreadSafe<ExternalLoader>;
31 virtual ~ExternalComponentLoader();
33 // The profile that this loader is associated with. It listens for
34 // preference changes for that profile.
35 Profile* profile_;
36 DISALLOW_COPY_AND_ASSIGN(ExternalComponentLoader);
39 } // namespace extensions
41 #endif // CHROME_BROWSER_EXTENSIONS_EXTERNAL_COMPONENT_LOADER_H_