| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/extensions/test_extension_system.h" | 5 #include "chrome/browser/extensions/test_extension_system.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } | 123 } |
| 124 | 124 |
| 125 const OneShotEvent& TestExtensionSystem::ready() const { | 125 const OneShotEvent& TestExtensionSystem::ready() const { |
| 126 return ready_; | 126 return ready_; |
| 127 } | 127 } |
| 128 | 128 |
| 129 ContentVerifier* TestExtensionSystem::content_verifier() { | 129 ContentVerifier* TestExtensionSystem::content_verifier() { |
| 130 return NULL; | 130 return NULL; |
| 131 } | 131 } |
| 132 | 132 |
| 133 // TODO change this. |
| 134 declarative_net_request::RulesMonitor* TestExtensionSystem::rules_monitor() { |
| 135 return nullptr; |
| 136 } |
| 137 |
| 133 std::unique_ptr<ExtensionSet> TestExtensionSystem::GetDependentExtensions( | 138 std::unique_ptr<ExtensionSet> TestExtensionSystem::GetDependentExtensions( |
| 134 const Extension* extension) { | 139 const Extension* extension) { |
| 135 return extension_service()->shared_module_service()->GetDependentExtensions( | 140 return extension_service()->shared_module_service()->GetDependentExtensions( |
| 136 extension); | 141 extension); |
| 137 } | 142 } |
| 138 | 143 |
| 139 void TestExtensionSystem::InstallUpdate(const std::string& extension_id, | 144 void TestExtensionSystem::InstallUpdate(const std::string& extension_id, |
| 140 const base::FilePath& temp_dir) { | 145 const base::FilePath& temp_dir) { |
| 141 NOTREACHED(); | 146 NOTREACHED(); |
| 142 } | 147 } |
| 143 | 148 |
| 144 TestingValueStore* TestExtensionSystem::value_store() { | 149 TestingValueStore* TestExtensionSystem::value_store() { |
| 145 // These tests use TestingValueStore in a way that ensures it only ever mints | 150 // These tests use TestingValueStore in a way that ensures it only ever mints |
| 146 // instances of TestingValueStore. | 151 // instances of TestingValueStore. |
| 147 return static_cast<TestingValueStore*>(store_factory_->LastCreatedStore()); | 152 return static_cast<TestingValueStore*>(store_factory_->LastCreatedStore()); |
| 148 } | 153 } |
| 149 | 154 |
| 150 // static | 155 // static |
| 151 std::unique_ptr<KeyedService> TestExtensionSystem::Build( | 156 std::unique_ptr<KeyedService> TestExtensionSystem::Build( |
| 152 content::BrowserContext* profile) { | 157 content::BrowserContext* profile) { |
| 153 return base::WrapUnique( | 158 return base::WrapUnique( |
| 154 new TestExtensionSystem(static_cast<Profile*>(profile))); | 159 new TestExtensionSystem(static_cast<Profile*>(profile))); |
| 155 } | 160 } |
| 156 | 161 |
| 157 void TestExtensionSystem::RecreateAppSorting() { | 162 void TestExtensionSystem::RecreateAppSorting() { |
| 158 app_sorting_.reset(new ChromeAppSorting(profile_)); | 163 app_sorting_.reset(new ChromeAppSorting(profile_)); |
| 159 } | 164 } |
| 160 | 165 |
| 161 } // namespace extensions | 166 } // namespace extensions |
| OLD | NEW |