Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: chrome/browser/win/jumplist_factory.cc

Issue 2323603002: Convert JumpList to a KeyedService. (Closed)
Patch Set: Fix includes Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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/win/jumplist_factory.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9
10 // static
11 scoped_refptr<JumpList> JumpListFactory::GetForProfile(Profile* profile) {
12 return static_cast<JumpList*>(
13 GetInstance()->GetServiceForBrowserContext(profile, true).get());
14 }
15
16 // static
17 JumpListFactory* JumpListFactory::GetInstance() {
18 return base::Singleton<JumpListFactory>::get();
19 }
20
21 JumpListFactory::JumpListFactory()
22 : RefcountedBrowserContextKeyedServiceFactory(
23 "JumpList",
24 BrowserContextDependencyManager::GetInstance()) {}
gab 2016/09/09 19:02:30 Dependencies are declared here in constructor thro
Ilya Kulshin 2016/09/13 00:01:00 Done.
25
26 JumpListFactory::~JumpListFactory() = default;
27
28 scoped_refptr<RefcountedKeyedService> JumpListFactory::BuildServiceInstanceFor(
29 content::BrowserContext* context) const {
30 return new JumpList(static_cast<Profile*>(context));
gab 2016/09/09 19:02:30 Profile::FromBrowserContext() instead of static_ca
Ilya Kulshin 2016/09/13 00:01:00 Done.
31 }
OLDNEW
« chrome/browser/win/jumplist.cc ('K') | « chrome/browser/win/jumplist_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698