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

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

Issue 2744253004: NTP: clang-format (Closed)
Patch Set: Created 3 years, 9 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
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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 // Create the ContentSuggestionsService. 289 // Create the ContentSuggestionsService.
290 SigninManagerBase* signin_manager = 290 SigninManagerBase* signin_manager =
291 SigninManagerFactory::GetForProfile(profile); 291 SigninManagerFactory::GetForProfile(profile);
292 HistoryService* history_service = HistoryServiceFactory::GetForProfile( 292 HistoryService* history_service = HistoryServiceFactory::GetForProfile(
293 profile, ServiceAccessType::EXPLICIT_ACCESS); 293 profile, ServiceAccessType::EXPLICIT_ACCESS);
294 PrefService* pref_service = profile->GetPrefs(); 294 PrefService* pref_service = profile->GetPrefs();
295 std::unique_ptr<CategoryRanker> category_ranker = 295 std::unique_ptr<CategoryRanker> category_ranker =
296 ntp_snippets::BuildSelectedCategoryRanker( 296 ntp_snippets::BuildSelectedCategoryRanker(
297 pref_service, base::MakeUnique<base::DefaultClock>()); 297 pref_service, base::MakeUnique<base::DefaultClock>());
298 auto* service = 298 auto* service = new ContentSuggestionsService(State::ENABLED, signin_manager,
299 new ContentSuggestionsService(State::ENABLED, signin_manager, 299 history_service, pref_service,
300 history_service, pref_service, std::move(category_ranker)); 300 std::move(category_ranker));
301 301
302 #if defined(OS_ANDROID) 302 #if defined(OS_ANDROID)
303 OfflinePageModel* offline_page_model = 303 OfflinePageModel* offline_page_model =
304 OfflinePageModelFactory::GetForBrowserContext(profile); 304 OfflinePageModelFactory::GetForBrowserContext(profile);
305 RequestCoordinator* request_coordinator = 305 RequestCoordinator* request_coordinator =
306 RequestCoordinatorFactory::GetForBrowserContext(profile); 306 RequestCoordinatorFactory::GetForBrowserContext(profile);
307 DownloadManager* download_manager = 307 DownloadManager* download_manager =
308 content::BrowserContext::GetDownloadManager(profile); 308 content::BrowserContext::GetDownloadManager(profile);
309 DownloadService* download_service = 309 DownloadService* download_service =
310 DownloadServiceFactory::GetForBrowserContext(profile); 310 DownloadServiceFactory::GetForBrowserContext(profile);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 ntp_snippets::kForeignSessionsSuggestionsFeature)) { 361 ntp_snippets::kForeignSessionsSuggestionsFeature)) {
362 RegisterForeignSessionsProvider(sync_service, service, pref_service); 362 RegisterForeignSessionsProvider(sync_service, service, pref_service);
363 } 363 }
364 364
365 return service; 365 return service;
366 366
367 #else 367 #else
368 return nullptr; 368 return nullptr;
369 #endif // CONTENT_SUGGESTIONS_ENABLED 369 #endif // CONTENT_SUGGESTIONS_ENABLED
370 } 370 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698