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

Unified Diff: components/ntp_snippets/content_suggestions_provider.cc

Issue 2236303002: Make OfflinePage ContentSuggestions dismissable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base::Value --> std::unique_ptr<base::Value> 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/content_suggestions_provider.cc
diff --git a/components/ntp_snippets/content_suggestions_provider.cc b/components/ntp_snippets/content_suggestions_provider.cc
index bf2094112981a8f6e668f60593fd3456220e277a..3f071889b3bfddd56bba867a3268baf3f7ff1874 100644
--- a/components/ntp_snippets/content_suggestions_provider.cc
+++ b/components/ntp_snippets/content_suggestions_provider.cc
@@ -26,13 +26,13 @@ ContentSuggestionsProvider::~ContentSuggestionsProvider() {}
std::string ContentSuggestionsProvider::MakeUniqueID(
Category category,
- const std::string& within_category_id) {
+ const std::string& within_category_id) const {
return base::StringPrintf(kCombinedIDFormat, category.id(),
within_category_id.c_str());
}
Category ContentSuggestionsProvider::GetCategoryFromUniqueID(
- const std::string& unique_id) {
+ const std::string& unique_id) const {
size_t colon_index = unique_id.find(kSeparator);
DCHECK_NE(std::string::npos, colon_index) << "Not a valid unique_id: "
<< unique_id;
@@ -43,7 +43,7 @@ Category ContentSuggestionsProvider::GetCategoryFromUniqueID(
}
std::string ContentSuggestionsProvider::GetWithinCategoryIDFromUniqueID(
- const std::string& unique_id) {
+ const std::string& unique_id) const {
size_t colon_index = unique_id.find(kSeparator);
DCHECK_NE(std::string::npos, colon_index) << "Not a valid unique_id: "
<< unique_id;

Powered by Google App Engine
This is Rietveld 408576698