| 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/image_loader_factory.h" | 5 #include "chrome/browser/extensions/image_loader_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/image_loader.h" | 7 #include "chrome/browser/extensions/image_loader.h" |
| 8 #include "chrome/browser/profiles/incognito_helpers.h" | 8 #include "chrome/browser/profiles/incognito_helpers.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 : BrowserContextKeyedServiceFactory( | 25 : BrowserContextKeyedServiceFactory( |
| 26 "ImageLoader", | 26 "ImageLoader", |
| 27 BrowserContextDependencyManager::GetInstance()) { | 27 BrowserContextDependencyManager::GetInstance()) { |
| 28 } | 28 } |
| 29 | 29 |
| 30 ImageLoaderFactory::~ImageLoaderFactory() { | 30 ImageLoaderFactory::~ImageLoaderFactory() { |
| 31 } | 31 } |
| 32 | 32 |
| 33 BrowserContextKeyedService* ImageLoaderFactory::BuildServiceInstanceFor( | 33 BrowserContextKeyedService* ImageLoaderFactory::BuildServiceInstanceFor( |
| 34 content::BrowserContext* profile) const { | 34 content::BrowserContext* profile) const { |
| 35 return new ImageLoader; | 35 return new ImageLoader(static_cast<Profile*>(profile)); |
| 36 } | 36 } |
| 37 | 37 |
| 38 bool ImageLoaderFactory::ServiceIsCreatedWithBrowserContext() const { | 38 bool ImageLoaderFactory::ServiceIsCreatedWithBrowserContext() const { |
| 39 return false; | 39 return false; |
| 40 } | 40 } |
| 41 | 41 |
| 42 content::BrowserContext* ImageLoaderFactory::GetBrowserContextToUse( | 42 content::BrowserContext* ImageLoaderFactory::GetBrowserContextToUse( |
| 43 content::BrowserContext* context) const { | 43 content::BrowserContext* context) const { |
| 44 return chrome::GetBrowserContextRedirectedInIncognito(context); | 44 return chrome::GetBrowserContextRedirectedInIncognito(context); |
| 45 } | 45 } |
| 46 | 46 |
| 47 } // namespace extensions | 47 } // namespace extensions |
| OLD | NEW |