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

Unified Diff: chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc

Issue 2342443006: [Offline pages] Use the new policy bits (Closed)
Patch Set: code review update 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: chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
diff --git a/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc b/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
index 5b6e72285c1ee2601397e78052b82b452b078dc8..217a1b15ba4f2e6d000c1160fb4153aed58a4754 100644
--- a/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
+++ b/chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.cc
@@ -21,6 +21,7 @@
#include "chrome/browser/profiles/profile_android.h"
#include "components/offline_pages/background/request_coordinator.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_feature.h"
#include "components/offline_pages/offline_page_model.h"
@@ -72,10 +73,11 @@ std::vector<int64_t> FilterRequestsByGuid(
std::vector<std::unique_ptr<SavePageRequest>> requests,
const std::string& guid) {
std::vector<int64_t> request_ids;
+ ClientPolicyController policy_controller;
for (const auto& request : requests) {
if (request->client_id().id == guid &&
- (request->client_id().name_space == kDownloadNamespace ||
- request->client_id().name_space == kAsyncNamespace)) {
+ policy_controller.IsSupportedByDownload(
+ request->client_id().name_space)) {
request_ids.push_back(request->request_id());
}
}

Powered by Google App Engine
This is Rietveld 408576698