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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 (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/api/storage/settings_test_util.h" 5 #include "chrome/browser/extensions/api/storage/settings_test_util.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "chrome/browser/extensions/api/storage/settings_frontend.h" 8 #include "chrome/browser/extensions/api/storage/settings_frontend.h"
9 #include "chrome/browser/extensions/extension_system_factory.h" 9 #include "chrome/browser/extensions/extension_system_factory.h"
10 #include "chrome/common/extensions/extension.h" 10 #include "chrome/common/extensions/extension.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 event_router_.reset(new EventRouter(profile_, NULL)); 117 event_router_.reset(new EventRouter(profile_, NULL));
118 return event_router_.get(); 118 return event_router_.get();
119 } 119 }
120 120
121 ExtensionService* MockExtensionSystem::extension_service() { 121 ExtensionService* MockExtensionSystem::extension_service() {
122 ExtensionServiceInterface* as_interface = 122 ExtensionServiceInterface* as_interface =
123 static_cast<ExtensionServiceInterface*>(&extension_service_); 123 static_cast<ExtensionServiceInterface*>(&extension_service_);
124 return static_cast<ExtensionService*>(as_interface); 124 return static_cast<ExtensionService*>(as_interface);
125 } 125 }
126 126
127 ProfileKeyedService* BuildMockExtensionSystem( 127 BrowserContextKeyedService* BuildMockExtensionSystem(
128 content::BrowserContext* profile) { 128 content::BrowserContext* profile) {
129 return new MockExtensionSystem(static_cast<Profile*>(profile)); 129 return new MockExtensionSystem(static_cast<Profile*>(profile));
130 } 130 }
131 131
132 // MockProfile 132 // MockProfile
133 133
134 MockProfile::MockProfile(const base::FilePath& file_path) 134 MockProfile::MockProfile(const base::FilePath& file_path)
135 : TestingProfile(file_path) { 135 : TestingProfile(file_path) {
136 ExtensionSystemFactory::GetInstance()->SetTestingFactoryAndUse(this, 136 ExtensionSystemFactory::GetInstance()->SetTestingFactoryAndUse(this,
137 &BuildMockExtensionSystem); 137 &BuildMockExtensionSystem);
(...skipping 19 matching lines...) Expand all
157 ValueStore* ScopedSettingsStorageFactory::Create( 157 ValueStore* ScopedSettingsStorageFactory::Create(
158 const base::FilePath& base_path, 158 const base::FilePath& base_path,
159 const std::string& extension_id) { 159 const std::string& extension_id) {
160 DCHECK(delegate_.get()); 160 DCHECK(delegate_.get());
161 return delegate_->Create(base_path, extension_id); 161 return delegate_->Create(base_path, extension_id);
162 } 162 }
163 163
164 } // namespace settings_test_util 164 } // namespace settings_test_util
165 165
166 } // namespace extensions 166 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698