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 "chrome/browser/favicon/large_icon_service_factory.h" | 5 #include "chrome/browser/favicon/large_icon_service_factory.h" |
6 | 6 |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "base/task_scheduler/post_task.h" | 8 #include "base/task_scheduler/post_task.h" |
9 #include "chrome/browser/favicon/favicon_service_factory.h" | 9 #include "chrome/browser/favicon/favicon_service_factory.h" |
10 #include "chrome/browser/profiles/incognito_helpers.h" | 10 #include "chrome/browser/profiles/incognito_helpers.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 KeyedService* LargeIconServiceFactory::BuildServiceInstanceFor( | 46 KeyedService* LargeIconServiceFactory::BuildServiceInstanceFor( |
47 content::BrowserContext* context) const { | 47 content::BrowserContext* context) const { |
48 Profile* profile = Profile::FromBrowserContext(context); | 48 Profile* profile = Profile::FromBrowserContext(context); |
49 favicon::FaviconService* favicon_service = | 49 favicon::FaviconService* favicon_service = |
50 FaviconServiceFactory::GetForProfile(profile, | 50 FaviconServiceFactory::GetForProfile(profile, |
51 ServiceAccessType::EXPLICIT_ACCESS); | 51 ServiceAccessType::EXPLICIT_ACCESS); |
52 return new favicon::LargeIconService( | 52 return new favicon::LargeIconService( |
53 favicon_service, | 53 favicon_service, |
54 base::CreateTaskRunnerWithTraits( | 54 base::CreateTaskRunnerWithTraits( |
55 base::TaskTraits() | 55 {base::MayBlock(), base::TaskPriority::BACKGROUND, |
56 .MayBlock() | 56 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}), |
57 .WithPriority(base::TaskPriority::BACKGROUND) | |
58 .WithShutdownBehavior( | |
59 base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN)), | |
60 base::MakeUnique<image_fetcher::ImageFetcherImpl>( | 57 base::MakeUnique<image_fetcher::ImageFetcherImpl>( |
61 base::MakeUnique<suggestions::ImageDecoderImpl>(), | 58 base::MakeUnique<suggestions::ImageDecoderImpl>(), |
62 profile->GetRequestContext())); | 59 profile->GetRequestContext())); |
63 } | 60 } |
64 | 61 |
65 bool LargeIconServiceFactory::ServiceIsNULLWhileTesting() const { | 62 bool LargeIconServiceFactory::ServiceIsNULLWhileTesting() const { |
66 return true; | 63 return true; |
67 } | 64 } |
OLD | NEW |