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/settings/settings_test_util.h" | 5 #include "chrome/browser/extensions/settings/settings_test_util.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "chrome/common/extensions/extension.h" | 8 #include "chrome/common/extensions/extension.h" |
9 #include "chrome/browser/extensions/extension_system_factory.h" | 9 #include "chrome/browser/extensions/extension_system_factory.h" |
10 #include "chrome/browser/extensions/settings/settings_frontend.h" | 10 #include "chrome/browser/extensions/settings/settings_frontend.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 107 } |
108 | 108 |
109 // MockExtensionSystem | 109 // MockExtensionSystem |
110 | 110 |
111 MockExtensionSystem::MockExtensionSystem(Profile* profile) | 111 MockExtensionSystem::MockExtensionSystem(Profile* profile) |
112 : TestExtensionSystem(profile) {} | 112 : TestExtensionSystem(profile) {} |
113 MockExtensionSystem::~MockExtensionSystem() {} | 113 MockExtensionSystem::~MockExtensionSystem() {} |
114 | 114 |
115 EventRouter* MockExtensionSystem::event_router() { | 115 EventRouter* MockExtensionSystem::event_router() { |
116 if (!event_router_.get()) | 116 if (!event_router_.get()) |
117 event_router_.reset(new EventRouter(profile_, NULL)); | 117 event_router_.reset(new EventRouter(profile_)); |
118 return event_router_.get(); | 118 return event_router_.get(); |
119 } | 119 } |
120 | 120 |
121 ProfileKeyedService* BuildMockExtensionSystem(Profile* profile) { | 121 ProfileKeyedService* BuildMockExtensionSystem(Profile* profile) { |
122 return new MockExtensionSystem(profile); | 122 return new MockExtensionSystem(profile); |
123 } | 123 } |
124 | 124 |
125 // MockProfile | 125 // MockProfile |
126 | 126 |
127 MockProfile::MockProfile(const FilePath& file_path) | 127 MockProfile::MockProfile(const FilePath& file_path) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 ValueStore* ScopedSettingsStorageFactory::Create( | 160 ValueStore* ScopedSettingsStorageFactory::Create( |
161 const FilePath& base_path, const std::string& extension_id) { | 161 const FilePath& base_path, const std::string& extension_id) { |
162 DCHECK(delegate_.get()); | 162 DCHECK(delegate_.get()); |
163 return delegate_->Create(base_path, extension_id); | 163 return delegate_->Create(base_path, extension_id); |
164 } | 164 } |
165 | 165 |
166 } // namespace settings_test_util | 166 } // namespace settings_test_util |
167 | 167 |
168 } // namespace extensions | 168 } // namespace extensions |
OLD | NEW |