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

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

Issue 2931573003: Fix stability and data racing issues, coalesce more updates for JumpList (Closed)
Patch Set: Remove refcounting for jumplist KeyedService, fix nits. Created 3 years, 6 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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_WIN_JUMPLIST_FACTORY_H_ 5 #ifndef CHROME_BROWSER_WIN_JUMPLIST_FACTORY_H_
6 #define CHROME_BROWSER_WIN_JUMPLIST_FACTORY_H_ 6 #define CHROME_BROWSER_WIN_JUMPLIST_FACTORY_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "chrome/browser/win/jumplist.h" 9 #include "chrome/browser/win/jumplist.h"
grt (UTC plus 2) 2017/06/12 20:43:39 nit: could this be moved to the .cc file in favor
chengx 2017/06/12 22:05:30 I don't think so. The return type of GetForProfile
grt (UTC plus 2) 2017/06/13 07:32:27 A forward decl is fine in that case -- consumers o
chengx 2017/06/13 19:16:01 Done. You are right. I only need to tell the heade
10 #include "components/keyed_service/content/refcounted_browser_context_keyed_serv ice_factory.h" 10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
11 11
12 class JumpListFactory : public RefcountedBrowserContextKeyedServiceFactory { 12 class JumpListFactory : public BrowserContextKeyedServiceFactory {
13 public: 13 public:
14 static scoped_refptr<JumpList> GetForProfile(Profile* profile); 14 static JumpList* GetForProfile(Profile* profile);
15 15
16 static JumpListFactory* GetInstance(); 16 static JumpListFactory* GetInstance();
17 17
18 private: 18 private:
19 friend struct base::DefaultSingletonTraits<JumpListFactory>; 19 friend struct base::DefaultSingletonTraits<JumpListFactory>;
20 JumpListFactory(); 20 JumpListFactory();
21 ~JumpListFactory() override; 21 ~JumpListFactory() override;
22 22
23 // BrowserContextKeyedServiceFactory: 23 // BrowserContextKeyedServiceFactory:
24 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( 24 KeyedService* BuildServiceInstanceFor(
25 content::BrowserContext* context) const override; 25 content::BrowserContext* context) const override;
26 }; 26 };
27 27
28 #endif // CHROME_BROWSER_WIN_JUMPLIST_FACTORY_H_ 28 #endif // CHROME_BROWSER_WIN_JUMPLIST_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698