Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/extensions/api/url_overrides/url_overrides_api_factory. h" | |
|
Yoyo Zhou
2012/12/28 03:59:45
Switch to ProfileKeyedAPIFactory
| |
| 6 | |
| 7 #include "chrome/browser/extensions/api/url_overrides/url_overrides_api.h" | |
| 8 #include "chrome/browser/profiles/profile_dependency_manager.h" | |
| 9 | |
| 10 namespace extensions { | |
| 11 | |
| 12 // static | |
| 13 URLOverridesAPIFactory* URLOverridesAPIFactory::GetInstance() { | |
| 14 return Singleton<URLOverridesAPIFactory>::get(); | |
| 15 } | |
| 16 | |
| 17 URLOverridesAPIFactory::URLOverridesAPIFactory() | |
| 18 : ProfileKeyedServiceFactory("URLOverridesAPI", | |
| 19 ProfileDependencyManager::GetInstance()) { | |
| 20 } | |
| 21 | |
| 22 URLOverridesAPIFactory::~URLOverridesAPIFactory() { | |
| 23 } | |
| 24 | |
| 25 ProfileKeyedService* URLOverridesAPIFactory::BuildServiceInstanceFor( | |
| 26 Profile* profile) const { | |
| 27 return new URLOverridesAPI(profile); | |
| 28 } | |
| 29 | |
| 30 bool URLOverridesAPIFactory::ServiceIsCreatedWithProfile() const { | |
| 31 return true; | |
| 32 } | |
| 33 | |
| 34 bool URLOverridesAPIFactory::ServiceIsNULLWhileTesting() const { | |
| 35 return true; | |
| 36 } | |
| 37 | |
| 38 } // namespace extensions | |
| OLD | NEW |