EDK: Sprinkle some more |final| secret sauce.

Don't go around subclassing RefPtr. Or Mutex.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/1435043002 .
diff --git a/mojo/edk/system/test/scoped_test_dir.h b/mojo/edk/system/test/scoped_test_dir.h
index 9f4db1b..9d4fde8 100644
--- a/mojo/edk/system/test/scoped_test_dir.h
+++ b/mojo/edk/system/test/scoped_test_dir.h
@@ -15,7 +15,7 @@
 
 // Creates/destroyes a temporary directory for test purposes. (Unlike
 // |base::ScopedTempDir|, this automatically creates the temporary directory.)
-class ScopedTestDir {
+class ScopedTestDir final {
  public:
   ScopedTestDir();
   ~ScopedTestDir();
diff --git a/mojo/edk/system/test/stopwatch.h b/mojo/edk/system/test/stopwatch.h
index ed8d149..8f4b3e3 100644
--- a/mojo/edk/system/test/stopwatch.h
+++ b/mojo/edk/system/test/stopwatch.h
@@ -16,7 +16,7 @@
 namespace test {
 
 // A simple "stopwatch" for measuring time elapsed from a given starting point.
-class Stopwatch {
+class Stopwatch final {
  public:
   Stopwatch();
   ~Stopwatch();
diff --git a/mojo/edk/system/test/test_io_thread.h b/mojo/edk/system/test/test_io_thread.h
index 67c0911..f53c5f7 100644
--- a/mojo/edk/system/test/test_io_thread.h
+++ b/mojo/edk/system/test/test_io_thread.h
@@ -15,7 +15,7 @@
 namespace test {
 
 // Class to help create/run threads with I/O |MessageLoop|s in tests.
-class TestIOThread {
+class TestIOThread final {
  public:
   enum class StartMode { AUTO, MANUAL };
   explicit TestIOThread(StartMode start_mode);
diff --git a/mojo/edk/test/multiprocess_test_helper.h b/mojo/edk/test/multiprocess_test_helper.h
index 952df04..5358eb4 100644
--- a/mojo/edk/test/multiprocess_test_helper.h
+++ b/mojo/edk/test/multiprocess_test_helper.h
@@ -22,7 +22,7 @@
 
 namespace test {
 
-class MultiprocessTestHelper {
+class MultiprocessTestHelper final {
  public:
   MultiprocessTestHelper();
   ~MultiprocessTestHelper();
diff --git a/mojo/edk/test/scoped_ipc_support.h b/mojo/edk/test/scoped_ipc_support.h
index c591054..48395e5 100644
--- a/mojo/edk/test/scoped_ipc_support.h
+++ b/mojo/edk/test/scoped_ipc_support.h
@@ -20,7 +20,7 @@
 
 namespace internal {
 
-class ScopedIPCSupportHelper {
+class ScopedIPCSupportHelper final {
  public:
   ScopedIPCSupportHelper();
   ~ScopedIPCSupportHelper();
@@ -47,7 +47,7 @@
 // |ProcessType::NONE|) on construction and |ShutdownIPCSupport()| on
 // destruction (or |ShutdownIPCSupportOnIOThread()| if destroyed on the I/O
 // thread).
-class ScopedIPCSupport : public embedder::ProcessDelegate {
+class ScopedIPCSupport final : public embedder::ProcessDelegate {
  public:
   explicit ScopedIPCSupport(
       embedder::PlatformTaskRunnerRefPtr io_thread_task_runner);
@@ -65,7 +65,7 @@
 
 // Like |ScopedIPCSupport|, but with |ProcessType::MASTER|. It will (optionally)
 // call a callback (on the I/O thread) on receiving |OnSlaveDisconnect()|.
-class ScopedMasterIPCSupport : public embedder::MasterProcessDelegate {
+class ScopedMasterIPCSupport final : public embedder::MasterProcessDelegate {
  public:
   explicit ScopedMasterIPCSupport(
       embedder::PlatformTaskRunnerRefPtr io_thread_task_runner);
@@ -88,7 +88,7 @@
 
 // Like |ScopedIPCSupport|, but with |ProcessType::SLAVE|. It will (optionally)
 // call a callback (on the I/O thread) on receiving |OnMasterDisconnect()|.
-class ScopedSlaveIPCSupport : public embedder::SlaveProcessDelegate {
+class ScopedSlaveIPCSupport final : public embedder::SlaveProcessDelegate {
  public:
   ScopedSlaveIPCSupport(
       embedder::PlatformTaskRunnerRefPtr io_thread_task_runner,
diff --git a/mojo/edk/util/command_line.h b/mojo/edk/util/command_line.h
index 4f989b0..3db716d 100644
--- a/mojo/edk/util/command_line.h
+++ b/mojo/edk/util/command_line.h
@@ -52,7 +52,7 @@
 // Class that stores processed command lines ("argv[0]", options, and positional
 // arguments) and provides access to them. For more details, see the file-level
 // comment above. This class is thread-safe.
-class CommandLine {
+class CommandLine final {
  private:
   class ConstructionHelper;
 
@@ -139,7 +139,7 @@
 
 // Helper class for building command lines (finding options, etc.) from raw
 // arguments.
-class CommandLineBuilder {
+class CommandLineBuilder final {
  public:
   CommandLineBuilder();
   ~CommandLineBuilder();
diff --git a/mojo/edk/util/cond_var.h b/mojo/edk/util/cond_var.h
index 68b0fdd..7acc202 100644
--- a/mojo/edk/util/cond_var.h
+++ b/mojo/edk/util/cond_var.h
@@ -18,7 +18,7 @@
 
 class Mutex;
 
-class CondVar {
+class CondVar final {
  public:
   CondVar();
   ~CondVar();
diff --git a/mojo/edk/util/mutex.h b/mojo/edk/util/mutex.h
index 381ce7a..0776376 100644
--- a/mojo/edk/util/mutex.h
+++ b/mojo/edk/util/mutex.h
@@ -21,7 +21,7 @@
 
 class CondVar;
 
-class MOJO_LOCKABLE Mutex {
+class MOJO_LOCKABLE Mutex final {
  public:
 #if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
   Mutex() { pthread_mutex_init(&impl_, nullptr); }
@@ -63,7 +63,7 @@
 
 // MutexLocker -----------------------------------------------------------------
 
-class MOJO_SCOPED_LOCKABLE MutexLocker {
+class MOJO_SCOPED_LOCKABLE MutexLocker final {
  public:
   explicit MutexLocker(Mutex* mutex) MOJO_EXCLUSIVE_LOCK_FUNCTION(mutex)
       : mutex_(mutex) {
diff --git a/mojo/edk/util/ref_ptr.h b/mojo/edk/util/ref_ptr.h
index 9d8bf85..baa7345 100644
--- a/mojo/edk/util/ref_ptr.h
+++ b/mojo/edk/util/ref_ptr.h
@@ -63,7 +63,7 @@
 // constructor/operator= to be deleted, but for clarity we include explicit
 // non-templated versions of everything.)
 template <typename T>
-class RefPtr {
+class RefPtr final {
  public:
   RefPtr() : ptr_(nullptr) {}
   RefPtr(std::nullptr_t) : ptr_(nullptr) {}
diff --git a/mojo/edk/util/ref_ptr_internal.h b/mojo/edk/util/ref_ptr_internal.h
index 5c416e9..2449846 100644
--- a/mojo/edk/util/ref_ptr_internal.h
+++ b/mojo/edk/util/ref_ptr_internal.h
@@ -25,7 +25,7 @@
 // (below). (You can't friend partial specializations.) See |MakeRefCounted()|
 // and |FRIEND_MAKE_REF_COUNTED()|.
 template <typename T>
-class MakeRefCountedHelper {
+class MakeRefCountedHelper final {
  public:
   template <typename... Args>
   static RefPtr<T> MakeRefCounted(Args&&... args) {
diff --git a/mojo/edk/util/waitable_event.h b/mojo/edk/util/waitable_event.h
index be64a66..f12b9c1 100644
--- a/mojo/edk/util/waitable_event.h
+++ b/mojo/edk/util/waitable_event.h
@@ -25,7 +25,7 @@
 // to Windows's auto-reset Event, which is also imitated by Chromium's
 // auto-reset |base::WaitableEvent|. However, there are some limitations -- see
 // |Signal()|.) This class is thread-safe.
-class AutoResetWaitableEvent {
+class AutoResetWaitableEvent final {
  public:
   AutoResetWaitableEvent() {}
   ~AutoResetWaitableEvent() {}
@@ -77,7 +77,7 @@
 // until explicitly reset. (This is similar to Windows's manual-reset Event,
 // which is also imitated by Chromium's manual-reset |base::WaitableEvent|.)
 // This class is thread-safe.
-class ManualResetWaitableEvent {
+class ManualResetWaitableEvent final {
  public:
   ManualResetWaitableEvent() {}
   ~ManualResetWaitableEvent() {}