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

Side by Side Diff: chrome/browser/android/ntp/offline_page_suggestions_provider_factory.cc

Issue 2187233002: Add ContentSuggestionsCategoryFactory; Store categories as ints (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
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/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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_bridge.cc ('k') | chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698