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

Side by Side Diff: chrome/browser/ntp_snippets/content_suggestions_service_factory.cc

Issue 2673633002: [NTP::Downloads] Do not show old downloads. (Closed)
Patch Set: comments + clean rebase (sorry). Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/download_suggestions_provider.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h" 5 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/feature_list.h" 9 #include "base/feature_list.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 service->RegisterProvider(std::move(provider)); 114 service->RegisterProvider(std::move(provider));
115 } 115 }
116 116
117 void RegisterDownloadsProvider(OfflinePageModel* offline_page_model, 117 void RegisterDownloadsProvider(OfflinePageModel* offline_page_model,
118 DownloadManager* download_manager, 118 DownloadManager* download_manager,
119 DownloadHistory* download_history, 119 DownloadHistory* download_history,
120 ContentSuggestionsService* service, 120 ContentSuggestionsService* service,
121 PrefService* pref_service) { 121 PrefService* pref_service) {
122 auto provider = base::MakeUnique<DownloadSuggestionsProvider>( 122 auto provider = base::MakeUnique<DownloadSuggestionsProvider>(
123 service, offline_page_model, download_manager, download_history, 123 service, offline_page_model, download_manager, download_history,
124 pref_service); 124 pref_service, base::MakeUnique<base::DefaultClock>());
125 service->RegisterProvider(std::move(provider)); 125 service->RegisterProvider(std::move(provider));
126 } 126 }
127 #endif // OS_ANDROID 127 #endif // OS_ANDROID
128 128
129 void RegisterBookmarkProvider(BookmarkModel* bookmark_model, 129 void RegisterBookmarkProvider(BookmarkModel* bookmark_model,
130 ContentSuggestionsService* service, 130 ContentSuggestionsService* service,
131 PrefService* pref_service) { 131 PrefService* pref_service) {
132 auto provider = base::MakeUnique<BookmarkSuggestionsProvider>( 132 auto provider = base::MakeUnique<BookmarkSuggestionsProvider>(
133 service, bookmark_model, pref_service); 133 service, bookmark_model, pref_service);
134 service->RegisterProvider(std::move(provider)); 134 service->RegisterProvider(std::move(provider));
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 language_model, pref_service, profile); 323 language_model, pref_service, profile);
324 } 324 }
325 325
326 if (base::FeatureList::IsEnabled( 326 if (base::FeatureList::IsEnabled(
327 ntp_snippets::kForeignSessionsSuggestionsFeature)) { 327 ntp_snippets::kForeignSessionsSuggestionsFeature)) {
328 RegisterForeignSessionsProvider(sync_service, service, pref_service); 328 RegisterForeignSessionsProvider(sync_service, service, pref_service);
329 } 329 }
330 330
331 return service; 331 return service;
332 } 332 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ntp_snippets/download_suggestions_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698