| OLD | NEW |
| 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 "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 10 #include "components/keyed_service/content/refcounted_browser_context_keyed_serv
ice_factory.h" | |
| 11 | 10 |
| 12 class JumpListFactory : public RefcountedBrowserContextKeyedServiceFactory { | 11 class Profile; |
| 12 class JumpList; |
| 13 |
| 14 class JumpListFactory : public BrowserContextKeyedServiceFactory { |
| 13 public: | 15 public: |
| 14 static scoped_refptr<JumpList> GetForProfile(Profile* profile); | 16 static JumpList* GetForProfile(Profile* profile); |
| 15 | 17 |
| 16 static JumpListFactory* GetInstance(); | 18 static JumpListFactory* GetInstance(); |
| 17 | 19 |
| 18 private: | 20 private: |
| 19 friend struct base::DefaultSingletonTraits<JumpListFactory>; | 21 friend struct base::DefaultSingletonTraits<JumpListFactory>; |
| 20 JumpListFactory(); | 22 JumpListFactory(); |
| 21 ~JumpListFactory() override; | 23 ~JumpListFactory() override; |
| 22 | 24 |
| 23 // BrowserContextKeyedServiceFactory: | 25 // BrowserContextKeyedServiceFactory: |
| 24 scoped_refptr<RefcountedKeyedService> BuildServiceInstanceFor( | 26 KeyedService* BuildServiceInstanceFor( |
| 25 content::BrowserContext* context) const override; | 27 content::BrowserContext* context) const override; |
| 26 }; | 28 }; |
| 27 | 29 |
| 28 #endif // CHROME_BROWSER_WIN_JUMPLIST_FACTORY_H_ | 30 #endif // CHROME_BROWSER_WIN_JUMPLIST_FACTORY_H_ |
| OLD | NEW |