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

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

Issue 2256183004: Use bookmark creation date fallback for 6 weeks after installing M54 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make another DCHECK more readable Created 4 years, 4 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/prefs/browser_prefs.cc » ('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 "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 #endif // OS_ANDROID 150 #endif // OS_ANDROID
151 151
152 // Create the BookmarkSuggestionsProvider. 152 // Create the BookmarkSuggestionsProvider.
153 if (base::FeatureList::IsEnabled( 153 if (base::FeatureList::IsEnabled(
154 ntp_snippets::kBookmarkSuggestionsFeature)) { 154 ntp_snippets::kBookmarkSuggestionsFeature)) {
155 BookmarkModel* bookmark_model = 155 BookmarkModel* bookmark_model =
156 BookmarkModelFactory::GetForBrowserContext(profile); 156 BookmarkModelFactory::GetForBrowserContext(profile);
157 std::unique_ptr<BookmarkSuggestionsProvider> bookmark_suggestions_provider = 157 std::unique_ptr<BookmarkSuggestionsProvider> bookmark_suggestions_provider =
158 base::MakeUnique<BookmarkSuggestionsProvider>( 158 base::MakeUnique<BookmarkSuggestionsProvider>(
159 service, service->category_factory(), bookmark_model); 159 service, service->category_factory(), bookmark_model,
160 profile->GetPrefs());
160 service->RegisterProvider(std::move(bookmark_suggestions_provider)); 161 service->RegisterProvider(std::move(bookmark_suggestions_provider));
161 } 162 }
162 163
163 #if defined(OS_ANDROID) 164 #if defined(OS_ANDROID)
164 // Create the PhysicalWebPageSuggestionsProvider. 165 // Create the PhysicalWebPageSuggestionsProvider.
165 if (base::FeatureList::IsEnabled( 166 if (base::FeatureList::IsEnabled(
166 ntp_snippets::kPhysicalWebPageSuggestionsFeature)) { 167 ntp_snippets::kPhysicalWebPageSuggestionsFeature)) {
167 std::unique_ptr<PhysicalWebPageSuggestionsProvider> 168 std::unique_ptr<PhysicalWebPageSuggestionsProvider>
168 physical_web_page_suggestions_provider = 169 physical_web_page_suggestions_provider =
169 base::MakeUnique<PhysicalWebPageSuggestionsProvider>( 170 base::MakeUnique<PhysicalWebPageSuggestionsProvider>(
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 base::MakeUnique<ImageDecoderImpl>(), 212 base::MakeUnique<ImageDecoderImpl>(),
212 base::MakeUnique<NTPSnippetsDatabase>(database_dir, task_runner), 213 base::MakeUnique<NTPSnippetsDatabase>(database_dir, task_runner),
213 base::MakeUnique<NTPSnippetsStatusService>(signin_manager, 214 base::MakeUnique<NTPSnippetsStatusService>(signin_manager,
214 profile->GetPrefs())); 215 profile->GetPrefs()));
215 service->set_ntp_snippets_service(ntp_snippets_service.get()); 216 service->set_ntp_snippets_service(ntp_snippets_service.get());
216 service->RegisterProvider(std::move(ntp_snippets_service)); 217 service->RegisterProvider(std::move(ntp_snippets_service));
217 } 218 }
218 219
219 return service; 220 return service;
220 } 221 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prefs/browser_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698