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

Unified Diff: chrome/browser/download/chrome_download_manager_delegate.h

Issue 2674973003: Adding a DownloadRestrictions group policy. (Closed)
Patch Set: Patch set 5 + rebase Created 3 years, 10 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/download/chrome_download_manager_delegate.h
diff --git a/chrome/browser/download/chrome_download_manager_delegate.h b/chrome/browser/download/chrome_download_manager_delegate.h
index 1091d3ed80f501c8c843ca7287c5fb12c581284f..abe175a3b3c212f5183d2a26da2827047ac3f109 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.h
+++ b/chrome/browser/download/chrome_download_manager_delegate.h
@@ -8,6 +8,8 @@
#include <stdint.h>
#include <memory>
+#include <string>
+#include <vector>
#include "base/compiler_specific.h"
#include "base/containers/hash_tables.h"
@@ -84,6 +86,7 @@ class ChromeDownloadManagerDelegate
content::DownloadItem* download,
const content::CheckForFileExistenceCallback& callback) override;
std::string ApplicationClientIdForFileScanning() const override;
+ bool ShouldBlockAllDownloads() const override;
// Opens a download using the platform handler. DownloadItem::OpenDownload,
// which ends up being handled by OpenDownload(), will open a download in the
@@ -157,6 +160,10 @@ class ChromeDownloadManagerDelegate
// Returns true if |path| should open in the browser.
bool IsOpenInBrowserPreferreredForFile(const base::FilePath& path);
+ // Return true if the downloaded file should be blocked on on the current pref
+ // and |danger_type|.
+ bool ShouldBlockFile(content::DownloadDangerType danger_type) const;
+
Profile* profile_;
uint32_t next_download_id_;
IdCallbackVector id_callbacks_;

Powered by Google App Engine
This is Rietveld 408576698