Index: chrome/browser/win/jumplist_factory.cc |
diff --git a/chrome/browser/win/jumplist_factory.cc b/chrome/browser/win/jumplist_factory.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b65de8fa751799cc68f07d4dfafc4ba34f250beb |
--- /dev/null |
+++ b/chrome/browser/win/jumplist_factory.cc |
@@ -0,0 +1,31 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/browser/win/jumplist_factory.h" |
+ |
+#include "chrome/browser/profiles/profile.h" |
+#include "components/keyed_service/content/browser_context_dependency_manager.h" |
+ |
+// static |
+scoped_refptr<JumpList> JumpListFactory::GetForProfile(Profile* profile) { |
+ return static_cast<JumpList*>( |
+ GetInstance()->GetServiceForBrowserContext(profile, true).get()); |
+} |
+ |
+// static |
+JumpListFactory* JumpListFactory::GetInstance() { |
+ return base::Singleton<JumpListFactory>::get(); |
+} |
+ |
+JumpListFactory::JumpListFactory() |
+ : RefcountedBrowserContextKeyedServiceFactory( |
+ "JumpList", |
+ 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.
|
+ |
+JumpListFactory::~JumpListFactory() = default; |
+ |
+scoped_refptr<RefcountedKeyedService> JumpListFactory::BuildServiceInstanceFor( |
+ content::BrowserContext* context) const { |
+ 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.
|
+} |