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

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

Issue 9583036: Revert 124817 - Take extensions out of Profile into a profile-keyed service, ExtensionSystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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) 2012 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_TEST_EXTENSION_SYSTEM_H_
6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
7 #pragma once
8
9 #include "chrome/browser/extensions/extension_system.h"
10
11 class CommandLine;
12 class FilePath;
13
14 // Test ExtensionSystem, for use with TestingProfile.
15 class TestExtensionSystem : public ExtensionSystem {
16 public:
17 explicit TestExtensionSystem(Profile* profile);
18 virtual ~TestExtensionSystem();
19
20 // ProfileKeyedService implementation.
21 virtual void Shutdown() OVERRIDE;
22
23 // Creates an ExtensionService initialized with the testing profile and
24 // returns it.
25 ExtensionService* CreateExtensionService(const CommandLine* command_line,
26 const FilePath& install_directory,
27 bool autoupdate_enabled);
28
29 // Creates an ExtensionProcessManager. If not invoked, the
30 // ExtensionProcessManager is NULL.
31 void CreateExtensionProcessManager();
32
33 virtual void Init(bool extensions_enabled) OVERRIDE {}
34 virtual ExtensionService* extension_service() OVERRIDE;
35 void SetExtensionService(ExtensionService* service);
36 virtual UserScriptMaster* user_script_master() OVERRIDE;
37 virtual ExtensionDevToolsManager* devtools_manager() OVERRIDE;
38 virtual ExtensionProcessManager* process_manager() OVERRIDE;
39 virtual ExtensionInfoMap* info_map() OVERRIDE;
40 virtual ExtensionMessageService* message_service() OVERRIDE;
41 virtual ExtensionEventRouter* event_router() OVERRIDE;
42
43 // Factory method for tests to use with SetTestingProfile.
44 static ProfileKeyedBase* Build(Profile* profile);
45
46 private:
47 Profile* profile_;
48
49 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
50 // The Extension Preferences. Only created if CreateExtensionService is
51 // invoked.
52 scoped_ptr<ExtensionPrefs> extension_prefs_;
53 scoped_ptr<ExtensionService> extension_service_;
54 scoped_ptr<ExtensionProcessManager> extension_process_manager_;
55 };
56
57 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_updater_unittest.cc ('k') | chrome/browser/extensions/test_extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698