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

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

Issue 546903002: Added logging in PolicyBase::AddRule. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fri 09/05/2014 11:10:21.69 Created 6 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: sandbox/win/src/sandbox_policy_base.cc
diff --git a/sandbox/win/src/sandbox_policy_base.cc b/sandbox/win/src/sandbox_policy_base.cc
index 7b9262b079a58923cba919860ca5e54f0e43c3b1..8b754323e24ed408ea328b55de5f8af476a66951 100644
--- a/sandbox/win/src/sandbox_policy_base.cc
+++ b/sandbox/win/src/sandbox_policy_base.cc
@@ -373,8 +373,21 @@ ResultCode PolicyBase::SetStderrHandle(HANDLE handle) {
return SBOX_ALL_OK;
}
-ResultCode PolicyBase::AddRule(SubSystem subsystem, Semantics semantics,
+ResultCode PolicyBase::AddRule(SubSystem subsystem,
+ Semantics semantics,
const wchar_t* pattern) {
+ ResultCode result = AddRuleInternal(subsystem, semantics, pattern);
+ LOG_IF(ERROR, result != SBOX_ALL_OK) << "Failed to add sandbox rule."
+ << " error = " << result
+ << ", subsystem = " << subsystem
+ << ", semantics = " << semantics
+ << ", pattern = '" << pattern << "'";
+ return result;
+}
+
+ResultCode PolicyBase::AddRuleInternal(SubSystem subsystem,
+ Semantics semantics,
+ const wchar_t* pattern) {
if (NULL == policy_) {
policy_ = MakeBrokerPolicyMemory();
DCHECK(policy_);
« sandbox/win/src/sandbox_policy_base.h ('K') | « sandbox/win/src/sandbox_policy_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698