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

Unified Diff: components/ntp_snippets/category_rankers/category_ranker.h

Issue 2889153003: [NTP::SectionOrder] Add ranker section to snippets internals. (Closed)
Patch Set: jkrcal@ nit. Created 3 years, 7 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/category_rankers/category_ranker.h
diff --git a/components/ntp_snippets/category_rankers/category_ranker.h b/components/ntp_snippets/category_rankers/category_ranker.h
index aa19c57d668134194cccc252d44b52153606863a..89b01246f64245c51049b01722350a9c4626f5aa 100644
--- a/components/ntp_snippets/category_rankers/category_ranker.h
+++ b/components/ntp_snippets/category_rankers/category_ranker.h
@@ -5,6 +5,9 @@
#ifndef COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_CATEGORY_RANKER_H_
#define COMPONENTS_NTP_SNIPPETS_CATEGORY_RANKERS_CATEGORY_RANKER_H_
+#include <string>
+#include <vector>
+
#include "base/time/time.h"
#include "components/ntp_snippets/category.h"
@@ -39,6 +42,17 @@ class CategoryRanker {
virtual void InsertCategoryAfterIfNecessary(Category category_to_insert,
Category anchor) = 0;
+ struct DebugDataItem {
+ std::string label;
+ std::string content;
+ DebugDataItem(const std::string& label, const std::string& content)
+ : label(label), content(content) {}
+ };
+
+ // Returns DebugData in form of pairs of strings (label; content),
+ // e.g. describing internal state or parameter values.
+ virtual std::vector<DebugDataItem> GetDebugData() = 0;
+
// Feedback data from the user to update the ranking.
// Called whenever a suggestion is opened by the user.

Powered by Google App Engine
This is Rietveld 408576698