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

Unified Diff: sandbox/win/src/sandbox.h

Issue 1378523002: Use scoped_refptr and RefCountedThreadSafe for TargetPolicy. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated patchset dependency Created 5 years, 1 month 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
« no previous file with comments | « sandbox/win/src/policy_target_test.cc ('k') | sandbox/win/src/sandbox_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sandbox.h
diff --git a/sandbox/win/src/sandbox.h b/sandbox/win/src/sandbox.h
index e3261944030a11b92c9f70bfb9c48c2de50459bc..5fb658de1878206c4e7e03839844d203735fab70 100644
--- a/sandbox/win/src/sandbox.h
+++ b/sandbox/win/src/sandbox.h
@@ -22,6 +22,7 @@
#include <windows.h>
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
#include "sandbox/win/src/sandbox_policy.h"
#include "sandbox/win/src/sandbox_types.h"
@@ -57,7 +58,7 @@ class BrokerServices {
// Returns the interface pointer to a new, empty policy object. Use this
// interface to specify the sandbox policy for new processes created by
// SpawnTarget()
- virtual TargetPolicy* CreatePolicy() = 0;
+ virtual scoped_refptr<TargetPolicy> CreatePolicy() = 0;
// Creates a new target (child process) in a suspended state.
// Parameters:
@@ -75,7 +76,7 @@ class BrokerServices {
// ALL_OK if successful. All other return values imply failure.
virtual ResultCode SpawnTarget(const wchar_t* exe_path,
const wchar_t* command_line,
- TargetPolicy* policy,
+ scoped_refptr<TargetPolicy> policy,
PROCESS_INFORMATION* target) = 0;
// This call blocks (waits) for all the targets to terminate.
« no previous file with comments | « sandbox/win/src/policy_target_test.cc ('k') | sandbox/win/src/sandbox_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698