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

Unified Diff: components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc

Issue 2342443006: [Offline pages] Use the new policy bits (Closed)
Patch Set: also rename isUserRequested in offline page model impl Created 4 years, 3 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/offline_pages/offline_page_suggestions_provider.cc
diff --git a/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc b/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
index 3c1b0e3e58017d788e065c94326f0ccf79613398..5ffac374ca00986b9b486c6dc6a67c5b329193ea 100644
--- a/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
+++ b/components/ntp_snippets/offline_pages/offline_page_suggestions_provider.cc
@@ -15,6 +15,7 @@
#include "base/values.h"
#include "components/ntp_snippets/pref_names.h"
#include "components/offline_pages/client_namespace_constants.h"
+#include "components/offline_pages/client_policy_controller.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "grit/components_strings.h"
@@ -45,7 +46,8 @@ bool IsRecentTab(const offline_pages::ClientId& client_id) {
bool IsDownload(const offline_pages::ClientId& client_id) {
// TODO(pke): Use kDownloadNamespace once the OfflinePageModel uses that.
// The current logic is taken from DownloadUIAdapter::IsVisibleInUI.
- return client_id.name_space == offline_pages::kAsyncNamespace &&
+ return offline_pages::ClientPolicyController().IsSupportedByDownload(
fgorski 2016/09/19 22:18:54 Does the comment/todo still make sense here? Could
chili 2016/09/20 00:02:33 Done.
+ client_id.name_space) &&
base::IsValidGUID(client_id.id);
}

Powered by Google App Engine
This is Rietveld 408576698