[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 1 | // Copyright 2014 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 | #include "extensions/browser/mock_extension_system.h" | ||||
6 | |||||
cmumford | 6ae8d46 | 2016-03-24 20:35:27 | [diff] [blame] | 7 | #include "extensions/browser/value_store/value_store_factory.h" |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 8 | #include "extensions/common/extension_set.h" |
9 | |||||
10 | namespace extensions { | ||||
11 | |||||
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 12 | MockExtensionSystem::MockExtensionSystem(content::BrowserContext* context) |
juncai | cf52333 | 2015-06-04 00:14:04 | [diff] [blame] | 13 | : browser_context_(context) { |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 14 | } |
15 | |||||
16 | MockExtensionSystem::~MockExtensionSystem() { | ||||
17 | } | ||||
18 | |||||
Randy Smith | 64399d6 | 2017-12-20 04:33:40 | [diff] [blame] | 19 | void MockExtensionSystem::InitForRegularProfile(bool extensions_enabled) {} |
20 | |||||
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 21 | ExtensionService* MockExtensionSystem::extension_service() { |
jamescook | 6a8982b | 2014-11-19 00:24:56 | [diff] [blame] | 22 | return nullptr; |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 23 | } |
24 | |||||
25 | RuntimeData* MockExtensionSystem::runtime_data() { | ||||
jamescook | 6a8982b | 2014-11-19 00:24:56 | [diff] [blame] | 26 | return nullptr; |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 27 | } |
28 | |||||
29 | ManagementPolicy* MockExtensionSystem::management_policy() { | ||||
jamescook | 6a8982b | 2014-11-19 00:24:56 | [diff] [blame] | 30 | return nullptr; |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 31 | } |
32 | |||||
rdevlin.cronin | f5863da | 2015-09-10 19:21:45 | [diff] [blame] | 33 | ServiceWorkerManager* MockExtensionSystem::service_worker_manager() { |
34 | return nullptr; | ||||
35 | } | ||||
36 | |||||
[email protected] | 15ad2ee | 2014-08-15 19:15:26 | [diff] [blame] | 37 | SharedUserScriptMaster* MockExtensionSystem::shared_user_script_master() { |
jamescook | 6a8982b | 2014-11-19 00:24:56 | [diff] [blame] | 38 | return nullptr; |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 39 | } |
40 | |||||
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 41 | StateStore* MockExtensionSystem::state_store() { |
jamescook | 6a8982b | 2014-11-19 00:24:56 | [diff] [blame] | 42 | return nullptr; |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 43 | } |
44 | |||||
45 | StateStore* MockExtensionSystem::rules_store() { | ||||
jamescook | 6a8982b | 2014-11-19 00:24:56 | [diff] [blame] | 46 | return nullptr; |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 47 | } |
48 | |||||
cmumford | 6ae8d46 | 2016-03-24 20:35:27 | [diff] [blame] | 49 | scoped_refptr<ValueStoreFactory> MockExtensionSystem::store_factory() { |
50 | return nullptr; | ||||
51 | } | ||||
52 | |||||
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 53 | InfoMap* MockExtensionSystem::info_map() { |
jamescook | 6a8982b | 2014-11-19 00:24:56 | [diff] [blame] | 54 | return nullptr; |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 55 | } |
56 | |||||
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 57 | QuotaService* MockExtensionSystem::quota_service() { |
jamescook | 6a8982b | 2014-11-19 00:24:56 | [diff] [blame] | 58 | return nullptr; |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 59 | } |
60 | |||||
treib | 926ee2d | 2015-08-06 10:55:42 | [diff] [blame] | 61 | AppSorting* MockExtensionSystem::app_sorting() { |
62 | return nullptr; | ||||
63 | } | ||||
64 | |||||
Christopher Lam | ebb9020 | 2019-04-04 03:42:36 | [diff] [blame] | 65 | const base::OneShotEvent& MockExtensionSystem::ready() const { |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 66 | return ready_; |
67 | } | ||||
68 | |||||
69 | ContentVerifier* MockExtensionSystem::content_verifier() { | ||||
jamescook | 6a8982b | 2014-11-19 00:24:56 | [diff] [blame] | 70 | return nullptr; |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 71 | } |
72 | |||||
dcheng | f5d24108 | 2016-04-21 03:43:11 | [diff] [blame] | 73 | std::unique_ptr<ExtensionSet> MockExtensionSystem::GetDependentExtensions( |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 74 | const Extension* extension) { |
dcheng | f5d24108 | 2016-04-21 03:43:11 | [diff] [blame] | 75 | return std::unique_ptr<ExtensionSet>(); |
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 76 | } |
77 | |||||
Minh X. Nguyen | 3097534 | 2017-12-04 22:02:41 | [diff] [blame] | 78 | void MockExtensionSystem::InstallUpdate( |
79 | const std::string& extension_id, | ||||
80 | const std::string& public_key, | ||||
81 | const base::FilePath& temp_dir, | ||||
Minh X. Nguyen | 039eb99 | 2018-06-26 20:12:13 | [diff] [blame] | 82 | bool install_immediately, |
Minh X. Nguyen | 3097534 | 2017-12-04 22:02:41 | [diff] [blame] | 83 | InstallUpdateCallback install_update_callback) { |
asargent | 631a99a | 2015-10-15 21:51:48 | [diff] [blame] | 84 | NOTREACHED(); |
85 | } | ||||
86 | |||||
Minh X. Nguyen | b4fbf92 | 2018-01-29 18:28:10 | [diff] [blame] | 87 | bool MockExtensionSystem::FinishDelayedInstallationIfReady( |
88 | const std::string& extension_id, | ||||
89 | bool install_immediately) { | ||||
90 | NOTREACHED(); | ||||
91 | return false; | ||||
92 | } | ||||
93 | |||||
[email protected] | 4db043b | 2014-08-13 09:46:18 | [diff] [blame] | 94 | } // namespace extensions |