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

Side by Side Diff: extensions/browser/api/storage/settings_test_util.cc

Issue 197413002: Move extensions-related files to using //components/keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "extensions/browser/api/storage/settings_test_util.h" 5 #include "extensions/browser/api/storage/settings_test_util.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "extensions/browser/api/storage/settings_frontend.h" 8 #include "extensions/browser/api/storage/settings_frontend.h"
9 #include "extensions/browser/extension_registry.h" 9 #include "extensions/browser/extension_registry.h"
10 #include "extensions/browser/extension_system_provider.h" 10 #include "extensions/browser/extension_system_provider.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 MockExtensionSystem::MockExtensionSystem(Profile* profile) 104 MockExtensionSystem::MockExtensionSystem(Profile* profile)
105 : TestExtensionSystem(profile) {} 105 : TestExtensionSystem(profile) {}
106 MockExtensionSystem::~MockExtensionSystem() {} 106 MockExtensionSystem::~MockExtensionSystem() {}
107 107
108 EventRouter* MockExtensionSystem::event_router() { 108 EventRouter* MockExtensionSystem::event_router() {
109 if (!event_router_.get()) 109 if (!event_router_.get())
110 event_router_.reset(new EventRouter(profile_, NULL)); 110 event_router_.reset(new EventRouter(profile_, NULL));
111 return event_router_.get(); 111 return event_router_.get();
112 } 112 }
113 113
114 BrowserContextKeyedService* BuildMockExtensionSystem( 114 KeyedService* BuildMockExtensionSystem(content::BrowserContext* profile) {
115 content::BrowserContext* profile) {
116 return new MockExtensionSystem(static_cast<Profile*>(profile)); 115 return new MockExtensionSystem(static_cast<Profile*>(profile));
117 } 116 }
118 117
119 // MockProfile 118 // MockProfile
120 119
121 MockProfile::MockProfile(const base::FilePath& file_path) 120 MockProfile::MockProfile(const base::FilePath& file_path)
122 : TestingProfile(file_path) { 121 : TestingProfile(file_path) {
123 ExtensionsBrowserClient::Get() 122 ExtensionsBrowserClient::Get()
124 ->GetExtensionSystemFactory() 123 ->GetExtensionSystemFactory()
125 ->SetTestingFactoryAndUse(this, &BuildMockExtensionSystem); 124 ->SetTestingFactoryAndUse(this, &BuildMockExtensionSystem);
(...skipping 25 matching lines...) Expand all
151 150
152 void ScopedSettingsStorageFactory::DeleteDatabaseIfExists( 151 void ScopedSettingsStorageFactory::DeleteDatabaseIfExists(
153 const base::FilePath& base_path, 152 const base::FilePath& base_path,
154 const std::string& extension_id) { 153 const std::string& extension_id) {
155 delegate_->DeleteDatabaseIfExists(base_path, extension_id); 154 delegate_->DeleteDatabaseIfExists(base_path, extension_id);
156 } 155 }
157 156
158 } // namespace settings_test_util 157 } // namespace settings_test_util
159 158
160 } // namespace extensions 159 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/api_resource_manager.h ('k') | extensions/browser/browser_context_keyed_api_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698