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

Side by Side Diff: components/ntp_snippets/content_suggestions_provider.cc

Issue 2368583002: [NTP Snippets] Cleanups from clang-tidy (Closed)
Patch Set: rebase Created 4 years, 2 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 "components/ntp_snippets/content_suggestions_provider.h" 5 #include "components/ntp_snippets/content_suggestions_provider.h"
6 6
7 #include "components/ntp_snippets/category_factory.h" 7 #include "components/ntp_snippets/category_factory.h"
8 8
9 namespace ntp_snippets { 9 namespace ntp_snippets {
10 10
11 ContentSuggestionsProvider::ContentSuggestionsProvider( 11 ContentSuggestionsProvider::ContentSuggestionsProvider(
12 Observer* observer, 12 Observer* observer,
13 CategoryFactory* category_factory) 13 CategoryFactory* category_factory)
14 : observer_(observer), category_factory_(category_factory) {} 14 : observer_(observer), category_factory_(category_factory) {}
15 15
16 ContentSuggestionsProvider::~ContentSuggestionsProvider() {} 16 ContentSuggestionsProvider::~ContentSuggestionsProvider() = default;
17 17
18 std::string ContentSuggestionsProvider::MakeUniqueID( 18 std::string ContentSuggestionsProvider::MakeUniqueID(
19 Category category, 19 Category category,
20 const std::string& within_category_id) const { 20 const std::string& within_category_id) const {
21 return category_factory()->MakeUniqueID(category, within_category_id); 21 return category_factory()->MakeUniqueID(category, within_category_id);
22 } 22 }
23 23
24 Category ContentSuggestionsProvider::GetCategoryFromUniqueID( 24 Category ContentSuggestionsProvider::GetCategoryFromUniqueID(
25 const std::string& unique_id) const { 25 const std::string& unique_id) const {
26 return category_factory()->GetCategoryFromUniqueID(unique_id); 26 return category_factory()->GetCategoryFromUniqueID(unique_id);
27 } 27 }
28 28
29 std::string ContentSuggestionsProvider::GetWithinCategoryIDFromUniqueID( 29 std::string ContentSuggestionsProvider::GetWithinCategoryIDFromUniqueID(
30 const std::string& unique_id) const { 30 const std::string& unique_id) const {
31 return category_factory()->GetWithinCategoryIDFromUniqueID(unique_id); 31 return category_factory()->GetWithinCategoryIDFromUniqueID(unique_id);
32 } 32 }
33 33
34 } // namespace ntp_snippets 34 } // namespace ntp_snippets
OLDNEW
« no previous file with comments | « components/ntp_snippets/content_suggestion.cc ('k') | components/ntp_snippets/content_suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698