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

Unified Diff: sandbox/linux/seccomp-bpf/trap.h

Issue 291063002: Fix misuses of DISALLOW_IMPLICIT_CONSTRUCTORS() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sort declarations according to Google style guide Created 6 years, 7 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
« no previous file with comments | « content/common/sandbox_linux/sandbox_linux.h ('k') | sandbox/linux/suid/client/setuid_sandbox_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/trap.h
diff --git a/sandbox/linux/seccomp-bpf/trap.h b/sandbox/linux/seccomp-bpf/trap.h
index f6a09c05c79224f166718c5eb0b22461e8369eba..adc6d7f5e22f4e1cad6b0aecee6aa11e80012fa3 100644
--- a/sandbox/linux/seccomp-bpf/trap.h
+++ b/sandbox/linux/seccomp-bpf/trap.h
@@ -63,10 +63,6 @@ class SANDBOX_EXPORT Trap {
static ErrorCode ErrorCodeFromTrapId(uint16_t id);
private:
- // The destructor is unimplemented. Don't ever attempt to destruct this
- // object. It'll break subsequent system calls that trigger a SIGSYS.
- ~Trap();
-
struct TrapKey {
TrapKey(TrapFnc f, const void* a, bool s) : fnc(f), aux(a), safe(s) {}
TrapFnc fnc;
@@ -76,6 +72,14 @@ class SANDBOX_EXPORT Trap {
};
typedef std::map<TrapKey, uint16_t> TrapIds;
+ // Our constructor is private. A shared global instance is created
+ // automatically as needed.
+ Trap();
+
+ // The destructor is unimplemented. Don't ever attempt to destruct this
+ // object. It'll break subsequent system calls that trigger a SIGSYS.
+ ~Trap();
+
// We only have a very small number of methods. We opt to make them static
// and have them internally call GetInstance(). This is a little more
// convenient than having each caller obtain short-lived reference to the
@@ -105,11 +109,9 @@ class SANDBOX_EXPORT Trap {
size_t trap_array_capacity_; // Currently allocated capacity of array
bool has_unsafe_traps_; // Whether unsafe traps have been enabled
- // Our constructor is private. A shared global instance is created
- // automatically as needed.
// Copying and assigning is unimplemented. It doesn't make sense for a
// singleton.
- DISALLOW_IMPLICIT_CONSTRUCTORS(Trap);
+ DISALLOW_COPY_AND_ASSIGN(Trap);
};
} // namespace sandbox
« no previous file with comments | « content/common/sandbox_linux/sandbox_linux.h ('k') | sandbox/linux/suid/client/setuid_sandbox_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698