remove DISALLOW_COPY_AND_ASSIGN from files in base/*
Also fixes a few cpp lint errors. No functional changes.
Bug: 1010217
Change-Id: Ibdbac42980740d26392812b39f86859b238b7a64
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422964
Commit-Queue: David Bienvenu <[email protected]>
Reviewed-by: Lei Zhang <[email protected]>
Cr-Commit-Position: refs/heads/master@{#809700}
diff --git a/base/no_destructor_unittest.cc b/base/no_destructor_unittest.cc
index 63d5c13..54ac1b53 100644
--- a/base/no_destructor_unittest.cc
+++ b/base/no_destructor_unittest.cc
@@ -4,8 +4,10 @@
#include "base/no_destructor.h"
+#include <memory>
#include <string>
#include <utility>
+#include <vector>
#include "base/atomicops.h"
#include "base/barrier_closure.h"
@@ -93,7 +95,8 @@
PlatformThread::YieldCurrentThread();
done_construction_ = true;
}
-
+ BlockingConstructor(const BlockingConstructor&) = delete;
+ BlockingConstructor& operator=(const BlockingConstructor&) = delete;
~BlockingConstructor() = delete;
// Returns true if BlockingConstructor() was entered.
@@ -106,7 +109,7 @@
subtle::NoBarrier_Store(&complete_construction_, 1);
}
- bool done_construction() { return done_construction_; }
+ bool done_construction() const { return done_construction_; }
private:
// Use Atomic32 instead of AtomicFlag for them to be trivially initialized.
@@ -114,8 +117,6 @@
static subtle::Atomic32 complete_construction_;
bool done_construction_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(BlockingConstructor);
};
// static
@@ -132,6 +133,9 @@
OnceClosure before_get)
: SimpleThread("BlockingConstructorThread", Options(thread_priority)),
before_get_(std::move(before_get)) {}
+ BlockingConstructorThread(const BlockingConstructorThread&) = delete;
+ BlockingConstructorThread& operator=(const BlockingConstructorThread&) =
+ delete;
void Run() override {
if (before_get_)
@@ -143,8 +147,6 @@
private:
OnceClosure before_get_;
-
- DISALLOW_COPY_AND_ASSIGN(BlockingConstructorThread);
};
} // namespace