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

Unified Diff: components/ntp_snippets/user_classifier.cc

Issue 2395123002: Connecting UserClassifier to NtpSnippetsFetcher (Closed)
Patch Set: A small fix 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 side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/user_classifier.cc
diff --git a/components/ntp_snippets/user_classifier.cc b/components/ntp_snippets/user_classifier.cc
index a9122343a1ee3e2977c2416e02121463455b04e1..a65a18fcf176f6d23281431ef1a448157cb37d58 100644
--- a/components/ntp_snippets/user_classifier.cc
+++ b/components/ntp_snippets/user_classifier.cc
@@ -280,6 +280,19 @@ UserClassifier::UserClass UserClassifier::GetUserClass() const {
return UserClass::ACTIVE_NTP_USER;
}
+std::string UserClassifier::GetUserClassNameForProto() const {
+ switch (GetUserClass()) {
+ case UserClass::RARE_NTP_USER:
+ return "RARE_NTP_USER";
+ case UserClass::ACTIVE_NTP_USER:
+ return "ACTIVE_NTP_USER";
+ case UserClass::ACTIVE_SUGGESTIONS_CONSUMER:
+ return "ACTIVE_SUGGESTIONS_CONSUMER";
+ }
+ NOTREACHED();
+ return std::string();
+}
+
std::string UserClassifier::GetUserClassDescriptionForDebugging() const {
switch (GetUserClass()) {
case UserClass::RARE_NTP_USER:

Powered by Google App Engine
This is Rietveld 408576698