| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/favicon/ios_chrome_favicon_loader_factory.h" | 5 #include "ios/chrome/browser/favicon/ios_chrome_favicon_loader_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "components/keyed_service/core/service_access_type.h" | 8 #include "components/keyed_service/core/service_access_type.h" |
| 9 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 9 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
| 10 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h" | 10 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h" |
| 11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 11 #import "ios/chrome/browser/favicon/favicon_loader.h" | 12 #import "ios/chrome/browser/favicon/favicon_loader.h" |
| 12 #include "ios/chrome/browser/favicon/favicon_service_factory.h" | 13 #include "ios/chrome/browser/favicon/favicon_service_factory.h" |
| 13 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | |
| 14 | 14 |
| 15 FaviconLoader* IOSChromeFaviconLoaderFactory::GetForBrowserState( | 15 FaviconLoader* IOSChromeFaviconLoaderFactory::GetForBrowserState( |
| 16 ios::ChromeBrowserState* browser_state) { | 16 ios::ChromeBrowserState* browser_state) { |
| 17 return static_cast<FaviconLoader*>( | 17 return static_cast<FaviconLoader*>( |
| 18 GetInstance()->GetServiceForBrowserState(browser_state, true)); | 18 GetInstance()->GetServiceForBrowserState(browser_state, true)); |
| 19 } | 19 } |
| 20 | 20 |
| 21 FaviconLoader* IOSChromeFaviconLoaderFactory::GetForBrowserStateIfExists( | 21 FaviconLoader* IOSChromeFaviconLoaderFactory::GetForBrowserStateIfExists( |
| 22 ios::ChromeBrowserState* browser_state) { | 22 ios::ChromeBrowserState* browser_state) { |
| 23 return static_cast<FaviconLoader*>( | 23 return static_cast<FaviconLoader*>( |
| (...skipping 23 matching lines...) Expand all Loading... |
| 47 } | 47 } |
| 48 | 48 |
| 49 web::BrowserState* IOSChromeFaviconLoaderFactory::GetBrowserStateToUse( | 49 web::BrowserState* IOSChromeFaviconLoaderFactory::GetBrowserStateToUse( |
| 50 web::BrowserState* context) const { | 50 web::BrowserState* context) const { |
| 51 return GetBrowserStateRedirectedInIncognito(context); | 51 return GetBrowserStateRedirectedInIncognito(context); |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool IOSChromeFaviconLoaderFactory::ServiceIsNULLWhileTesting() const { | 54 bool IOSChromeFaviconLoaderFactory::ServiceIsNULLWhileTesting() const { |
| 55 return true; | 55 return true; |
| 56 } | 56 } |
| OLD | NEW |