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

Unified Diff: components/offline_pages/downloads/download_ui_adapter.cc

Issue 2342443006: [Offline pages] Use the new policy bits (Closed)
Patch Set: i think i got it! Made sure it compiles 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/offline_pages/downloads/download_ui_adapter.cc
diff --git a/components/offline_pages/downloads/download_ui_adapter.cc b/components/offline_pages/downloads/download_ui_adapter.cc
index 1df2757481bf61dee4c8e1eae921f4e6416c4512..7a11f66fda4853f1b69290742586c7af33743b3b 100644
--- a/components/offline_pages/downloads/download_ui_adapter.cc
+++ b/components/offline_pages/downloads/download_ui_adapter.cc
@@ -10,6 +10,7 @@
#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/offline_pages/client_namespace_constants.h"
+#include "components/offline_pages/client_policy_controller.h"
#include "components/offline_pages/downloads/download_ui_item.h"
#include "components/offline_pages/offline_page_model.h"
@@ -208,10 +209,9 @@ void DownloadUIAdapter::OnDeletePagesDone(DeletePageResult result) {
// TODO(dimich): Consider adding UMA to record user actions.
}
-// static
bool DownloadUIAdapter::IsVisibleInUI(const ClientId& client_id) {
const std::string& name_space = client_id.name_space;
- return (name_space == kAsyncNamespace || name_space == kDownloadNamespace) &&
+ return model_->GetPolicyController()->IsSupportedByDownload(name_space) &&
base::IsValidGUID(client_id.id);
}

Powered by Google App Engine
This is Rietveld 408576698