OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/profiles/profile.h" | |
6 #include "chrome/browser/win/jumplist_factory.h" | |
sky
2016/09/08 23:48:08
Style guide says this should be your first include
Ilya Kulshin
2016/09/13 00:01:00
Done.
| |
7 #include "components/keyed_service/content/browser_context_dependency_manager.h" | |
8 | |
9 // static | |
10 scoped_refptr<JumpList> JumpListFactory::GetForProfile(Profile* profile) { | |
11 return static_cast<JumpList*>( | |
12 GetInstance()->GetServiceForBrowserContext(profile, true).get()); | |
13 } | |
14 | |
15 // static | |
16 JumpListFactory* JumpListFactory::GetInstance() { | |
17 return base::Singleton<JumpListFactory>::get(); | |
18 } | |
19 | |
20 JumpListFactory::JumpListFactory() | |
21 : RefcountedBrowserContextKeyedServiceFactory( | |
22 "JumpList", | |
23 BrowserContextDependencyManager::GetInstance()) {} | |
24 | |
25 JumpListFactory::~JumpListFactory() = default; | |
26 | |
27 scoped_refptr<RefcountedKeyedService> JumpListFactory::BuildServiceInstanceFor( | |
28 content::BrowserContext* context) const { | |
29 return new JumpList(static_cast<Profile*>(context)); | |
30 } | |
OLD | NEW |