OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/app_list/app_list_prefs_factory.h" | 5 #include "chrome/browser/ui/app_list/app_list_prefs_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/prefs/pref_service.h" | |
10 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/ui/app_list/app_list_prefs.h" | 10 #include "chrome/browser/ui/app_list/app_list_prefs.h" |
12 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 11 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 12 #include "components/prefs/pref_service.h" |
13 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
14 #include "extensions/browser/extensions_browser_client.h" | 14 #include "extensions/browser/extensions_browser_client.h" |
15 | 15 |
16 namespace app_list { | 16 namespace app_list { |
17 | 17 |
18 // static | 18 // static |
19 AppListPrefs* AppListPrefsFactory::GetForBrowserContext( | 19 AppListPrefs* AppListPrefsFactory::GetForBrowserContext( |
20 content::BrowserContext* context) { | 20 content::BrowserContext* context) { |
21 return static_cast<AppListPrefs*>( | 21 return static_cast<AppListPrefs*>( |
22 GetInstance()->GetServiceForBrowserContext(context, true)); | 22 GetInstance()->GetServiceForBrowserContext(context, true)); |
(...skipping 24 matching lines...) Expand all Loading... |
47 return AppListPrefs::Create(Profile::FromBrowserContext(context)->GetPrefs()); | 47 return AppListPrefs::Create(Profile::FromBrowserContext(context)->GetPrefs()); |
48 } | 48 } |
49 | 49 |
50 content::BrowserContext* AppListPrefsFactory::GetBrowserContextToUse( | 50 content::BrowserContext* AppListPrefsFactory::GetBrowserContextToUse( |
51 content::BrowserContext* context) const { | 51 content::BrowserContext* context) const { |
52 return extensions::ExtensionsBrowserClient::Get()->GetOriginalContext( | 52 return extensions::ExtensionsBrowserClient::Get()->GetOriginalContext( |
53 context); | 53 context); |
54 } | 54 } |
55 | 55 |
56 } // namespace app_list | 56 } // namespace app_list |
OLD | NEW |