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

Unified Diff: chrome/browser/ui/webui/snippets_internals_message_handler.cc

Issue 2139293004: [TEMP - DO NOT SUBMIT] OfflinePagesProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@internalspage
Patch Set: Implement OfflinePage conversion 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 | « chrome/browser/resources/snippets_internals.html ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fdb57a837b076e95f3ebbaf3f8d2c0c29713fbd7..b59d41b9b815ec39f47548fb407615c8d98e3711 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
@@ -78,6 +78,10 @@ std::string MapCategoryName(ContentSuggestionsCategory category) {
switch (category) {
case ContentSuggestionsCategory::ARTICLES:
return "Articles";
+ case ContentSuggestionsCategory::OFFLINE_PAGES_CACHED:
+ return "Continue browsing (cached offline pages)";
+ case ContentSuggestionsCategory::OFFLINE_PAGES_DOWNLOADS:
+ return "Downloads (downloaded offline pages)";
case ContentSuggestionsCategory::COUNT:
NOTREACHED() << "Category::COUNT must not be used as a value";
}
@@ -256,6 +260,10 @@ void SnippetsInternalsMessageHandler::SendInitialData() {
SendBoolean("flag-snippets", base::FeatureList::IsEnabled(
chrome::android::kNTPSnippetsFeature));
+ SendBoolean("flag-offline-page-suggestions",
+ base::FeatureList::IsEnabled(
+ chrome::android::kNTPOfflinePageSuggestionsFeature));
+
web_ui()->CallJavascriptFunctionUnsafe(
"chrome.SnippetsInternals.setHostRestricted",
base::FundamentalValue(
« no previous file with comments | « chrome/browser/resources/snippets_internals.html ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698