summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-04-29 14:28:44 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-29 21:30:03 +0000
commit7e7213dae82225490cc15fc25ac3c093708609f1 (patch)
treecc30aabfb6a70c86c9539e3123525b82bf0957c9
parent7eb5cd9c17165102b9b25805c1f97cfde260aed8 (diff)
downloadchromium_src-7e7213dae82225490cc15fc25ac3c093708609f1.zip
chromium_src-7e7213dae82225490cc15fc25ac3c093708609f1.tar.gz
chromium_src-7e7213dae82225490cc15fc25ac3c093708609f1.tar.bz2
Apply automated fixits for Chrome clang plugin to sandbox.
Working on trimming down plugin warnings on the Windows clang build. BUG=467287 TBR=cpu@chromium.org Review URL: https://codereview.chromium.org/1118473005 Cr-Commit-Position: refs/heads/master@{#327558}
-rw-r--r--sandbox/win/src/address_sanitizer_test.cc4
-rw-r--r--sandbox/win/src/eat_resolver.h26
-rw-r--r--sandbox/win/src/filesystem_dispatcher.h4
-rw-r--r--sandbox/win/src/handle_dispatcher.h4
-rw-r--r--sandbox/win/src/ipc_unittest.cc4
-rw-r--r--sandbox/win/src/named_pipe_dispatcher.h4
-rw-r--r--sandbox/win/src/process_mitigations_win32k_dispatcher.h4
-rw-r--r--sandbox/win/src/process_thread_dispatcher.h4
-rw-r--r--sandbox/win/src/registry_dispatcher.h4
-rw-r--r--sandbox/win/src/service_resolver.h44
-rw-r--r--sandbox/win/src/sidestep_resolver.h40
-rw-r--r--sandbox/win/src/sync_dispatcher.h4
-rw-r--r--sandbox/win/src/target_services.h16
-rw-r--r--sandbox/win/src/win2k_threadpool.h11
14 files changed, 87 insertions, 86 deletions
diff --git a/sandbox/win/src/address_sanitizer_test.cc b/sandbox/win/src/address_sanitizer_test.cc
index 6eb2c85..b88aa81 100644
--- a/sandbox/win/src/address_sanitizer_test.cc
+++ b/sandbox/win/src/address_sanitizer_test.cc
@@ -18,12 +18,12 @@ namespace sandbox {
class AddressSanitizerTests : public ::testing::Test {
public:
- void SetUp() {
+ void SetUp() override {
env_.reset(base::Environment::Create());
had_asan_options_ = env_->GetVar("ASAN_OPTIONS", &old_asan_options_);
}
- void TearDown() {
+ void TearDown() override {
if (had_asan_options_)
ASSERT_TRUE(env_->SetVar("ASAN_OPTIONS", old_asan_options_));
else
diff --git a/sandbox/win/src/eat_resolver.h b/sandbox/win/src/eat_resolver.h
index 5e4b6e8..1d9d430 100644
--- a/sandbox/win/src/eat_resolver.h
+++ b/sandbox/win/src/eat_resolver.h
@@ -15,25 +15,25 @@ namespace sandbox {
class EatResolverThunk : public ResolverThunk {
public:
EatResolverThunk() : eat_entry_(NULL) {}
- virtual ~EatResolverThunk() {}
+ ~EatResolverThunk() override {}
// Implementation of Resolver::Setup.
- virtual NTSTATUS Setup(const void* target_module,
- const void* interceptor_module,
- const char* target_name,
- const char* interceptor_name,
- const void* interceptor_entry_point,
- void* thunk_storage,
- size_t storage_bytes,
- size_t* storage_used);
+ NTSTATUS Setup(const void* target_module,
+ const void* interceptor_module,
+ const char* target_name,
+ const char* interceptor_name,
+ const void* interceptor_entry_point,
+ void* thunk_storage,
+ size_t storage_bytes,
+ size_t* storage_used) override;
// Implementation of Resolver::ResolveTarget.
- virtual NTSTATUS ResolveTarget(const void* module,
- const char* function_name,
- void** address);
+ NTSTATUS ResolveTarget(const void* module,
+ const char* function_name,
+ void** address) override;
// Implementation of Resolver::GetThunkSize.
- virtual size_t GetThunkSize() const;
+ size_t GetThunkSize() const override;
private:
// The entry to patch.
diff --git a/sandbox/win/src/filesystem_dispatcher.h b/sandbox/win/src/filesystem_dispatcher.h
index 935a084..192d36c 100644
--- a/sandbox/win/src/filesystem_dispatcher.h
+++ b/sandbox/win/src/filesystem_dispatcher.h
@@ -16,10 +16,10 @@ namespace sandbox {
class FilesystemDispatcher : public Dispatcher {
public:
explicit FilesystemDispatcher(PolicyBase* policy_base);
- ~FilesystemDispatcher() {}
+ ~FilesystemDispatcher() override {}
// Dispatcher interface.
- virtual bool SetupService(InterceptionManager* manager, int service);
+ bool SetupService(InterceptionManager* manager, int service) override;
private:
// Processes IPC requests coming from calls to NtCreateFile in the target.
diff --git a/sandbox/win/src/handle_dispatcher.h b/sandbox/win/src/handle_dispatcher.h
index 739045d..84a22e1 100644
--- a/sandbox/win/src/handle_dispatcher.h
+++ b/sandbox/win/src/handle_dispatcher.h
@@ -15,10 +15,10 @@ namespace sandbox {
class HandleDispatcher : public Dispatcher {
public:
explicit HandleDispatcher(PolicyBase* policy_base);
- ~HandleDispatcher() {}
+ ~HandleDispatcher() override {}
// Dispatcher interface.
- virtual bool SetupService(InterceptionManager* manager, int service);
+ bool SetupService(InterceptionManager* manager, int service) override;
private:
// Processes IPC requests coming from calls to
diff --git a/sandbox/win/src/ipc_unittest.cc b/sandbox/win/src/ipc_unittest.cc
index fc1f2a2..b1e74ab 100644
--- a/sandbox/win/src/ipc_unittest.cc
+++ b/sandbox/win/src/ipc_unittest.cc
@@ -565,9 +565,9 @@ class UnitTestIPCDispatcher : public Dispatcher {
};
UnitTestIPCDispatcher();
- ~UnitTestIPCDispatcher() {};
+ ~UnitTestIPCDispatcher() override{};
- virtual bool SetupService(InterceptionManager* manager, int service) {
+ bool SetupService(InterceptionManager* manager, int service) override {
return true;
}
diff --git a/sandbox/win/src/named_pipe_dispatcher.h b/sandbox/win/src/named_pipe_dispatcher.h
index 1b87828..1c02199 100644
--- a/sandbox/win/src/named_pipe_dispatcher.h
+++ b/sandbox/win/src/named_pipe_dispatcher.h
@@ -16,10 +16,10 @@ namespace sandbox {
class NamedPipeDispatcher : public Dispatcher {
public:
explicit NamedPipeDispatcher(PolicyBase* policy_base);
- ~NamedPipeDispatcher() {}
+ ~NamedPipeDispatcher() override {}
// Dispatcher interface.
- virtual bool SetupService(InterceptionManager* manager, int service);
+ bool SetupService(InterceptionManager* manager, int service) override;
private:
// Processes IPC requests coming from calls to CreateNamedPipeW() in the
diff --git a/sandbox/win/src/process_mitigations_win32k_dispatcher.h b/sandbox/win/src/process_mitigations_win32k_dispatcher.h
index 65c9f77..2e1e1a8 100644
--- a/sandbox/win/src/process_mitigations_win32k_dispatcher.h
+++ b/sandbox/win/src/process_mitigations_win32k_dispatcher.h
@@ -15,10 +15,10 @@ namespace sandbox {
class ProcessMitigationsWin32KDispatcher : public Dispatcher {
public:
explicit ProcessMitigationsWin32KDispatcher(PolicyBase* policy_base);
- ~ProcessMitigationsWin32KDispatcher() {}
+ ~ProcessMitigationsWin32KDispatcher() override {}
// Dispatcher interface.
- virtual bool SetupService(InterceptionManager* manager, int service);
+ bool SetupService(InterceptionManager* manager, int service) override;
private:
PolicyBase* policy_base_;
diff --git a/sandbox/win/src/process_thread_dispatcher.h b/sandbox/win/src/process_thread_dispatcher.h
index c0b12d1..2bb3b6e 100644
--- a/sandbox/win/src/process_thread_dispatcher.h
+++ b/sandbox/win/src/process_thread_dispatcher.h
@@ -16,10 +16,10 @@ namespace sandbox {
class ThreadProcessDispatcher : public Dispatcher {
public:
explicit ThreadProcessDispatcher(PolicyBase* policy_base);
- ~ThreadProcessDispatcher() {}
+ ~ThreadProcessDispatcher() override {}
// Dispatcher interface.
- virtual bool SetupService(InterceptionManager* manager, int service);
+ bool SetupService(InterceptionManager* manager, int service) override;
private:
// Processes IPC requests coming from calls to NtOpenThread() in the target.
diff --git a/sandbox/win/src/registry_dispatcher.h b/sandbox/win/src/registry_dispatcher.h
index 14411fa..83811a9 100644
--- a/sandbox/win/src/registry_dispatcher.h
+++ b/sandbox/win/src/registry_dispatcher.h
@@ -16,10 +16,10 @@ namespace sandbox {
class RegistryDispatcher : public Dispatcher {
public:
explicit RegistryDispatcher(PolicyBase* policy_base);
- ~RegistryDispatcher() {}
+ ~RegistryDispatcher() override {}
// Dispatcher interface.
- virtual bool SetupService(InterceptionManager* manager, int service);
+ bool SetupService(InterceptionManager* manager, int service) override;
private:
// Processes IPC requests coming from calls to NtCreateKey in the target.
diff --git a/sandbox/win/src/service_resolver.h b/sandbox/win/src/service_resolver.h
index 76daee4..ab125fb 100644
--- a/sandbox/win/src/service_resolver.h
+++ b/sandbox/win/src/service_resolver.h
@@ -18,30 +18,30 @@ class ServiceResolverThunk : public ResolverThunk {
ServiceResolverThunk(HANDLE process, bool relaxed)
: process_(process), ntdll_base_(NULL),
relaxed_(relaxed), relative_jump_(0) {}
- virtual ~ServiceResolverThunk() {}
+ ~ServiceResolverThunk() override {}
// Implementation of Resolver::Setup.
- virtual NTSTATUS Setup(const void* target_module,
- const void* interceptor_module,
- const char* target_name,
- const char* interceptor_name,
- const void* interceptor_entry_point,
- void* thunk_storage,
- size_t storage_bytes,
- size_t* storage_used);
+ NTSTATUS Setup(const void* target_module,
+ const void* interceptor_module,
+ const char* target_name,
+ const char* interceptor_name,
+ const void* interceptor_entry_point,
+ void* thunk_storage,
+ size_t storage_bytes,
+ size_t* storage_used) override;
// Implementation of Resolver::ResolveInterceptor.
- virtual NTSTATUS ResolveInterceptor(const void* module,
- const char* function_name,
- const void** address);
+ NTSTATUS ResolveInterceptor(const void* module,
+ const char* function_name,
+ const void** address) override;
// Implementation of Resolver::ResolveTarget.
- virtual NTSTATUS ResolveTarget(const void* module,
- const char* function_name,
- void** address);
+ NTSTATUS ResolveTarget(const void* module,
+ const char* function_name,
+ void** address) override;
// Implementation of Resolver::GetThunkSize.
- virtual size_t GetThunkSize() const;
+ size_t GetThunkSize() const override;
// Call this to set up ntdll_base_ which will allow for local patches.
virtual void AllowLocalPatches();
@@ -95,10 +95,10 @@ class Wow64ResolverThunk : public ServiceResolverThunk {
// The service resolver needs a child process to write to.
Wow64ResolverThunk(HANDLE process, bool relaxed)
: ServiceResolverThunk(process, relaxed) {}
- virtual ~Wow64ResolverThunk() {}
+ ~Wow64ResolverThunk() override {}
private:
- virtual bool IsFunctionAService(void* local_thunk) const;
+ bool IsFunctionAService(void* local_thunk) const override;
DISALLOW_COPY_AND_ASSIGN(Wow64ResolverThunk);
};
@@ -110,10 +110,10 @@ class Wow64W8ResolverThunk : public ServiceResolverThunk {
// The service resolver needs a child process to write to.
Wow64W8ResolverThunk(HANDLE process, bool relaxed)
: ServiceResolverThunk(process, relaxed) {}
- virtual ~Wow64W8ResolverThunk() {}
+ ~Wow64W8ResolverThunk() override {}
private:
- virtual bool IsFunctionAService(void* local_thunk) const;
+ bool IsFunctionAService(void* local_thunk) const override;
DISALLOW_COPY_AND_ASSIGN(Wow64W8ResolverThunk);
};
@@ -125,10 +125,10 @@ class Win8ResolverThunk : public ServiceResolverThunk {
// The service resolver needs a child process to write to.
Win8ResolverThunk(HANDLE process, bool relaxed)
: ServiceResolverThunk(process, relaxed) {}
- virtual ~Win8ResolverThunk() {}
+ ~Win8ResolverThunk() override {}
private:
- virtual bool IsFunctionAService(void* local_thunk) const;
+ bool IsFunctionAService(void* local_thunk) const override;
DISALLOW_COPY_AND_ASSIGN(Win8ResolverThunk);
};
diff --git a/sandbox/win/src/sidestep_resolver.h b/sandbox/win/src/sidestep_resolver.h
index 30d8cb3..cf03d6e 100644
--- a/sandbox/win/src/sidestep_resolver.h
+++ b/sandbox/win/src/sidestep_resolver.h
@@ -15,20 +15,20 @@ namespace sandbox {
class SidestepResolverThunk : public ResolverThunk {
public:
SidestepResolverThunk() {}
- virtual ~SidestepResolverThunk() {}
+ ~SidestepResolverThunk() override {}
// Implementation of Resolver::Setup.
- virtual NTSTATUS Setup(const void* target_module,
- const void* interceptor_module,
- const char* target_name,
- const char* interceptor_name,
- const void* interceptor_entry_point,
- void* thunk_storage,
- size_t storage_bytes,
- size_t* storage_used);
+ NTSTATUS Setup(const void* target_module,
+ const void* interceptor_module,
+ const char* target_name,
+ const char* interceptor_name,
+ const void* interceptor_entry_point,
+ void* thunk_storage,
+ size_t storage_bytes,
+ size_t* storage_used) override;
// Implementation of Resolver::GetThunkSize.
- virtual size_t GetThunkSize() const;
+ size_t GetThunkSize() const override;
private:
DISALLOW_COPY_AND_ASSIGN(SidestepResolverThunk);
@@ -41,20 +41,20 @@ class SidestepResolverThunk : public ResolverThunk {
class SmartSidestepResolverThunk : public SidestepResolverThunk {
public:
SmartSidestepResolverThunk() {}
- virtual ~SmartSidestepResolverThunk() {}
+ ~SmartSidestepResolverThunk() override {}
// Implementation of Resolver::Setup.
- virtual NTSTATUS Setup(const void* target_module,
- const void* interceptor_module,
- const char* target_name,
- const char* interceptor_name,
- const void* interceptor_entry_point,
- void* thunk_storage,
- size_t storage_bytes,
- size_t* storage_used);
+ NTSTATUS Setup(const void* target_module,
+ const void* interceptor_module,
+ const char* target_name,
+ const char* interceptor_name,
+ const void* interceptor_entry_point,
+ void* thunk_storage,
+ size_t storage_bytes,
+ size_t* storage_used) override;
// Implementation of Resolver::GetThunkSize.
- virtual size_t GetThunkSize() const;
+ size_t GetThunkSize() const override;
private:
// Performs the actual call to the interceptor if the conditions are correct
diff --git a/sandbox/win/src/sync_dispatcher.h b/sandbox/win/src/sync_dispatcher.h
index 56b5664..29c6c1e 100644
--- a/sandbox/win/src/sync_dispatcher.h
+++ b/sandbox/win/src/sync_dispatcher.h
@@ -16,10 +16,10 @@ namespace sandbox {
class SyncDispatcher : public Dispatcher {
public:
explicit SyncDispatcher(PolicyBase* policy_base);
- ~SyncDispatcher() {}
+ ~SyncDispatcher() override {}
// Dispatcher interface.
- virtual bool SetupService(InterceptionManager* manager, int service);
+ bool SetupService(InterceptionManager* manager, int service) override;
private:
// Processes IPC requests coming from calls to CreateEvent in the target.
diff --git a/sandbox/win/src/target_services.h b/sandbox/win/src/target_services.h
index 70f173b..115de46 100644
--- a/sandbox/win/src/target_services.h
+++ b/sandbox/win/src/target_services.h
@@ -43,14 +43,14 @@ class TargetServicesBase : public TargetServices {
TargetServicesBase();
// Public interface of TargetServices.
- virtual ResultCode Init();
- virtual void LowerToken();
- virtual ProcessState* GetState();
- virtual ResultCode DuplicateHandle(HANDLE source_handle,
- DWORD target_process_id,
- HANDLE* target_handle,
- DWORD desired_access,
- DWORD options);
+ ResultCode Init() override;
+ void LowerToken() override;
+ ProcessState* GetState() override;
+ ResultCode DuplicateHandle(HANDLE source_handle,
+ DWORD target_process_id,
+ HANDLE* target_handle,
+ DWORD desired_access,
+ DWORD options) override;
// Factory method.
static TargetServicesBase* GetInstance();
diff --git a/sandbox/win/src/win2k_threadpool.h b/sandbox/win/src/win2k_threadpool.h
index 41cd5f1..be2791f 100644
--- a/sandbox/win/src/win2k_threadpool.h
+++ b/sandbox/win/src/win2k_threadpool.h
@@ -25,13 +25,14 @@ namespace sandbox {
class Win2kThreadPool : public ThreadProvider {
public:
Win2kThreadPool();
- virtual ~Win2kThreadPool();
+ ~Win2kThreadPool() override;
- virtual bool RegisterWait(const void* cookie, HANDLE waitable_object,
- CrossCallIPCCallback callback,
- void* context);
+ bool RegisterWait(const void* cookie,
+ HANDLE waitable_object,
+ CrossCallIPCCallback callback,
+ void* context) override;
- virtual bool UnRegisterWaits(void* cookie);
+ bool UnRegisterWaits(void* cookie) override;
// Returns the total number of wait objects associated with
// the thread pool.