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

Unified Diff: components/offline_pages/downloads/download_notifying_observer.h

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_notifying_observer.h
diff --git a/components/offline_pages/downloads/download_notifying_observer.h b/components/offline_pages/downloads/download_notifying_observer.h
index 44f1e1f617c4991966e645a312359920cf7fbb3f..844373e5d3edc231d99b531e148b8f5f8c94d8ae 100644
--- a/components/offline_pages/downloads/download_notifying_observer.h
+++ b/components/offline_pages/downloads/download_notifying_observer.h
@@ -7,12 +7,16 @@
#include <memory>
+#include "base/guid.h"
#include "base/macros.h"
#include "components/offline_pages/background/request_coordinator.h"
+#include "components/offline_pages/client_policy_controller.h"
namespace offline_pages {
+struct ClientId;
struct OfflinePageDownloadNotifier;
+class ClientPolicyController;
class SavePageRequest;
// Class observing the save page requests and issuing corresponding user
@@ -38,11 +42,16 @@ class DownloadNotifyingObserver : public RequestCoordinator::Observer,
private:
friend class DownloadNotifyingObserverTest;
- explicit DownloadNotifyingObserver(
- std::unique_ptr<OfflinePageDownloadNotifier> notifier);
+ DownloadNotifyingObserver(
+ std::unique_ptr<OfflinePageDownloadNotifier> notifier,
+ ClientPolicyController* policy_controller);
+
+ bool IsVisibleInUI(const ClientId& id);
// Used to issue notifications related to save page requests.
std::unique_ptr<OfflinePageDownloadNotifier> notifier_;
+ // Used to determine policy-related permissions. Not owned.
+ ClientPolicyController* policy_controller_;
DISALLOW_COPY_AND_ASSIGN(DownloadNotifyingObserver);
};

Powered by Google App Engine
This is Rietveld 408576698