summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authornick <nick@chromium.org>2015-04-23 12:54:59 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-23 19:56:08 +0000
commitd6ac192621b71ee5ecdac74082e99346871e5024 (patch)
tree62a96ffa3817ac1fedebc518e27ede9fc3200a52 /sandbox
parent7d538572490d411d4cdb22640120c739379a433a (diff)
downloadchromium_src-d6ac192621b71ee5ecdac74082e99346871e5024.zip
chromium_src-d6ac192621b71ee5ecdac74082e99346871e5024.tar.gz
chromium_src-d6ac192621b71ee5ecdac74082e99346871e5024.tar.bz2
Update {virtual,override} to follow C++11 style in sandbox.
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override. This patch was manually generated using a regex and a text editor. BUG=417463 Review URL: https://codereview.chromium.org/1058123003 Cr-Commit-Position: refs/heads/master@{#326616}
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/linux/bpf_dsl/bpf_dsl.h4
-rw-r--r--sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h6
-rw-r--r--sandbox/linux/seccomp-bpf/bpf_tests.h6
-rw-r--r--sandbox/win/src/broker_services.h22
-rw-r--r--sandbox/win/src/sandbox_policy_base.h72
5 files changed, 53 insertions, 57 deletions
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl.h b/sandbox/linux/bpf_dsl/bpf_dsl.h
index 63b095d..365e9b5 100644
--- a/sandbox/linux/bpf_dsl/bpf_dsl.h
+++ b/sandbox/linux/bpf_dsl/bpf_dsl.h
@@ -33,8 +33,8 @@
// class SillyPolicy : public Policy {
// public:
// SillyPolicy() {}
-// virtual ~SillyPolicy() {}
-// virtual ResultExpr EvaluateSyscall(int sysno) const override {
+// ~SillyPolicy() override {}
+// ResultExpr EvaluateSyscall(int sysno) const override {
// if (sysno == __NR_fcntl) {
// Arg<int> fd(0), cmd(1);
// Arg<unsigned long> flags(2);
diff --git a/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h b/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
index 1869913..7736c15 100644
--- a/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
+++ b/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
@@ -25,9 +25,9 @@ class BPFTesterCompatibilityDelegate : public BPFTesterDelegate {
explicit BPFTesterCompatibilityDelegate(TestFunction test_function)
: aux_(), test_function_(test_function) {}
- virtual ~BPFTesterCompatibilityDelegate() {}
+ ~BPFTesterCompatibilityDelegate() override {}
- virtual scoped_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
+ scoped_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
// The current method is guaranteed to only run in the child process
// running the test. In this process, the current object is guaranteed
// to live forever. So it's ok to pass aux_pointer_for_policy_ to
@@ -35,7 +35,7 @@ class BPFTesterCompatibilityDelegate : public BPFTesterDelegate {
return scoped_ptr<bpf_dsl::Policy>(new Policy(&aux_));
}
- virtual void RunTestFunction() override {
+ void RunTestFunction() override {
// Run the actual test.
// The current object is guaranteed to live forever in the child process
// where this will run.
diff --git a/sandbox/linux/seccomp-bpf/bpf_tests.h b/sandbox/linux/seccomp-bpf/bpf_tests.h
index 57de1dd..cc4debd 100644
--- a/sandbox/linux/seccomp-bpf/bpf_tests.h
+++ b/sandbox/linux/seccomp-bpf/bpf_tests.h
@@ -102,12 +102,12 @@ class BPFTesterSimpleDelegate : public BPFTesterDelegate {
public:
explicit BPFTesterSimpleDelegate(void (*test_function)(void))
: test_function_(test_function) {}
- virtual ~BPFTesterSimpleDelegate() {}
+ ~BPFTesterSimpleDelegate() override {}
- virtual scoped_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
+ scoped_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
return scoped_ptr<bpf_dsl::Policy>(new PolicyClass());
}
- virtual void RunTestFunction() override {
+ void RunTestFunction() override {
DCHECK(test_function_);
test_function_();
}
diff --git a/sandbox/win/src/broker_services.h b/sandbox/win/src/broker_services.h
index 76011e5..3e7a179 100644
--- a/sandbox/win/src/broker_services.h
+++ b/sandbox/win/src/broker_services.h
@@ -45,17 +45,17 @@ class BrokerServicesBase final : public BrokerServices,
~BrokerServicesBase();
// BrokerServices interface.
- virtual ResultCode Init() override;
- virtual TargetPolicy* CreatePolicy() override;
- virtual ResultCode SpawnTarget(const wchar_t* exe_path,
- const wchar_t* command_line,
- TargetPolicy* policy,
- PROCESS_INFORMATION* target) override;
- virtual ResultCode WaitForAllTargets() override;
- virtual ResultCode AddTargetPeer(HANDLE peer_process) override;
- virtual ResultCode InstallAppContainer(const wchar_t* sid,
- const wchar_t* name) override;
- virtual ResultCode UninstallAppContainer(const wchar_t* sid) override;
+ ResultCode Init() override;
+ TargetPolicy* CreatePolicy() override;
+ ResultCode SpawnTarget(const wchar_t* exe_path,
+ const wchar_t* command_line,
+ TargetPolicy* policy,
+ PROCESS_INFORMATION* target) override;
+ ResultCode WaitForAllTargets() override;
+ ResultCode AddTargetPeer(HANDLE peer_process) override;
+ ResultCode InstallAppContainer(const wchar_t* sid,
+ const wchar_t* name) override;
+ ResultCode UninstallAppContainer(const wchar_t* sid) override;
// Checks if the supplied process ID matches one of the broker's active
// target processes
diff --git a/sandbox/win/src/sandbox_policy_base.h b/sandbox/win/src/sandbox_policy_base.h
index ea0f3e6..587d793 100644
--- a/sandbox/win/src/sandbox_policy_base.h
+++ b/sandbox/win/src/sandbox_policy_base.h
@@ -37,45 +37,41 @@ class PolicyBase : public Dispatcher, public TargetPolicy {
PolicyBase();
// TargetPolicy:
- virtual void AddRef() override;
- virtual void Release() override;
- virtual ResultCode SetTokenLevel(TokenLevel initial,
- TokenLevel lockdown) override;
- virtual TokenLevel GetInitialTokenLevel() const override;
- virtual TokenLevel GetLockdownTokenLevel() const override;
- virtual ResultCode SetJobLevel(JobLevel job_level,
- uint32 ui_exceptions) override;
- virtual ResultCode SetJobMemoryLimit(size_t memory_limit) override;
- virtual ResultCode SetAlternateDesktop(bool alternate_winstation) override;
- virtual base::string16 GetAlternateDesktop() const override;
- virtual ResultCode CreateAlternateDesktop(bool alternate_winstation) override;
- virtual void DestroyAlternateDesktop() override;
- virtual ResultCode SetIntegrityLevel(IntegrityLevel integrity_level) override;
- virtual IntegrityLevel GetIntegrityLevel() const override;
- virtual ResultCode SetDelayedIntegrityLevel(
- IntegrityLevel integrity_level) override;
- virtual ResultCode SetAppContainer(const wchar_t* sid) override;
- virtual ResultCode SetCapability(const wchar_t* sid) override;
- virtual ResultCode SetLowBox(const wchar_t* sid) override;
- virtual ResultCode SetProcessMitigations(MitigationFlags flags) override;
- virtual MitigationFlags GetProcessMitigations() override;
- virtual ResultCode SetDelayedProcessMitigations(
- MitigationFlags flags) override;
- virtual MitigationFlags GetDelayedProcessMitigations() const override;
- virtual void SetStrictInterceptions() override;
- virtual ResultCode SetStdoutHandle(HANDLE handle) override;
- virtual ResultCode SetStderrHandle(HANDLE handle) override;
- virtual ResultCode AddRule(SubSystem subsystem, Semantics semantics,
- const wchar_t* pattern) override;
- virtual ResultCode AddDllToUnload(const wchar_t* dll_name) override;
- virtual ResultCode AddKernelObjectToClose(
- const base::char16* handle_type,
- const base::char16* handle_name) override;
+ void AddRef() override;
+ void Release() override;
+ ResultCode SetTokenLevel(TokenLevel initial, TokenLevel lockdown) override;
+ TokenLevel GetInitialTokenLevel() const override;
+ TokenLevel GetLockdownTokenLevel() const override;
+ ResultCode SetJobLevel(JobLevel job_level, uint32 ui_exceptions) override;
+ ResultCode SetJobMemoryLimit(size_t memory_limit) override;
+ ResultCode SetAlternateDesktop(bool alternate_winstation) override;
+ base::string16 GetAlternateDesktop() const override;
+ ResultCode CreateAlternateDesktop(bool alternate_winstation) override;
+ void DestroyAlternateDesktop() override;
+ ResultCode SetIntegrityLevel(IntegrityLevel integrity_level) override;
+ IntegrityLevel GetIntegrityLevel() const override;
+ ResultCode SetDelayedIntegrityLevel(IntegrityLevel integrity_level) override;
+ ResultCode SetAppContainer(const wchar_t* sid) override;
+ ResultCode SetCapability(const wchar_t* sid) override;
+ ResultCode SetLowBox(const wchar_t* sid) override;
+ ResultCode SetProcessMitigations(MitigationFlags flags) override;
+ MitigationFlags GetProcessMitigations() override;
+ ResultCode SetDelayedProcessMitigations(MitigationFlags flags) override;
+ MitigationFlags GetDelayedProcessMitigations() const override;
+ void SetStrictInterceptions() override;
+ ResultCode SetStdoutHandle(HANDLE handle) override;
+ ResultCode SetStderrHandle(HANDLE handle) override;
+ ResultCode AddRule(SubSystem subsystem,
+ Semantics semantics,
+ const wchar_t* pattern) override;
+ ResultCode AddDllToUnload(const wchar_t* dll_name) override;
+ ResultCode AddKernelObjectToClose(const base::char16* handle_type,
+ const base::char16* handle_name) override;
// Dispatcher:
- virtual Dispatcher* OnMessageReady(IPCParams* ipc,
- CallbackGeneric* callback) override;
- virtual bool SetupService(InterceptionManager* manager, int service) override;
+ Dispatcher* OnMessageReady(IPCParams* ipc,
+ CallbackGeneric* callback) override;
+ bool SetupService(InterceptionManager* manager, int service) override;
// Creates a Job object with the level specified in a previous call to
// SetJobLevel().
@@ -104,7 +100,7 @@ class PolicyBase : public Dispatcher, public TargetPolicy {
HANDLE GetStderrHandle();
private:
- ~PolicyBase();
+ ~PolicyBase() override;
// Test IPC providers.
bool Ping(IPCInfo* ipc, void* cookie);