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 #include "chrome/browser/android/ntp/offline_page_suggestions_provider_factory.h
" | 5 #include "chrome/browser/android/ntp/offline_page_suggestions_provider_factory.h
" |
6 | 6 |
7 #include "base/feature_list.h" | 7 #include "base/feature_list.h" |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "chrome/browser/android/chrome_feature_list.h" | 9 #include "chrome/browser/android/chrome_feature_list.h" |
10 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" | 10 #include "chrome/browser/android/offline_pages/offline_page_model_factory.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 if (!base::FeatureList::IsEnabled( | 62 if (!base::FeatureList::IsEnabled( |
63 chrome::android::kNTPOfflinePageSuggestionsFeature)) { | 63 chrome::android::kNTPOfflinePageSuggestionsFeature)) { |
64 return nullptr; | 64 return nullptr; |
65 } | 65 } |
66 | 66 |
67 OfflinePageModel* offline_page_model = | 67 OfflinePageModel* offline_page_model = |
68 OfflinePageModelFactory::GetForBrowserContext(profile); | 68 OfflinePageModelFactory::GetForBrowserContext(profile); |
69 | 69 |
70 OfflinePageSuggestionsProvider* offline_page_suggestions_provider = | 70 OfflinePageSuggestionsProvider* offline_page_suggestions_provider = |
71 new OfflinePageSuggestionsProvider(offline_page_model); | 71 new OfflinePageSuggestionsProvider( |
| 72 content_suggestions_service->category_factory(), offline_page_model); |
72 content_suggestions_service->RegisterProvider( | 73 content_suggestions_service->RegisterProvider( |
73 offline_page_suggestions_provider); | 74 offline_page_suggestions_provider); |
74 return offline_page_suggestions_provider; | 75 return offline_page_suggestions_provider; |
75 } | 76 } |
OLD | NEW |