| 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/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/profiles/profile_dependency_manager.h" | 10 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 10 | 11 |
| 11 namespace extensions { | 12 namespace extensions { |
| 12 | 13 |
| 13 // static | 14 // static |
| 14 ImageLoader* ImageLoaderFactory::GetForProfile(Profile* profile) { | 15 ImageLoader* ImageLoaderFactory::GetForProfile(Profile* profile) { |
| 15 return static_cast<ImageLoader*>( | 16 return static_cast<ImageLoader*>( |
| 16 GetInstance()->GetServiceForProfile(profile, true)); | 17 GetInstance()->GetServiceForProfile(profile, true)); |
| 17 } | 18 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 37 | 38 |
| 38 ProfileKeyedService* ImageLoaderFactory::BuildServiceInstanceFor( | 39 ProfileKeyedService* ImageLoaderFactory::BuildServiceInstanceFor( |
| 39 content::BrowserContext* profile) const { | 40 content::BrowserContext* profile) const { |
| 40 return new ImageLoader; | 41 return new ImageLoader; |
| 41 } | 42 } |
| 42 | 43 |
| 43 bool ImageLoaderFactory::ServiceIsCreatedWithProfile() const { | 44 bool ImageLoaderFactory::ServiceIsCreatedWithProfile() const { |
| 44 return false; | 45 return false; |
| 45 } | 46 } |
| 46 | 47 |
| 47 bool ImageLoaderFactory::ServiceRedirectedInIncognito() const { | 48 content::BrowserContext* ImageLoaderFactory::GetBrowserContextToUse( |
| 48 return true; | 49 content::BrowserContext* context) const { |
| 50 return chrome::GetBrowserContextRedirectedInIncognito(context); |
| 49 } | 51 } |
| 50 | 52 |
| 51 } // namespace extensions | 53 } // namespace extensions |
| OLD | NEW |