Replace base/atomic with std::atomic

BUG=b:23907815

Change-Id: I42a2cdba2c08ec26541c95d7d376379edb4a9d28
diff --git a/libweave/external/base/memory/ref_counted.cc b/libweave/external/base/memory/ref_counted.cc
index 4a20cb6..42e777c 100644
--- a/libweave/external/base/memory/ref_counted.cc
+++ b/libweave/external/base/memory/ref_counted.cc
@@ -9,8 +9,7 @@
 namespace subtle {
 
 bool RefCountedThreadSafeBase::HasOneRef() const {
-  return AtomicRefCountIsOne(
-      &const_cast<RefCountedThreadSafeBase*>(this)->ref_count_);
+  return ref_count_ == 1;
 }
 
 RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(0) {
@@ -30,15 +29,15 @@
 #ifndef NDEBUG
   DCHECK(!in_dtor_);
 #endif
-  AtomicRefCountInc(&ref_count_);
+  ++ref_count_;
 }
 
 bool RefCountedThreadSafeBase::Release() const {
 #ifndef NDEBUG
   DCHECK(!in_dtor_);
-  DCHECK(!AtomicRefCountIsZero(&ref_count_));
+  DCHECK(ref_count_ != 0);
 #endif
-  if (!AtomicRefCountDec(&ref_count_)) {
+  if (--ref_count_ == 0) {
 #ifndef NDEBUG
     in_dtor_ = true;
 #endif