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

Unified Diff: components/ntp_snippets/content_suggestions_provider.h

Issue 2155243003: Use pipe as ID separator and add inverse functions for MakeUniqueID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@css-unittest
Patch Set: Fix category not initialized warning Created 4 years, 5 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
« no previous file with comments | « no previous file | components/ntp_snippets/content_suggestions_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_snippets/content_suggestions_provider.h
diff --git a/components/ntp_snippets/content_suggestions_provider.h b/components/ntp_snippets/content_suggestions_provider.h
index 8d0b5dd7e5d6c38ae55581b5ca84299aae71dac0..43f211bd96a430c9a2517c35e597ee29697e385f 100644
--- a/components/ntp_snippets/content_suggestions_provider.h
+++ b/components/ntp_snippets/content_suggestions_provider.h
@@ -110,6 +110,11 @@ class ContentSuggestionsProvider {
// suggestions for that category.
static std::string MakeUniqueID(ContentSuggestionsCategory category,
const std::string& within_category_id);
+ // Reverse functions for MakeUniqueID()
+ static ContentSuggestionsCategory GetCategoryFromUniqueID(
+ const std::string& unique_id);
+ static std::string GetWithinCategoryIDFromUniqueID(
+ const std::string& unique_id);
private:
const std::vector<ContentSuggestionsCategory> provided_categories_;
« no previous file with comments | « no previous file | components/ntp_snippets/content_suggestions_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698