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

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

Issue 9369013: 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, 10 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 // Creates an ExtensionService initialized with the testing profile and
21 // returns it.
22 ExtensionService* CreateExtensionService(const CommandLine* command_line,
23 const FilePath& install_directory,
24 bool autoupdate_enabled);
25
26 // Creates an ExtensionProcessManager. If not invoked, the
27 // ExtensionProcessManager is NULL.
28 void CreateExtensionProcessManager();
29
30 virtual void InitPrefs(bool extensions_enabled,
31 ExtensionPrefValueMap* pref_value_map) OVERRIDE {}
32 virtual void Init(bool extensions_enabled) OVERRIDE {}
33 virtual ExtensionService* extension_service() OVERRIDE;
34 void SetExtensionService(ExtensionService* service);
35 virtual UserScriptMaster* user_script_master() OVERRIDE;
36 virtual ExtensionDevToolsManager* devtools_manager() OVERRIDE;
37 virtual ExtensionProcessManager* process_manager() OVERRIDE;
38 virtual ExtensionInfoMap* info_map() OVERRIDE;
39 virtual ExtensionMessageService* message_service() OVERRIDE;
40 virtual ExtensionEventRouter* event_router() OVERRIDE;
41
42 virtual void DestroyProcessManager() OVERRIDE;
43
44 // Factory method for tests to use with SetTestingProfile.
45 static ProfileKeyedService* Build(Profile* profile);
46
47 private:
48 Profile* profile_;
49
50 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
51 // The Extension Preferences. Only created if CreateExtensionService is
52 // invoked.
53 scoped_ptr<ExtensionPrefs> extension_prefs_;
54 scoped_ptr<ExtensionService> extension_service_;
55 scoped_ptr<ExtensionProcessManager> extension_process_manager_;
56 };
57
58 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698