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

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

Issue 2228553003: a provider of Physical Web pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added unittest Created 4 years, 4 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: 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 105147d3d9af045167e48d028c0bfac2993ade98..a1a922d222bea0d77982668ee7a279d65af478cc 100644
--- a/chrome/browser/ui/webui/snippets_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/snippets_internals_message_handler.cc
@@ -59,6 +59,9 @@ std::string GetCategoryTitle(Category category) {
if (category.IsKnownCategory(KnownCategories::BOOKMARKS)) {
return "Recently visited bookmarks";
}
+ if (category.IsKnownCategory(KnownCategories::PHYSICAL_WEB_PAGES)) {
+ return "Physical Web pages (in the vicinity)";
+ }
return std::string();
}
@@ -207,6 +210,10 @@ void SnippetsInternalsMessageHandler::SendAllContent() {
base::FeatureList::IsEnabled(
ntp_snippets::kOfflinePageSuggestionsFeature));
+ SendBoolean("flag-physical-web-page-suggestions",
+ base::FeatureList::IsEnabled(
+ chrome::android::kNTPPhysicalWebPageSuggestionsFeature));
+
web_ui()->CallJavascriptFunctionUnsafe(
"chrome.SnippetsInternals.setHostRestricted",
base::FundamentalValue(

Powered by Google App Engine
This is Rietveld 408576698