| Index: chrome/browser/ui/webui/snippets_internals_message_handler.cc
|
| diff --git a/chrome/browser/ui/webui/snippets_internals_message_handler.cc b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
|
| index 988dc19ce21135d458c7272408c78501d1934be9..2b81ba0893931e2f09b6f944a8294df02a3fac47 100644
|
| --- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
|
| +++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
|
| @@ -23,6 +23,7 @@
|
| #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/common/chrome_features.h"
|
| +#include "components/ntp_snippets/category.h"
|
| #include "components/ntp_snippets/category_info.h"
|
| #include "components/ntp_snippets/features.h"
|
| #include "components/ntp_snippets/switches.h"
|
| @@ -209,10 +210,8 @@ void SnippetsInternalsMessageHandler::HandleClearCachedSuggestions(
|
| if (!args->GetInteger(0, &category_id))
|
| return;
|
|
|
| - Category category =
|
| - content_suggestions_service_->category_factory()->FromIDValue(
|
| - category_id);
|
| - content_suggestions_service_->ClearCachedSuggestions(category);
|
| + content_suggestions_service_->ClearCachedSuggestions(
|
| + Category::FromIDValue(category_id));
|
| SendContentSuggestions();
|
| }
|
|
|
| @@ -224,9 +223,7 @@ void SnippetsInternalsMessageHandler::HandleClearDismissedSuggestions(
|
| if (!args->GetInteger(0, &category_id))
|
| return;
|
|
|
| - Category category =
|
| - content_suggestions_service_->category_factory()->FromIDValue(
|
| - category_id);
|
| + Category category = Category::FromIDValue(category_id);
|
| content_suggestions_service_->ClearDismissedSuggestionsForDebugging(category);
|
| SendContentSuggestions();
|
| dismissed_state_[category] = DismissedState::LOADING;
|
| @@ -247,9 +244,7 @@ void SnippetsInternalsMessageHandler::HandleToggleDismissedSuggestions(
|
| if (!args->GetBoolean(1, &dismissed_visible))
|
| return;
|
|
|
| - Category category =
|
| - content_suggestions_service_->category_factory()->FromIDValue(
|
| - category_id);
|
| + Category category = Category::FromIDValue(category_id);
|
| if (dismissed_visible) {
|
| dismissed_state_[category] = DismissedState::LOADING;
|
| content_suggestions_service_->GetDismissedSuggestionsForDebugging(
|
|
|