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

Unified Diff: sandbox/win/src/filesystem_dispatcher.cc

Issue 1460903002: Unify PolicyBase into TargetPolicy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@policy_dispatcher
Patch Set: Rebase. Created 5 years 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: sandbox/win/src/filesystem_dispatcher.cc
diff --git a/sandbox/win/src/filesystem_dispatcher.cc b/sandbox/win/src/filesystem_dispatcher.cc
index d4ef79637c8578b5e4c99abee448dfcfbb5a618b..53d8b2ee775b67589aafb4b5e0aed73641858898 100644
--- a/sandbox/win/src/filesystem_dispatcher.cc
+++ b/sandbox/win/src/filesystem_dispatcher.cc
@@ -17,8 +17,8 @@
namespace sandbox {
-FilesystemDispatcher::FilesystemDispatcher(PolicyBase* policy_base)
- : policy_base_(policy_base) {
+FilesystemDispatcher::FilesystemDispatcher(TargetPolicy* policy)
+ : policy_(policy) {
static const IPCCall create_params = {
{IPC_NTCREATEFILE_TAG,
{WCHAR_TYPE,
@@ -111,8 +111,8 @@ bool FilesystemDispatcher::NtCreateFile(IPCInfo* ipc,
// To evaluate the policy we need to call back to the policy object. We
// are just middlemen in the operation since is the FileSystemPolicy which
// knows what to do.
- EvalResult result = policy_base_->EvalPolicy(IPC_NTCREATEFILE_TAG,
- params.GetBase());
+ EvalResult result =
+ policy_->EvalPolicy(IPC_NTCREATEFILE_TAG, params.GetBase());
HANDLE handle;
ULONG_PTR io_information = 0;
NTSTATUS nt_status;
@@ -158,8 +158,7 @@ bool FilesystemDispatcher::NtOpenFile(IPCInfo* ipc,
// To evaluate the policy we need to call back to the policy object. We
// are just middlemen in the operation since is the FileSystemPolicy which
// knows what to do.
- EvalResult result = policy_base_->EvalPolicy(IPC_NTOPENFILE_TAG,
- params.GetBase());
+ EvalResult result = policy_->EvalPolicy(IPC_NTOPENFILE_TAG, params.GetBase());
HANDLE handle;
ULONG_PTR io_information = 0;
NTSTATUS nt_status;
@@ -199,8 +198,8 @@ bool FilesystemDispatcher::NtQueryAttributesFile(IPCInfo* ipc,
// To evaluate the policy we need to call back to the policy object. We
// are just middlemen in the operation since is the FileSystemPolicy which
// knows what to do.
- EvalResult result = policy_base_->EvalPolicy(IPC_NTQUERYATTRIBUTESFILE_TAG,
- params.GetBase());
+ EvalResult result =
+ policy_->EvalPolicy(IPC_NTQUERYATTRIBUTESFILE_TAG, params.GetBase());
FILE_BASIC_INFORMATION* information =
reinterpret_cast<FILE_BASIC_INFORMATION*>(info->Buffer());
@@ -239,8 +238,8 @@ bool FilesystemDispatcher::NtQueryFullAttributesFile(IPCInfo* ipc,
// To evaluate the policy we need to call back to the policy object. We
// are just middlemen in the operation since is the FileSystemPolicy which
// knows what to do.
- EvalResult result = policy_base_->EvalPolicy(
- IPC_NTQUERYFULLATTRIBUTESFILE_TAG, params.GetBase());
+ EvalResult result =
+ policy_->EvalPolicy(IPC_NTQUERYFULLATTRIBUTESFILE_TAG, params.GetBase());
FILE_NETWORK_OPEN_INFORMATION* information =
reinterpret_cast<FILE_NETWORK_OPEN_INFORMATION*>(info->Buffer());
@@ -294,8 +293,8 @@ bool FilesystemDispatcher::NtSetInformationFile(IPCInfo* ipc,
// To evaluate the policy we need to call back to the policy object. We
// are just middlemen in the operation since is the FileSystemPolicy which
// knows what to do.
- EvalResult result = policy_base_->EvalPolicy(IPC_NTSETINFO_RENAME_TAG,
- params.GetBase());
+ EvalResult result =
+ policy_->EvalPolicy(IPC_NTSETINFO_RENAME_TAG, params.GetBase());
IO_STATUS_BLOCK* io_status =
reinterpret_cast<IO_STATUS_BLOCK*>(status->Buffer());

Powered by Google App Engine
This is Rietveld 408576698