Script remove more DISALLOW_COPY_AND_ASSIGNs
This applies a script previously used for large directories on all
remaining (smaller) directories as a single chunk.
This replaces DISALLOW_COPY_AND_ASSIGN with explicit constructor deletes
where a local script is able to detect its insertion place (~Foo() is
public => insert before this line).
This is incomplete as not all classes have a public ~Foo() declared, so
not all DISALLOW_COPY_AND_ASSIGN occurrences are replaced.
IWYU cleanup is left as a separate pass that is easier when these macros
go away.
Bug: 1010217
Change-Id: I572936462f763e1dd15dd88cdcf451ee14b34dd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3182480
Reviewed-by: Lei Zhang <thestig@chromium.org>
Owners-Override: Lei Zhang <thestig@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#925533}
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index f459e52..cca77a0 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -506,14 +506,18 @@
class BASE_EXPORT ScopedDisallowBaseSyncPrimitives {
public:
ScopedDisallowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF;
+
+ ScopedDisallowBaseSyncPrimitives(const ScopedDisallowBaseSyncPrimitives&) =
+ delete;
+ ScopedDisallowBaseSyncPrimitives& operator=(
+ const ScopedDisallowBaseSyncPrimitives&) = delete;
+
~ScopedDisallowBaseSyncPrimitives() EMPTY_BODY_IF_DCHECK_IS_OFF;
private:
#if DCHECK_IS_ON()
std::unique_ptr<BooleanWithStack> was_disallowed_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(ScopedDisallowBaseSyncPrimitives);
};
class BASE_EXPORT ScopedAllowBaseSyncPrimitives {
@@ -731,14 +735,16 @@
class BASE_EXPORT ScopedDisallowSingleton {
public:
ScopedDisallowSingleton() EMPTY_BODY_IF_DCHECK_IS_OFF;
+
+ ScopedDisallowSingleton(const ScopedDisallowSingleton&) = delete;
+ ScopedDisallowSingleton& operator=(const ScopedDisallowSingleton&) = delete;
+
~ScopedDisallowSingleton() EMPTY_BODY_IF_DCHECK_IS_OFF;
private:
#if DCHECK_IS_ON()
std::unique_ptr<BooleanWithStack> was_disallowed_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(ScopedDisallowSingleton);
};
// Asserts that running long CPU work is allowed in the current scope.
diff --git a/courgette/adjustment_method.cc b/courgette/adjustment_method.cc
index 939d02e..cdcd77d 100644
--- a/courgette/adjustment_method.cc
+++ b/courgette/adjustment_method.cc
@@ -214,6 +214,9 @@
m_root_(nullptr),
p_root_(nullptr) {}
+ AssignmentProblem(const AssignmentProblem&) = delete;
+ AssignmentProblem& operator=(const AssignmentProblem&) = delete;
+
~AssignmentProblem() {
for (size_t i = 0; i < all_nodes_.size(); ++i)
delete all_nodes_[i];
@@ -562,14 +565,16 @@
NodeQueue unsolved_;
std::vector<Node*> all_nodes_;
-
- DISALLOW_COPY_AND_ASSIGN(AssignmentProblem);
};
class GraphAdjuster : public AdjustmentMethod {
public:
GraphAdjuster()
: prog_(nullptr), model_(nullptr), debug_label_index_gen_(0) {}
+
+ GraphAdjuster(const GraphAdjuster&) = delete;
+ GraphAdjuster& operator=(const GraphAdjuster&) = delete;
+
~GraphAdjuster() = default;
bool Adjust(const AssemblyProgram& model, AssemblyProgram* program) {
@@ -659,9 +664,6 @@
// Note LabelInfo is allocated inside map, so the LabelInfo lifetimes are
// managed by the map.
std::map<Label*, LabelInfo> label_infos_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GraphAdjuster);
};
diff --git a/courgette/adjustment_method_2.cc b/courgette/adjustment_method_2.cc
index 467e79a2..e7569f5 100644
--- a/courgette/adjustment_method_2.cc
+++ b/courgette/adjustment_method_2.cc
@@ -1228,6 +1228,10 @@
class Adjuster : public AdjustmentMethod {
public:
Adjuster() : prog_(nullptr), model_(nullptr) {}
+
+ Adjuster(const Adjuster&) = delete;
+ Adjuster& operator=(const Adjuster&) = delete;
+
~Adjuster() = default;
bool Adjust(const AssemblyProgram& model, AssemblyProgram* program) {
@@ -1285,9 +1289,6 @@
const AssemblyProgram* model_; // Program to be mimicked, owned by caller.
LabelInfoMaker label_info_maker_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Adjuster);
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/courgette/assembly_program.cc b/courgette/assembly_program.cc
index 4a3a76c..6293bd0 100644
--- a/courgette/assembly_program.cc
+++ b/courgette/assembly_program.cc
@@ -22,6 +22,10 @@
using VECTOR = CONTAINER<Label*>;
LabelReceptor() = default;
+
+ LabelReceptor(const LabelReceptor&) = delete;
+ LabelReceptor& operator=(const LabelReceptor&) = delete;
+
~LabelReceptor() override = default;
VECTOR* mutable_abs32_vector() { return &abs32_vector_; }
@@ -51,8 +55,6 @@
private:
VECTOR abs32_vector_;
VECTOR rel32_vector_;
-
- DISALLOW_COPY_AND_ASSIGN(LabelReceptor);
};
} // namespace
diff --git a/courgette/assembly_program.h b/courgette/assembly_program.h
index 8f87f3e..22d3f2ee7 100644
--- a/courgette/assembly_program.h
+++ b/courgette/assembly_program.h
@@ -42,6 +42,10 @@
class AssemblyProgram {
public:
AssemblyProgram(ExecutableType kind, uint64_t image_base);
+
+ AssemblyProgram(const AssemblyProgram&) = delete;
+ AssemblyProgram& operator=(const AssemblyProgram&) = delete;
+
~AssemblyProgram();
ExecutableType kind() const { return kind_; }
@@ -89,8 +93,6 @@
// These are used by Label adjustment during patch generation.
std::vector<Label*> abs32_label_annotations_;
std::vector<Label*> rel32_label_annotations_;
-
- DISALLOW_COPY_AND_ASSIGN(AssemblyProgram);
};
} // namespace courgette
diff --git a/courgette/courgette_flow.h b/courgette/courgette_flow.h
index 8329742..b849e7c 100644
--- a/courgette/courgette_flow.h
+++ b/courgette/courgette_flow.h
@@ -23,6 +23,10 @@
class RegionBuffer : public BasicBuffer {
public:
explicit RegionBuffer(const Region& region) : region_(region) {}
+
+ RegionBuffer(const RegionBuffer&) = delete;
+ RegionBuffer& operator=(const RegionBuffer&) = delete;
+
~RegionBuffer() override {}
// BasicBuffer:
@@ -31,8 +35,6 @@
private:
Region region_;
-
- DISALLOW_COPY_AND_ASSIGN(RegionBuffer);
};
// CourgetteFlow stores Courgette data arranged into groups, and exposes
@@ -63,6 +65,10 @@
};
CourgetteFlow();
+
+ CourgetteFlow(const CourgetteFlow&) = delete;
+ CourgetteFlow& operator=(const CourgetteFlow&) = delete;
+
~CourgetteFlow();
static const char* name(Group group);
@@ -141,8 +147,6 @@
Data data_only_;
Data data_old_;
Data data_new_;
-
- DISALLOW_COPY_AND_ASSIGN(CourgetteFlow);
};
} // namespace courgette
diff --git a/courgette/courgette_tool.cc b/courgette/courgette_tool.cc
index 9d904a5..ce43de4 100644
--- a/courgette/courgette_tool.cc
+++ b/courgette/courgette_tool.cc
@@ -83,6 +83,10 @@
if (!buffer_.Initialize(file_name))
Problem("Can't read %s file.", kind);
}
+
+ BufferedFileReader(const BufferedFileReader&) = delete;
+ BufferedFileReader& operator=(const BufferedFileReader&) = delete;
+
~BufferedFileReader() override = default;
// courgette::BasicBuffer:
@@ -91,8 +95,6 @@
private:
base::MemoryMappedFile buffer_;
-
- DISALLOW_COPY_AND_ASSIGN(BufferedFileReader);
};
/******** Various helpers ********/
diff --git a/courgette/difference_estimator.h b/courgette/difference_estimator.h
index 690c8404..b43d5f7c 100644
--- a/courgette/difference_estimator.h
+++ b/courgette/difference_estimator.h
@@ -34,6 +34,10 @@
class DifferenceEstimator {
public:
DifferenceEstimator();
+
+ DifferenceEstimator(const DifferenceEstimator&) = delete;
+ DifferenceEstimator& operator=(const DifferenceEstimator&) = delete;
+
~DifferenceEstimator();
class Base;
@@ -53,7 +57,6 @@
private:
std::vector<Base*> owned_bases_;
std::vector<Subject*> owned_subjects_;
- DISALLOW_COPY_AND_ASSIGN(DifferenceEstimator);
};
} // namespace
diff --git a/courgette/disassembler.h b/courgette/disassembler.h
index 78a4005f..f3eb88e3 100644
--- a/courgette/disassembler.h
+++ b/courgette/disassembler.h
@@ -27,6 +27,10 @@
public:
RvaVisitor_Abs32(const std::vector<RVA>& rva_locations,
const AddressTranslator& translator);
+
+ RvaVisitor_Abs32(const RvaVisitor_Abs32&) = delete;
+ RvaVisitor_Abs32& operator=(const RvaVisitor_Abs32&) = delete;
+
~RvaVisitor_Abs32() override { }
// VectorRvaVisitor<RVA> interfaces.
@@ -34,8 +38,6 @@
private:
const AddressTranslator& translator_;
-
- DISALLOW_COPY_AND_ASSIGN(RvaVisitor_Abs32);
};
// Visitor/adaptor to translate RVA to target RVA for rel32.
@@ -43,6 +45,10 @@
public:
RvaVisitor_Rel32(const std::vector<RVA>& rva_locations,
const AddressTranslator& translator);
+
+ RvaVisitor_Rel32(const RvaVisitor_Rel32&) = delete;
+ RvaVisitor_Rel32& operator=(const RvaVisitor_Rel32&) = delete;
+
~RvaVisitor_Rel32() override { }
// VectorRvaVisitor<RVA> interfaces.
@@ -50,8 +56,6 @@
private:
const AddressTranslator& translator_;
-
- DISALLOW_COPY_AND_ASSIGN(RvaVisitor_Rel32);
};
virtual ~Disassembler();
diff --git a/courgette/disassembler_elf_32.h b/courgette/disassembler_elf_32.h
index fba67f1..a32b8e2 100644
--- a/courgette/disassembler_elf_32.h
+++ b/courgette/disassembler_elf_32.h
@@ -85,18 +85,22 @@
public:
Elf32RvaVisitor_Rel32(
const std::vector<std::unique_ptr<TypedRVA>>& rva_locations);
+
+ Elf32RvaVisitor_Rel32(const Elf32RvaVisitor_Rel32&) = delete;
+ Elf32RvaVisitor_Rel32& operator=(const Elf32RvaVisitor_Rel32&) = delete;
+
~Elf32RvaVisitor_Rel32() override { }
// VectorRvaVisitor<TypedRVA*> interfaces.
RVA Get() const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Elf32RvaVisitor_Rel32);
};
public:
DisassemblerElf32(const uint8_t* start, size_t length);
+ DisassemblerElf32(const DisassemblerElf32&) = delete;
+ DisassemblerElf32& operator=(const DisassemblerElf32&) = delete;
+
~DisassemblerElf32() override { }
// Disassembler interfaces.
@@ -240,9 +244,6 @@
// Sorted rel32 RVAs. This is mutable because ParseFile() temporarily sorts
// these by file offsets.
mutable std::vector<std::unique_ptr<TypedRVA>> rel32_locations_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DisassemblerElf32);
};
} // namespace courgette
diff --git a/courgette/disassembler_elf_32_x86.h b/courgette/disassembler_elf_32_x86.h
index 71e61ab..ad39307 100644
--- a/courgette/disassembler_elf_32_x86.h
+++ b/courgette/disassembler_elf_32_x86.h
@@ -39,6 +39,9 @@
DisassemblerElf32X86(const uint8_t* start, size_t length);
+ DisassemblerElf32X86(const DisassemblerElf32X86&) = delete;
+ DisassemblerElf32X86& operator=(const DisassemblerElf32X86&) = delete;
+
~DisassemblerElf32X86() override { }
// DisassemblerElf32 interfaces.
@@ -58,9 +61,6 @@
#if COURGETTE_HISTOGRAM_TARGETS
std::map<RVA, int> rel32_target_rvas_;
#endif
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DisassemblerElf32X86);
};
} // namespace courgette
diff --git a/courgette/disassembler_win32.h b/courgette/disassembler_win32.h
index da6a16d..c9b357c 100644
--- a/courgette/disassembler_win32.h
+++ b/courgette/disassembler_win32.h
@@ -25,6 +25,9 @@
class DisassemblerWin32 : public Disassembler {
public:
+ DisassemblerWin32(const DisassemblerWin32&) = delete;
+ DisassemblerWin32& operator=(const DisassemblerWin32&) = delete;
+
virtual ~DisassemblerWin32() = default;
// Disassembler interfaces.
@@ -153,9 +156,6 @@
std::map<RVA, int> abs32_target_rvas_;
std::map<RVA, int> rel32_target_rvas_;
#endif
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DisassemblerWin32);
};
} // namespace courgette
diff --git a/courgette/disassembler_win32_x64.h b/courgette/disassembler_win32_x64.h
index 837c745..c4d071e0 100644
--- a/courgette/disassembler_win32_x64.h
+++ b/courgette/disassembler_win32_x64.h
@@ -26,6 +26,10 @@
}
DisassemblerWin32X64(const uint8_t* start, size_t length);
+
+ DisassemblerWin32X64(const DisassemblerWin32X64&) = delete;
+ DisassemblerWin32X64& operator=(const DisassemblerWin32X64&) = delete;
+
~DisassemblerWin32X64() override = default;
// Disassembler interfaces.
@@ -47,9 +51,6 @@
uint16_t RelativeOffsetOfDataDirectories() const override {
return kOffsetOfDataDirectoryFromImageOptionalHeader64;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DisassemblerWin32X64);
};
} // namespace courgette
diff --git a/courgette/disassembler_win32_x86.h b/courgette/disassembler_win32_x86.h
index 84813e6..67a46279 100644
--- a/courgette/disassembler_win32_x86.h
+++ b/courgette/disassembler_win32_x86.h
@@ -26,6 +26,10 @@
}
DisassemblerWin32X86(const uint8_t* start, size_t length);
+
+ DisassemblerWin32X86(const DisassemblerWin32X86&) = delete;
+ DisassemblerWin32X86& operator=(const DisassemblerWin32X86&) = delete;
+
~DisassemblerWin32X86() override = default;
// Disassembler interfaces.
@@ -47,9 +51,6 @@
uint16_t RelativeOffsetOfDataDirectories() const override {
return kOffsetOfDataDirectoryFromImageOptionalHeader32;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DisassemblerWin32X86);
};
} // namespace courgette
diff --git a/courgette/encoded_program.h b/courgette/encoded_program.h
index b814cbb..3558039 100644
--- a/courgette/encoded_program.h
+++ b/courgette/encoded_program.h
@@ -44,6 +44,10 @@
class EncodedProgram {
public:
EncodedProgram();
+
+ EncodedProgram(const EncodedProgram&) = delete;
+ EncodedProgram& operator=(const EncodedProgram&) = delete;
+
~EncodedProgram();
// Generating an EncodedProgram:
@@ -138,8 +142,6 @@
// Table of the addresses containing abs32 relocations; computed during
// assembly, used to generate base relocation table.
UInt32Vector abs32_relocs_;
-
- DISALLOW_COPY_AND_ASSIGN(EncodedProgram);
};
// Deserializes program from a stream set to |*output|. Returns C_OK if
diff --git a/courgette/ensemble.h b/courgette/ensemble.h
index adb4b079..8597901 100644
--- a/courgette/ensemble.h
+++ b/courgette/ensemble.h
@@ -41,6 +41,9 @@
Ensemble* ensemble,
const Region& region);
+ Element(const Element&) = delete;
+ Element& operator=(const Element&) = delete;
+
virtual ~Element();
ExecutableType kind() const { return kind_; }
@@ -57,8 +60,6 @@
ExecutableType kind_;
Ensemble* ensemble_;
Region region_;
-
- DISALLOW_COPY_AND_ASSIGN(Element);
};
@@ -66,6 +67,10 @@
public:
Ensemble(const Region& region, const char* name)
: region_(region), name_(name) {}
+
+ Ensemble(const Ensemble&) = delete;
+ Ensemble& operator=(const Ensemble&) = delete;
+
~Ensemble();
const Region& region() const { return region_; }
@@ -85,8 +90,6 @@
std::vector<Element*> elements_; // Embedded elements discovered.
std::vector<Element*> owned_elements_; // For deallocation.
-
- DISALLOW_COPY_AND_ASSIGN(Ensemble);
};
inline size_t Element::offset_in_ensemble() const {
diff --git a/courgette/ensemble_apply.cc b/courgette/ensemble_apply.cc
index 54fccb5d..0711670 100644
--- a/courgette/ensemble_apply.cc
+++ b/courgette/ensemble_apply.cc
@@ -30,6 +30,10 @@
class EnsemblePatchApplication {
public:
EnsemblePatchApplication();
+
+ EnsemblePatchApplication(const EnsemblePatchApplication&) = delete;
+ EnsemblePatchApplication& operator=(const EnsemblePatchApplication&) = delete;
+
~EnsemblePatchApplication() = default;
Status ReadHeader(SourceStream* header_stream);
@@ -76,8 +80,6 @@
SinkStream corrected_parameters_storage_;
SinkStream corrected_elements_storage_;
-
- DISALLOW_COPY_AND_ASSIGN(EnsemblePatchApplication);
};
EnsemblePatchApplication::EnsemblePatchApplication()
diff --git a/courgette/instruction_utils.h b/courgette/instruction_utils.h
index 9b201dce7..31aa4e8 100644
--- a/courgette/instruction_utils.h
+++ b/courgette/instruction_utils.h
@@ -18,6 +18,10 @@
class InstructionReceptor {
public:
InstructionReceptor() = default;
+
+ InstructionReceptor(const InstructionReceptor&) = delete;
+ InstructionReceptor& operator=(const InstructionReceptor&) = delete;
+
virtual ~InstructionReceptor() = default;
// Generates an entire base relocation table.
@@ -43,9 +47,6 @@
// Generates an 8-byte absolute reference to address of 'label'.
virtual CheckBool EmitAbs64(Label* label) = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(InstructionReceptor);
};
// A rerunable callback that emit instructions to a provided receptor. Returns
diff --git a/courgette/label_manager.h b/courgette/label_manager.h
index 4b252405..dc0e2ac 100644
--- a/courgette/label_manager.h
+++ b/courgette/label_manager.h
@@ -50,6 +50,10 @@
class SimpleIndexAssigner {
public:
explicit SimpleIndexAssigner(LabelVector* labels);
+
+ SimpleIndexAssigner(const SimpleIndexAssigner&) = delete;
+ SimpleIndexAssigner& operator=(const SimpleIndexAssigner&) = delete;
+
~SimpleIndexAssigner();
// Scans forward to assign successive indexes to Labels, using existing
@@ -73,8 +77,6 @@
// Tracker for index usage to ensure uniqueness of indexes.
std::vector<bool> available_;
-
- DISALLOW_COPY_AND_ASSIGN(SimpleIndexAssigner);
};
LabelManager();
diff --git a/courgette/streams.h b/courgette/streams.h
index a0de9e6..60f5d607 100644
--- a/courgette/streams.h
+++ b/courgette/streams.h
@@ -129,6 +129,10 @@
class SinkStream {
public:
SinkStream() {}
+
+ SinkStream(const SinkStream&) = delete;
+ SinkStream& operator=(const SinkStream&) = delete;
+
~SinkStream() {}
// Appends |byte_count| bytes from |data| to the stream.
@@ -169,14 +173,16 @@
private:
NoThrowBuffer<char> buffer_;
-
- DISALLOW_COPY_AND_ASSIGN(SinkStream);
};
// A SourceStreamSet is a set of SourceStreams.
class SourceStreamSet {
public:
SourceStreamSet();
+
+ SourceStreamSet(const SourceStreamSet&) = delete;
+ SourceStreamSet& operator=(const SourceStreamSet&) = delete;
+
~SourceStreamSet();
// Initializes the SourceStreamSet with the stream data in memory at |source|.
@@ -205,8 +211,6 @@
private:
size_t count_;
SourceStream streams_[kMaxStreams];
-
- DISALLOW_COPY_AND_ASSIGN(SourceStreamSet);
};
// A SinkStreamSet is a set of SinkStreams. Data is collected by writing to the
@@ -217,6 +221,10 @@
class SinkStreamSet {
public:
SinkStreamSet();
+
+ SinkStreamSet(const SinkStreamSet&) = delete;
+ SinkStreamSet& operator=(const SinkStreamSet&) = delete;
+
~SinkStreamSet();
// Initializes the SinkStreamSet to have |stream_index_limit| streams. Must
@@ -243,8 +251,6 @@
size_t count_;
SinkStream streams_[kMaxStreams];
-
- DISALLOW_COPY_AND_ASSIGN(SinkStreamSet);
};
} // namespace courgette
diff --git a/crypto/apple_keychain.h b/crypto/apple_keychain.h
index 01f8d285..8e76245 100644
--- a/crypto/apple_keychain.h
+++ b/crypto/apple_keychain.h
@@ -30,6 +30,10 @@
class CRYPTO_EXPORT AppleKeychain {
public:
AppleKeychain();
+
+ AppleKeychain(const AppleKeychain&) = delete;
+ AppleKeychain& operator=(const AppleKeychain&) = delete;
+
virtual ~AppleKeychain();
virtual OSStatus FindGenericPassword(UInt32 serviceNameLength,
@@ -53,9 +57,6 @@
#if !defined(OS_IOS)
virtual OSStatus ItemDelete(AppleSecKeychainItemRef itemRef) const;
#endif // !defined(OS_IOS)
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AppleKeychain);
};
} // namespace crypto
diff --git a/crypto/ec_private_key.h b/crypto/ec_private_key.h
index 50d9877f..ae8f446 100644
--- a/crypto/ec_private_key.h
+++ b/crypto/ec_private_key.h
@@ -27,6 +27,9 @@
// tricky.)
class CRYPTO_EXPORT ECPrivateKey {
public:
+ ECPrivateKey(const ECPrivateKey&) = delete;
+ ECPrivateKey& operator=(const ECPrivateKey&) = delete;
+
~ECPrivateKey();
// Creates a new random instance. Can return nullptr if initialization fails.
@@ -78,8 +81,6 @@
ECPrivateKey();
bssl::UniquePtr<EVP_PKEY> key_;
-
- DISALLOW_COPY_AND_ASSIGN(ECPrivateKey);
};
} // namespace crypto
diff --git a/crypto/ec_signature_creator_impl.h b/crypto/ec_signature_creator_impl.h
index 595a721..96f06c4 100644
--- a/crypto/ec_signature_creator_impl.h
+++ b/crypto/ec_signature_creator_impl.h
@@ -19,6 +19,10 @@
class ECSignatureCreatorImpl : public ECSignatureCreator {
public:
explicit ECSignatureCreatorImpl(ECPrivateKey* key);
+
+ ECSignatureCreatorImpl(const ECSignatureCreatorImpl&) = delete;
+ ECSignatureCreatorImpl& operator=(const ECSignatureCreatorImpl&) = delete;
+
~ECSignatureCreatorImpl() override;
bool Sign(base::span<const uint8_t> data,
@@ -29,8 +33,6 @@
private:
ECPrivateKey* key_;
-
- DISALLOW_COPY_AND_ASSIGN(ECSignatureCreatorImpl);
};
} // namespace crypto
diff --git a/crypto/hmac.h b/crypto/hmac.h
index 716ab25..7f606c6 100644
--- a/crypto/hmac.h
+++ b/crypto/hmac.h
@@ -35,6 +35,10 @@
};
explicit HMAC(HashAlgorithm hash_alg);
+
+ HMAC(const HMAC&) = delete;
+ HMAC& operator=(const HMAC&) = delete;
+
~HMAC();
// Returns the length of digest that this HMAC will create.
@@ -105,8 +109,6 @@
HashAlgorithm hash_alg_;
bool initialized_;
std::vector<unsigned char> key_;
-
- DISALLOW_COPY_AND_ASSIGN(HMAC);
};
} // namespace crypto
diff --git a/crypto/mock_apple_keychain.h b/crypto/mock_apple_keychain.h
index b44986d..88a6217 100644
--- a/crypto/mock_apple_keychain.h
+++ b/crypto/mock_apple_keychain.h
@@ -28,6 +28,10 @@
class CRYPTO_EXPORT MockAppleKeychain : public AppleKeychain {
public:
MockAppleKeychain();
+
+ MockAppleKeychain(const MockAppleKeychain&) = delete;
+ MockAppleKeychain& operator=(const MockAppleKeychain&) = delete;
+
~MockAppleKeychain() override;
// AppleKeychain implementation.
@@ -79,8 +83,6 @@
// Tracks the allocations and frees of password data in |FindGenericPassword|
// and |ItemFreeContent|.
mutable int password_data_count_;
-
- DISALLOW_COPY_AND_ASSIGN(MockAppleKeychain);
};
} // namespace crypto
diff --git a/crypto/nss_util_internal.h b/crypto/nss_util_internal.h
index 99fbb10..353215c9 100644
--- a/crypto/nss_util_internal.h
+++ b/crypto/nss_util_internal.h
@@ -36,11 +36,14 @@
class CRYPTO_EXPORT AutoSECMODListReadLock {
public:
AutoSECMODListReadLock();
+
+ AutoSECMODListReadLock(const AutoSECMODListReadLock&) = delete;
+ AutoSECMODListReadLock& operator=(const AutoSECMODListReadLock&) = delete;
+
~AutoSECMODListReadLock();
private:
SECMODListLock* lock_;
- DISALLOW_COPY_AND_ASSIGN(AutoSECMODListReadLock);
};
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/crypto/openssl_util.h b/crypto/openssl_util.h
index db6537e..91cb596 100644
--- a/crypto/openssl_util.h
+++ b/crypto/openssl_util.h
@@ -29,6 +29,10 @@
output_len_(output_len) {
}
+ ScopedOpenSSLSafeSizeBuffer(const ScopedOpenSSLSafeSizeBuffer&) = delete;
+ ScopedOpenSSLSafeSizeBuffer& operator=(const ScopedOpenSSLSafeSizeBuffer&) =
+ delete;
+
~ScopedOpenSSLSafeSizeBuffer() {
if (output_len_ < MIN_SIZE) {
// Copy the temporary buffer out, truncating as needed.
@@ -50,8 +54,6 @@
// Temporary buffer writen into in the case where the caller's
// buffer is not of sufficient size.
unsigned char min_sized_buffer_[MIN_SIZE];
-
- DISALLOW_COPY_AND_ASSIGN(ScopedOpenSSLSafeSizeBuffer);
};
// Initialize OpenSSL if it isn't already initialized. This must be called
diff --git a/crypto/rsa_private_key.h b/crypto/rsa_private_key.h
index 7079949..b747b896 100644
--- a/crypto/rsa_private_key.h
+++ b/crypto/rsa_private_key.h
@@ -24,6 +24,9 @@
// TODO(hclam): This class should be ref-counted so it can be reused easily.
class CRYPTO_EXPORT RSAPrivateKey {
public:
+ RSAPrivateKey(const RSAPrivateKey&) = delete;
+ RSAPrivateKey& operator=(const RSAPrivateKey&) = delete;
+
~RSAPrivateKey();
// Create a new random instance. Can return NULL if initialization fails.
@@ -56,8 +59,6 @@
RSAPrivateKey();
bssl::UniquePtr<EVP_PKEY> key_;
-
- DISALLOW_COPY_AND_ASSIGN(RSAPrivateKey);
};
} // namespace crypto
diff --git a/crypto/scoped_test_nss_chromeos_user.h b/crypto/scoped_test_nss_chromeos_user.h
index 9202b0f..ad5a770 100644
--- a/crypto/scoped_test_nss_chromeos_user.h
+++ b/crypto/scoped_test_nss_chromeos_user.h
@@ -21,6 +21,11 @@
// Opens the software database and sets the public slot for the user. The
// private slot will not be initialized until FinishInit() is called.
explicit ScopedTestNSSChromeOSUser(const std::string& username_hash);
+
+ ScopedTestNSSChromeOSUser(const ScopedTestNSSChromeOSUser&) = delete;
+ ScopedTestNSSChromeOSUser& operator=(const ScopedTestNSSChromeOSUser&) =
+ delete;
+
~ScopedTestNSSChromeOSUser();
std::string username_hash() const { return username_hash_; }
@@ -34,8 +39,6 @@
const std::string username_hash_;
base::ScopedTempDir temp_dir_;
bool constructed_successfully_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedTestNSSChromeOSUser);
};
} // namespace crypto
diff --git a/crypto/scoped_test_nss_db.h b/crypto/scoped_test_nss_db.h
index 1505b4d..f0da44d 100644
--- a/crypto/scoped_test_nss_db.h
+++ b/crypto/scoped_test_nss_db.h
@@ -18,6 +18,10 @@
class CRYPTO_EXPORT ScopedTestNSSDB {
public:
ScopedTestNSSDB();
+
+ ScopedTestNSSDB(const ScopedTestNSSDB&) = delete;
+ ScopedTestNSSDB& operator=(const ScopedTestNSSDB&) = delete;
+
~ScopedTestNSSDB();
bool is_open() const { return !!slot_; }
@@ -29,8 +33,6 @@
base::ScopedTempDir temp_dir_;
ScopedPK11Slot slot_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedTestNSSDB);
};
} // namespace crypto
diff --git a/crypto/scoped_test_system_nss_key_slot.h b/crypto/scoped_test_system_nss_key_slot.h
index ae9b2cd8..1c8804e 100644
--- a/crypto/scoped_test_system_nss_key_slot.h
+++ b/crypto/scoped_test_system_nss_key_slot.h
@@ -28,6 +28,11 @@
class CRYPTO_EXPORT ScopedTestSystemNSSKeySlot {
public:
ScopedTestSystemNSSKeySlot();
+
+ ScopedTestSystemNSSKeySlot(const ScopedTestSystemNSSKeySlot&) = delete;
+ ScopedTestSystemNSSKeySlot& operator=(const ScopedTestSystemNSSKeySlot&) =
+ delete;
+
~ScopedTestSystemNSSKeySlot();
bool ConstructedSuccessfully() const;
@@ -35,8 +40,6 @@
private:
std::unique_ptr<ScopedTestNSSDB> test_db_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedTestSystemNSSKeySlot);
};
} // namespace crypto
diff --git a/crypto/secure_hash.h b/crypto/secure_hash.h
index b97487b..907c6a8 100644
--- a/crypto/secure_hash.h
+++ b/crypto/secure_hash.h
@@ -22,6 +22,10 @@
enum Algorithm {
SHA256,
};
+
+ SecureHash(const SecureHash&) = delete;
+ SecureHash& operator=(const SecureHash&) = delete;
+
virtual ~SecureHash() {}
static std::unique_ptr<SecureHash> Create(Algorithm type);
@@ -37,9 +41,6 @@
protected:
SecureHash() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SecureHash);
};
} // namespace crypto
diff --git a/crypto/signature_creator.h b/crypto/signature_creator.h
index 3a50bac..35e4c776 100644
--- a/crypto/signature_creator.h
+++ b/crypto/signature_creator.h
@@ -29,6 +29,9 @@
SHA256,
};
+ SignatureCreator(const SignatureCreator&) = delete;
+ SignatureCreator& operator=(const SignatureCreator&) = delete;
+
~SignatureCreator();
// Create an instance. The caller must ensure that the provided PrivateKey
@@ -56,8 +59,6 @@
SignatureCreator();
EVP_MD_CTX* sign_context_;
-
- DISALLOW_COPY_AND_ASSIGN(SignatureCreator);
};
} // namespace crypto
diff --git a/crypto/symmetric_key.h b/crypto/symmetric_key.h
index d802241..da79fba 100644
--- a/crypto/symmetric_key.h
+++ b/crypto/symmetric_key.h
@@ -27,6 +27,9 @@
HMAC_SHA1,
};
+ SymmetricKey(const SymmetricKey&) = delete;
+ SymmetricKey& operator=(const SymmetricKey&) = delete;
+
virtual ~SymmetricKey();
// Generates a random key suitable to be used with |algorithm| and of
@@ -79,8 +82,6 @@
SymmetricKey();
std::string key_;
-
- DISALLOW_COPY_AND_ASSIGN(SymmetricKey);
};
} // namespace crypto
diff --git a/dbus/bus.cc b/dbus/bus.cc
index 0a17df7e..2c1f60a0 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -52,6 +52,9 @@
dbus_watch_set_data(raw_watch_, this, nullptr);
}
+ Watch(const Watch&) = delete;
+ Watch& operator=(const Watch&) = delete;
+
~Watch() { dbus_watch_set_data(raw_watch_, nullptr, nullptr); }
// Returns true if the underlying file descriptor is ready to be watched.
@@ -94,8 +97,6 @@
DBusWatch* raw_watch_;
std::unique_ptr<base::FileDescriptorWatcher::Controller> read_watcher_;
std::unique_ptr<base::FileDescriptorWatcher::Controller> write_watcher_;
-
- DISALLOW_COPY_AND_ASSIGN(Watch);
};
// The class is used for monitoring the timeout used for D-Bus method
@@ -107,6 +108,9 @@
dbus_timeout_set_data(raw_timeout_, this, nullptr);
}
+ Timeout(const Timeout&) = delete;
+ Timeout& operator=(const Timeout&) = delete;
+
~Timeout() {
// Remove the association between |this| and the |raw_timeout_|.
dbus_timeout_set_data(raw_timeout_, nullptr, nullptr);
@@ -140,8 +144,6 @@
DBusTimeout* raw_timeout_;
base::WeakPtrFactory<Timeout> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(Timeout);
};
} // namespace
diff --git a/dbus/bus_unittest.cc b/dbus/bus_unittest.cc
index a752422..61834e8 100644
--- a/dbus/bus_unittest.cc
+++ b/dbus/bus_unittest.cc
@@ -34,6 +34,10 @@
class RunLoopWithExpectedCount {
public:
RunLoopWithExpectedCount() : expected_quit_calls_(0), actual_quit_calls_(0) {}
+
+ RunLoopWithExpectedCount(const RunLoopWithExpectedCount&) = delete;
+ RunLoopWithExpectedCount& operator=(const RunLoopWithExpectedCount&) = delete;
+
~RunLoopWithExpectedCount() = default;
void Run(int expected_quit_calls) {
@@ -56,8 +60,6 @@
std::unique_ptr<base::RunLoop> run_loop_;
int expected_quit_calls_;
int actual_quit_calls_;
-
- DISALLOW_COPY_AND_ASSIGN(RunLoopWithExpectedCount);
};
// Test helper for BusTest.ListenForServiceOwnerChange.
diff --git a/dbus/dbus_statistics.cc b/dbus/dbus_statistics.cc
index f6aa1e5..3bd1602 100644
--- a/dbus/dbus_statistics.cc
+++ b/dbus/dbus_statistics.cc
@@ -48,6 +48,9 @@
origin_thread_id_(base::PlatformThread::CurrentId()) {
}
+ DBusStatistics(const DBusStatistics&) = delete;
+ DBusStatistics& operator=(const DBusStatistics&) = delete;
+
~DBusStatistics() {
DCHECK_EQ(origin_thread_id_, base::PlatformThread::CurrentId());
}
@@ -107,8 +110,6 @@
StatMap stats_;
base::Time start_time_;
base::PlatformThreadId origin_thread_id_;
-
- DISALLOW_COPY_AND_ASSIGN(DBusStatistics);
};
DBusStatistics* g_dbus_statistics = nullptr;
diff --git a/dbus/message.h b/dbus/message.h
index 6ae6f24..d8649ca5 100644
--- a/dbus/message.h
+++ b/dbus/message.h
@@ -266,6 +266,10 @@
// Data added with Append* will be written to |message|, which may be NULL
// to create a sub-writer for passing to OpenArray, etc.
explicit MessageWriter(Message* message);
+
+ MessageWriter(const MessageWriter&) = delete;
+ MessageWriter& operator=(const MessageWriter&) = delete;
+
~MessageWriter();
// Appends a byte to the message.
@@ -365,8 +369,6 @@
Message* message_;
DBusMessageIter raw_message_iter_;
bool container_is_open_;
-
- DISALLOW_COPY_AND_ASSIGN(MessageWriter);
};
// MessageReader is used to read incoming messages such as responses for
@@ -379,6 +381,10 @@
// The data will be read from the given |message|, which may be NULL to
// create a sub-reader for passing to PopArray, etc.
explicit MessageReader(Message* message);
+
+ MessageReader(const MessageReader&) = delete;
+ MessageReader& operator=(const MessageReader&) = delete;
+
~MessageReader();
// Returns true if the reader has more data to read. The function is
@@ -504,8 +510,6 @@
Message* message_;
DBusMessageIter raw_message_iter_;
-
- DISALLOW_COPY_AND_ASSIGN(MessageReader);
};
} // namespace dbus
diff --git a/dbus/object_proxy.h b/dbus/object_proxy.h
index f3f0c8a..1eb8c55 100644
--- a/dbus/object_proxy.h
+++ b/dbus/object_proxy.h
@@ -237,6 +237,9 @@
// This is movable to be bound to an OnceCallback.
ReplyCallbackHolder(ReplyCallbackHolder&& other);
+ ReplyCallbackHolder(const ReplyCallbackHolder&) = delete;
+ ReplyCallbackHolder& operator=(const ReplyCallbackHolder&) = delete;
+
// |callback_| needs to be destroyed on the origin thread.
// If this is not destroyed on non-origin thread, it PostTask()s the
// callback to the origin thread for destroying.
@@ -253,7 +256,6 @@
private:
scoped_refptr<base::SequencedTaskRunner> origin_task_runner_;
ResponseOrErrorCallback callback_;
- DISALLOW_COPY_AND_ASSIGN(ReplyCallbackHolder);
};
// Starts the async method call. This is a helper function to implement
diff --git a/dbus/property.h b/dbus/property.h
index 9a32184..adcee38 100644
--- a/dbus/property.h
+++ b/dbus/property.h
@@ -137,6 +137,10 @@
class CHROME_DBUS_EXPORT PropertyBase {
public:
PropertyBase();
+
+ PropertyBase(const PropertyBase&) = delete;
+ PropertyBase& operator=(const PropertyBase&) = delete;
+
virtual ~PropertyBase();
// Initializes the |property_set| and property |name| so that method
@@ -194,8 +198,6 @@
// Name of the property.
std::string name_;
-
- DISALLOW_COPY_AND_ASSIGN(PropertyBase);
};
// PropertySet groups a collection of properties for a remote object
@@ -225,6 +227,9 @@
PropertySet(ObjectProxy* object_proxy, const std::string& interface,
const PropertyChangedCallback& property_changed_callback);
+ PropertySet(const PropertySet&) = delete;
+ PropertySet& operator=(const PropertySet&) = delete;
+
// Destructor; we don't hold on to any references or memory that needs
// explicit clean-up, but clang thinks we might.
virtual ~PropertySet();
@@ -348,8 +353,6 @@
// Weak pointer factory as D-Bus callbacks may last longer than these
// objects.
base::WeakPtrFactory<PropertySet> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(PropertySet);
};
// Property template, this defines the type-specific and type-safe methods
diff --git a/fuchsia/base/agent_impl.h b/fuchsia/base/agent_impl.h
index 8a1d4d93..829d42c2 100644
--- a/fuchsia/base/agent_impl.h
+++ b/fuchsia/base/agent_impl.h
@@ -50,6 +50,9 @@
// };
class ComponentStateBase {
public:
+ ComponentStateBase(const ComponentStateBase&) = delete;
+ ComponentStateBase& operator=(const ComponentStateBase&) = delete;
+
virtual ~ComponentStateBase();
protected:
@@ -93,8 +96,6 @@
sys::OutgoingDirectory outgoing_directory_;
std::unique_ptr<base::ServiceProviderImpl> service_provider_;
std::vector<base::RepeatingCallback<bool()>> keepalive_callbacks_;
-
- DISALLOW_COPY_AND_ASSIGN(ComponentStateBase);
};
// Creates a component state instance providing the services to which the
diff --git a/fuchsia/base/agent_manager.h b/fuchsia/base/agent_manager.h
index 17fd60c..d091e52 100644
--- a/fuchsia/base/agent_manager.h
+++ b/fuchsia/base/agent_manager.h
@@ -20,6 +20,10 @@
class AgentManager {
public:
explicit AgentManager(const sys::ServiceDirectory* incoming);
+
+ AgentManager(const AgentManager&) = delete;
+ AgentManager& operator=(const AgentManager&) = delete;
+
~AgentManager();
// Connects to |agent| so satisfying the specified |request|.
@@ -59,8 +63,6 @@
// Cache of resources for Agents which we're actively using. All |agents_|
// are kept alive until the AgentManager is torn down, for now.
base::flat_map<std::string, AgentConnection> agents_;
-
- DISALLOW_COPY_AND_ASSIGN(AgentManager);
};
} // namespace cr_fuchsia
diff --git a/fuchsia/base/lifecycle_impl.h b/fuchsia/base/lifecycle_impl.h
index caf0ade3..b09d7bb 100644
--- a/fuchsia/base/lifecycle_impl.h
+++ b/fuchsia/base/lifecycle_impl.h
@@ -23,6 +23,10 @@
public:
LifecycleImpl(sys::OutgoingDirectory* outgoing_directory,
base::OnceClosure on_terminate);
+
+ LifecycleImpl(const LifecycleImpl&) = delete;
+ LifecycleImpl& operator=(const LifecycleImpl&) = delete;
+
~LifecycleImpl() override;
// fuchsia::modular::Lifecycle implementation.
@@ -32,8 +36,6 @@
const base::ScopedServiceBinding<::fuchsia::modular::Lifecycle> binding_;
base::OnceClosure on_terminate_;
-
- DISALLOW_COPY_AND_ASSIGN(LifecycleImpl);
};
} // namespace cr_fuchsia
diff --git a/fuchsia/base/test/fake_component_context.h b/fuchsia/base/test/fake_component_context.h
index 875387c..1c4fd8a 100644
--- a/fuchsia/base/test/fake_component_context.h
+++ b/fuchsia/base/test/fake_component_context.h
@@ -29,6 +29,10 @@
public:
FakeComponentContext(sys::OutgoingDirectory* outgoing_directory,
base::StringPiece component_url);
+
+ FakeComponentContext(const FakeComponentContext&) = delete;
+ FakeComponentContext& operator=(const FakeComponentContext&) = delete;
+
~FakeComponentContext() override;
void RegisterCreateComponentStateCallback(
@@ -50,8 +54,6 @@
fuchsia::sys::ServiceProviderPtr agent_services_;
std::map<base::StringPiece, std::unique_ptr<AgentImpl>> agent_impl_map_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeComponentContext);
};
} // namespace cr_fuchsia
diff --git a/fuchsia/engine/browser/ax_tree_converter_unittest.cc b/fuchsia/engine/browser/ax_tree_converter_unittest.cc
index 38a11df..09d8eea 100644
--- a/fuchsia/engine/browser/ax_tree_converter_unittest.cc
+++ b/fuchsia/engine/browser/ax_tree_converter_unittest.cc
@@ -149,12 +149,14 @@
ax::mojom::CheckedState::kNone);
root_node_data_.id = kRootId;
}
+
+ AXTreeConverterTest(const AXTreeConverterTest&) = delete;
+ AXTreeConverterTest& operator=(const AXTreeConverterTest&) = delete;
+
~AXTreeConverterTest() override = default;
ui::AXNodeData& root_node() { return root_node_data_; }
- DISALLOW_COPY_AND_ASSIGN(AXTreeConverterTest);
-
private:
ui::AXNodeData root_node_data_;
};
diff --git a/fuchsia/engine/browser/cookie_manager_impl.cc b/fuchsia/engine/browser/cookie_manager_impl.cc
index de377e4..f3e1be9 100644
--- a/fuchsia/engine/browser/cookie_manager_impl.cc
+++ b/fuchsia/engine/browser/cookie_manager_impl.cc
@@ -78,6 +78,10 @@
net::CookieChangeCause::INSERTED);
}
}
+
+ CookiesIteratorImpl(const CookiesIteratorImpl&) = delete;
+ CookiesIteratorImpl& operator=(const CookiesIteratorImpl&) = delete;
+
~CookiesIteratorImpl() override = default;
// fuchsia::web::CookiesIterator implementation:
@@ -148,8 +152,6 @@
// corresponding fuchsia::web::Cookie.
std::map<net::CanonicalCookie::UniqueCookieKey, fuchsia::web::Cookie>
queued_cookies_;
-
- DISALLOW_COPY_AND_ASSIGN(CookiesIteratorImpl);
};
void OnAllCookiesReceived(
diff --git a/fuchsia/engine/browser/cookie_manager_impl.h b/fuchsia/engine/browser/cookie_manager_impl.h
index 820bc61..9e416f4 100644
--- a/fuchsia/engine/browser/cookie_manager_impl.h
+++ b/fuchsia/engine/browser/cookie_manager_impl.h
@@ -31,6 +31,10 @@
// |get_network_context| will be called to (re)connect to CookieManager,
// on-demand, in response to query/observation requests.
explicit CookieManagerImpl(GetNetworkContextCallback get_network_context);
+
+ CookieManagerImpl(const CookieManagerImpl&) = delete;
+ CookieManagerImpl& operator=(const CookieManagerImpl&) = delete;
+
~CookieManagerImpl() override;
// fuchsia::web::CookieManager implementation:
@@ -59,8 +63,6 @@
mojo::Remote<network::mojom::CookieManager> cookie_manager_;
base::OnceClosure on_mojo_disconnected_for_test_;
-
- DISALLOW_COPY_AND_ASSIGN(CookieManagerImpl);
};
#endif // FUCHSIA_ENGINE_BROWSER_COOKIE_MANAGER_IMPL_H_
diff --git a/fuchsia/engine/browser/cookie_manager_impl_unittest.cc b/fuchsia/engine/browser/cookie_manager_impl_unittest.cc
index dc76d7f4..73372e4 100644
--- a/fuchsia/engine/browser/cookie_manager_impl_unittest.cc
+++ b/fuchsia/engine/browser/cookie_manager_impl_unittest.cc
@@ -58,6 +58,10 @@
cookie_manager_(
base::BindRepeating(&CookieManagerImplTest::GetNetworkContext,
base::Unretained(this))) {}
+
+ CookieManagerImplTest(const CookieManagerImplTest&) = delete;
+ CookieManagerImplTest& operator=(const CookieManagerImplTest&) = delete;
+
~CookieManagerImplTest() override = default;
protected:
@@ -140,9 +144,6 @@
mojo::Remote<network::mojom::CookieManager> mojo_cookie_manager_;
CookieManagerImpl cookie_manager_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CookieManagerImplTest);
};
// Calls GetNext() on the supplied |iterator| and lets the caller express
@@ -154,6 +155,10 @@
iterator->GetNext(cr_fuchsia::CallbackToFitFunction(result_.GetCallback()));
}
+ GetNextCookiesIteratorResult(const GetNextCookiesIteratorResult&) = delete;
+ GetNextCookiesIteratorResult& operator=(const GetNextCookiesIteratorResult&) =
+ delete;
+
~GetNextCookiesIteratorResult() = default;
void ExpectSingleCookie(base::StringPiece name,
@@ -194,8 +199,6 @@
protected:
base::test::TestFuture<std::vector<fuchsia::web::Cookie>> result_;
-
- DISALLOW_COPY_AND_ASSIGN(GetNextCookiesIteratorResult);
};
} // namespace
diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc
index ea353ed..1a1a6b4 100644
--- a/fuchsia/engine/browser/frame_impl.cc
+++ b/fuchsia/engine/browser/frame_impl.cc
@@ -88,13 +88,14 @@
class FrameFocusRules : public wm::BaseFocusRules {
public:
FrameFocusRules() = default;
+
+ FrameFocusRules(const FrameFocusRules&) = delete;
+ FrameFocusRules& operator=(const FrameFocusRules&) = delete;
+
~FrameFocusRules() override = default;
// wm::BaseFocusRules implementation.
bool SupportsChildActivation(const aura::Window*) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FrameFocusRules);
};
bool FrameFocusRules::SupportsChildActivation(const aura::Window*) const {
diff --git a/fuchsia/engine/browser/frame_impl_browsertest.cc b/fuchsia/engine/browser/frame_impl_browsertest.cc
index 7dd5541..ffcf1f9 100644
--- a/fuchsia/engine/browser/frame_impl_browsertest.cc
+++ b/fuchsia/engine/browser/frame_impl_browsertest.cc
@@ -487,6 +487,11 @@
class ChunkedHttpTransactionFactory : public net::test_server::HttpResponse {
public:
ChunkedHttpTransactionFactory() = default;
+
+ ChunkedHttpTransactionFactory(const ChunkedHttpTransactionFactory&) = delete;
+ ChunkedHttpTransactionFactory& operator=(
+ const ChunkedHttpTransactionFactory&) = delete;
+
~ChunkedHttpTransactionFactory() override = default;
void SetOnResponseCreatedCallback(base::OnceClosure on_response_created) {
@@ -505,8 +510,6 @@
private:
base::OnceClosure on_response_created_;
-
- DISALLOW_COPY_AND_ASSIGN(ChunkedHttpTransactionFactory);
};
IN_PROC_BROWSER_TEST_F(FrameImplTest, NavigationEventDuringPendingLoad) {
diff --git a/fuchsia/engine/browser/media_player_impl_unittest.cc b/fuchsia/engine/browser/media_player_impl_unittest.cc
index e0d5540e..f67930f 100644
--- a/fuchsia/engine/browser/media_player_impl_unittest.cc
+++ b/fuchsia/engine/browser/media_player_impl_unittest.cc
@@ -84,6 +84,10 @@
public:
MediaPlayerImplTest()
: task_environment_(base::test::TaskEnvironment::MainThreadType::IO) {}
+
+ MediaPlayerImplTest(const MediaPlayerImplTest&) = delete;
+ MediaPlayerImplTest& operator=(const MediaPlayerImplTest&) = delete;
+
~MediaPlayerImplTest() override = default;
void OnPlayerDisconnected() {}
@@ -95,8 +99,6 @@
fuchsia::media::sessions2::PlayerPtr player_;
std::unique_ptr<MediaPlayerImpl> player_impl_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaPlayerImplTest);
};
// Verify that the |on_disconnect| closure is invoked if the client disconnects.
diff --git a/fuchsia/engine/browser/navigation_controller_impl.h b/fuchsia/engine/browser/navigation_controller_impl.h
index c3d3936..b18624b 100644
--- a/fuchsia/engine/browser/navigation_controller_impl.h
+++ b/fuchsia/engine/browser/navigation_controller_impl.h
@@ -27,6 +27,10 @@
public favicon::FaviconDriverObserver {
public:
explicit NavigationControllerImpl(content::WebContents* web_contents);
+
+ NavigationControllerImpl(const NavigationControllerImpl&) = delete;
+ NavigationControllerImpl& operator=(const NavigationControllerImpl&) = delete;
+
~NavigationControllerImpl() override;
void AddBinding(
@@ -104,8 +108,6 @@
bool send_favicon_ = false;
base::WeakPtrFactory<NavigationControllerImpl> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(NavigationControllerImpl);
};
// Computes the differences from old_entry to new_entry and stores the result in
diff --git a/fuchsia/engine/browser/url_request_rewrite_rules_manager.h b/fuchsia/engine/browser/url_request_rewrite_rules_manager.h
index 37a3ac1..3f1cf8e 100644
--- a/fuchsia/engine/browser/url_request_rewrite_rules_manager.h
+++ b/fuchsia/engine/browser/url_request_rewrite_rules_manager.h
@@ -28,6 +28,11 @@
static std::unique_ptr<UrlRequestRewriteRulesManager> CreateForTesting();
explicit UrlRequestRewriteRulesManager(content::WebContents* web_contents);
+
+ UrlRequestRewriteRulesManager(const UrlRequestRewriteRulesManager&) = delete;
+ UrlRequestRewriteRulesManager& operator=(
+ const UrlRequestRewriteRulesManager&) = delete;
+
~UrlRequestRewriteRulesManager() override;
// Signals |rules| have been updated. Actual implementation for
@@ -57,8 +62,6 @@
active_remotes_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(UrlRequestRewriteRulesManager);
};
#endif // FUCHSIA_ENGINE_BROWSER_URL_REQUEST_REWRITE_RULES_MANAGER_H_
diff --git a/fuchsia/engine/browser/url_request_rewrite_rules_manager_unittest.cc b/fuchsia/engine/browser/url_request_rewrite_rules_manager_unittest.cc
index 451c754..fa48f22 100644
--- a/fuchsia/engine/browser/url_request_rewrite_rules_manager_unittest.cc
+++ b/fuchsia/engine/browser/url_request_rewrite_rules_manager_unittest.cc
@@ -17,6 +17,12 @@
: task_environment_(base::test::TaskEnvironment::MainThreadType::IO),
url_request_rewrite_rules_manager_(
UrlRequestRewriteRulesManager::CreateForTesting()) {}
+
+ UrlRequestRewriteRulesManagerTest(const UrlRequestRewriteRulesManagerTest&) =
+ delete;
+ UrlRequestRewriteRulesManagerTest& operator=(
+ const UrlRequestRewriteRulesManagerTest&) = delete;
+
~UrlRequestRewriteRulesManagerTest() override = default;
protected:
@@ -36,8 +42,6 @@
base::test::SingleThreadTaskEnvironment task_environment_;
std::unique_ptr<UrlRequestRewriteRulesManager>
url_request_rewrite_rules_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(UrlRequestRewriteRulesManagerTest);
};
// Tests AddHeaders rewrites are properly converted to their Mojo equivalent.
diff --git a/fuchsia/engine/browser/web_engine_browser_context.cc b/fuchsia/engine/browser/web_engine_browser_context.cc
index 16c88249..e119445 100644
--- a/fuchsia/engine/browser/web_engine_browser_context.cc
+++ b/fuchsia/engine/browser/web_engine_browser_context.cc
@@ -50,10 +50,11 @@
: public content::ResourceContext {
public:
ResourceContext() = default;
- ~ResourceContext() override = default;
- private:
- DISALLOW_COPY_AND_ASSIGN(ResourceContext);
+ ResourceContext(const ResourceContext&) = delete;
+ ResourceContext& operator=(const ResourceContext&) = delete;
+
+ ~ResourceContext() override = default;
};
// static
diff --git a/fuchsia/engine/browser/web_engine_net_log_observer.h b/fuchsia/engine/browser/web_engine_net_log_observer.h
index 8053cb1..0bfe2e4 100644
--- a/fuchsia/engine/browser/web_engine_net_log_observer.h
+++ b/fuchsia/engine/browser/web_engine_net_log_observer.h
@@ -20,12 +20,14 @@
class WebEngineNetLogObserver {
public:
explicit WebEngineNetLogObserver(const base::FilePath& log_path);
+
+ WebEngineNetLogObserver(const WebEngineNetLogObserver&) = delete;
+ WebEngineNetLogObserver& operator=(const WebEngineNetLogObserver&) = delete;
+
~WebEngineNetLogObserver();
private:
std::unique_ptr<net::FileNetLogObserver> file_net_log_observer_;
-
- DISALLOW_COPY_AND_ASSIGN(WebEngineNetLogObserver);
};
#endif // FUCHSIA_ENGINE_BROWSER_WEB_ENGINE_NET_LOG_OBSERVER_H_
diff --git a/fuchsia/engine/context_provider_impl_unittest.cc b/fuchsia/engine/context_provider_impl_unittest.cc
index 5a880bb..15e3ba33 100644
--- a/fuchsia/engine/context_provider_impl_unittest.cc
+++ b/fuchsia/engine/context_provider_impl_unittest.cc
@@ -320,6 +320,9 @@
bindings_.AddBinding(provider_.get(), provider_ptr_.NewRequest());
}
+ ContextProviderImplTest(const ContextProviderImplTest&) = delete;
+ ContextProviderImplTest& operator=(const ContextProviderImplTest&) = delete;
+
~ContextProviderImplTest() override {
provider_ptr_.Unbind();
base::RunLoop().RunUntilIdle();
@@ -416,8 +419,6 @@
base::OnceClosure on_change_cb_;
fuchsia::web::NavigationState captured_state_;
};
-
- DISALLOW_COPY_AND_ASSIGN(ContextProviderImplTest);
};
TEST_F(ContextProviderImplTest, CanCreateContext) {
diff --git a/fuchsia/engine/fake_context.h b/fuchsia/engine/fake_context.h
index e019409..4f489c6 100644
--- a/fuchsia/engine/fake_context.h
+++ b/fuchsia/engine/fake_context.h
@@ -19,6 +19,10 @@
class FakeFrame : public fuchsia::web::testing::Frame_TestBase {
public:
explicit FakeFrame(fidl::InterfaceRequest<fuchsia::web::Frame> request);
+
+ FakeFrame(const FakeFrame&) = delete;
+ FakeFrame& operator=(const FakeFrame&) = delete;
+
~FakeFrame() override;
void set_on_set_listener_callback(base::OnceClosure callback) {
@@ -53,8 +57,6 @@
fuchsia::web::NavigationController* navigation_controller_ = nullptr;
fidl::BindingSet<fuchsia::web::NavigationController>
navigation_controller_bindings_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeFrame);
};
// An implementation of Context that creates and binds FakeFrames.
@@ -63,6 +65,10 @@
using CreateFrameCallback = base::RepeatingCallback<void(FakeFrame*)>;
FakeContext();
+
+ FakeContext(const FakeContext&) = delete;
+ FakeContext& operator=(const FakeContext&) = delete;
+
~FakeContext() override;
// Sets a callback that is invoked whenever new Frames are bound.
@@ -79,8 +85,6 @@
private:
CreateFrameCallback on_create_frame_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeContext);
};
#endif // FUCHSIA_ENGINE_FAKE_CONTEXT_H_
diff --git a/fuchsia/engine/renderer/web_engine_content_renderer_client.h b/fuchsia/engine/renderer/web_engine_content_renderer_client.h
index 2c976dd7..4a41153e 100644
--- a/fuchsia/engine/renderer/web_engine_content_renderer_client.h
+++ b/fuchsia/engine/renderer/web_engine_content_renderer_client.h
@@ -17,6 +17,12 @@
class WebEngineContentRendererClient : public content::ContentRendererClient {
public:
WebEngineContentRendererClient();
+
+ WebEngineContentRendererClient(const WebEngineContentRendererClient&) =
+ delete;
+ WebEngineContentRendererClient& operator=(
+ const WebEngineContentRendererClient&) = delete;
+
~WebEngineContentRendererClient() override;
// Returns the WebEngineRenderFrameObserver corresponding to
@@ -61,8 +67,6 @@
// is limited.
std::unique_ptr<memory_pressure::MultiSourceMemoryPressureMonitor>
memory_pressure_monitor_;
-
- DISALLOW_COPY_AND_ASSIGN(WebEngineContentRendererClient);
};
#endif // FUCHSIA_ENGINE_RENDERER_WEB_ENGINE_CONTENT_RENDERER_CLIENT_H_
diff --git a/fuchsia/engine/renderer/web_engine_url_loader_throttle_provider.h b/fuchsia/engine/renderer/web_engine_url_loader_throttle_provider.h
index b492457..aafb45111 100644
--- a/fuchsia/engine/renderer/web_engine_url_loader_throttle_provider.h
+++ b/fuchsia/engine/renderer/web_engine_url_loader_throttle_provider.h
@@ -19,6 +19,12 @@
public:
explicit WebEngineURLLoaderThrottleProvider(
WebEngineContentRendererClient* content_renderer_client);
+
+ WebEngineURLLoaderThrottleProvider(
+ const WebEngineURLLoaderThrottleProvider&) = delete;
+ WebEngineURLLoaderThrottleProvider& operator=(
+ const WebEngineURLLoaderThrottleProvider&) = delete;
+
~WebEngineURLLoaderThrottleProvider() override;
// blink::URLLoaderThrottleProvider implementation.
@@ -31,8 +37,6 @@
private:
const WebEngineContentRendererClient* const content_renderer_client_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(WebEngineURLLoaderThrottleProvider);
};
#endif // FUCHSIA_ENGINE_RENDERER_WEB_ENGINE_URL_LOADER_THROTTLE_PROVIDER_H_
diff --git a/fuchsia/engine/test_debug_listener.h b/fuchsia/engine/test_debug_listener.h
index efb1f22..d86ff048 100644
--- a/fuchsia/engine/test_debug_listener.h
+++ b/fuchsia/engine/test_debug_listener.h
@@ -18,6 +18,10 @@
class TestDebugListener final : public fuchsia::web::DevToolsListener {
public:
TestDebugListener();
+
+ TestDebugListener(const TestDebugListener&) = delete;
+ TestDebugListener& operator=(const TestDebugListener&) = delete;
+
~TestDebugListener() override;
// Spins a RunLoop until there are exactly |size| DevTools ports open.
@@ -33,6 +37,10 @@
TestDebugListener* test_debug_listener,
fidl::InterfaceRequest<fuchsia::web::DevToolsPerContextListener>
listener);
+
+ TestPerContextListener(const TestPerContextListener&) = delete;
+ TestPerContextListener& operator=(const TestPerContextListener&) = delete;
+
~TestPerContextListener() override;
private:
@@ -42,8 +50,6 @@
uint16_t port_ = 0;
TestDebugListener* test_debug_listener_;
fidl::Binding<fuchsia::web::DevToolsPerContextListener> binding_;
-
- DISALLOW_COPY_AND_ASSIGN(TestPerContextListener);
};
// fuchsia::web::DevToolsListener implementation.
@@ -60,8 +66,6 @@
base::UniquePtrComparator>
per_context_listeners_;
base::RepeatingClosure on_debug_ports_changed_;
-
- DISALLOW_COPY_AND_ASSIGN(TestDebugListener);
};
#endif // FUCHSIA_ENGINE_TEST_DEBUG_LISTENER_H_
diff --git a/fuchsia/engine/web_engine_debug_integration_test.cc b/fuchsia/engine/web_engine_debug_integration_test.cc
index fbc4191..34ebdae 100644
--- a/fuchsia/engine/web_engine_debug_integration_test.cc
+++ b/fuchsia/engine/web_engine_debug_integration_test.cc
@@ -34,6 +34,10 @@
WebEngineDebugIntegrationTest()
: dev_tools_listener_binding_(&dev_tools_listener_) {}
+ WebEngineDebugIntegrationTest(const WebEngineDebugIntegrationTest&) = delete;
+ WebEngineDebugIntegrationTest& operator=(
+ const WebEngineDebugIntegrationTest&) = delete;
+
~WebEngineDebugIntegrationTest() override = default;
void SetUp() override {
@@ -113,8 +117,6 @@
base::OnceClosure on_url_fetch_complete_ack_;
net::EmbeddedTestServer test_server_;
-
- DISALLOW_COPY_AND_ASSIGN(WebEngineDebugIntegrationTest);
};
enum class UserModeDebugging { kEnabled = 0, kDisabled = 1 };
diff --git a/fuchsia/engine/web_engine_main_delegate.h b/fuchsia/engine/web_engine_main_delegate.h
index 058d47b22..5c48a0e 100644
--- a/fuchsia/engine/web_engine_main_delegate.h
+++ b/fuchsia/engine/web_engine_main_delegate.h
@@ -25,6 +25,10 @@
: public content::ContentMainDelegate {
public:
explicit WebEngineMainDelegate();
+
+ WebEngineMainDelegate(const WebEngineMainDelegate&) = delete;
+ WebEngineMainDelegate& operator=(const WebEngineMainDelegate&) = delete;
+
~WebEngineMainDelegate() override;
WebEngineContentBrowserClient* browser_client() {
@@ -47,8 +51,6 @@
std::unique_ptr<content::ContentClient> content_client_;
std::unique_ptr<WebEngineContentBrowserClient> browser_client_;
std::unique_ptr<WebEngineContentRendererClient> renderer_client_;
-
- DISALLOW_COPY_AND_ASSIGN(WebEngineMainDelegate);
};
#endif // FUCHSIA_ENGINE_WEB_ENGINE_MAIN_DELEGATE_H_
diff --git a/fuchsia/http/http_service_impl.h b/fuchsia/http/http_service_impl.h
index db2703d7..a0cb3ef6 100644
--- a/fuchsia/http/http_service_impl.h
+++ b/fuchsia/http/http_service_impl.h
@@ -14,15 +14,16 @@
class HttpServiceImpl : public ::fuchsia::net::oldhttp::HttpService {
public:
HttpServiceImpl();
+
+ HttpServiceImpl(const HttpServiceImpl&) = delete;
+ HttpServiceImpl& operator=(const HttpServiceImpl&) = delete;
+
~HttpServiceImpl() override;
// HttpService methods:
void CreateURLLoader(
fidl::InterfaceRequest<::fuchsia::net::oldhttp::URLLoader> request)
override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(HttpServiceImpl);
};
#endif // FUCHSIA_HTTP_HTTP_SERVICE_IMPL_H_
diff --git a/fuchsia/http/url_loader_impl.h b/fuchsia/http/url_loader_impl.h
index c8dfef6..e745aaf 100644
--- a/fuchsia/http/url_loader_impl.h
+++ b/fuchsia/http/url_loader_impl.h
@@ -29,6 +29,10 @@
URLLoaderImpl(
std::unique_ptr<net::URLRequestContext> context,
::fidl::InterfaceRequest<::fuchsia::net::oldhttp::URLLoader> request);
+
+ URLLoaderImpl(const URLLoaderImpl&) = delete;
+ URLLoaderImpl& operator=(const URLLoaderImpl&) = delete;
+
~URLLoaderImpl() override;
// Returns the number of active requests. Used for testing.
@@ -118,8 +122,6 @@
// writable, |buffered_bytes_| is used to store the number of bytes waiting
// in |buffer_|.
int buffered_bytes_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(URLLoaderImpl);
};
#endif // FUCHSIA_HTTP_URL_LOADER_IMPL_H_
diff --git a/fuchsia/runners/cast/api_bindings_client.h b/fuchsia/runners/cast/api_bindings_client.h
index 1c3f252..3078563 100644
--- a/fuchsia/runners/cast/api_bindings_client.h
+++ b/fuchsia/runners/cast/api_bindings_client.h
@@ -25,6 +25,10 @@
ApiBindingsClient(
fidl::InterfaceHandle<chromium::cast::ApiBindings> bindings_service,
base::OnceClosure on_initialization_complete);
+
+ ApiBindingsClient(const ApiBindingsClient&) = delete;
+ ApiBindingsClient& operator=(const ApiBindingsClient&) = delete;
+
~ApiBindingsClient();
// Injects APIs and handles channel connections on |frame|.
@@ -58,8 +62,6 @@
cast_api_bindings::NamedMessagePortConnector* connector_ = nullptr;
chromium::cast::ApiBindingsPtr bindings_service_;
base::OnceClosure on_initialization_complete_;
-
- DISALLOW_COPY_AND_ASSIGN(ApiBindingsClient);
};
#endif // FUCHSIA_RUNNERS_CAST_API_BINDINGS_CLIENT_H_
diff --git a/fuchsia/runners/cast/application_controller_impl.h b/fuchsia/runners/cast/application_controller_impl.h
index 3b24e3b..2113f75 100644
--- a/fuchsia/runners/cast/application_controller_impl.h
+++ b/fuchsia/runners/cast/application_controller_impl.h
@@ -19,6 +19,11 @@
public:
ApplicationControllerImpl(fuchsia::web::Frame* frame,
chromium::cast::ApplicationContext* context);
+
+ ApplicationControllerImpl(const ApplicationControllerImpl&) = delete;
+ ApplicationControllerImpl& operator=(const ApplicationControllerImpl&) =
+ delete;
+
~ApplicationControllerImpl() override;
protected:
@@ -33,8 +38,6 @@
private:
fidl::Binding<chromium::cast::ApplicationController> binding_;
fuchsia::web::Frame* const frame_;
-
- DISALLOW_COPY_AND_ASSIGN(ApplicationControllerImpl);
};
#endif // FUCHSIA_RUNNERS_CAST_APPLICATION_CONTROLLER_IMPL_H_
diff --git a/fuchsia/runners/cast/application_controller_impl_unittest.cc b/fuchsia/runners/cast/application_controller_impl_unittest.cc
index eb12759..1d2ccba 100644
--- a/fuchsia/runners/cast/application_controller_impl_unittest.cc
+++ b/fuchsia/runners/cast/application_controller_impl_unittest.cc
@@ -49,6 +49,10 @@
run_loop.Run();
}
+ ApplicationControllerImplTest(const ApplicationControllerImplTest&) = delete;
+ ApplicationControllerImplTest& operator=(
+ const ApplicationControllerImplTest&) = delete;
+
~ApplicationControllerImplTest() override = default;
protected:
@@ -76,9 +80,6 @@
chromium::cast::ApplicationControllerPtr application_ptr_;
base::OnceClosure wait_for_controller_callback_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ApplicationControllerImplTest);
};
// Verifies that SetTouchInputEnabled() calls the Frame API correctly.
diff --git a/fuchsia/runners/cast/cast_component.h b/fuchsia/runners/cast/cast_component.h
index ed34c5dd..314a176b 100644
--- a/fuchsia/runners/cast/cast_component.h
+++ b/fuchsia/runners/cast/cast_component.h
@@ -75,6 +75,10 @@
WebContentRunner* runner,
Params params,
bool is_headless);
+
+ CastComponent(const CastComponent&) = delete;
+ CastComponent& operator=(const CastComponent&) = delete;
+
~CastComponent() override;
void SetOnDestroyedCallback(base::OnceClosure on_destroyed);
@@ -136,8 +140,6 @@
uint64_t media_session_id_ = 0;
zx::eventpair headless_view_token_;
base::MessagePumpForIO::ZxHandleWatchController headless_disconnect_watch_;
-
- DISALLOW_COPY_AND_ASSIGN(CastComponent);
};
#endif // FUCHSIA_RUNNERS_CAST_CAST_COMPONENT_H_
diff --git a/fuchsia/runners/cast/fake_application_config_manager.h b/fuchsia/runners/cast/fake_application_config_manager.h
index 097fc178..f2575ad 100644
--- a/fuchsia/runners/cast/fake_application_config_manager.h
+++ b/fuchsia/runners/cast/fake_application_config_manager.h
@@ -22,6 +22,11 @@
static const char kFakeAgentUrl[];
FakeApplicationConfigManager();
+
+ FakeApplicationConfigManager(const FakeApplicationConfigManager&) = delete;
+ FakeApplicationConfigManager& operator=(const FakeApplicationConfigManager&) =
+ delete;
+
~FakeApplicationConfigManager() override;
// Creates a config for a dummy application with the specified |id| and |url|.
@@ -41,8 +46,6 @@
private:
std::map<std::string, chromium::cast::ApplicationConfig> id_to_config_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeApplicationConfigManager);
};
#endif // FUCHSIA_RUNNERS_CAST_FAKE_APPLICATION_CONFIG_MANAGER_H_
diff --git a/fuchsia/runners/common/web_component.h b/fuchsia/runners/common/web_component.h
index 98b7119..62d05de9 100644
--- a/fuchsia/runners/common/web_component.h
+++ b/fuchsia/runners/common/web_component.h
@@ -46,6 +46,9 @@
fidl::InterfaceRequest<fuchsia::sys::ComponentController>
controller_request);
+ WebComponent(const WebComponent&) = delete;
+ WebComponent& operator=(const WebComponent&) = delete;
+
~WebComponent() override;
// Enables remote debugging on this WebComponent. Must be called before
@@ -137,8 +140,6 @@
// process crashes.
fidl::Binding<fuchsia::web::NavigationEventListener>
navigation_listener_binding_;
-
- DISALLOW_COPY_AND_ASSIGN(WebComponent);
};
#endif // FUCHSIA_RUNNERS_COMMON_WEB_COMPONENT_H_
diff --git a/fuchsia/runners/web/web_runner_smoke_test.cc b/fuchsia/runners/web/web_runner_smoke_test.cc
index f66a055..a953063 100644
--- a/fuchsia/runners/web/web_runner_smoke_test.cc
+++ b/fuchsia/runners/web/web_runner_smoke_test.cc
@@ -175,6 +175,10 @@
: public fuchsia::modular::testing::ModuleContext_TestBase {
public:
MockModuleContext() = default;
+
+ MockModuleContext(const MockModuleContext&) = delete;
+ MockModuleContext& operator=(const MockModuleContext&) = delete;
+
~MockModuleContext() override = default;
MOCK_METHOD0(RemoveSelfFromStory, void());
@@ -182,8 +186,6 @@
void NotImplemented_(const std::string& name) override {
NOTIMPLEMENTED() << name;
}
-
- DISALLOW_COPY_AND_ASSIGN(MockModuleContext);
};
// Verify that Modular's RemoveSelfFromStory() is called on teardown.
diff --git a/google_apis/drive/drive_api_parser.h b/google_apis/drive/drive_api_parser.h
index 665d5189..1568f08 100644
--- a/google_apis/drive/drive_api_parser.h
+++ b/google_apis/drive/drive_api_parser.h
@@ -229,6 +229,10 @@
class TeamDriveList {
public:
TeamDriveList();
+
+ TeamDriveList(const TeamDriveList&) = delete;
+ TeamDriveList& operator=(const TeamDriveList&) = delete;
+
~TeamDriveList();
// Registers the mapping between JSON field names and the members in this
@@ -268,8 +272,6 @@
std::string next_page_token_;
std::vector<std::unique_ptr<TeamDriveResource>> items_;
-
- DISALLOW_COPY_AND_ASSIGN(TeamDriveList);
};
// ParentReference represents a directory.
@@ -692,6 +694,10 @@
class FileList {
public:
FileList();
+
+ FileList(const FileList&) = delete;
+ FileList& operator=(const FileList&) = delete;
+
~FileList();
// Registers the mapping between JSON field names and the members in this
@@ -731,8 +737,6 @@
GURL next_link_;
std::vector<std::unique_ptr<FileResource>> items_;
-
- DISALLOW_COPY_AND_ASSIGN(FileList);
};
// ChangeResource represents a change in a file.
@@ -745,6 +749,10 @@
TEAM_DRIVE,
};
ChangeResource();
+
+ ChangeResource(const ChangeResource&) = delete;
+ ChangeResource& operator=(const ChangeResource&) = delete;
+
~ChangeResource();
// Registers the mapping between JSON field names and the members in this
@@ -843,8 +851,6 @@
base::Time modification_date_;
std::string team_drive_id_;
std::unique_ptr<TeamDriveResource> team_drive_;
-
- DISALLOW_COPY_AND_ASSIGN(ChangeResource);
};
// ChangeList represents a set of changes in the drive.
@@ -852,6 +858,10 @@
class ChangeList {
public:
ChangeList();
+
+ ChangeList(const ChangeList&) = delete;
+ ChangeList& operator=(const ChangeList&) = delete;
+
~ChangeList();
// Registers the mapping between JSON field names and the members in this
@@ -908,8 +918,6 @@
int64_t largest_change_id_;
std::string new_start_page_token_;
std::vector<std::unique_ptr<ChangeResource>> items_;
-
- DISALLOW_COPY_AND_ASSIGN(ChangeList);
};
// StartPageToken represets the starting pageToken for listing changes in the
diff --git a/google_apis/drive/drive_api_requests.h b/google_apis/drive/drive_api_requests.h
index 3348986..ba512f6 100644
--- a/google_apis/drive/drive_api_requests.h
+++ b/google_apis/drive/drive_api_requests.h
@@ -115,6 +115,11 @@
class DriveApiPartialFieldRequest : public DriveUrlFetchRequestBase {
public:
explicit DriveApiPartialFieldRequest(RequestSender* sender);
+
+ DriveApiPartialFieldRequest(const DriveApiPartialFieldRequest&) = delete;
+ DriveApiPartialFieldRequest& operator=(const DriveApiPartialFieldRequest&) =
+ delete;
+
~DriveApiPartialFieldRequest() override;
// Optional parameter.
@@ -131,8 +136,6 @@
private:
std::string fields_;
-
- DISALLOW_COPY_AND_ASSIGN(DriveApiPartialFieldRequest);
};
//============================ DriveApiDataRequest ===========================
@@ -151,6 +154,10 @@
: DriveApiPartialFieldRequest(sender), callback_(std::move(callback)) {
DCHECK(!callback_.is_null());
}
+
+ DriveApiDataRequest(const DriveApiDataRequest&) = delete;
+ DriveApiDataRequest& operator=(const DriveApiDataRequest&) = delete;
+
~DriveApiDataRequest() override {}
protected:
@@ -201,8 +208,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<DriveApiDataRequest> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DriveApiDataRequest);
};
//=============================== FilesGetRequest =============================
@@ -215,6 +220,10 @@
FilesGetRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
FileResourceCallback callback);
+
+ FilesGetRequest(const FilesGetRequest&) = delete;
+ FilesGetRequest& operator=(const FilesGetRequest&) = delete;
+
~FilesGetRequest() override;
// Required parameter.
@@ -235,8 +244,6 @@
const DriveApiUrlGenerator url_generator_;
std::string file_id_;
GURL embed_origin_;
-
- DISALLOW_COPY_AND_ASSIGN(FilesGetRequest);
};
//============================ FilesInsertRequest =============================
@@ -257,6 +264,10 @@
FilesInsertRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
FileResourceCallback callback);
+
+ FilesInsertRequest(const FilesInsertRequest&) = delete;
+ FilesInsertRequest& operator=(const FilesInsertRequest&) = delete;
+
~FilesInsertRequest() override;
// Optional parameter
@@ -308,8 +319,6 @@
std::vector<std::string> parents_;
std::string title_;
Properties properties_;
-
- DISALLOW_COPY_AND_ASSIGN(FilesInsertRequest);
};
//============================== FilesPatchRequest ============================
@@ -322,6 +331,10 @@
FilesPatchRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
FileResourceCallback callback);
+
+ FilesPatchRequest(const FilesPatchRequest&) = delete;
+ FilesPatchRequest& operator=(const FilesPatchRequest&) = delete;
+
~FilesPatchRequest() override;
// Required parameter.
@@ -388,8 +401,6 @@
base::Time last_viewed_by_me_date_;
std::vector<std::string> parents_;
Properties properties_;
-
- DISALLOW_COPY_AND_ASSIGN(FilesPatchRequest);
};
//============================= FilesCopyRequest ==============================
@@ -403,6 +414,10 @@
FilesCopyRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
FileResourceCallback callback);
+
+ FilesCopyRequest(const FilesCopyRequest&) = delete;
+ FilesCopyRequest& operator=(const FilesCopyRequest&) = delete;
+
~FilesCopyRequest() override;
// Required parameter.
@@ -441,8 +456,6 @@
base::Time modified_date_;
std::vector<std::string> parents_;
std::string title_;
-
- DISALLOW_COPY_AND_ASSIGN(FilesCopyRequest);
};
//========================== TeamDriveListRequest =============================
@@ -458,6 +471,10 @@
TeamDriveListRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
TeamDriveListCallback callback);
+
+ TeamDriveListRequest(const TeamDriveListRequest&) = delete;
+ TeamDriveListRequest& operator=(const TeamDriveListRequest&) = delete;
+
~TeamDriveListRequest() override;
// Optional parameter
@@ -477,8 +494,6 @@
const DriveApiUrlGenerator url_generator_;
int max_results_;
std::string page_token_;
-
- DISALLOW_COPY_AND_ASSIGN(TeamDriveListRequest);
};
//========================== StartPageTokenRequest =============================
@@ -493,6 +508,10 @@
StartPageTokenRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
StartPageTokenCallback callback);
+
+ StartPageTokenRequest(const StartPageTokenRequest&) = delete;
+ StartPageTokenRequest& operator=(const StartPageTokenRequest&) = delete;
+
~StartPageTokenRequest() override;
// Optional parameter
@@ -508,8 +527,6 @@
private:
const DriveApiUrlGenerator url_generator_;
std::string team_drive_id_;
-
- DISALLOW_COPY_AND_ASSIGN(StartPageTokenRequest);
};
//============================= FilesListRequest =============================
@@ -525,6 +542,10 @@
FilesListRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
FileListCallback callback);
+
+ FilesListRequest(const FilesListRequest&) = delete;
+ FilesListRequest& operator=(const FilesListRequest&) = delete;
+
~FilesListRequest() override;
// Optional parameter
@@ -558,8 +579,6 @@
FilesListCorpora corpora_;
std::string team_drive_id_;
std::string q_;
-
- DISALLOW_COPY_AND_ASSIGN(FilesListRequest);
};
//========================= FilesListNextPageRequest ==========================
@@ -571,6 +590,10 @@
class FilesListNextPageRequest : public DriveApiDataRequest<FileList> {
public:
FilesListNextPageRequest(RequestSender* sender, FileListCallback callback);
+
+ FilesListNextPageRequest(const FilesListNextPageRequest&) = delete;
+ FilesListNextPageRequest& operator=(const FilesListNextPageRequest&) = delete;
+
~FilesListNextPageRequest() override;
const GURL& next_link() const { return next_link_; }
@@ -582,8 +605,6 @@
private:
GURL next_link_;
-
- DISALLOW_COPY_AND_ASSIGN(FilesListNextPageRequest);
};
//============================= FilesDeleteRequest =============================
@@ -596,6 +617,10 @@
FilesDeleteRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
EntryActionCallback callback);
+
+ FilesDeleteRequest(const FilesDeleteRequest&) = delete;
+ FilesDeleteRequest& operator=(const FilesDeleteRequest&) = delete;
+
~FilesDeleteRequest() override;
// Required parameter.
@@ -613,8 +638,6 @@
const DriveApiUrlGenerator url_generator_;
std::string file_id_;
std::string etag_;
-
- DISALLOW_COPY_AND_ASSIGN(FilesDeleteRequest);
};
//============================= FilesTrashRequest ==============================
@@ -627,6 +650,10 @@
FilesTrashRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
FileResourceCallback callback);
+
+ FilesTrashRequest(const FilesTrashRequest&) = delete;
+ FilesTrashRequest& operator=(const FilesTrashRequest&) = delete;
+
~FilesTrashRequest() override;
// Required parameter.
@@ -643,8 +670,6 @@
private:
const DriveApiUrlGenerator url_generator_;
std::string file_id_;
-
- DISALLOW_COPY_AND_ASSIGN(FilesTrashRequest);
};
//============================== AboutGetRequest =============================
@@ -657,6 +682,10 @@
AboutGetRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
AboutResourceCallback callback);
+
+ AboutGetRequest(const AboutGetRequest&) = delete;
+ AboutGetRequest& operator=(const AboutGetRequest&) = delete;
+
~AboutGetRequest() override;
protected:
@@ -665,8 +694,6 @@
private:
const DriveApiUrlGenerator url_generator_;
-
- DISALLOW_COPY_AND_ASSIGN(AboutGetRequest);
};
//============================ ChangesListRequest ============================
@@ -682,6 +709,10 @@
ChangesListRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
ChangeListCallback callback);
+
+ ChangesListRequest(const ChangesListRequest&) = delete;
+ ChangesListRequest& operator=(const ChangesListRequest&) = delete;
+
~ChangesListRequest() override;
// Optional parameter
@@ -719,8 +750,6 @@
std::string page_token_;
int64_t start_change_id_;
std::string team_drive_id_;
-
- DISALLOW_COPY_AND_ASSIGN(ChangesListRequest);
};
//======================== ChangesListNextPageRequest =========================
@@ -733,6 +762,11 @@
public:
ChangesListNextPageRequest(RequestSender* sender,
ChangeListCallback callback);
+
+ ChangesListNextPageRequest(const ChangesListNextPageRequest&) = delete;
+ ChangesListNextPageRequest& operator=(const ChangesListNextPageRequest&) =
+ delete;
+
~ChangesListNextPageRequest() override;
const GURL& next_link() const { return next_link_; }
@@ -744,8 +778,6 @@
private:
GURL next_link_;
-
- DISALLOW_COPY_AND_ASSIGN(ChangesListNextPageRequest);
};
//========================== ChildrenInsertRequest ============================
@@ -758,6 +790,10 @@
ChildrenInsertRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
EntryActionCallback callback);
+
+ ChildrenInsertRequest(const ChildrenInsertRequest&) = delete;
+ ChildrenInsertRequest& operator=(const ChildrenInsertRequest&) = delete;
+
~ChildrenInsertRequest() override;
// Required parameter.
@@ -779,8 +815,6 @@
const DriveApiUrlGenerator url_generator_;
std::string folder_id_;
std::string id_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildrenInsertRequest);
};
//========================== ChildrenDeleteRequest ============================
@@ -794,6 +828,10 @@
ChildrenDeleteRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
EntryActionCallback callback);
+
+ ChildrenDeleteRequest(const ChildrenDeleteRequest&) = delete;
+ ChildrenDeleteRequest& operator=(const ChildrenDeleteRequest&) = delete;
+
~ChildrenDeleteRequest() override;
// Required parameter.
@@ -812,8 +850,6 @@
const DriveApiUrlGenerator url_generator_;
std::string child_id_;
std::string folder_id_;
-
- DISALLOW_COPY_AND_ASSIGN(ChildrenDeleteRequest);
};
//======================= InitiateUploadNewFileRequest =======================
@@ -832,6 +868,11 @@
const std::string& parent_resource_id,
const std::string& title,
InitiateUploadCallback callback);
+
+ InitiateUploadNewFileRequest(const InitiateUploadNewFileRequest&) = delete;
+ InitiateUploadNewFileRequest& operator=(const InitiateUploadNewFileRequest&) =
+ delete;
+
~InitiateUploadNewFileRequest() override;
// Optional parameters.
@@ -865,8 +906,6 @@
base::Time modified_date_;
base::Time last_viewed_by_me_date_;
Properties properties_;
-
- DISALLOW_COPY_AND_ASSIGN(InitiateUploadNewFileRequest);
};
//==================== InitiateUploadExistingFileRequest =====================
@@ -887,6 +926,12 @@
const std::string& resource_id,
const std::string& etag,
InitiateUploadCallback callback);
+
+ InitiateUploadExistingFileRequest(const InitiateUploadExistingFileRequest&) =
+ delete;
+ InitiateUploadExistingFileRequest& operator=(
+ const InitiateUploadExistingFileRequest&) = delete;
+
~InitiateUploadExistingFileRequest() override;
// Optional parameters.
@@ -929,8 +974,6 @@
base::Time modified_date_;
base::Time last_viewed_by_me_date_;
Properties properties_;
-
- DISALLOW_COPY_AND_ASSIGN(InitiateUploadExistingFileRequest);
};
// Callback used for ResumeUpload() and GetUploadStatus().
@@ -954,6 +997,10 @@
const base::FilePath& local_file_path,
UploadRangeCallback callback,
ProgressCallback progress_callback);
+
+ ResumeUploadRequest(const ResumeUploadRequest&) = delete;
+ ResumeUploadRequest& operator=(const ResumeUploadRequest&) = delete;
+
~ResumeUploadRequest() override;
protected:
@@ -963,8 +1010,6 @@
private:
UploadRangeCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(ResumeUploadRequest);
};
//========================== GetUploadStatusRequest ==========================
@@ -978,6 +1023,10 @@
const GURL& upload_url,
int64_t content_length,
UploadRangeCallback callback);
+
+ GetUploadStatusRequest(const GetUploadStatusRequest&) = delete;
+ GetUploadStatusRequest& operator=(const GetUploadStatusRequest&) = delete;
+
~GetUploadStatusRequest() override;
protected:
@@ -987,8 +1036,6 @@
private:
UploadRangeCallback callback_;
-
- DISALLOW_COPY_AND_ASSIGN(GetUploadStatusRequest);
};
//======================= MultipartUploadNewFileDelegate =======================
@@ -1012,6 +1059,12 @@
const DriveApiUrlGenerator& url_generator,
FileResourceCallback callback,
ProgressCallback progress_callback);
+
+ MultipartUploadNewFileDelegate(const MultipartUploadNewFileDelegate&) =
+ delete;
+ MultipartUploadNewFileDelegate& operator=(
+ const MultipartUploadNewFileDelegate&) = delete;
+
~MultipartUploadNewFileDelegate() override;
protected:
@@ -1022,8 +1075,6 @@
private:
const bool has_modified_date_;
const DriveApiUrlGenerator url_generator_;
-
- DISALLOW_COPY_AND_ASSIGN(MultipartUploadNewFileDelegate);
};
//====================== MultipartUploadExistingFileDelegate ===================
@@ -1049,6 +1100,12 @@
const DriveApiUrlGenerator& url_generator,
FileResourceCallback callback,
ProgressCallback progress_callback);
+
+ MultipartUploadExistingFileDelegate(
+ const MultipartUploadExistingFileDelegate&) = delete;
+ MultipartUploadExistingFileDelegate& operator=(
+ const MultipartUploadExistingFileDelegate&) = delete;
+
~MultipartUploadExistingFileDelegate() override;
protected:
@@ -1062,8 +1119,6 @@
const std::string etag_;
const bool has_modified_date_;
const DriveApiUrlGenerator url_generator_;
-
- DISALLOW_COPY_AND_ASSIGN(MultipartUploadExistingFileDelegate);
};
//========================== DownloadFileRequest ==========================
@@ -1079,9 +1134,11 @@
DownloadActionCallback download_action_callback,
const GetContentCallback& get_content_callback,
ProgressCallback progress_callback);
- ~DownloadFileRequest() override;
- DISALLOW_COPY_AND_ASSIGN(DownloadFileRequest);
+ DownloadFileRequest(const DownloadFileRequest&) = delete;
+ DownloadFileRequest& operator=(const DownloadFileRequest&) = delete;
+
+ ~DownloadFileRequest() override;
};
//========================== PermissionsInsertRequest ==========================
@@ -1109,6 +1166,10 @@
PermissionsInsertRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator,
EntryActionCallback callback);
+
+ PermissionsInsertRequest(const PermissionsInsertRequest&) = delete;
+ PermissionsInsertRequest& operator=(const PermissionsInsertRequest&) = delete;
+
~PermissionsInsertRequest() override;
void set_id(const std::string& id) { id_ = id; }
@@ -1128,8 +1189,6 @@
PermissionType type_;
PermissionRole role_;
std::string value_;
-
- DISALLOW_COPY_AND_ASSIGN(PermissionsInsertRequest);
};
//======================= SingleBatchableDelegateRequest =======================
@@ -1139,6 +1198,12 @@
public:
SingleBatchableDelegateRequest(RequestSender* sender,
std::unique_ptr<BatchableDelegate> delegate);
+
+ SingleBatchableDelegateRequest(const SingleBatchableDelegateRequest&) =
+ delete;
+ SingleBatchableDelegateRequest& operator=(
+ const SingleBatchableDelegateRequest&) = delete;
+
~SingleBatchableDelegateRequest() override;
private:
@@ -1159,8 +1224,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<SingleBatchableDelegateRequest> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SingleBatchableDelegateRequest);
};
//========================== BatchUploadRequest ==========================
@@ -1168,20 +1231,25 @@
class BatchUploadChildEntry {
public:
explicit BatchUploadChildEntry(BatchableDelegate* request);
+
+ BatchUploadChildEntry(const BatchUploadChildEntry&) = delete;
+ BatchUploadChildEntry& operator=(const BatchUploadChildEntry&) = delete;
+
~BatchUploadChildEntry();
std::unique_ptr<BatchableDelegate> request;
bool prepared;
int64_t data_offset;
int64_t data_size;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BatchUploadChildEntry);
};
class BatchUploadRequest : public DriveUrlFetchRequestBase {
public:
BatchUploadRequest(RequestSender* sender,
const DriveApiUrlGenerator& url_generator);
+
+ BatchUploadRequest(const BatchUploadRequest&) = delete;
+ BatchUploadRequest& operator=(const BatchUploadRequest&) = delete;
+
~BatchUploadRequest() override;
// Adds request to the batch request. The instance takes ownership of
@@ -1256,8 +1324,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BatchUploadRequest> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BatchUploadRequest);
};
} // namespace drive
diff --git a/google_apis/drive/files_list_request_runner.h b/google_apis/drive/files_list_request_runner.h
index 49db5adde..0674633 100644
--- a/google_apis/drive/files_list_request_runner.h
+++ b/google_apis/drive/files_list_request_runner.h
@@ -37,6 +37,9 @@
const std::string& fields,
FileListCallback callback);
+ FilesListRequestRunner(const FilesListRequestRunner&) = delete;
+ FilesListRequestRunner& operator=(const FilesListRequestRunner&) = delete;
+
~FilesListRequestRunner();
void SetRequestCompletedCallbackForTesting(base::OnceClosure callback);
@@ -67,7 +70,6 @@
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<FilesListRequestRunner> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(FilesListRequestRunner);
};
} // namespace google_apis
diff --git a/google_apis/gaia/fake_gaia.h b/google_apis/gaia/fake_gaia.h
index 92d47d0..00e0680a 100644
--- a/google_apis/gaia/fake_gaia.h
+++ b/google_apis/gaia/fake_gaia.h
@@ -100,6 +100,10 @@
};
FakeGaia();
+
+ FakeGaia(const FakeGaia&) = delete;
+ FakeGaia& operator=(const FakeGaia&) = delete;
+
virtual ~FakeGaia();
void SetFakeMergeSessionParams(const std::string& email,
@@ -344,7 +348,6 @@
GaiaAuthConsumer::ReAuthProofTokenStatus next_reauth_status_ =
GaiaAuthConsumer::ReAuthProofTokenStatus::kSuccess;
GURL embedded_setup_chromeos_iframe_url_;
- DISALLOW_COPY_AND_ASSIGN(FakeGaia);
};
#endif // GOOGLE_APIS_GAIA_FAKE_GAIA_H_
diff --git a/google_apis/gaia/fake_oauth2_access_token_manager.h b/google_apis/gaia/fake_oauth2_access_token_manager.h
index 5820986..4fef68ff 100644
--- a/google_apis/gaia/fake_oauth2_access_token_manager.h
+++ b/google_apis/gaia/fake_oauth2_access_token_manager.h
@@ -33,6 +33,11 @@
explicit FakeOAuth2AccessTokenManager(
OAuth2AccessTokenManager::Delegate* delegate);
+
+ FakeOAuth2AccessTokenManager(const FakeOAuth2AccessTokenManager&) = delete;
+ FakeOAuth2AccessTokenManager& operator=(const FakeOAuth2AccessTokenManager&) =
+ delete;
+
~FakeOAuth2AccessTokenManager() override;
// Gets a list of active requests (can be used by tests to validate that the
@@ -117,8 +122,6 @@
bool auto_post_fetch_response_on_message_loop_;
base::WeakPtrFactory<FakeOAuth2AccessTokenManager> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FakeOAuth2AccessTokenManager);
};
#endif // GOOGLE_APIS_GAIA_FAKE_OAUTH2_ACCESS_TOKEN_MANAGER_H_
diff --git a/google_apis/gaia/gaia_auth_fetcher.h b/google_apis/gaia/gaia_auth_fetcher.h
index a448d71..f1ef340 100644
--- a/google_apis/gaia/gaia_auth_fetcher.h
+++ b/google_apis/gaia/gaia_auth_fetcher.h
@@ -90,6 +90,10 @@
GaiaAuthConsumer* consumer,
gaia::GaiaSource source,
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory);
+
+ GaiaAuthFetcher(const GaiaAuthFetcher&) = delete;
+ GaiaAuthFetcher& operator=(const GaiaAuthFetcher&) = delete;
+
virtual ~GaiaAuthFetcher();
// Start a request to revoke |auth_token|.
@@ -405,8 +409,6 @@
FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthWithQuote);
FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeSuccess);
FRIEND_TEST_ALL_PREFIXES(GaiaAuthFetcherTest, ClientOAuthChallengeQuote);
-
- DISALLOW_COPY_AND_ASSIGN(GaiaAuthFetcher);
};
#endif // GOOGLE_APIS_GAIA_GAIA_AUTH_FETCHER_H_
diff --git a/google_apis/gaia/gaia_oauth_client_unittest.cc b/google_apis/gaia/gaia_oauth_client_unittest.cc
index 20c805b4..bd78b3e 100644
--- a/google_apis/gaia/gaia_oauth_client_unittest.cc
+++ b/google_apis/gaia/gaia_oauth_client_unittest.cc
@@ -50,6 +50,9 @@
base::Unretained(this)));
}
+ ResponseInjector(const ResponseInjector&) = delete;
+ ResponseInjector& operator=(const ResponseInjector&) = delete;
+
~ResponseInjector() {
url_loader_factory_->SetInterceptor(
base::BindRepeating([](const network::ResourceRequest& request) {
@@ -126,7 +129,6 @@
int current_failure_count_;
int max_failure_count_;
std::string results_;
- DISALLOW_COPY_AND_ASSIGN(ResponseInjector);
};
const std::string kTestAccessToken = "1/fFAGRNJru1FTz70BzhT3Zg";
diff --git a/google_apis/gaia/oauth2_access_token_fetcher.h b/google_apis/gaia/oauth2_access_token_fetcher.h
index 3c3a351..43bf900 100644
--- a/google_apis/gaia/oauth2_access_token_fetcher.h
+++ b/google_apis/gaia/oauth2_access_token_fetcher.h
@@ -24,6 +24,10 @@
class OAuth2AccessTokenFetcher {
public:
explicit OAuth2AccessTokenFetcher(OAuth2AccessTokenConsumer* consumer);
+
+ OAuth2AccessTokenFetcher(const OAuth2AccessTokenFetcher&) = delete;
+ OAuth2AccessTokenFetcher& operator=(const OAuth2AccessTokenFetcher&) = delete;
+
virtual ~OAuth2AccessTokenFetcher();
// Starts the flow with the given parameters.
@@ -49,8 +53,6 @@
private:
OAuth2AccessTokenConsumer* const consumer_;
-
- DISALLOW_COPY_AND_ASSIGN(OAuth2AccessTokenFetcher);
};
#endif // GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_FETCHER_H_
diff --git a/google_apis/gaia/oauth2_access_token_fetcher_immediate_error.h b/google_apis/gaia/oauth2_access_token_fetcher_immediate_error.h
index 4af0b8f..c7c19d6 100644
--- a/google_apis/gaia/oauth2_access_token_fetcher_immediate_error.h
+++ b/google_apis/gaia/oauth2_access_token_fetcher_immediate_error.h
@@ -32,6 +32,12 @@
public:
OAuth2AccessTokenFetcherImmediateError(OAuth2AccessTokenConsumer* consumer,
const GoogleServiceAuthError& error);
+
+ OAuth2AccessTokenFetcherImmediateError(
+ const OAuth2AccessTokenFetcherImmediateError&) = delete;
+ OAuth2AccessTokenFetcherImmediateError& operator=(
+ const OAuth2AccessTokenFetcherImmediateError&) = delete;
+
~OAuth2AccessTokenFetcherImmediateError() override;
void Start(const std::string& client_id,
@@ -59,7 +65,6 @@
scoped_refptr<FailCaller> failer_;
GoogleServiceAuthError immediate_error_;
- DISALLOW_COPY_AND_ASSIGN(OAuth2AccessTokenFetcherImmediateError);
};
#endif // GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_FETCHER_IMMEDIATE_ERROR_H_
diff --git a/google_apis/gaia/oauth2_access_token_fetcher_impl.h b/google_apis/gaia/oauth2_access_token_fetcher_impl.h
index 55448bb..95f17067 100644
--- a/google_apis/gaia/oauth2_access_token_fetcher_impl.h
+++ b/google_apis/gaia/oauth2_access_token_fetcher_impl.h
@@ -60,6 +60,11 @@
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
const std::string& refresh_token,
const std::string& auth_code = std::string());
+
+ OAuth2AccessTokenFetcherImpl(const OAuth2AccessTokenFetcherImpl&) = delete;
+ OAuth2AccessTokenFetcherImpl& operator=(const OAuth2AccessTokenFetcherImpl&) =
+ delete;
+
~OAuth2AccessTokenFetcherImpl() override;
// Implementation of OAuth2AccessTokenFetcher
@@ -146,7 +151,6 @@
ParseGetAccessTokenFailure);
FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenFetcherImplTest,
ParseGetAccessTokenFailureInvalidError);
- DISALLOW_COPY_AND_ASSIGN(OAuth2AccessTokenFetcherImpl);
};
#endif // GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_FETCHER_IMPL_H_
diff --git a/google_apis/gaia/oauth2_access_token_manager.cc b/google_apis/gaia/oauth2_access_token_manager.cc
index 62e4c14..f4f18c8 100644
--- a/google_apis/gaia/oauth2_access_token_manager.cc
+++ b/google_apis/gaia/oauth2_access_token_manager.cc
@@ -150,6 +150,10 @@
const ScopeSet& scopes,
const std::string& consumer_name,
base::WeakPtr<RequestImpl> waiting_request);
+
+ Fetcher(const Fetcher&) = delete;
+ Fetcher& operator=(const Fetcher&) = delete;
+
~Fetcher() override;
// Add a request that is waiting for the result of this Fetcher.
@@ -225,8 +229,6 @@
// Ensures that the fetcher is deleted only once.
bool scheduled_for_deletion_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(Fetcher);
};
// static
diff --git a/google_apis/gaia/oauth2_access_token_manager.h b/google_apis/gaia/oauth2_access_token_manager.h
index 4dfd3bf..350a92f 100644
--- a/google_apis/gaia/oauth2_access_token_manager.h
+++ b/google_apis/gaia/oauth2_access_token_manager.h
@@ -180,6 +180,10 @@
explicit OAuth2AccessTokenManager(
OAuth2AccessTokenManager::Delegate* delegate);
+
+ OAuth2AccessTokenManager(const OAuth2AccessTokenManager&) = delete;
+ OAuth2AccessTokenManager& operator=(const OAuth2AccessTokenManager&) = delete;
+
virtual ~OAuth2AccessTokenManager();
OAuth2AccessTokenManager::Delegate* GetDelegate();
@@ -345,8 +349,6 @@
FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenManagerTest, ClearCache);
FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenManagerTest, ClearCacheForAccount);
FRIEND_TEST_ALL_PREFIXES(OAuth2AccessTokenManagerTest, OnAccessTokenRemoved);
-
- DISALLOW_COPY_AND_ASSIGN(OAuth2AccessTokenManager);
};
#endif // GOOGLE_APIS_GAIA_OAUTH2_ACCESS_TOKEN_MANAGER_H_
diff --git a/google_apis/gaia/oauth2_api_call_flow.h b/google_apis/gaia/oauth2_api_call_flow.h
index 0684d497..04f6171 100644
--- a/google_apis/gaia/oauth2_api_call_flow.h
+++ b/google_apis/gaia/oauth2_api_call_flow.h
@@ -31,6 +31,9 @@
public:
OAuth2ApiCallFlow();
+ OAuth2ApiCallFlow(const OAuth2ApiCallFlow&) = delete;
+ OAuth2ApiCallFlow& operator=(const OAuth2ApiCallFlow&) = delete;
+
virtual ~OAuth2ApiCallFlow();
// Start the flow.
@@ -99,8 +102,6 @@
State state_;
std::unique_ptr<network::SimpleURLLoader> url_loader_;
-
- DISALLOW_COPY_AND_ASSIGN(OAuth2ApiCallFlow);
};
#endif // GOOGLE_APIS_GAIA_OAUTH2_API_CALL_FLOW_H_
diff --git a/google_apis/gcm/base/socket_stream.h b/google_apis/gcm/base/socket_stream.h
index 109f4168..9af1517 100644
--- a/google_apis/gcm/base/socket_stream.h
+++ b/google_apis/gcm/base/socket_stream.h
@@ -65,6 +65,10 @@
// |socket| should already be connected.
explicit SocketInputStream(mojo::ScopedDataPipeConsumerHandle stream);
+
+ SocketInputStream(const SocketInputStream&) = delete;
+ SocketInputStream& operator=(const SocketInputStream&) = delete;
+
~SocketInputStream() override;
// ZeroCopyInputStream implementation.
@@ -129,8 +133,6 @@
net::Error last_error_;
base::WeakPtrFactory<SocketInputStream> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SocketInputStream);
};
// A helper class for writing to a mojo producer handle with protobuf encoded
@@ -161,6 +163,10 @@
};
explicit SocketOutputStream(mojo::ScopedDataPipeProducerHandle stream);
+
+ SocketOutputStream(const SocketOutputStream&) = delete;
+ SocketOutputStream& operator=(const SocketOutputStream&) = delete;
+
~SocketOutputStream() override;
// ZeroCopyOutputStream implementation.
@@ -202,8 +208,6 @@
net::Error last_error_;
base::WeakPtrFactory<SocketOutputStream> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SocketOutputStream);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/checkin_request.h b/google_apis/gcm/engine/checkin_request.h
index ec345fc9..093bfafa 100644
--- a/google_apis/gcm/engine/checkin_request.h
+++ b/google_apis/gcm/engine/checkin_request.h
@@ -71,6 +71,10 @@
scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
GCMStatsRecorder* recorder);
+
+ CheckinRequest(const CheckinRequest&) = delete;
+ CheckinRequest& operator=(const CheckinRequest&) = delete;
+
~CheckinRequest();
void Start();
@@ -98,8 +102,6 @@
GCMStatsRecorder* recorder_;
base::WeakPtrFactory<CheckinRequest> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(CheckinRequest);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/connection_event_tracker.h b/google_apis/gcm/engine/connection_event_tracker.h
index 44cb748..5be60f8 100644
--- a/google_apis/gcm/engine/connection_event_tracker.h
+++ b/google_apis/gcm/engine/connection_event_tracker.h
@@ -19,6 +19,10 @@
public:
// TODO(harkness): Pass in the storage information.
ConnectionEventTracker();
+
+ ConnectionEventTracker(const ConnectionEventTracker&) = delete;
+ ConnectionEventTracker& operator=(const ConnectionEventTracker&) = delete;
+
~ConnectionEventTracker();
// Returns a boolean indicating whether an attempt is currently in progress.
@@ -56,8 +60,6 @@
// Number of events which were discarded due to exceeding the total number of
// events collected. This is sent to GCM to represent those events.
uint32_t number_discarded_events_ = 0;
-
- DISALLOW_COPY_AND_ASSIGN(ConnectionEventTracker);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/connection_factory_impl.h b/google_apis/gcm/engine/connection_factory_impl.h
index 057386fa..a91e196f 100644
--- a/google_apis/gcm/engine/connection_factory_impl.h
+++ b/google_apis/gcm/engine/connection_factory_impl.h
@@ -39,6 +39,10 @@
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
GCMStatsRecorder* recorder,
network::NetworkConnectionTracker* network_connection_tracker);
+
+ ConnectionFactoryImpl(const ConnectionFactoryImpl&) = delete;
+ ConnectionFactoryImpl& operator=(const ConnectionFactoryImpl&) = delete;
+
~ConnectionFactoryImpl() override;
// ConnectionFactory implementation.
@@ -196,8 +200,6 @@
ConnectionListener* listener_;
base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/connection_handler_impl.h b/google_apis/gcm/engine/connection_handler_impl.h
index 5bb5514..dacd5b77 100644
--- a/google_apis/gcm/engine/connection_handler_impl.h
+++ b/google_apis/gcm/engine/connection_handler_impl.h
@@ -44,6 +44,10 @@
const ProtoReceivedCallback& read_callback,
const ProtoSentCallback& write_callback,
const ConnectionChangedCallback& connection_callback);
+
+ ConnectionHandlerImpl(const ConnectionHandlerImpl&) = delete;
+ ConnectionHandlerImpl& operator=(const ConnectionHandlerImpl&) = delete;
+
~ConnectionHandlerImpl() override;
// ConnectionHandler implementation.
@@ -135,8 +139,6 @@
std::vector<uint8_t> payload_input_buffer_;
base::WeakPtrFactory<ConnectionHandlerImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ConnectionHandlerImpl);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/fake_connection_factory.h b/google_apis/gcm/engine/fake_connection_factory.h
index 83caf24..8bcb111 100644
--- a/google_apis/gcm/engine/fake_connection_factory.h
+++ b/google_apis/gcm/engine/fake_connection_factory.h
@@ -19,6 +19,10 @@
class FakeConnectionFactory : public ConnectionFactory {
public:
FakeConnectionFactory();
+
+ FakeConnectionFactory(const FakeConnectionFactory&) = delete;
+ FakeConnectionFactory& operator=(const FakeConnectionFactory&) = delete;
+
~FakeConnectionFactory() override;
// ConnectionFactory implementation.
@@ -53,8 +57,6 @@
bool delay_reconnect_;
ConnectionListener* connection_listener_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeConnectionFactory);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/fake_connection_handler.h b/google_apis/gcm/engine/fake_connection_handler.h
index 70afb649..fef7014 100644
--- a/google_apis/gcm/engine/fake_connection_handler.h
+++ b/google_apis/gcm/engine/fake_connection_handler.h
@@ -21,6 +21,10 @@
FakeConnectionHandler(
const ConnectionHandler::ProtoReceivedCallback& read_callback,
const ConnectionHandler::ProtoSentCallback& write_callback);
+
+ FakeConnectionHandler(const FakeConnectionHandler&) = delete;
+ FakeConnectionHandler& operator=(const FakeConnectionHandler&) = delete;
+
~FakeConnectionHandler() override;
// ConnectionHandler implementation.
@@ -78,8 +82,6 @@
// Whether an error was encountered after a successful login.
bool had_error_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeConnectionHandler);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/gcm_registration_request_handler.h b/google_apis/gcm/engine/gcm_registration_request_handler.h
index 6970794..56d4c93 100644
--- a/google_apis/gcm/engine/gcm_registration_request_handler.h
+++ b/google_apis/gcm/engine/gcm_registration_request_handler.h
@@ -15,6 +15,11 @@
: public RegistrationRequest::CustomRequestHandler {
public:
GCMRegistrationRequestHandler(const std::string& senders);
+
+ GCMRegistrationRequestHandler(const GCMRegistrationRequestHandler&) = delete;
+ GCMRegistrationRequestHandler& operator=(
+ const GCMRegistrationRequestHandler&) = delete;
+
~GCMRegistrationRequestHandler() override;
// RegistrationRequest::RequestHandler overrides:
@@ -24,8 +29,6 @@
private:
std::string senders_;
-
- DISALLOW_COPY_AND_ASSIGN(GCMRegistrationRequestHandler);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/gcm_request_test_base.h b/google_apis/gcm/engine/gcm_request_test_base.h
index 4fe9ba2..68fa6b8 100644
--- a/google_apis/gcm/engine/gcm_request_test_base.h
+++ b/google_apis/gcm/engine/gcm_request_test_base.h
@@ -24,6 +24,10 @@
class GCMRequestTestBase : public testing::Test {
public:
GCMRequestTestBase();
+
+ GCMRequestTestBase(const GCMRequestTestBase&) = delete;
+ GCMRequestTestBase& operator=(const GCMRequestTestBase&) = delete;
+
~GCMRequestTestBase() override;
const net::BackoffEntry::Policy& GetBackoffPolicy() const;
@@ -69,8 +73,6 @@
// Tracks the number of retries so far.
int retry_count_;
-
- DISALLOW_COPY_AND_ASSIGN(GCMRequestTestBase);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/gcm_store.h b/google_apis/gcm/engine/gcm_store.h
index 0cbce3e..2689c1d 100644
--- a/google_apis/gcm/engine/gcm_store.h
+++ b/google_apis/gcm/engine/gcm_store.h
@@ -72,6 +72,10 @@
using UpdateCallback = base::OnceCallback<void(bool success)>;
GCMStore();
+
+ GCMStore(const GCMStore&) = delete;
+ GCMStore& operator=(const GCMStore&) = delete;
+
virtual ~GCMStore();
// Load the data from persistent store and pass the initial state back to
@@ -159,9 +163,6 @@
UpdateCallback callback) = 0;
virtual void RemoveInstanceIDData(const std::string& app_id,
UpdateCallback callback) = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GCMStore);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/gcm_store_impl.h b/google_apis/gcm/engine/gcm_store_impl.h
index 872cc5f..2d1dc77 100644
--- a/google_apis/gcm/engine/gcm_store_impl.h
+++ b/google_apis/gcm/engine/gcm_store_impl.h
@@ -34,6 +34,10 @@
bool remove_account_mappings_with_email_key,
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner,
std::unique_ptr<Encryptor> encryptor);
+
+ GCMStoreImpl(const GCMStoreImpl&) = delete;
+ GCMStoreImpl& operator=(const GCMStoreImpl&) = delete;
+
~GCMStoreImpl() override;
// Load the directory and pass the initial state back to caller.
@@ -151,8 +155,6 @@
scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/gcm_unregistration_request_handler.h b/google_apis/gcm/engine/gcm_unregistration_request_handler.h
index dead670a..796459a 100644
--- a/google_apis/gcm/engine/gcm_unregistration_request_handler.h
+++ b/google_apis/gcm/engine/gcm_unregistration_request_handler.h
@@ -16,6 +16,12 @@
public UnregistrationRequest::CustomRequestHandler {
public:
GCMUnregistrationRequestHandler(const std::string& app_id);
+
+ GCMUnregistrationRequestHandler(const GCMUnregistrationRequestHandler&) =
+ delete;
+ GCMUnregistrationRequestHandler& operator=(
+ const GCMUnregistrationRequestHandler&) = delete;
+
~GCMUnregistrationRequestHandler() override;
// UnregistrationRequest::CustomRequestHandler overrides:
@@ -26,8 +32,6 @@
private:
std::string app_id_;
-
- DISALLOW_COPY_AND_ASSIGN(GCMUnregistrationRequestHandler);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/gservices_settings.h b/google_apis/gcm/engine/gservices_settings.h
index 92a96c12..090f5a5 100644
--- a/google_apis/gcm/engine/gservices_settings.h
+++ b/google_apis/gcm/engine/gservices_settings.h
@@ -31,6 +31,10 @@
static std::string CalculateDigest(const SettingsMap& settings);
GServicesSettings();
+
+ GServicesSettings(const GServicesSettings&) = delete;
+ GServicesSettings& operator=(const GServicesSettings&) = delete;
+
~GServicesSettings();
// Updates the settings based on |checkin_response|.
@@ -71,8 +75,6 @@
// Factory for creating references in callbacks.
base::WeakPtrFactory<GServicesSettings> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(GServicesSettings);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/heartbeat_manager.h b/google_apis/gcm/engine/heartbeat_manager.h
index 6034497..d8535e3 100644
--- a/google_apis/gcm/engine/heartbeat_manager.h
+++ b/google_apis/gcm/engine/heartbeat_manager.h
@@ -40,6 +40,10 @@
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
scoped_refptr<base::SequencedTaskRunner>
maybe_power_wrapped_io_task_runner);
+
+ HeartbeatManager(const HeartbeatManager&) = delete;
+ HeartbeatManager& operator=(const HeartbeatManager&) = delete;
+
~HeartbeatManager() override;
// Start the heartbeat logic.
@@ -137,8 +141,6 @@
ReconnectCallback trigger_reconnect_callback_;
base::WeakPtrFactory<HeartbeatManager> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(HeartbeatManager);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/instance_id_delete_token_request_handler.h b/google_apis/gcm/engine/instance_id_delete_token_request_handler.h
index 73bf76c..7ca8c0c 100644
--- a/google_apis/gcm/engine/instance_id_delete_token_request_handler.h
+++ b/google_apis/gcm/engine/instance_id_delete_token_request_handler.h
@@ -21,6 +21,12 @@
const std::string& authorized_entity,
const std::string& scope,
int gcm_version);
+
+ InstanceIDDeleteTokenRequestHandler(
+ const InstanceIDDeleteTokenRequestHandler&) = delete;
+ InstanceIDDeleteTokenRequestHandler& operator=(
+ const InstanceIDDeleteTokenRequestHandler&) = delete;
+
~InstanceIDDeleteTokenRequestHandler() override;
// UnregistrationRequest overrides:
@@ -34,8 +40,6 @@
std::string authorized_entity_;
std::string scope_;
int gcm_version_;
-
- DISALLOW_COPY_AND_ASSIGN(InstanceIDDeleteTokenRequestHandler);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/instance_id_get_token_request_handler.h b/google_apis/gcm/engine/instance_id_get_token_request_handler.h
index 1882b02..7a5fea9 100644
--- a/google_apis/gcm/engine/instance_id_get_token_request_handler.h
+++ b/google_apis/gcm/engine/instance_id_get_token_request_handler.h
@@ -22,6 +22,12 @@
const std::string& scope,
int gcm_version,
base::TimeDelta time_to_live);
+
+ InstanceIDGetTokenRequestHandler(const InstanceIDGetTokenRequestHandler&) =
+ delete;
+ InstanceIDGetTokenRequestHandler& operator=(
+ const InstanceIDGetTokenRequestHandler&) = delete;
+
~InstanceIDGetTokenRequestHandler() override;
// RegistrationRequest overrides:
@@ -35,8 +41,6 @@
std::string scope_;
int gcm_version_;
base::TimeDelta time_to_live_;
-
- DISALLOW_COPY_AND_ASSIGN(InstanceIDGetTokenRequestHandler);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/mcs_client.h b/google_apis/gcm/engine/mcs_client.h
index b069b95..741dd3c 100644
--- a/google_apis/gcm/engine/mcs_client.h
+++ b/google_apis/gcm/engine/mcs_client.h
@@ -106,6 +106,10 @@
GCMStore* gcm_store,
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
GCMStatsRecorder* recorder);
+
+ MCSClient(const MCSClient&) = delete;
+ MCSClient& operator=(const MCSClient&) = delete;
+
virtual ~MCSClient();
// Initialize the client. Will load any previous id/token information as well
@@ -312,8 +316,6 @@
GCMStatsRecorder* recorder_;
base::WeakPtrFactory<MCSClient> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MCSClient);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/registration_request.h b/google_apis/gcm/engine/registration_request.h
index c50321d3..b779336 100644
--- a/google_apis/gcm/engine/registration_request.h
+++ b/google_apis/gcm/engine/registration_request.h
@@ -124,6 +124,10 @@
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
GCMStatsRecorder* recorder,
const std::string& source_to_record);
+
+ RegistrationRequest(const RegistrationRequest&) = delete;
+ RegistrationRequest& operator=(const RegistrationRequest&) = delete;
+
~RegistrationRequest();
void Start();
@@ -162,8 +166,6 @@
std::string source_to_record_;
base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(RegistrationRequest);
};
} // namespace gcm
diff --git a/google_apis/gcm/engine/unregistration_request.h b/google_apis/gcm/engine/unregistration_request.h
index 287ab27..81534efe 100644
--- a/google_apis/gcm/engine/unregistration_request.h
+++ b/google_apis/gcm/engine/unregistration_request.h
@@ -119,6 +119,10 @@
scoped_refptr<base::SequencedTaskRunner> io_task_runner,
GCMStatsRecorder* recorder,
const std::string& source_to_record);
+
+ UnregistrationRequest(const UnregistrationRequest&) = delete;
+ UnregistrationRequest& operator=(const UnregistrationRequest&) = delete;
+
~UnregistrationRequest();
// Starts an unregistration request.
@@ -154,8 +158,6 @@
std::string source_to_record_;
base::WeakPtrFactory<UnregistrationRequest> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(UnregistrationRequest);
};
} // namespace gcm
diff --git a/google_apis/gcm/monitoring/fake_gcm_stats_recorder.h b/google_apis/gcm/monitoring/fake_gcm_stats_recorder.h
index f81dcf9..9af12e7 100644
--- a/google_apis/gcm/monitoring/fake_gcm_stats_recorder.h
+++ b/google_apis/gcm/monitoring/fake_gcm_stats_recorder.h
@@ -16,6 +16,10 @@
class FakeGCMStatsRecorder : public GCMStatsRecorder {
public:
FakeGCMStatsRecorder();
+
+ FakeGCMStatsRecorder(const FakeGCMStatsRecorder&) = delete;
+ FakeGCMStatsRecorder& operator=(const FakeGCMStatsRecorder&) = delete;
+
~FakeGCMStatsRecorder() override;
void RecordCheckinInitiated(uint64_t android_id) override;
@@ -66,9 +70,6 @@
void RecordIncomingSendError(const std::string& app_id,
const std::string& receiver_id,
const std::string& message_id) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FakeGCMStatsRecorder);
};
} // namespace gcm
diff --git a/headless/app/headless_shell.h b/headless/app/headless_shell.h
index e81f543..395c4e2 100644
--- a/headless/app/headless_shell.h
+++ b/headless/app/headless_shell.h
@@ -31,6 +31,10 @@
public page::ExperimentalObserver {
public:
HeadlessShell();
+
+ HeadlessShell(const HeadlessShell&) = delete;
+ HeadlessShell& operator=(const HeadlessShell&) = delete;
+
~HeadlessShell() override;
void OnStart(HeadlessBrowser* browser);
@@ -105,8 +109,6 @@
scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
std::unique_ptr<base::FileProxy> file_proxy_;
base::WeakPtrFactory<HeadlessShell> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessShell);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_browser_context_impl.h b/headless/lib/browser/headless_browser_context_impl.h
index bc82a1c..3956461 100644
--- a/headless/lib/browser/headless_browser_context_impl.h
+++ b/headless/lib/browser/headless_browser_context_impl.h
@@ -31,6 +31,10 @@
: public HeadlessBrowserContext,
public content::BrowserContext {
public:
+ HeadlessBrowserContextImpl(const HeadlessBrowserContextImpl&) = delete;
+ HeadlessBrowserContextImpl& operator=(const HeadlessBrowserContextImpl&) =
+ delete;
+
~HeadlessBrowserContextImpl() override;
static HeadlessBrowserContextImpl* From(
@@ -140,8 +144,6 @@
std::unique_ptr<HeadlessRequestContextManager> request_context_manager_;
std::unique_ptr<SimpleFactoryKey> simple_factory_key_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContextImpl);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_browser_context_options.h b/headless/lib/browser/headless_browser_context_options.h
index d61d5c6..5ac12cc 100644
--- a/headless/lib/browser/headless_browser_context_options.h
+++ b/headless/lib/browser/headless_browser_context_options.h
@@ -21,6 +21,11 @@
class HeadlessBrowserContextOptions {
public:
HeadlessBrowserContextOptions(HeadlessBrowserContextOptions&& options);
+
+ HeadlessBrowserContextOptions(const HeadlessBrowserContextOptions&) = delete;
+ HeadlessBrowserContextOptions& operator=(
+ const HeadlessBrowserContextOptions&) = delete;
+
~HeadlessBrowserContextOptions();
HeadlessBrowserContextOptions& operator=(
@@ -73,8 +78,6 @@
override_web_preferences_callback_;
absl::optional<gfx::FontRenderParams::Hinting> font_render_hinting_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContextOptions);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_browser_impl.h b/headless/lib/browser/headless_browser_impl.h
index 4df1c87..9f94d3f 100644
--- a/headless/lib/browser/headless_browser_impl.h
+++ b/headless/lib/browser/headless_browser_impl.h
@@ -51,6 +51,10 @@
HeadlessBrowserImpl(
base::OnceCallback<void(HeadlessBrowser*)> on_start_callback,
HeadlessBrowser::Options options);
+
+ HeadlessBrowserImpl(const HeadlessBrowserImpl&) = delete;
+ HeadlessBrowserImpl& operator=(const HeadlessBrowserImpl&) = delete;
+
~HeadlessBrowserImpl() override;
// HeadlessBrowser implementation:
@@ -124,9 +128,6 @@
std::unique_ptr<HeadlessRequestContextManager>
system_request_context_manager_;
base::WeakPtrFactory<HeadlessBrowserImpl> weak_ptr_factory_{this};
-
- private:
- DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserImpl);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_browser_main_parts.h b/headless/lib/browser/headless_browser_main_parts.h
index eb83871..b7d2200 100644
--- a/headless/lib/browser/headless_browser_main_parts.h
+++ b/headless/lib/browser/headless_browser_main_parts.h
@@ -36,6 +36,10 @@
explicit HeadlessBrowserMainParts(
const content::MainFunctionParams& parameters,
HeadlessBrowserImpl* browser);
+
+ HeadlessBrowserMainParts(const HeadlessBrowserMainParts&) = delete;
+ HeadlessBrowserMainParts& operator=(const HeadlessBrowserMainParts&) = delete;
+
~HeadlessBrowserMainParts() override;
// content::BrowserMainParts implementation:
@@ -88,8 +92,6 @@
#if defined(OS_MAC)
std::unique_ptr<device::GeolocationManager> geolocation_manager_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserMainParts);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_content_browser_client.h b/headless/lib/browser/headless_content_browser_client.h
index 68b1b0a..ba26a4c 100644
--- a/headless/lib/browser/headless_content_browser_client.h
+++ b/headless/lib/browser/headless_content_browser_client.h
@@ -21,6 +21,11 @@
class HeadlessContentBrowserClient : public content::ContentBrowserClient {
public:
explicit HeadlessContentBrowserClient(HeadlessBrowserImpl* browser);
+
+ HeadlessContentBrowserClient(const HeadlessContentBrowserClient&) = delete;
+ HeadlessContentBrowserClient& operator=(const HeadlessContentBrowserClient&) =
+ delete;
+
~HeadlessContentBrowserClient() override;
// content::ContentBrowserClient implementation:
@@ -100,8 +105,6 @@
append_command_line_flags_callback_;
std::unique_ptr<StubBadgeService> stub_badge_service_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessContentBrowserClient);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_devtools_agent_host_client.h b/headless/lib/browser/headless_devtools_agent_host_client.h
index 73fea85..51e56a0 100644
--- a/headless/lib/browser/headless_devtools_agent_host_client.h
+++ b/headless/lib/browser/headless_devtools_agent_host_client.h
@@ -19,6 +19,12 @@
public:
explicit HeadlessDevToolsAgentHostClient(
scoped_refptr<content::DevToolsAgentHost> agent_host);
+
+ HeadlessDevToolsAgentHostClient(const HeadlessDevToolsAgentHostClient&) =
+ delete;
+ HeadlessDevToolsAgentHostClient& operator=(
+ const HeadlessDevToolsAgentHostClient&) = delete;
+
~HeadlessDevToolsAgentHostClient() override;
// content::DevToolsAgentHostClient implementation.
@@ -33,8 +39,6 @@
private:
scoped_refptr<content::DevToolsAgentHost> agent_host_;
HeadlessDevToolsChannel::Client* client_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsAgentHostClient);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_focus_client.h b/headless/lib/browser/headless_focus_client.h
index 303cf56..9184023d 100644
--- a/headless/lib/browser/headless_focus_client.h
+++ b/headless/lib/browser/headless_focus_client.h
@@ -17,6 +17,10 @@
public aura::WindowObserver {
public:
HeadlessFocusClient();
+
+ HeadlessFocusClient(const HeadlessFocusClient&) = delete;
+ HeadlessFocusClient& operator=(const HeadlessFocusClient&) = delete;
+
~HeadlessFocusClient() override;
private:
@@ -35,8 +39,6 @@
observation_manager_{this};
base::ObserverList<aura::client::FocusChangeObserver>::Unchecked
focus_observers_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessFocusClient);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_permission_manager.h b/headless/lib/browser/headless_permission_manager.h
index b19bb434..58a091d 100644
--- a/headless/lib/browser/headless_permission_manager.h
+++ b/headless/lib/browser/headless_permission_manager.h
@@ -18,6 +18,11 @@
class HeadlessPermissionManager : public content::PermissionControllerDelegate {
public:
explicit HeadlessPermissionManager(content::BrowserContext* browser_context);
+
+ HeadlessPermissionManager(const HeadlessPermissionManager&) = delete;
+ HeadlessPermissionManager& operator=(const HeadlessPermissionManager&) =
+ delete;
+
~HeadlessPermissionManager() override;
// PermissionManager implementation.
@@ -58,8 +63,6 @@
private:
content::BrowserContext* browser_context_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessPermissionManager);
};
} // namespace content
diff --git a/headless/lib/browser/headless_platform_event_source.h b/headless/lib/browser/headless_platform_event_source.h
index ccd7463..345866f 100644
--- a/headless/lib/browser/headless_platform_event_source.h
+++ b/headless/lib/browser/headless_platform_event_source.h
@@ -15,10 +15,12 @@
class HeadlessPlatformEventSource : public ui::PlatformEventSource {
public:
HeadlessPlatformEventSource();
- ~HeadlessPlatformEventSource() override;
- private:
- DISALLOW_COPY_AND_ASSIGN(HeadlessPlatformEventSource);
+ HeadlessPlatformEventSource(const HeadlessPlatformEventSource&) = delete;
+ HeadlessPlatformEventSource& operator=(const HeadlessPlatformEventSource&) =
+ delete;
+
+ ~HeadlessPlatformEventSource() override;
};
} // namespace headless
diff --git a/headless/lib/browser/headless_request_context_manager.cc b/headless/lib/browser/headless_request_context_manager.cc
index ea2606a..8d56b24 100644
--- a/headless/lib/browser/headless_request_context_manager.cc
+++ b/headless/lib/browser/headless_request_context_manager.cc
@@ -121,6 +121,10 @@
base::Unretained(this)));
}
+ HeadlessProxyConfigMonitor(const HeadlessProxyConfigMonitor&) = delete;
+ HeadlessProxyConfigMonitor& operator=(const HeadlessProxyConfigMonitor&) =
+ delete;
+
~HeadlessProxyConfigMonitor() override {
DCHECK(task_runner_->RunsTasksInCurrentSequence());
proxy_config_service_->RemoveObserver(this);
@@ -174,8 +178,6 @@
mojo::Receiver<::network::mojom::ProxyConfigPollerClient> poller_receiver_{
this};
mojo::Remote<::network::mojom::ProxyConfigClient> proxy_config_client_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessProxyConfigMonitor);
};
// static
diff --git a/headless/lib/browser/headless_request_context_manager.h b/headless/lib/browser/headless_request_context_manager.h
index 39da647..d4a593d9 100644
--- a/headless/lib/browser/headless_request_context_manager.h
+++ b/headless/lib/browser/headless_request_context_manager.h
@@ -34,6 +34,11 @@
HeadlessRequestContextManager(const HeadlessBrowserContextOptions* options,
base::FilePath user_data_path);
+
+ HeadlessRequestContextManager(const HeadlessRequestContextManager&) = delete;
+ HeadlessRequestContextManager& operator=(
+ const HeadlessRequestContextManager&) = delete;
+
~HeadlessRequestContextManager();
void ConfigureNetworkContextParams(
@@ -63,8 +68,6 @@
mojo::PendingRemote<::network::mojom::NetworkContext> system_context_;
std::unique_ptr<content::ResourceContext> resource_context_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessRequestContextManager);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_screen.h b/headless/lib/browser/headless_screen.h
index 7e3bd87..a4d30c4 100644
--- a/headless/lib/browser/headless_screen.h
+++ b/headless/lib/browser/headless_screen.h
@@ -21,6 +21,10 @@
public:
// Creates a display::Screen of the specified size (physical pixels).
static HeadlessScreen* Create(const gfx::Size& size);
+
+ HeadlessScreen(const HeadlessScreen&) = delete;
+ HeadlessScreen& operator=(const HeadlessScreen&) = delete;
+
~HeadlessScreen() override;
protected:
@@ -36,8 +40,6 @@
private:
explicit HeadlessScreen(const gfx::Rect& screen_bounds);
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessScreen);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_web_contents_impl.h b/headless/lib/browser/headless_web_contents_impl.h
index ee3d0fe..6c6203f9 100644
--- a/headless/lib/browser/headless_web_contents_impl.h
+++ b/headless/lib/browser/headless_web_contents_impl.h
@@ -43,6 +43,9 @@
public content::RenderProcessHostObserver,
public content::WebContentsObserver {
public:
+ HeadlessWebContentsImpl(const HeadlessWebContentsImpl&) = delete;
+ HeadlessWebContentsImpl& operator=(const HeadlessWebContentsImpl&) = delete;
+
~HeadlessWebContentsImpl() override;
static HeadlessWebContentsImpl* From(HeadlessWebContents* web_contents);
@@ -160,8 +163,6 @@
class PendingFrame;
base::WeakPtr<PendingFrame> pending_frame_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_window_parenting_client.h b/headless/lib/browser/headless_window_parenting_client.h
index c7e9390..4d7b2093 100644
--- a/headless/lib/browser/headless_window_parenting_client.h
+++ b/headless/lib/browser/headless_window_parenting_client.h
@@ -14,6 +14,11 @@
: public aura::client::WindowParentingClient {
public:
explicit HeadlessWindowParentingClient(aura::Window* root_window);
+
+ HeadlessWindowParentingClient(const HeadlessWindowParentingClient&) = delete;
+ HeadlessWindowParentingClient& operator=(
+ const HeadlessWindowParentingClient&) = delete;
+
~HeadlessWindowParentingClient() override;
aura::Window* GetDefaultParent(aura::Window* window,
@@ -21,8 +26,6 @@
private:
aura::Window* root_window_; // Not owned.
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessWindowParentingClient);
};
} // namespace headless
diff --git a/headless/lib/browser/headless_window_tree_host.h b/headless/lib/browser/headless_window_tree_host.h
index d9b38e0..b2982f8 100644
--- a/headless/lib/browser/headless_window_tree_host.h
+++ b/headless/lib/browser/headless_window_tree_host.h
@@ -31,6 +31,10 @@
public ui::PlatformEventDispatcher {
public:
explicit HeadlessWindowTreeHost(bool use_external_begin_frame_control);
+
+ HeadlessWindowTreeHost(const HeadlessWindowTreeHost&) = delete;
+ HeadlessWindowTreeHost& operator=(const HeadlessWindowTreeHost&) = delete;
+
~HeadlessWindowTreeHost() override;
void SetParentWindow(gfx::NativeWindow window);
@@ -62,8 +66,6 @@
gfx::Rect bounds_;
std::unique_ptr<aura::client::FocusClient> focus_client_;
std::unique_ptr<aura::client::WindowParentingClient> window_parenting_client_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessWindowTreeHost);
};
} // namespace headless
diff --git a/headless/lib/browser/protocol/browser_handler.h b/headless/lib/browser/protocol/browser_handler.h
index 026a76e..50c2962 100644
--- a/headless/lib/browser/protocol/browser_handler.h
+++ b/headless/lib/browser/protocol/browser_handler.h
@@ -16,6 +16,10 @@
class BrowserHandler : public DomainHandler, public Browser::Backend {
public:
BrowserHandler(HeadlessBrowserImpl* browser, const std::string& target_id);
+
+ BrowserHandler(const BrowserHandler&) = delete;
+ BrowserHandler& operator=(const BrowserHandler&) = delete;
+
~BrowserHandler() override;
// DomainHandler implementation
@@ -39,7 +43,6 @@
private:
HeadlessBrowserImpl* browser_;
std::string target_id_;
- DISALLOW_COPY_AND_ASSIGN(BrowserHandler);
};
} // namespace protocol
diff --git a/headless/lib/browser/protocol/headless_devtools_session.h b/headless/lib/browser/protocol/headless_devtools_session.h
index 226dc1a..7856da28 100644
--- a/headless/lib/browser/protocol/headless_devtools_session.h
+++ b/headless/lib/browser/protocol/headless_devtools_session.h
@@ -25,6 +25,10 @@
public:
HeadlessDevToolsSession(base::WeakPtr<HeadlessBrowserImpl> browser,
content::DevToolsAgentHostClientChannel* channel);
+
+ HeadlessDevToolsSession(const HeadlessDevToolsSession&) = delete;
+ HeadlessDevToolsSession& operator=(const HeadlessDevToolsSession&) = delete;
+
~HeadlessDevToolsSession() override;
void HandleCommand(
@@ -49,7 +53,6 @@
base::flat_map<int, content::DevToolsManagerDelegate::NotHandledCallback>
pending_commands_;
content::DevToolsAgentHostClientChannel* client_channel_;
- DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsSession);
};
} // namespace protocol
diff --git a/headless/lib/browser/protocol/headless_handler.h b/headless/lib/browser/protocol/headless_handler.h
index 22151e92..72afa3c 100644
--- a/headless/lib/browser/protocol/headless_handler.h
+++ b/headless/lib/browser/protocol/headless_handler.h
@@ -22,6 +22,10 @@
public:
HeadlessHandler(HeadlessBrowserImpl* browser,
content::WebContents* web_contents);
+
+ HeadlessHandler(const HeadlessHandler&) = delete;
+ HeadlessHandler& operator=(const HeadlessHandler&) = delete;
+
~HeadlessHandler() override;
// DomainHandler implementation
@@ -40,7 +44,6 @@
HeadlessBrowserImpl* browser_;
content::WebContents* web_contents_;
std::unique_ptr<HeadlessExperimental::Frontend> frontend_;
- DISALLOW_COPY_AND_ASSIGN(HeadlessHandler);
};
} // namespace protocol
diff --git a/headless/lib/browser/protocol/page_handler.h b/headless/lib/browser/protocol/page_handler.h
index 4d1d900..7032f93 100644
--- a/headless/lib/browser/protocol/page_handler.h
+++ b/headless/lib/browser/protocol/page_handler.h
@@ -27,6 +27,10 @@
public:
PageHandler(scoped_refptr<content::DevToolsAgentHost> agent_host,
content::WebContents* web_contents);
+
+ PageHandler(const PageHandler&) = delete;
+ PageHandler& operator=(const PageHandler&) = delete;
+
~PageHandler() override;
// DomainHandler implementation
@@ -64,8 +68,6 @@
base::WeakPtr<content::WebContents> web_contents_;
base::WeakPtrFactory<PageHandler> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(PageHandler);
};
} // namespace protocol
diff --git a/headless/lib/browser/protocol/target_handler.h b/headless/lib/browser/protocol/target_handler.h
index 6051d5e..df08f020 100644
--- a/headless/lib/browser/protocol/target_handler.h
+++ b/headless/lib/browser/protocol/target_handler.h
@@ -16,6 +16,10 @@
class TargetHandler : public DomainHandler, public Target::Backend {
public:
explicit TargetHandler(HeadlessBrowserImpl* browser);
+
+ TargetHandler(const TargetHandler&) = delete;
+ TargetHandler& operator=(const TargetHandler&) = delete;
+
~TargetHandler() override;
// DomainHandler implementation
@@ -36,7 +40,6 @@
private:
HeadlessBrowserImpl* browser_;
- DISALLOW_COPY_AND_ASSIGN(TargetHandler);
};
} // namespace protocol
diff --git a/headless/lib/headless_content_client.h b/headless/lib/headless_content_client.h
index 98870496..84b011ad 100644
--- a/headless/lib/headless_content_client.h
+++ b/headless/lib/headless_content_client.h
@@ -19,6 +19,10 @@
class HeadlessContentClient : public content::ContentClient {
public:
HeadlessContentClient();
+
+ HeadlessContentClient(const HeadlessContentClient&) = delete;
+ HeadlessContentClient& operator=(const HeadlessContentClient&) = delete;
+
~HeadlessContentClient() override;
// content::ContentClient implementation:
@@ -34,8 +38,6 @@
// Used to lock when |origin_trial_policy_| is initialized.
base::Lock origin_trial_policy_lock_;
std::unique_ptr<embedder_support::OriginTrialPolicyImpl> origin_trial_policy_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessContentClient);
};
} // namespace headless
diff --git a/headless/lib/headless_content_main_delegate.h b/headless/lib/headless_content_main_delegate.h
index 4fef66b1..ee940081 100644
--- a/headless/lib/headless_content_main_delegate.h
+++ b/headless/lib/headless_content_main_delegate.h
@@ -34,6 +34,11 @@
explicit HeadlessContentMainDelegate(
std::unique_ptr<HeadlessBrowserImpl> browser);
explicit HeadlessContentMainDelegate(HeadlessBrowser::Options options);
+
+ HeadlessContentMainDelegate(const HeadlessContentMainDelegate&) = delete;
+ HeadlessContentMainDelegate& operator=(const HeadlessContentMainDelegate&) =
+ delete;
+
~HeadlessContentMainDelegate() override;
// content::ContentMainDelegate implementation:
@@ -78,8 +83,6 @@
std::unique_ptr<HeadlessBrowserImpl> browser_;
std::unique_ptr<HeadlessBrowser::Options> options_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessContentMainDelegate);
};
} // namespace headless
diff --git a/headless/lib/headless_crash_reporter_client.h b/headless/lib/headless_crash_reporter_client.h
index 2e13202..83490862 100644
--- a/headless/lib/headless_crash_reporter_client.h
+++ b/headless/lib/headless_crash_reporter_client.h
@@ -17,6 +17,11 @@
class HeadlessCrashReporterClient : public crash_reporter::CrashReporterClient {
public:
HeadlessCrashReporterClient();
+
+ HeadlessCrashReporterClient(const HeadlessCrashReporterClient&) = delete;
+ HeadlessCrashReporterClient& operator=(const HeadlessCrashReporterClient&) =
+ delete;
+
~HeadlessCrashReporterClient() override;
void set_crash_dumps_dir(const base::FilePath& dir) {
@@ -47,8 +52,6 @@
private:
base::FilePath crash_dumps_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessCrashReporterClient);
};
} // namespace headless
diff --git a/headless/lib/renderer/headless_content_renderer_client.h b/headless/lib/renderer/headless_content_renderer_client.h
index 30a3834..bf33e54 100644
--- a/headless/lib/renderer/headless_content_renderer_client.h
+++ b/headless/lib/renderer/headless_content_renderer_client.h
@@ -12,12 +12,15 @@
class HeadlessContentRendererClient : public content::ContentRendererClient {
public:
HeadlessContentRendererClient();
+
+ HeadlessContentRendererClient(const HeadlessContentRendererClient&) = delete;
+ HeadlessContentRendererClient& operator=(
+ const HeadlessContentRendererClient&) = delete;
+
~HeadlessContentRendererClient() override;
private:
void RenderFrameCreated(content::RenderFrame* render_frame) override;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessContentRendererClient);
};
} // namespace headless
diff --git a/headless/lib/renderer/headless_print_render_frame_helper_delegate.h b/headless/lib/renderer/headless_print_render_frame_helper_delegate.h
index 707e849..0547d4a4 100644
--- a/headless/lib/renderer/headless_print_render_frame_helper_delegate.h
+++ b/headless/lib/renderer/headless_print_render_frame_helper_delegate.h
@@ -14,6 +14,12 @@
: public printing::PrintRenderFrameHelper::Delegate {
public:
HeadlessPrintRenderFrameHelperDelegate();
+
+ HeadlessPrintRenderFrameHelperDelegate(
+ const HeadlessPrintRenderFrameHelperDelegate&) = delete;
+ HeadlessPrintRenderFrameHelperDelegate& operator=(
+ const HeadlessPrintRenderFrameHelperDelegate&) = delete;
+
~HeadlessPrintRenderFrameHelperDelegate() override;
private:
@@ -22,8 +28,6 @@
bool ShouldGenerateTaggedPDF() override;
bool OverridePrint(blink::WebLocalFrame* frame) override;
blink::WebElement GetPdfElement(blink::WebLocalFrame* frame) override;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessPrintRenderFrameHelperDelegate);
};
} // namespace headless
diff --git a/headless/lib/utility/headless_content_utility_client.h b/headless/lib/utility/headless_content_utility_client.h
index 8ea47a6..c342ba4 100644
--- a/headless/lib/utility/headless_content_utility_client.h
+++ b/headless/lib/utility/headless_content_utility_client.h
@@ -23,6 +23,11 @@
NetworkBinderCreationCallback callback);
explicit HeadlessContentUtilityClient(const std::string& user_agent);
+
+ HeadlessContentUtilityClient(const HeadlessContentUtilityClient&) = delete;
+ HeadlessContentUtilityClient& operator=(const HeadlessContentUtilityClient&) =
+ delete;
+
~HeadlessContentUtilityClient() override;
// content::ContentUtilityClient:
@@ -32,8 +37,6 @@
private:
const std::string user_agent_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessContentUtilityClient);
};
} // namespace headless
diff --git a/headless/public/headless_browser.h b/headless/public/headless_browser.h
index 37879d70..82b1838 100644
--- a/headless/public/headless_browser.h
+++ b/headless/public/headless_browser.h
@@ -229,6 +229,10 @@
public:
Builder(int argc, const char** argv);
Builder();
+
+ Builder(const Builder&) = delete;
+ Builder& operator=(const Builder&) = delete;
+
~Builder();
// Browser-wide settings.
@@ -270,8 +274,6 @@
private:
Options options_;
-
- DISALLOW_COPY_AND_ASSIGN(Builder);
};
#if !defined(OS_WIN)
diff --git a/headless/public/headless_browser_context.h b/headless/public/headless_browser_context.h
index 597f2ec..a32e9a2c 100644
--- a/headless/public/headless_browser_context.h
+++ b/headless/public/headless_browser_context.h
@@ -36,6 +36,9 @@
public:
class Builder;
+ HeadlessBrowserContext(const HeadlessBrowserContext&) = delete;
+ HeadlessBrowserContext& operator=(const HeadlessBrowserContext&) = delete;
+
virtual ~HeadlessBrowserContext() {}
// Open a new tab. Returns a builder object which can be used to set
@@ -63,14 +66,15 @@
protected:
HeadlessBrowserContext() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserContext);
};
class HEADLESS_EXPORT HeadlessBrowserContext::Builder {
public:
Builder(Builder&&);
+
+ Builder(const Builder&) = delete;
+ Builder& operator=(const Builder&) = delete;
+
~Builder();
// By default if you add mojo bindings, http and https are disabled because
@@ -125,8 +129,6 @@
std::list<MojoBindings> mojo_bindings_;
bool enable_http_and_https_if_mojo_used_;
-
- DISALLOW_COPY_AND_ASSIGN(Builder);
};
} // namespace headless
diff --git a/headless/public/headless_devtools_client.h b/headless/public/headless_devtools_client.h
index 73d955a..f2c042d 100644
--- a/headless/public/headless_devtools_client.h
+++ b/headless/public/headless_devtools_client.h
@@ -124,16 +124,20 @@
// An interface for controlling and receiving events from a devtools target.
class HEADLESS_EXPORT HeadlessDevToolsClient {
public:
+ HeadlessDevToolsClient(const HeadlessDevToolsClient&) = delete;
+ HeadlessDevToolsClient& operator=(const HeadlessDevToolsClient&) = delete;
+
virtual ~HeadlessDevToolsClient() {}
class HEADLESS_EXPORT ExternalHost {
public:
ExternalHost() {}
+
+ ExternalHost(const ExternalHost&) = delete;
+ ExternalHost& operator=(const ExternalHost&) = delete;
+
virtual ~ExternalHost() {}
virtual void SendProtocolMessage(base::span<const uint8_t> message) = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ExternalHost);
};
static std::unique_ptr<HeadlessDevToolsClient> Create();
@@ -185,15 +189,16 @@
class HEADLESS_EXPORT RawProtocolListener {
public:
RawProtocolListener() {}
+
+ RawProtocolListener(const RawProtocolListener&) = delete;
+ RawProtocolListener& operator=(const RawProtocolListener&) = delete;
+
virtual ~RawProtocolListener() {}
// Returns true if the listener handled the message.
virtual bool OnProtocolMessage(
base::span<const uint8_t> json_message,
const base::DictionaryValue& parsed_message) = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RawProtocolListener);
};
virtual void AttachToChannel(
@@ -222,8 +227,6 @@
friend class HeadlessDevToolsClientImpl;
HeadlessDevToolsClient() {}
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsClient);
};
} // namespace headless
diff --git a/headless/public/headless_web_contents.h b/headless/public/headless_web_contents.h
index 0d8249f..3c937038 100644
--- a/headless/public/headless_web_contents.h
+++ b/headless/public/headless_web_contents.h
@@ -28,6 +28,9 @@
public:
class HEADLESS_EXPORT Builder;
+ HeadlessWebContents(const HeadlessWebContents&) = delete;
+ HeadlessWebContents& operator=(const HeadlessWebContents&) = delete;
+
virtual ~HeadlessWebContents() {}
class HEADLESS_EXPORT Observer {
@@ -98,12 +101,13 @@
protected:
HeadlessWebContents() {}
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessWebContents);
};
class HEADLESS_EXPORT HeadlessWebContents::Builder {
public:
+ Builder(const Builder&) = delete;
+ Builder& operator=(const Builder&) = delete;
+
~Builder();
Builder(Builder&&);
@@ -135,8 +139,6 @@
GURL initial_url_ = GURL("about:blank");
gfx::Size window_size_;
bool enable_begin_frame_control_ = false;
-
- DISALLOW_COPY_AND_ASSIGN(Builder);
};
} // namespace headless
diff --git a/headless/public/internal/headless_devtools_client_impl.h b/headless/public/internal/headless_devtools_client_impl.h
index c5363f0..c1c31ae 100644
--- a/headless/public/internal/headless_devtools_client_impl.h
+++ b/headless/public/internal/headless_devtools_client_impl.h
@@ -61,6 +61,11 @@
public internal::MessageDispatcher {
public:
HeadlessDevToolsClientImpl();
+
+ HeadlessDevToolsClientImpl(const HeadlessDevToolsClientImpl&) = delete;
+ HeadlessDevToolsClientImpl& operator=(const HeadlessDevToolsClientImpl&) =
+ delete;
+
~HeadlessDevToolsClientImpl() override;
// HeadlessDevToolsClient implementation:
@@ -226,8 +231,6 @@
tracing::ExperimentalDomain tracing_domain_;
scoped_refptr<base::SequencedTaskRunner> browser_main_thread_;
base::WeakPtrFactory<HeadlessDevToolsClientImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsClientImpl);
};
} // namespace headless
diff --git a/headless/test/headless_browser_browsertest.cc b/headless/test/headless_browser_browsertest.cc
index 3a48597..c24e9e2 100644
--- a/headless/test/headless_browser_browsertest.cc
+++ b/headless/test/headless_browser_browsertest.cc
@@ -342,6 +342,9 @@
base::Unretained(this)));
}
+ CookieSetter(const CookieSetter&) = delete;
+ CookieSetter& operator=(const CookieSetter&) = delete;
+
~CookieSetter() {
web_contents_->GetDevToolsTarget()->DetachClient(devtools_client_.get());
}
@@ -361,8 +364,6 @@
std::unique_ptr<HeadlessDevToolsClient> devtools_client_;
std::unique_ptr<network::SetCookieResult> result_;
-
- DISALLOW_COPY_AND_ASSIGN(CookieSetter);
};
} // namespace
@@ -571,6 +572,9 @@
base::BindOnce(&TraceHelper::OnTracingStarted, base::Unretained(this)));
}
+ TraceHelper(const TraceHelper&) = delete;
+ TraceHelper& operator=(const TraceHelper&) = delete;
+
~TraceHelper() override {
target_->DetachClient(client_.get());
EXPECT_FALSE(target_->IsAttached());
@@ -604,8 +608,6 @@
std::unique_ptr<HeadlessDevToolsClient> client_;
std::unique_ptr<base::ListValue> tracing_data_;
-
- DISALLOW_COPY_AND_ASSIGN(TraceHelper);
};
} // namespace
diff --git a/headless/test/headless_browser_test.cc b/headless/test/headless_browser_test.cc
index 73154d7..85012c7 100644
--- a/headless/test/headless_browser_test.cc
+++ b/headless/test/headless_browser_test.cc
@@ -82,6 +82,9 @@
base::Unretained(this)));
}
+ EvaluateHelper(const EvaluateHelper&) = delete;
+ EvaluateHelper& operator=(const EvaluateHelper&) = delete;
+
~EvaluateHelper() {
web_contents_->GetDevToolsTarget()->DetachClient(devtools_client_.get());
}
@@ -101,8 +104,6 @@
std::unique_ptr<HeadlessDevToolsClient> devtools_client_;
std::unique_ptr<runtime::EvaluateResult> result_;
-
- DISALLOW_COPY_AND_ASSIGN(EvaluateHelper);
};
} // namespace
diff --git a/headless/test/headless_browser_test.h b/headless/test/headless_browser_test.h
index 78efcd3..274e97f 100644
--- a/headless/test/headless_browser_test.h
+++ b/headless/test/headless_browser_test.h
@@ -31,6 +31,10 @@
public:
LoadObserver(HeadlessDevToolsClient* devtools_client,
base::OnceClosure callback);
+
+ LoadObserver(const LoadObserver&) = delete;
+ LoadObserver& operator=(const LoadObserver&) = delete;
+
~LoadObserver() override;
// page::Observer implementation:
@@ -47,8 +51,6 @@
HeadlessDevToolsClient* devtools_client_; // Not owned.
bool navigation_succeeded_;
-
- DISALLOW_COPY_AND_ASSIGN(LoadObserver);
};
// Base class for tests which require a full instance of the headless browser.
diff --git a/headless/test/headless_origin_trials_browsertest.cc b/headless/test/headless_origin_trials_browsertest.cc
index 2ceaff6..8f273eb6 100644
--- a/headless/test/headless_origin_trials_browsertest.cc
+++ b/headless/test/headless_origin_trials_browsertest.cc
@@ -24,6 +24,12 @@
class HeadlessOriginTrialsBrowserTest : public HeadlessBrowserTest {
public:
HeadlessOriginTrialsBrowserTest() = default;
+
+ HeadlessOriginTrialsBrowserTest(const HeadlessOriginTrialsBrowserTest&) =
+ delete;
+ HeadlessOriginTrialsBrowserTest& operator=(
+ const HeadlessOriginTrialsBrowserTest&) = delete;
+
~HeadlessOriginTrialsBrowserTest() override = default;
void SetUpOnMainThread() override {
@@ -50,8 +56,6 @@
private:
std::unique_ptr<URLLoaderInterceptor> url_loader_interceptor_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadlessOriginTrialsBrowserTest);
};
IN_PROC_BROWSER_TEST_F(HeadlessOriginTrialsBrowserTest,
diff --git a/headless/test/headless_test_launcher.cc b/headless/test/headless_test_launcher.cc
index fdc457f8..4c4625c 100644
--- a/headless/test/headless_test_launcher.cc
+++ b/headless/test/headless_test_launcher.cc
@@ -41,6 +41,11 @@
class HeadlessTestLauncherDelegate : public content::TestLauncherDelegate {
public:
HeadlessTestLauncherDelegate() = default;
+
+ HeadlessTestLauncherDelegate(const HeadlessTestLauncherDelegate&) = delete;
+ HeadlessTestLauncherDelegate& operator=(const HeadlessTestLauncherDelegate&) =
+ delete;
+
~HeadlessTestLauncherDelegate() override = default;
// content::TestLauncherDelegate implementation:
@@ -60,9 +65,6 @@
new HeadlessBrowserImplForTest(options_builder.Build()));
return new HeadlessContentMainDelegate(std::move(browser));
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(HeadlessTestLauncherDelegate);
};
} // namespace
diff --git a/headless/test/test_network_interceptor.h b/headless/test/test_network_interceptor.h
index c5c8edc..9278f92 100644
--- a/headless/test/test_network_interceptor.h
+++ b/headless/test/test_network_interceptor.h
@@ -19,6 +19,10 @@
class Impl;
TestNetworkInterceptor();
+
+ TestNetworkInterceptor(const TestNetworkInterceptor&) = delete;
+ TestNetworkInterceptor& operator=(const TestNetworkInterceptor&) = delete;
+
~TestNetworkInterceptor();
struct Response {
@@ -54,8 +58,6 @@
std::unique_ptr<content::URLLoaderInterceptor> interceptor_;
base::WeakPtrFactory<TestNetworkInterceptor> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(TestNetworkInterceptor);
};
} // namespace headless
diff --git a/ipc/ipc_channel_mojo.h b/ipc/ipc_channel_mojo.h
index dc2b930cc..e6da2c59 100644
--- a/ipc/ipc_channel_mojo.h
+++ b/ipc/ipc_channel_mojo.h
@@ -66,6 +66,9 @@
const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
const scoped_refptr<base::SingleThreadTaskRunner>& proxy_task_runner);
+ ChannelMojo(const ChannelMojo&) = delete;
+ ChannelMojo& operator=(const ChannelMojo&) = delete;
+
~ChannelMojo() override;
// Channel implementation
@@ -132,8 +135,6 @@
associated_interfaces_;
base::WeakPtrFactory<ChannelMojo> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ChannelMojo);
};
} // namespace IPC
diff --git a/ipc/ipc_channel_mojo_unittest.cc b/ipc/ipc_channel_mojo_unittest.cc
index d41d61e..f50e7e15 100644
--- a/ipc/ipc_channel_mojo_unittest.cc
+++ b/ipc/ipc_channel_mojo_unittest.cc
@@ -1165,6 +1165,10 @@
class SyncReplyReader : public IPC::MessageReplyDeserializer {
public:
explicit SyncReplyReader(int32_t* storage) : storage_(storage) {}
+
+ SyncReplyReader(const SyncReplyReader&) = delete;
+ SyncReplyReader& operator=(const SyncReplyReader&) = delete;
+
~SyncReplyReader() override = default;
private:
@@ -1177,8 +1181,6 @@
}
int32_t* storage_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncReplyReader);
};
TEST_F(IPCChannelProxyMojoTest, SyncAssociatedInterface) {
@@ -1227,6 +1229,10 @@
public IPC::Listener {
public:
SimpleTestClientImpl() = default;
+
+ SimpleTestClientImpl(const SimpleTestClientImpl&) = delete;
+ SimpleTestClientImpl& operator=(const SimpleTestClientImpl&) = delete;
+
~SimpleTestClientImpl() override = default;
void set_driver(IPC::mojom::SimpleTestDriver* driver) { driver_ = driver; }
@@ -1291,8 +1297,6 @@
IPC::Sender* sync_sender_ = nullptr;
IPC::mojom::SimpleTestDriver* driver_ = nullptr;
std::unique_ptr<base::RunLoop> run_loop_;
-
- DISALLOW_COPY_AND_ASSIGN(SimpleTestClientImpl);
};
DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT_WITH_CUSTOM_FIXTURE(SyncAssociatedInterface,
@@ -1388,6 +1392,11 @@
base::OnceClosure quit_closure)
: expected_values_(expected_values),
quit_closure_(std::move(quit_closure)) {}
+
+ ExpectValueSequenceListener(const ExpectValueSequenceListener&) = delete;
+ ExpectValueSequenceListener& operator=(const ExpectValueSequenceListener&) =
+ delete;
+
~ExpectValueSequenceListener() override = default;
// IPC::Listener:
@@ -1406,8 +1415,6 @@
private:
base::queue<int32_t>* expected_values_;
base::OnceClosure quit_closure_;
-
- DISALLOW_COPY_AND_ASSIGN(ExpectValueSequenceListener);
};
DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT_WITH_CUSTOM_FIXTURE(CreatePausedClient,
diff --git a/ipc/ipc_channel_reader.h b/ipc/ipc_channel_reader.h
index 49d20f2c..d95c2195 100644
--- a/ipc/ipc_channel_reader.h
+++ b/ipc/ipc_channel_reader.h
@@ -32,6 +32,10 @@
class COMPONENT_EXPORT(IPC) ChannelReader {
public:
explicit ChannelReader(Listener* listener);
+
+ ChannelReader(const ChannelReader&) = delete;
+ ChannelReader& operator=(const ChannelReader&) = delete;
+
virtual ~ChannelReader();
void set_listener(Listener* listener) { listener_ = listener; }
@@ -157,8 +161,6 @@
// This is not a constant because we update it to reflect the reality
// of std::string::reserve() implementation.
size_t max_input_buffer_size_;
-
- DISALLOW_COPY_AND_ASSIGN(ChannelReader);
};
} // namespace internal
diff --git a/ipc/ipc_cpu_perftest.cc b/ipc/ipc_cpu_perftest.cc
index 9e15961..d1e886c 100644
--- a/ipc/ipc_cpu_perftest.cc
+++ b/ipc/ipc_cpu_perftest.cc
@@ -75,6 +75,9 @@
DCHECK_EQ(inital_cpu_usage, 0.0);
}
+ PerfCpuLogger(const PerfCpuLogger&) = delete;
+ PerfCpuLogger& operator=(const PerfCpuLogger&) = delete;
+
~PerfCpuLogger() {
double result = process_metrics_->GetPlatformIndependentCPUUsage();
base::LogPerfResult(test_name_.c_str(), result, "%");
@@ -83,8 +86,6 @@
private:
std::string test_name_;
std::unique_ptr<base::ProcessMetrics> process_metrics_;
-
- DISALLOW_COPY_AND_ASSIGN(PerfCpuLogger);
};
MULTIPROCESS_TEST_MAIN(MojoPerfTestClientTestChildMain) {
diff --git a/ipc/ipc_message_pipe_reader.h b/ipc/ipc_message_pipe_reader.h
index 2c30de1..d09b4f3 100644
--- a/ipc/ipc_message_pipe_reader.h
+++ b/ipc/ipc_message_pipe_reader.h
@@ -74,6 +74,10 @@
mojo::PendingAssociatedReceiver<mojom::Channel> receiver,
scoped_refptr<base::SequencedTaskRunner> task_runner,
Delegate* delegate);
+
+ MessagePipeReader(const MessagePipeReader&) = delete;
+ MessagePipeReader& operator=(const MessagePipeReader&) = delete;
+
~MessagePipeReader() override;
void FinishInitializationOnIOThread(base::ProcessId self_pid);
@@ -115,8 +119,6 @@
mojo::AssociatedReceiver<mojom::Channel> receiver_;
base::ThreadChecker thread_checker_;
base::WeakPtrFactory<MessagePipeReader> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MessagePipeReader);
};
} // namespace internal
diff --git a/ipc/ipc_mojo_bootstrap.cc b/ipc/ipc_mojo_bootstrap.cc
index 18b4dc9..0a62612 100644
--- a/ipc/ipc_mojo_bootstrap.cc
+++ b/ipc/ipc_mojo_bootstrap.cc
@@ -72,6 +72,10 @@
this, "IPCChannel", nullptr);
}
+ ControllerMemoryDumpProvider(const ControllerMemoryDumpProvider&) = delete;
+ ControllerMemoryDumpProvider& operator=(const ControllerMemoryDumpProvider&) =
+ delete;
+
~ControllerMemoryDumpProvider() override {
base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider(
this);
@@ -94,8 +98,6 @@
private:
base::Lock lock_;
std::set<ChannelAssociatedGroupController*> controllers_;
-
- DISALLOW_COPY_AND_ASSIGN(ControllerMemoryDumpProvider);
};
ControllerMemoryDumpProvider& GetMemoryDumpProvider() {
@@ -436,6 +438,9 @@
MessageWrapper(MessageWrapper&& other)
: controller_(other.controller_), value_(std::move(other.value_)) {}
+ MessageWrapper(const MessageWrapper&) = delete;
+ MessageWrapper& operator=(const MessageWrapper&) = delete;
+
~MessageWrapper() {
if (value_.associated_endpoint_handles()->empty())
return;
@@ -458,8 +463,6 @@
private:
ChannelAssociatedGroupController* controller_ = nullptr;
mojo::Message value_;
-
- DISALLOW_COPY_AND_ASSIGN(MessageWrapper);
};
class Endpoint : public base::RefCountedThreadSafe<Endpoint>,
@@ -1129,6 +1132,9 @@
associated_group_(controller),
handle_(std::move(handle)) {}
+ MojoBootstrapImpl(const MojoBootstrapImpl&) = delete;
+ MojoBootstrapImpl& operator=(const MojoBootstrapImpl&) = delete;
+
~MojoBootstrapImpl() override {
controller_->ShutDown();
}
@@ -1162,8 +1168,6 @@
mojo::AssociatedGroup associated_group_;
mojo::ScopedMessagePipeHandle handle_;
-
- DISALLOW_COPY_AND_ASSIGN(MojoBootstrapImpl);
};
} // namespace
diff --git a/ipc/ipc_mojo_bootstrap_unittest.cc b/ipc/ipc_mojo_bootstrap_unittest.cc
index 262067b..9e33959 100644
--- a/ipc/ipc_mojo_bootstrap_unittest.cc
+++ b/ipc/ipc_mojo_bootstrap_unittest.cc
@@ -68,6 +68,9 @@
receiver_.set_disconnect_handler(disconnect_run_loop_.QuitClosure());
}
+ PeerPidReceiver(const PeerPidReceiver&) = delete;
+ PeerPidReceiver& operator=(const PeerPidReceiver&) = delete;
+
~PeerPidReceiver() override {
bool expected_message =
message_expectation_ != MessageExpectation::kNotExpected;
@@ -106,8 +109,6 @@
int32_t peer_pid_ = -1;
bool received_message_ = false;
base::RunLoop disconnect_run_loop_;
-
- DISALLOW_COPY_AND_ASSIGN(PeerPidReceiver);
};
class IPCMojoBootstrapTest : public testing::Test {
diff --git a/ipc/ipc_perftest_util.h b/ipc/ipc_perftest_util.h
index d5ec63e..bf7791bd 100644
--- a/ipc/ipc_perftest_util.h
+++ b/ipc/ipc_perftest_util.h
@@ -71,6 +71,9 @@
public:
explicit LockThreadAffinity(int cpu_number);
+ LockThreadAffinity(const LockThreadAffinity&) = delete;
+ LockThreadAffinity& operator=(const LockThreadAffinity&) = delete;
+
~LockThreadAffinity();
private:
@@ -80,8 +83,6 @@
#elif defined(OS_LINUX) || defined(OS_CHROMEOS)
cpu_set_t old_cpuset_;
#endif
-
- DISALLOW_COPY_AND_ASSIGN(LockThreadAffinity);
};
// Avoid core 0 due to conflicts with Intel's Power Gadget.
diff --git a/ipc/ipc_sync_channel.h b/ipc/ipc_sync_channel.h
index f83f4d6..ad7a0a2 100644
--- a/ipc/ipc_sync_channel.h
+++ b/ipc/ipc_sync_channel.h
@@ -102,6 +102,9 @@
void RemoveListenerTaskRunner(int32_t routing_id);
+ SyncChannel(const SyncChannel&) = delete;
+ SyncChannel& operator=(const SyncChannel&) = delete;
+
~SyncChannel() override;
bool Send(Message* message) override;
@@ -245,8 +248,6 @@
// Tracks SyncMessageFilters created before complete channel initialization.
std::vector<scoped_refptr<SyncMessageFilter>> pre_init_sync_message_filters_;
-
- DISALLOW_COPY_AND_ASSIGN(SyncChannel);
};
} // namespace IPC
diff --git a/ipc/ipc_sync_channel_unittest.cc b/ipc/ipc_sync_channel_unittest.cc
index 9c7a087..7a73b9cd 100644
--- a/ipc/ipc_sync_channel_unittest.cc
+++ b/ipc/ipc_sync_channel_unittest.cc
@@ -78,6 +78,9 @@
base::WaitableEvent::InitialState::NOT_SIGNALED),
is_shutdown_(false) {}
+ Worker(const Worker&) = delete;
+ Worker& operator=(const Worker&) = delete;
+
~Worker() override {
// Shutdown() must be called before destruction.
CHECK(is_shutdown_);
@@ -252,8 +255,6 @@
base::WaitableEvent shutdown_event_;
bool is_shutdown_;
-
- DISALLOW_COPY_AND_ASSIGN(Worker);
};
diff --git a/ipc/ipc_test_base.h b/ipc/ipc_test_base.h
index 67dd7b8..1e023c5 100644
--- a/ipc/ipc_test_base.h
+++ b/ipc/ipc_test_base.h
@@ -22,6 +22,10 @@
class IPCChannelMojoTestBase : public testing::Test {
public:
IPCChannelMojoTestBase();
+
+ IPCChannelMojoTestBase(const IPCChannelMojoTestBase&) = delete;
+ IPCChannelMojoTestBase& operator=(const IPCChannelMojoTestBase&) = delete;
+
~IPCChannelMojoTestBase() override;
void Init(const std::string& test_client_name);
@@ -50,8 +54,6 @@
mojo::core::test::MultiprocessTestHelper helper_;
std::unique_ptr<IPC::Channel> channel_;
-
- DISALLOW_COPY_AND_ASSIGN(IPCChannelMojoTestBase);
};
class IpcChannelMojoTestClient {
diff --git a/ipc/ipc_test_sink.h b/ipc/ipc_test_sink.h
index e1cfbed..70aca5a 100644
--- a/ipc/ipc_test_sink.h
+++ b/ipc/ipc_test_sink.h
@@ -83,6 +83,10 @@
class TestSink : public Channel {
public:
TestSink();
+
+ TestSink(const TestSink&) = delete;
+ TestSink& operator=(const TestSink&) = delete;
+
~TestSink() override;
// Interface in IPC::Channel. This copies the message to the sink and then
@@ -132,8 +136,6 @@
// The actual list of received messages.
std::vector<Message> messages_;
base::ObserverList<Listener>::Unchecked filter_list_;
-
- DISALLOW_COPY_AND_ASSIGN(TestSink);
};
} // namespace IPC
diff --git a/ipc/message_router.h b/ipc/message_router.h
index 731c4eb..d916e86 100644
--- a/ipc/message_router.h
+++ b/ipc/message_router.h
@@ -36,6 +36,10 @@
class COMPONENT_EXPORT(IPC) MessageRouter : public Listener, public Sender {
public:
MessageRouter();
+
+ MessageRouter(const MessageRouter&) = delete;
+ MessageRouter& operator=(const MessageRouter&) = delete;
+
~MessageRouter() override;
// Implemented by subclasses to handle control messages
@@ -65,8 +69,6 @@
private:
// A list of all listeners with assigned routing IDs.
base::IDMap<Listener*> routes_;
-
- DISALLOW_COPY_AND_ASSIGN(MessageRouter);
};
} // namespace IPC
diff --git a/ipc/message_view.h b/ipc/message_view.h
index 5461ffa..c7c192a 100644
--- a/ipc/message_view.h
+++ b/ipc/message_view.h
@@ -23,6 +23,10 @@
base::span<const uint8_t> bytes,
absl::optional<std::vector<mojo::native::SerializedHandlePtr>> handles);
MessageView(MessageView&&);
+
+ MessageView(const MessageView&) = delete;
+ MessageView& operator=(const MessageView&) = delete;
+
~MessageView();
MessageView& operator=(MessageView&&);
@@ -33,8 +37,6 @@
private:
base::span<const uint8_t> bytes_;
absl::optional<std::vector<mojo::native::SerializedHandlePtr>> handles_;
-
- DISALLOW_COPY_AND_ASSIGN(MessageView);
};
} // namespace IPC
diff --git a/jingle/glue/network_service_async_socket.h b/jingle/glue/network_service_async_socket.h
index 23ac759..13113e4 100644
--- a/jingle/glue/network_service_async_socket.h
+++ b/jingle/glue/network_service_async_socket.h
@@ -42,6 +42,10 @@
size_t write_buf_size,
const net::NetworkTrafficAnnotationTag& traffic_annotation);
+ NetworkServiceAsyncSocket(const NetworkServiceAsyncSocket&) = delete;
+ NetworkServiceAsyncSocket& operator=(const NetworkServiceAsyncSocket&) =
+ delete;
+
// Does not raise any signals.
~NetworkServiceAsyncSocket() override;
@@ -262,8 +266,6 @@
// NetworkServiceAsyncSocket is not reused, hence annotation can be added in
// constructor and used in all subsequent writes.
const net::NetworkTrafficAnnotationTag traffic_annotation_;
-
- DISALLOW_COPY_AND_ASSIGN(NetworkServiceAsyncSocket);
};
} // namespace jingle_glue
diff --git a/jingle/glue/network_service_async_socket_unittest.cc b/jingle/glue/network_service_async_socket_unittest.cc
index 4cae011..515231ac 100644
--- a/jingle/glue/network_service_async_socket_unittest.cc
+++ b/jingle/glue/network_service_async_socket_unittest.cc
@@ -55,6 +55,9 @@
public:
AsyncSocketDataProvider() : has_pending_read_(false) {}
+ AsyncSocketDataProvider(const AsyncSocketDataProvider&) = delete;
+ AsyncSocketDataProvider& operator=(const AsyncSocketDataProvider&) = delete;
+
~AsyncSocketDataProvider() override {
EXPECT_TRUE(writes_.empty());
EXPECT_TRUE(reads_.empty());
@@ -126,8 +129,6 @@
bool has_pending_read_;
base::circular_deque<net::MockWrite> writes_;
-
- DISALLOW_COPY_AND_ASSIGN(AsyncSocketDataProvider);
};
class MockProxyResolvingSocket : public network::mojom::ProxyResolvingSocket {
@@ -147,6 +148,10 @@
};
MockProxyResolvingSocket() {}
+
+ MockProxyResolvingSocket(const MockProxyResolvingSocket&) = delete;
+ MockProxyResolvingSocket& operator=(const MockProxyResolvingSocket&) = delete;
+
~MockProxyResolvingSocket() override {}
void Connect(mojo::PendingRemote<network::mojom::SocketObserver> observer,
@@ -186,14 +191,18 @@
mojo::Remote<network::mojom::SocketObserver> observer_;
mojo::ScopedDataPipeProducerHandle receive_pipe_handle_;
mojo::ScopedDataPipeConsumerHandle send_pipe_handle_;
-
- DISALLOW_COPY_AND_ASSIGN(MockProxyResolvingSocket);
};
class MockProxyResolvingSocketFactory
: public network::mojom::ProxyResolvingSocketFactory {
public:
explicit MockProxyResolvingSocketFactory() : socket_raw_(nullptr) {}
+
+ MockProxyResolvingSocketFactory(const MockProxyResolvingSocketFactory&) =
+ delete;
+ MockProxyResolvingSocketFactory& operator=(
+ const MockProxyResolvingSocketFactory&) = delete;
+
~MockProxyResolvingSocketFactory() override {}
// mojom::ProxyResolvingSocketFactory implementation.
@@ -224,8 +233,6 @@
// Owned by |proxy_resolving_socket_receivers_|.
MockProxyResolvingSocket* socket_raw_;
-
- DISALLOW_COPY_AND_ASSIGN(MockProxyResolvingSocketFactory);
};
void MockProxyResolvingSocket::RunEvents(std::vector<Event>&& events) {
diff --git a/jingle/glue/task_pump.h b/jingle/glue/task_pump.h
index 4eefcf2..dfe10c2 100644
--- a/jingle/glue/task_pump.h
+++ b/jingle/glue/task_pump.h
@@ -20,6 +20,9 @@
public:
TaskPump();
+ TaskPump(const TaskPump&) = delete;
+ TaskPump& operator=(const TaskPump&) = delete;
+
~TaskPump() override;
// rtc::TaskRunner implementation.
@@ -38,8 +41,6 @@
SEQUENCE_CHECKER(sequence_checker_);
base::WeakPtrFactory<TaskPump> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(TaskPump);
};
} // namespace jingle_glue
diff --git a/jingle/glue/thread_wrapper.h b/jingle/glue/thread_wrapper.h
index 12ffb51a..6947f6e 100644
--- a/jingle/glue/thread_wrapper.h
+++ b/jingle/glue/thread_wrapper.h
@@ -73,6 +73,9 @@
SampledDurationCallback task_latency_callback,
SampledDurationCallback task_duration_callback);
+ JingleThreadWrapper(const JingleThreadWrapper&) = delete;
+ JingleThreadWrapper& operator=(const JingleThreadWrapper&) = delete;
+
~JingleThreadWrapper() override;
// Sets whether the thread can be used to send messages
@@ -175,8 +178,6 @@
base::WeakPtr<JingleThreadWrapper> weak_ptr_;
base::WeakPtrFactory<JingleThreadWrapper> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(JingleThreadWrapper);
};
} // namespace jingle_glue
diff --git a/jingle/notifier/base/fake_base_task.h b/jingle/notifier/base/fake_base_task.h
index e222ff5..4ef1574 100644
--- a/jingle/notifier/base/fake_base_task.h
+++ b/jingle/notifier/base/fake_base_task.h
@@ -21,6 +21,10 @@
class FakeBaseTask {
public:
FakeBaseTask();
+
+ FakeBaseTask(const FakeBaseTask&) = delete;
+ FakeBaseTask& operator=(const FakeBaseTask&) = delete;
+
~FakeBaseTask();
base::WeakPtr<jingle_xmpp::XmppTaskParentInterface> AsWeakPtr();
@@ -28,8 +32,6 @@
private:
jingle_glue::TaskPump task_pump_;
base::WeakPtr<jingle_xmpp::XmppTaskParentInterface> base_task_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBaseTask);
};
} // namespace notifier
diff --git a/jingle/notifier/base/gaia_token_pre_xmpp_auth.cc b/jingle/notifier/base/gaia_token_pre_xmpp_auth.cc
index 48955b7..69470d8 100644
--- a/jingle/notifier/base/gaia_token_pre_xmpp_auth.cc
+++ b/jingle/notifier/base/gaia_token_pre_xmpp_auth.cc
@@ -26,6 +26,9 @@
: jingle_xmpp::SaslCookieMechanism(
mechanism, username, cookie, token_service) {}
+ GaiaCookieMechanism(const GaiaCookieMechanism&) = delete;
+ GaiaCookieMechanism& operator=(const GaiaCookieMechanism&) = delete;
+
~GaiaCookieMechanism() override {}
jingle_xmpp::XmlElement* StartSaslAuth() override {
@@ -42,9 +45,6 @@
auth->SetAttr(QN_GOOGLE_AUTH_CLIENT_USES_FULL_BIND_RESULT, "true");
return auth;
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GaiaCookieMechanism);
};
} // namespace
diff --git a/jingle/notifier/base/weak_xmpp_client.h b/jingle/notifier/base/weak_xmpp_client.h
index d685ff3..a15ccca 100644
--- a/jingle/notifier/base/weak_xmpp_client.h
+++ b/jingle/notifier/base/weak_xmpp_client.h
@@ -28,6 +28,9 @@
public:
explicit WeakXmppClient(jingle_xmpp::TaskParent* parent);
+ WeakXmppClient(const WeakXmppClient&) = delete;
+ WeakXmppClient& operator=(const WeakXmppClient&) = delete;
+
~WeakXmppClient() override;
// Returns a weak pointer that is invalidated when the XmppClient
@@ -49,8 +52,6 @@
// SupportsWeakPtr since we want to invalidate in other places
// besides the destructor.
base::WeakPtrFactory<WeakXmppClient> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(WeakXmppClient);
};
} // namespace notifier
diff --git a/jingle/notifier/listener/fake_push_client.h b/jingle/notifier/listener/fake_push_client.h
index 3b325c1..8f5d029 100644
--- a/jingle/notifier/listener/fake_push_client.h
+++ b/jingle/notifier/listener/fake_push_client.h
@@ -19,6 +19,10 @@
class FakePushClient : public PushClient {
public:
FakePushClient();
+
+ FakePushClient(const FakePushClient&) = delete;
+ FakePushClient& operator=(const FakePushClient&) = delete;
+
~FakePushClient() override;
// PushClient implementation.
@@ -54,8 +58,6 @@
std::string token_;
std::vector<Notification> sent_notifications_;
int sent_pings_;
-
- DISALLOW_COPY_AND_ASSIGN(FakePushClient);
};
} // namespace notifier
diff --git a/jingle/notifier/listener/non_blocking_push_client.h b/jingle/notifier/listener/non_blocking_push_client.h
index 72f404d8..0daba36 100644
--- a/jingle/notifier/listener/non_blocking_push_client.h
+++ b/jingle/notifier/listener/non_blocking_push_client.h
@@ -39,6 +39,10 @@
explicit NonBlockingPushClient(
const scoped_refptr<base::SingleThreadTaskRunner>& delegate_task_runner,
CreateBlockingPushClientCallback create_blocking_push_client_callback);
+
+ NonBlockingPushClient(const NonBlockingPushClient&) = delete;
+ NonBlockingPushClient& operator=(const NonBlockingPushClient&) = delete;
+
~NonBlockingPushClient() override;
// PushClient implementation.
@@ -67,8 +71,6 @@
base::ObserverList<PushClientObserver>::Unchecked observers_;
base::WeakPtrFactory<NonBlockingPushClient> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(NonBlockingPushClient);
};
} // namespace notifier
diff --git a/jingle/notifier/listener/push_notifications_send_update_task.h b/jingle/notifier/listener/push_notifications_send_update_task.h
index cb051c49..9f64e16f 100644
--- a/jingle/notifier/listener/push_notifications_send_update_task.h
+++ b/jingle/notifier/listener/push_notifications_send_update_task.h
@@ -24,6 +24,12 @@
public:
PushNotificationsSendUpdateTask(
jingle_xmpp::XmppTaskParentInterface* parent, const Notification& notification);
+
+ PushNotificationsSendUpdateTask(const PushNotificationsSendUpdateTask&) =
+ delete;
+ PushNotificationsSendUpdateTask& operator=(
+ const PushNotificationsSendUpdateTask&) = delete;
+
~PushNotificationsSendUpdateTask() override;
// Overridden from jingle_xmpp::XmppTask.
@@ -38,8 +44,6 @@
FRIEND_TEST_ALL_PREFIXES(PushNotificationsSendUpdateTaskTest,
MakeUpdateMessage);
-
- DISALLOW_COPY_AND_ASSIGN(PushNotificationsSendUpdateTask);
};
} // namespace notifier
diff --git a/jingle/notifier/listener/push_notifications_subscribe_task.h b/jingle/notifier/listener/push_notifications_subscribe_task.h
index 1d251ce..deaaeb5 100644
--- a/jingle/notifier/listener/push_notifications_subscribe_task.h
+++ b/jingle/notifier/listener/push_notifications_subscribe_task.h
@@ -30,6 +30,12 @@
PushNotificationsSubscribeTask(jingle_xmpp::XmppTaskParentInterface* parent,
const SubscriptionList& subscriptions,
Delegate* delegate);
+
+ PushNotificationsSubscribeTask(const PushNotificationsSubscribeTask&) =
+ delete;
+ PushNotificationsSubscribeTask& operator=(
+ const PushNotificationsSubscribeTask&) = delete;
+
~PushNotificationsSubscribeTask() override;
// Overridden from XmppTask.
@@ -48,8 +54,6 @@
FRIEND_TEST_ALL_PREFIXES(PushNotificationsSubscribeTaskTest,
MakeSubscriptionMessage);
-
- DISALLOW_COPY_AND_ASSIGN(PushNotificationsSubscribeTask);
};
typedef PushNotificationsSubscribeTask::Delegate
diff --git a/jingle/notifier/listener/xmpp_push_client.h b/jingle/notifier/listener/xmpp_push_client.h
index 58f4752..a3fe7ee7 100644
--- a/jingle/notifier/listener/xmpp_push_client.h
+++ b/jingle/notifier/listener/xmpp_push_client.h
@@ -41,6 +41,10 @@
public SendPingTaskDelegate {
public:
explicit XmppPushClient(const NotifierOptions& notifier_options);
+
+ XmppPushClient(const XmppPushClient&) = delete;
+ XmppPushClient& operator=(const XmppPushClient&) = delete;
+
~XmppPushClient() override;
// PushClient implementation.
@@ -85,8 +89,6 @@
base::WeakPtr<jingle_xmpp::XmppTaskParentInterface> base_task_;
std::vector<Notification> pending_notifications_to_send_;
-
- DISALLOW_COPY_AND_ASSIGN(XmppPushClient);
};
} // namespace notifier
diff --git a/native_client_sdk/src/libraries/nacl_io/event_listener.h b/native_client_sdk/src/libraries/nacl_io/event_listener.h
index 1fcedb3..1acfa1f 100644
--- a/native_client_sdk/src/libraries/nacl_io/event_listener.h
+++ b/native_client_sdk/src/libraries/nacl_io/event_listener.h
@@ -91,6 +91,10 @@
class EventListener {
public:
EventListener();
+
+ EventListener(const EventListener&) = delete;
+ EventListener& operator=(const EventListener&) = delete;
+
~EventListener();
// Called by EventEmitter to signal the Listener that a new event is
@@ -99,7 +103,6 @@
protected:
pthread_cond_t signal_cond_;
- DISALLOW_COPY_AND_ASSIGN(EventListener);
};
// EventListenerLock
@@ -111,6 +114,10 @@
class EventListenerLock : public EventListener {
public:
explicit EventListenerLock(EventEmitter* emitter);
+
+ EventListenerLock(const EventListenerLock&) = delete;
+ EventListenerLock& operator=(const EventListenerLock&) = delete;
+
~EventListenerLock();
// Called by EventEmitter to signal the Listener that a new event is
@@ -130,7 +137,6 @@
private:
EventEmitter* emitter_;
sdk_util::AutoLock* lock_;
- DISALLOW_COPY_AND_ASSIGN(EventListenerLock);
};
class EventListenerPoll : public EventListener {
diff --git a/native_client_sdk/src/libraries/nacl_io/fifo_char.h b/native_client_sdk/src/libraries/nacl_io/fifo_char.h
index 8f026f2..2061b46 100644
--- a/native_client_sdk/src/libraries/nacl_io/fifo_char.h
+++ b/native_client_sdk/src/libraries/nacl_io/fifo_char.h
@@ -19,6 +19,10 @@
class FIFOChar : public FIFOInterface {
public:
explicit FIFOChar(size_t size);
+
+ FIFOChar(const FIFOChar&) = delete;
+ FIFOChar& operator=(const FIFOChar&) = delete;
+
virtual ~FIFOChar();
virtual bool IsEmpty();
@@ -45,8 +49,6 @@
size_t size_; // Size of the FIFO
size_t avail_; // How much data is currently available
size_t tail_; // Next read location
-
- DISALLOW_COPY_AND_ASSIGN(FIFOChar);
};
} // namespace nacl_io
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_handle.h b/native_client_sdk/src/libraries/nacl_io/kernel_handle.h
index 54f455f..d41c116 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_handle.h
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_handle.h
@@ -42,6 +42,10 @@
public:
KernelHandle();
KernelHandle(const ScopedFilesystem& fs, const ScopedNode& node);
+
+ KernelHandle(const KernelHandle&) = delete;
+ KernelHandle& operator=(const KernelHandle&) = delete;
+
~KernelHandle();
Error Init(int open_flags);
@@ -91,7 +95,6 @@
HandleAttr handle_attr_;
friend class KernelProxy;
- DISALLOW_COPY_AND_ASSIGN(KernelHandle);
};
typedef sdk_util::ScopedRef<KernelHandle> ScopedKernelHandle;
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_object.h b/native_client_sdk/src/libraries/nacl_io/kernel_object.h
index 725ce456..6f7a9e9 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_object.h
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_object.h
@@ -44,6 +44,10 @@
typedef std::map<std::string, ScopedFilesystem> FsMap_t;
KernelObject();
+
+ KernelObject(const KernelObject&) = delete;
+ KernelObject& operator=(const KernelObject&) = delete;
+
virtual ~KernelObject();
// Attach the given Filesystem object at the specified path.
@@ -119,8 +123,6 @@
sdk_util::SimpleLock cwd_lock_;
// Lock to protect umask_.
sdk_util::SimpleLock umask_lock_;
-
- DISALLOW_COPY_AND_ASSIGN(KernelObject);
};
} // namespace nacl_io
diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
index d5d80fea..989e0975 100644
--- a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
+++ b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.h
@@ -45,6 +45,10 @@
typedef std::map<std::string, FsFactory*> FsFactoryMap_t;
KernelProxy();
+
+ KernelProxy(const KernelProxy&) = delete;
+ KernelProxy& operator=(const KernelProxy&) = delete;
+
virtual ~KernelProxy();
// |ppapi| may be NULL. If so, no filesystem that uses pepper calls can be
@@ -256,7 +260,6 @@
#endif
ScopedEventEmitter signal_emitter_;
- DISALLOW_COPY_AND_ASSIGN(KernelProxy);
};
} // namespace nacl_io
diff --git a/native_client_sdk/src/libraries/nacl_io/pepper_interface.h b/native_client_sdk/src/libraries/nacl_io/pepper_interface.h
index 1ebd3c67e..b2f503d2 100644
--- a/native_client_sdk/src/libraries/nacl_io/pepper_interface.h
+++ b/native_client_sdk/src/libraries/nacl_io/pepper_interface.h
@@ -150,6 +150,10 @@
// Does not AddRef.
explicit ScopedResource(PepperInterface* ppapi);
ScopedResource(PepperInterface* ppapi, PP_Resource resource);
+
+ ScopedResource(const ScopedResource&) = delete;
+ ScopedResource& operator=(const ScopedResource&) = delete;
+
~ScopedResource();
PP_Resource pp_resource() const { return resource_; }
@@ -164,8 +168,6 @@
private:
PepperInterface* ppapi_;
PP_Resource resource_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedResource);
};
class ScopedVar {
@@ -173,6 +175,10 @@
// Does not AddRef.
explicit ScopedVar(PepperInterface* ppapi);
ScopedVar(PepperInterface* ppapi, PP_Var var);
+
+ ScopedVar(const ScopedVar&) = delete;
+ ScopedVar& operator=(const ScopedVar&) = delete;
+
~ScopedVar();
PP_Var pp_var() const { return var_; }
@@ -187,8 +193,6 @@
private:
PepperInterface* ppapi_;
PP_Var var_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedVar);
};
} // namespace nacl_io
diff --git a/native_client_sdk/src/libraries/nacl_io/socket/fifo_packet.h b/native_client_sdk/src/libraries/nacl_io/socket/fifo_packet.h
index 2b0f485..0acbf16 100644
--- a/native_client_sdk/src/libraries/nacl_io/socket/fifo_packet.h
+++ b/native_client_sdk/src/libraries/nacl_io/socket/fifo_packet.h
@@ -28,6 +28,10 @@
class FIFOPacket : public FIFOInterface {
public:
explicit FIFOPacket(size_t size);
+
+ FIFOPacket(const FIFOPacket&) = delete;
+ FIFOPacket& operator=(const FIFOPacket&) = delete;
+
virtual ~FIFOPacket();
virtual bool IsEmpty();
@@ -56,8 +60,6 @@
std::list<Packet*> packets_;
uint32_t max_bytes_;
uint32_t cur_bytes_;
-
- DISALLOW_COPY_AND_ASSIGN(FIFOPacket);
};
} // namespace nacl_io
diff --git a/native_client_sdk/src/libraries/nacl_io/socket/packet.h b/native_client_sdk/src/libraries/nacl_io/socket/packet.h
index ce199e6..c8bd997 100644
--- a/native_client_sdk/src/libraries/nacl_io/socket/packet.h
+++ b/native_client_sdk/src/libraries/nacl_io/socket/packet.h
@@ -18,6 +18,10 @@
class Packet {
public:
explicit Packet(PepperInterface* ppapi);
+
+ Packet(const Packet&) = delete;
+ Packet& operator=(const Packet&) = delete;
+
~Packet();
// Copy the buffer, and address reference
@@ -32,8 +36,6 @@
PP_Resource addr_;
char* buffer_;
size_t len_;
-
- DISALLOW_COPY_AND_ASSIGN(Packet);
};
} // namespace nacl_io
diff --git a/native_client_sdk/src/libraries/sdk_util/auto_lock.h b/native_client_sdk/src/libraries/sdk_util/auto_lock.h
index b969416..ec9be13 100644
--- a/native_client_sdk/src/libraries/sdk_util/auto_lock.h
+++ b/native_client_sdk/src/libraries/sdk_util/auto_lock.h
@@ -23,6 +23,9 @@
pthread_mutex_lock(lock_);
}
+ AutoLock(const AutoLock&) = delete;
+ AutoLock& operator=(const AutoLock&) = delete;
+
~AutoLock() {
Unlock();
}
@@ -34,8 +37,6 @@
private:
pthread_mutex_t* lock_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoLock);
};
} // namespace sdk_util
diff --git a/native_client_sdk/src/libraries/sdk_util/simple_lock.h b/native_client_sdk/src/libraries/sdk_util/simple_lock.h
index 1f381851..cf7b077 100644
--- a/native_client_sdk/src/libraries/sdk_util/simple_lock.h
+++ b/native_client_sdk/src/libraries/sdk_util/simple_lock.h
@@ -22,6 +22,9 @@
pthread_mutex_init(&lock_, NULL);
}
+ SimpleLock(const SimpleLock&) = delete;
+ SimpleLock& operator=(const SimpleLock&) = delete;
+
~SimpleLock() {
pthread_mutex_destroy(&lock_);
}
@@ -33,8 +36,6 @@
private:
mutable pthread_mutex_t lock_;
-
- DISALLOW_COPY_AND_ASSIGN(SimpleLock);
};
} // namespace sdk_util
diff --git a/native_client_sdk/src/libraries/sdk_util/thread_safe_queue.h b/native_client_sdk/src/libraries/sdk_util/thread_safe_queue.h
index 37842db..0893dec 100644
--- a/native_client_sdk/src/libraries/sdk_util/thread_safe_queue.h
+++ b/native_client_sdk/src/libraries/sdk_util/thread_safe_queue.h
@@ -25,6 +25,9 @@
pthread_cond_init(&cond_, NULL);
}
+ ThreadSafeQueue(const ThreadSafeQueue&) = delete;
+ ThreadSafeQueue& operator=(const ThreadSafeQueue&) = delete;
+
~ThreadSafeQueue() {
pthread_cond_destroy(&cond_);
}
@@ -55,10 +58,8 @@
std::list<T*> list_;
pthread_cond_t cond_;
SimpleLock lock_;
- DISALLOW_COPY_AND_ASSIGN(ThreadSafeQueue);
};
} // namespace sdk_util
#endif // LIBRARIES_SDK_UTIL_THREAD_SAFE_QUEUE_H_
-
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_messaging_interface.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_messaging_interface.h
index e7fca89..b131094 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_messaging_interface.h
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_messaging_interface.h
@@ -20,6 +20,10 @@
public:
FakeMessagingInterface(FakeVarManager* manager,
nacl_io::VarInterface* var_interface);
+
+ FakeMessagingInterface(const FakeMessagingInterface&) = delete;
+ FakeMessagingInterface& operator=(const FakeMessagingInterface&) = delete;
+
~FakeMessagingInterface();
virtual void PostMessage(PP_Instance instance, PP_Var message);
@@ -28,7 +32,6 @@
private:
FakeVarManager* manager_;
nacl_io::VarInterface* var_interface_;
- DISALLOW_COPY_AND_ASSIGN(FakeMessagingInterface);
};
#endif // TESTS_NACL_IO_TEST_FAKE_PPAPI_FAKE_MESSAGING_INTERFACE_H_
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface.h
index 3693619..bd416160 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface.h
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface.h
@@ -20,6 +20,10 @@
class FakePepperInterface : public nacl_io::PepperInterfaceDummy {
public:
FakePepperInterface();
+
+ FakePepperInterface(const FakePepperInterface&) = delete;
+ FakePepperInterface& operator=(const FakePepperInterface&) = delete;
+
virtual ~FakePepperInterface();
virtual nacl_io::CoreInterface* GetCoreInterface();
@@ -48,8 +52,6 @@
FakeVarDictionaryInterface var_dictionary_interface_;
FakeHostResolverInterface resolver_interface_;
FakeNetAddressInterface net_address_interface_;
-
- DISALLOW_COPY_AND_ASSIGN(FakePepperInterface);
};
#endif // TESTS_NACL_IO_TEST_FAKE_PPAPI_FAKE_PEPPER_INTERFACE_H_
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_googledrivefs.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_googledrivefs.h
index df59b08..a68268c 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_googledrivefs.h
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_googledrivefs.h
@@ -67,6 +67,12 @@
FakeDriveURLResponseInfoInterface(FakeCoreInterface* core_interface,
FakeVarInterface* var_interface,
FakeFileRefInterface* file_ref_interface);
+
+ FakeDriveURLResponseInfoInterface(const FakeDriveURLResponseInfoInterface&) =
+ delete;
+ FakeDriveURLResponseInfoInterface& operator=(
+ const FakeDriveURLResponseInfoInterface&) = delete;
+
~FakeDriveURLResponseInfoInterface();
virtual PP_Var GetProperty(PP_Resource response,
@@ -76,8 +82,6 @@
private:
FakeFileRefInterface* file_ref_interface_;
PP_Resource filesystem_resource_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeDriveURLResponseInfoInterface);
};
// This class is a fake implementation of the interfaces necessary to access
@@ -97,6 +101,12 @@
class FakePepperInterfaceGoogleDriveFs : public nacl_io::PepperInterfaceDummy {
public:
FakePepperInterfaceGoogleDriveFs();
+
+ FakePepperInterfaceGoogleDriveFs(const FakePepperInterfaceGoogleDriveFs&) =
+ delete;
+ FakePepperInterfaceGoogleDriveFs& operator=(
+ const FakePepperInterfaceGoogleDriveFs&) = delete;
+
~FakePepperInterfaceGoogleDriveFs();
virtual PP_Instance GetInstance() { return instance_; }
@@ -126,8 +136,6 @@
FakeDriveURLRequestInfoInterface drive_url_request_info_interface_;
FakeDriveURLResponseInfoInterface drive_url_response_info_interface_;
PP_Instance instance_;
-
- DISALLOW_COPY_AND_ASSIGN(FakePepperInterfaceGoogleDriveFs);
};
#endif // TESTS_NACL_IO_TEST_FAKE_PPAPI_FAKE_PEPPER_INTERFACE_GOOGLEDRIVEFS_H_
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_html5_fs.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_html5_fs.h
index f4b29692..cf8105e3 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_html5_fs.h
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_html5_fs.h
@@ -32,6 +32,11 @@
public:
FakePepperInterfaceHtml5Fs();
explicit FakePepperInterfaceHtml5Fs(const FakeFilesystem& filesystem);
+
+ FakePepperInterfaceHtml5Fs(const FakePepperInterfaceHtml5Fs&) = delete;
+ FakePepperInterfaceHtml5Fs& operator=(const FakePepperInterfaceHtml5Fs&) =
+ delete;
+
~FakePepperInterfaceHtml5Fs();
virtual PP_Instance GetInstance() { return instance_; }
@@ -55,8 +60,6 @@
FakeFileRefInterface file_ref_interface_;
FakeFileIoInterface file_io_interface_;
PP_Instance instance_;
-
- DISALLOW_COPY_AND_ASSIGN(FakePepperInterfaceHtml5Fs);
};
#endif // TESTS_NACL_IO_TEST_FAKE_PPAPI_FAKE_PEPPER_INTERFACE_HTML5_FS_H_
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.h
index 0cab8a54..376f2609 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.h
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.h
@@ -153,6 +153,11 @@
public:
FakePepperInterfaceURLLoader();
FakePepperInterfaceURLLoader(const FakeURLLoaderServer& server);
+
+ FakePepperInterfaceURLLoader(const FakePepperInterfaceURLLoader&) = delete;
+ FakePepperInterfaceURLLoader& operator=(const FakePepperInterfaceURLLoader&) =
+ delete;
+
~FakePepperInterfaceURLLoader();
virtual PP_Instance GetInstance() { return instance_; }
@@ -176,8 +181,6 @@
FakeURLRequestInfoInterface url_request_info_interface_;
FakeURLResponseInfoInterface url_response_info_interface_;
PP_Instance instance_;
-
- DISALLOW_COPY_AND_ASSIGN(FakePepperInterfaceURLLoader);
};
#endif // TESTS_NACL_IO_TEST_FAKE_PPAPI_FAKE_PEPPER_INTERFACE_URL_LOADER_H_
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_resource_manager.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_resource_manager.h
index 9f47da40..42f59a2 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_resource_manager.h
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_resource_manager.h
@@ -19,6 +19,10 @@
class FakeResourceManager {
public:
FakeResourceManager();
+
+ FakeResourceManager(const FakeResourceManager&) = delete;
+ FakeResourceManager& operator=(const FakeResourceManager&) = delete;
+
~FakeResourceManager();
PP_Resource Create(FakeResource* resource,
@@ -37,8 +41,6 @@
PP_Resource next_handle_;
ResourceMap resource_map_;
sdk_util::SimpleLock lock_; // Protects next_handle_ and resource_map_.
-
- DISALLOW_COPY_AND_ASSIGN(FakeResourceManager);
};
// FakeResourceTracker wraps a FakeResource to keep metadata about the
@@ -49,6 +51,10 @@
const char* classname,
const char* file,
int line);
+
+ FakeResourceTracker(const FakeResourceTracker&) = delete;
+ FakeResourceTracker& operator=(const FakeResourceTracker&) = delete;
+
~FakeResourceTracker();
void AddRef() { sdk_util::AtomicAddFetch(&ref_count_, 1); }
@@ -85,21 +91,20 @@
const char* file_; // Weak reference.
int line_;
int32_t ref_count_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeResourceTracker);
};
class FakeResource {
public:
FakeResource() {}
+
+ FakeResource(const FakeResource&) = delete;
+ FakeResource& operator=(const FakeResource&) = delete;
+
// Called when the resource is destroyed. For debugging purposes, this does
// not happen until the resource manager is destroyed.
virtual ~FakeResource() {}
// Called when the last reference to the resource is released.
virtual void Destroy() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(FakeResource);
};
template <typename T>
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.h
index 5186363..6fdb024 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.h
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.h
@@ -32,6 +32,10 @@
class FakeVarManager {
public:
FakeVarManager();
+
+ FakeVarManager(const FakeVarManager&) = delete;
+ FakeVarManager& operator=(const FakeVarManager&) = delete;
+
~FakeVarManager();
void AddRef(PP_Var var);
@@ -53,7 +57,6 @@
VarMap var_map_;
sdk_util::SimpleLock lock_;
- DISALLOW_COPY_AND_ASSIGN(FakeVarManager);
};
#endif // TESTS_NACL_IO_TEST_FAKE_PPAPI_FAKE_VAR_MANAGER_H_
diff --git a/rlz/chromeos/lib/rlz_value_store_chromeos.h b/rlz/chromeos/lib/rlz_value_store_chromeos.h
index f382d24..0c4e5a0 100644
--- a/rlz/chromeos/lib/rlz_value_store_chromeos.h
+++ b/rlz/chromeos/lib/rlz_value_store_chromeos.h
@@ -26,6 +26,10 @@
// Creates new instance and synchronously reads data from file.
explicit RlzValueStoreChromeOS(const base::FilePath& store_path);
+
+ RlzValueStoreChromeOS(const RlzValueStoreChromeOS&) = delete;
+ RlzValueStoreChromeOS& operator=(const RlzValueStoreChromeOS&) = delete;
+
~RlzValueStoreChromeOS() override;
// RlzValueStore overrides:
@@ -89,8 +93,6 @@
bool read_only_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(RlzValueStoreChromeOS);
};
} // namespace rlz_lib
diff --git a/rlz/lib/rlz_lib_test.cc b/rlz/lib/rlz_lib_test.cc
index bc9472c..38c598d 100644
--- a/rlz/lib/rlz_lib_test.cc
+++ b/rlz/lib/rlz_lib_test.cc
@@ -1081,6 +1081,10 @@
class TestDebugDaemonClient : public chromeos::FakeDebugDaemonClient {
public:
TestDebugDaemonClient() = default;
+
+ TestDebugDaemonClient(const TestDebugDaemonClient&) = delete;
+ TestDebugDaemonClient& operator=(const TestDebugDaemonClient&) = delete;
+
~TestDebugDaemonClient() override = default;
int num_set_rlz_ping_sent() const { return num_set_rlz_ping_sent_; }
@@ -1099,7 +1103,6 @@
private:
int num_set_rlz_ping_sent_ = 0;
bool default_result_ = false;
- DISALLOW_COPY_AND_ASSIGN(TestDebugDaemonClient);
};
TEST_F(RlzLibTest, SetRlzPingSent) {
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl.cc b/sandbox/linux/bpf_dsl/bpf_dsl.cc
index 846dc7a8..9013966 100644
--- a/sandbox/linux/bpf_dsl/bpf_dsl.cc
+++ b/sandbox/linux/bpf_dsl/bpf_dsl.cc
@@ -24,6 +24,10 @@
class ReturnResultExprImpl : public internal::ResultExprImpl {
public:
explicit ReturnResultExprImpl(uint32_t ret) : ret_(ret) {}
+
+ ReturnResultExprImpl(const ReturnResultExprImpl&) = delete;
+ ReturnResultExprImpl& operator=(const ReturnResultExprImpl&) = delete;
+
~ReturnResultExprImpl() override {}
CodeGen::Node Compile(PolicyCompiler* pc) const override {
@@ -43,8 +47,6 @@
}
uint32_t ret_;
-
- DISALLOW_COPY_AND_ASSIGN(ReturnResultExprImpl);
};
class TrapResultExprImpl : public internal::ResultExprImpl {
@@ -53,6 +55,10 @@
: func_(func), arg_(arg), safe_(safe) {
DCHECK(func_);
}
+
+ TrapResultExprImpl(const TrapResultExprImpl&) = delete;
+ TrapResultExprImpl& operator=(const TrapResultExprImpl&) = delete;
+
~TrapResultExprImpl() override {}
CodeGen::Node Compile(PolicyCompiler* pc) const override {
@@ -67,8 +73,6 @@
TrapRegistry::TrapFnc func_;
const void* arg_;
bool safe_;
-
- DISALLOW_COPY_AND_ASSIGN(TrapResultExprImpl);
};
class IfThenResultExprImpl : public internal::ResultExprImpl {
@@ -79,6 +83,10 @@
: cond_(std::move(cond)),
then_result_(std::move(then_result)),
else_result_(std::move(else_result)) {}
+
+ IfThenResultExprImpl(const IfThenResultExprImpl&) = delete;
+ IfThenResultExprImpl& operator=(const IfThenResultExprImpl&) = delete;
+
~IfThenResultExprImpl() override {}
CodeGen::Node Compile(PolicyCompiler* pc) const override {
@@ -97,13 +105,15 @@
BoolExpr cond_;
ResultExpr then_result_;
ResultExpr else_result_;
-
- DISALLOW_COPY_AND_ASSIGN(IfThenResultExprImpl);
};
class ConstBoolExprImpl : public internal::BoolExprImpl {
public:
explicit ConstBoolExprImpl(bool value) : value_(value) {}
+
+ ConstBoolExprImpl(const ConstBoolExprImpl&) = delete;
+ ConstBoolExprImpl& operator=(const ConstBoolExprImpl&) = delete;
+
~ConstBoolExprImpl() override = default;
CodeGen::Node Compile(PolicyCompiler* pc,
@@ -114,8 +124,6 @@
private:
bool value_;
-
- DISALLOW_COPY_AND_ASSIGN(ConstBoolExprImpl);
};
class MaskedEqualBoolExprImpl : public internal::BoolExprImpl {
@@ -125,6 +133,10 @@
uint64_t mask,
uint64_t value)
: argno_(argno), width_(width), mask_(mask), value_(value) {}
+
+ MaskedEqualBoolExprImpl(const MaskedEqualBoolExprImpl&) = delete;
+ MaskedEqualBoolExprImpl& operator=(const MaskedEqualBoolExprImpl&) = delete;
+
~MaskedEqualBoolExprImpl() override {}
CodeGen::Node Compile(PolicyCompiler* pc,
@@ -138,13 +150,15 @@
size_t width_;
uint64_t mask_;
uint64_t value_;
-
- DISALLOW_COPY_AND_ASSIGN(MaskedEqualBoolExprImpl);
};
class NegateBoolExprImpl : public internal::BoolExprImpl {
public:
explicit NegateBoolExprImpl(BoolExpr cond) : cond_(std::move(cond)) {}
+
+ NegateBoolExprImpl(const NegateBoolExprImpl&) = delete;
+ NegateBoolExprImpl& operator=(const NegateBoolExprImpl&) = delete;
+
~NegateBoolExprImpl() override {}
CodeGen::Node Compile(PolicyCompiler* pc,
@@ -155,14 +169,16 @@
private:
BoolExpr cond_;
-
- DISALLOW_COPY_AND_ASSIGN(NegateBoolExprImpl);
};
class AndBoolExprImpl : public internal::BoolExprImpl {
public:
AndBoolExprImpl(BoolExpr lhs, BoolExpr rhs)
: lhs_(std::move(lhs)), rhs_(std::move(rhs)) {}
+
+ AndBoolExprImpl(const AndBoolExprImpl&) = delete;
+ AndBoolExprImpl& operator=(const AndBoolExprImpl&) = delete;
+
~AndBoolExprImpl() override {}
CodeGen::Node Compile(PolicyCompiler* pc,
@@ -175,14 +191,16 @@
private:
BoolExpr lhs_;
BoolExpr rhs_;
-
- DISALLOW_COPY_AND_ASSIGN(AndBoolExprImpl);
};
class OrBoolExprImpl : public internal::BoolExprImpl {
public:
OrBoolExprImpl(BoolExpr lhs, BoolExpr rhs)
: lhs_(std::move(lhs)), rhs_(std::move(rhs)) {}
+
+ OrBoolExprImpl(const OrBoolExprImpl&) = delete;
+ OrBoolExprImpl& operator=(const OrBoolExprImpl&) = delete;
+
~OrBoolExprImpl() override {}
CodeGen::Node Compile(PolicyCompiler* pc,
@@ -195,8 +213,6 @@
private:
BoolExpr lhs_;
BoolExpr rhs_;
-
- DISALLOW_COPY_AND_ASSIGN(OrBoolExprImpl);
};
} // namespace
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl_unittest.cc b/sandbox/linux/bpf_dsl/bpf_dsl_unittest.cc
index ae35b33..1d1808c 100644
--- a/sandbox/linux/bpf_dsl/bpf_dsl_unittest.cc
+++ b/sandbox/linux/bpf_dsl/bpf_dsl_unittest.cc
@@ -84,6 +84,9 @@
}
}
+ PolicyEmulator(const PolicyEmulator&) = delete;
+ PolicyEmulator& operator=(const PolicyEmulator&) = delete;
+
~PolicyEmulator() {}
void ExpectAllow(const struct arch_seccomp_data& data) const {
@@ -110,13 +113,15 @@
}
CodeGen::Program program_;
-
- DISALLOW_COPY_AND_ASSIGN(PolicyEmulator);
};
class BasicPolicy : public Policy {
public:
BasicPolicy() {}
+
+ BasicPolicy(const BasicPolicy&) = delete;
+ BasicPolicy& operator=(const BasicPolicy&) = delete;
+
~BasicPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
if (sysno == __NR_getpgid) {
@@ -129,9 +134,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BasicPolicy);
};
TEST(BPFDSL, Basic) {
@@ -149,6 +151,10 @@
class BooleanLogicPolicy : public Policy {
public:
BooleanLogicPolicy() {}
+
+ BooleanLogicPolicy(const BooleanLogicPolicy&) = delete;
+ BooleanLogicPolicy& operator=(const BooleanLogicPolicy&) = delete;
+
~BooleanLogicPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
if (sysno == __NR_socketpair) {
@@ -161,9 +167,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BooleanLogicPolicy);
};
TEST(BPFDSL, BooleanLogic) {
@@ -195,6 +198,10 @@
class MoreBooleanLogicPolicy : public Policy {
public:
MoreBooleanLogicPolicy() {}
+
+ MoreBooleanLogicPolicy(const MoreBooleanLogicPolicy&) = delete;
+ MoreBooleanLogicPolicy& operator=(const MoreBooleanLogicPolicy&) = delete;
+
~MoreBooleanLogicPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
if (sysno == __NR_setresuid) {
@@ -205,9 +212,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MoreBooleanLogicPolicy);
};
TEST(BPFDSL, MoreBooleanLogic) {
@@ -235,6 +239,10 @@
class ArgSizePolicy : public Policy {
public:
ArgSizePolicy() {}
+
+ ArgSizePolicy(const ArgSizePolicy&) = delete;
+ ArgSizePolicy& operator=(const ArgSizePolicy&) = delete;
+
~ArgSizePolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
if (sysno == __NR_uname) {
@@ -243,9 +251,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ArgSizePolicy);
};
TEST(BPFDSL, ArgSizeTest) {
@@ -258,6 +263,10 @@
class NegativeConstantsPolicy : public Policy {
public:
NegativeConstantsPolicy() {}
+
+ NegativeConstantsPolicy(const NegativeConstantsPolicy&) = delete;
+ NegativeConstantsPolicy& operator=(const NegativeConstantsPolicy&) = delete;
+
~NegativeConstantsPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
if (sysno == __NR_fcntl) {
@@ -266,9 +275,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NegativeConstantsPolicy);
};
TEST(BPFDSL, NegativeConstantsTest) {
@@ -286,6 +292,10 @@
class TrappingPolicy : public Policy {
public:
TrappingPolicy() {}
+
+TrappingPolicy(const TrappingPolicy&) = delete;
+TrappingPolicy& operator=(const TrappingPolicy&) = delete;
+
~TrappingPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
if (sysno == __NR_uname) {
@@ -301,8 +311,6 @@
BPF_ASSERT_EQ(&count_, aux);
return ++count_;
}
-
- DISALLOW_COPY_AND_ASSIGN(TrappingPolicy);
};
intptr_t TrappingPolicy::count_;
@@ -317,6 +325,10 @@
class MaskingPolicy : public Policy {
public:
MaskingPolicy() {}
+
+ MaskingPolicy(const MaskingPolicy&) = delete;
+ MaskingPolicy& operator=(const MaskingPolicy&) = delete;
+
~MaskingPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
if (sysno == __NR_setuid) {
@@ -333,9 +345,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(MaskingPolicy);
};
TEST(BPFDSL, MaskTest) {
@@ -360,6 +369,10 @@
class ElseIfPolicy : public Policy {
public:
ElseIfPolicy() {}
+
+ ElseIfPolicy(const ElseIfPolicy&) = delete;
+ ElseIfPolicy& operator=(const ElseIfPolicy&) = delete;
+
~ElseIfPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
if (sysno == __NR_setuid) {
@@ -371,9 +384,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ElseIfPolicy);
};
TEST(BPFDSL, ElseIfTest) {
@@ -394,6 +404,10 @@
class SwitchPolicy : public Policy {
public:
SwitchPolicy() {}
+
+ SwitchPolicy(const SwitchPolicy&) = delete;
+ SwitchPolicy& operator=(const SwitchPolicy&) = delete;
+
~SwitchPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
if (sysno == __NR_fcntl) {
@@ -407,9 +421,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SwitchPolicy);
};
TEST(BPFDSL, SwitchTest) {
diff --git a/sandbox/linux/bpf_dsl/codegen.h b/sandbox/linux/bpf_dsl/codegen.h
index 3fc3f35..9db20f3 100644
--- a/sandbox/linux/bpf_dsl/codegen.h
+++ b/sandbox/linux/bpf_dsl/codegen.h
@@ -63,6 +63,10 @@
static const Node kNullNode = -1;
CodeGen();
+
+ CodeGen(const CodeGen&) = delete;
+ CodeGen& operator=(const CodeGen&) = delete;
+
~CodeGen();
// MakeInstruction creates a node representing the specified
@@ -110,8 +114,6 @@
std::vector<Node> equivalent_;
std::map<MemoKey, Node> memos_;
-
- DISALLOW_COPY_AND_ASSIGN(CodeGen);
};
} // namespace sandbox
diff --git a/sandbox/linux/bpf_dsl/policy.h b/sandbox/linux/bpf_dsl/policy.h
index 6c67589..858815c 100644
--- a/sandbox/linux/bpf_dsl/policy.h
+++ b/sandbox/linux/bpf_dsl/policy.h
@@ -16,6 +16,10 @@
class SANDBOX_EXPORT Policy {
public:
Policy() {}
+
+ Policy(const Policy&) = delete;
+ Policy& operator=(const Policy&) = delete;
+
virtual ~Policy() {}
// User extension point for writing custom sandbox policies.
@@ -26,9 +30,6 @@
// Optional overload for specifying alternate behavior for invalid
// system calls. The default is to return ENOSYS.
virtual ResultExpr InvalidSyscall() const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(Policy);
};
} // namespace bpf_dsl
diff --git a/sandbox/linux/bpf_dsl/policy_compiler.h b/sandbox/linux/bpf_dsl/policy_compiler.h
index 48b1d780..212d15d4 100644
--- a/sandbox/linux/bpf_dsl/policy_compiler.h
+++ b/sandbox/linux/bpf_dsl/policy_compiler.h
@@ -28,6 +28,10 @@
using PanicFunc = bpf_dsl::ResultExpr (*)(const char* error);
PolicyCompiler(const Policy* policy, TrapRegistry* registry);
+
+ PolicyCompiler(const PolicyCompiler&) = delete;
+ PolicyCompiler& operator=(const PolicyCompiler&) = delete;
+
~PolicyCompiler();
// Compile registers any trap handlers needed by the policy and
@@ -143,8 +147,6 @@
CodeGen gen_;
bool has_unsafe_traps_;
-
- DISALLOW_COPY_AND_ASSIGN(PolicyCompiler);
};
} // namespace bpf_dsl
diff --git a/sandbox/linux/bpf_dsl/test_trap_registry.h b/sandbox/linux/bpf_dsl/test_trap_registry.h
index 19e4e9c..ea9e1fa 100644
--- a/sandbox/linux/bpf_dsl/test_trap_registry.h
+++ b/sandbox/linux/bpf_dsl/test_trap_registry.h
@@ -19,6 +19,10 @@
class TestTrapRegistry : public TrapRegistry {
public:
TestTrapRegistry();
+
+ TestTrapRegistry(const TestTrapRegistry&) = delete;
+ TestTrapRegistry& operator=(const TestTrapRegistry&) = delete;
+
virtual ~TestTrapRegistry();
uint16_t Add(TrapFnc fnc, const void* aux, bool safe) override;
@@ -28,8 +32,6 @@
using Key = std::pair<TrapFnc, const void*>;
std::map<Key, uint16_t> map_;
-
- DISALLOW_COPY_AND_ASSIGN(TestTrapRegistry);
};
} // namespace bpf_dsl
diff --git a/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc b/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc
index 49937b5..7c174f4 100644
--- a/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc
+++ b/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc
@@ -97,6 +97,10 @@
public:
explicit VerboseAPITestingPolicy(int* counter_ptr)
: counter_ptr_(counter_ptr) {}
+
+ VerboseAPITestingPolicy(const VerboseAPITestingPolicy&) = delete;
+ VerboseAPITestingPolicy& operator=(const VerboseAPITestingPolicy&) = delete;
+
~VerboseAPITestingPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -109,8 +113,6 @@
private:
int* counter_ptr_;
-
- DISALLOW_COPY_AND_ASSIGN(VerboseAPITestingPolicy);
};
SANDBOX_TEST(SandboxBPF, DISABLE_ON_TSAN(VerboseAPITesting)) {
@@ -132,6 +134,10 @@
class DenylistNanosleepPolicy : public Policy {
public:
DenylistNanosleepPolicy() {}
+
+ DenylistNanosleepPolicy(const DenylistNanosleepPolicy&) = delete;
+ DenylistNanosleepPolicy& operator=(const DenylistNanosleepPolicy&) = delete;
+
~DenylistNanosleepPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -150,9 +156,6 @@
BPF_ASSERT_EQ(-1, HANDLE_EINTR(syscall(__NR_nanosleep, &ts, NULL)));
BPF_ASSERT_EQ(EACCES, errno);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DenylistNanosleepPolicy);
};
BPF_TEST_C(SandboxBPF, ApplyBasicDenylistPolicy, DenylistNanosleepPolicy) {
@@ -192,6 +195,10 @@
class AllowlistGetpidPolicy : public Policy {
public:
AllowlistGetpidPolicy() {}
+
+ AllowlistGetpidPolicy(const AllowlistGetpidPolicy&) = delete;
+ AllowlistGetpidPolicy& operator=(const AllowlistGetpidPolicy&) = delete;
+
~AllowlistGetpidPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -201,9 +208,6 @@
}
return Error(ENOMEM);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowlistGetpidPolicy);
};
BPF_TEST_C(SandboxBPF, ApplyBasicAllowlistPolicy, AllowlistGetpidPolicy) {
@@ -228,6 +232,11 @@
class DenylistNanosleepTrapPolicy : public Policy {
public:
explicit DenylistNanosleepTrapPolicy(int* aux) : aux_(aux) {}
+
+ DenylistNanosleepTrapPolicy(const DenylistNanosleepTrapPolicy&) = delete;
+ DenylistNanosleepTrapPolicy& operator=(const DenylistNanosleepTrapPolicy&) =
+ delete;
+
~DenylistNanosleepTrapPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -242,8 +251,6 @@
private:
int* aux_;
-
- DISALLOW_COPY_AND_ASSIGN(DenylistNanosleepTrapPolicy);
};
BPF_TEST(SandboxBPF,
@@ -270,12 +277,13 @@
class ErrnoTestPolicy : public Policy {
public:
ErrnoTestPolicy() {}
+
+ ErrnoTestPolicy(const ErrnoTestPolicy&) = delete;
+ ErrnoTestPolicy& operator=(const ErrnoTestPolicy&) = delete;
+
~ErrnoTestPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ErrnoTestPolicy);
};
ResultExpr ErrnoTestPolicy::EvaluateSyscall(int sysno) const {
@@ -352,6 +360,10 @@
class StackingPolicyPartOne : public Policy {
public:
StackingPolicyPartOne() {}
+
+ StackingPolicyPartOne(const StackingPolicyPartOne&) = delete;
+ StackingPolicyPartOne& operator=(const StackingPolicyPartOne&) = delete;
+
~StackingPolicyPartOne() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -365,14 +377,15 @@
return Allow();
}
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(StackingPolicyPartOne);
};
class StackingPolicyPartTwo : public Policy {
public:
StackingPolicyPartTwo() {}
+
+ StackingPolicyPartTwo(const StackingPolicyPartTwo&) = delete;
+ StackingPolicyPartTwo& operator=(const StackingPolicyPartTwo&) = delete;
+
~StackingPolicyPartTwo() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -386,9 +399,6 @@
return Allow();
}
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(StackingPolicyPartTwo);
};
// Depending on DCHECK being enabled or not the test may create some output.
@@ -435,6 +445,10 @@
class SyntheticPolicy : public Policy {
public:
SyntheticPolicy() {}
+
+ SyntheticPolicy(const SyntheticPolicy&) = delete;
+ SyntheticPolicy& operator=(const SyntheticPolicy&) = delete;
+
~SyntheticPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -444,9 +458,6 @@
}
return Error(SysnoToRandomErrno(sysno));
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SyntheticPolicy);
};
BPF_TEST_C(SandboxBPF, SyntheticPolicy, SyntheticPolicy) {
@@ -485,6 +496,10 @@
class ArmPrivatePolicy : public Policy {
public:
ArmPrivatePolicy() {}
+
+ ArmPrivatePolicy(const ArmPrivatePolicy&) = delete;
+ ArmPrivatePolicy& operator=(const ArmPrivatePolicy&) = delete;
+
~ArmPrivatePolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -497,9 +512,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ArmPrivatePolicy);
};
BPF_TEST_C(SandboxBPF, ArmPrivatePolicy, ArmPrivatePolicy) {
@@ -532,6 +544,10 @@
// Set the global environment for unsafe traps once.
EnableUnsafeTraps();
}
+
+ GreyListedPolicy(const GreyListedPolicy&) = delete;
+ GreyListedPolicy& operator=(const GreyListedPolicy&) = delete;
+
~GreyListedPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -551,8 +567,6 @@
private:
int* aux_;
-
- DISALLOW_COPY_AND_ASSIGN(GreyListedPolicy);
};
BPF_TEST(SandboxBPF, GreyListedPolicy, GreyListedPolicy, int /* (*BPF_AUX) */) {
@@ -598,6 +612,10 @@
class PrctlPolicy : public Policy {
public:
PrctlPolicy() {}
+
+ PrctlPolicy(const PrctlPolicy&) = delete;
+ PrctlPolicy& operator=(const PrctlPolicy&) = delete;
+
~PrctlPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -613,9 +631,6 @@
// Allow all other system calls.
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PrctlPolicy);
};
BPF_TEST_C(SandboxBPF, ForwardSyscall, PrctlPolicy) {
@@ -652,12 +667,14 @@
class RedirectAllSyscallsPolicy : public Policy {
public:
RedirectAllSyscallsPolicy() {}
+
+ RedirectAllSyscallsPolicy(const RedirectAllSyscallsPolicy&) = delete;
+ RedirectAllSyscallsPolicy& operator=(const RedirectAllSyscallsPolicy&) =
+ delete;
+
~RedirectAllSyscallsPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RedirectAllSyscallsPolicy);
};
ResultExpr RedirectAllSyscallsPolicy::EvaluateSyscall(int sysno) const {
@@ -763,12 +780,13 @@
class SimpleCondTestPolicy : public Policy {
public:
SimpleCondTestPolicy() {}
+
+ SimpleCondTestPolicy(const SimpleCondTestPolicy&) = delete;
+ SimpleCondTestPolicy& operator=(const SimpleCondTestPolicy&) = delete;
+
~SimpleCondTestPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SimpleCondTestPolicy);
};
ResultExpr SimpleCondTestPolicy::EvaluateSyscall(int sysno) const {
@@ -1123,6 +1141,10 @@
class EqualityStressTestPolicy : public Policy {
public:
explicit EqualityStressTestPolicy(EqualityStressTest* aux) : aux_(aux) {}
+
+ EqualityStressTestPolicy(const EqualityStressTestPolicy&) = delete;
+ EqualityStressTestPolicy& operator=(const EqualityStressTestPolicy&) = delete;
+
~EqualityStressTestPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -1131,8 +1153,6 @@
private:
EqualityStressTest* aux_;
-
- DISALLOW_COPY_AND_ASSIGN(EqualityStressTestPolicy);
};
BPF_TEST(SandboxBPF,
@@ -1145,12 +1165,14 @@
class EqualityArgumentWidthPolicy : public Policy {
public:
EqualityArgumentWidthPolicy() {}
+
+ EqualityArgumentWidthPolicy(const EqualityArgumentWidthPolicy&) = delete;
+ EqualityArgumentWidthPolicy& operator=(const EqualityArgumentWidthPolicy&) =
+ delete;
+
~EqualityArgumentWidthPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EqualityArgumentWidthPolicy);
};
ResultExpr EqualityArgumentWidthPolicy::EvaluateSyscall(int sysno) const {
@@ -1198,6 +1220,12 @@
class EqualityWithNegativeArgumentsPolicy : public Policy {
public:
EqualityWithNegativeArgumentsPolicy() {}
+
+ EqualityWithNegativeArgumentsPolicy(
+ const EqualityWithNegativeArgumentsPolicy&) = delete;
+ EqualityWithNegativeArgumentsPolicy& operator=(
+ const EqualityWithNegativeArgumentsPolicy&) = delete;
+
~EqualityWithNegativeArgumentsPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -1211,9 +1239,6 @@
}
return Allow();
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(EqualityWithNegativeArgumentsPolicy);
};
BPF_TEST_C(SandboxBPF,
@@ -1239,6 +1264,10 @@
class AllBitTestPolicy : public Policy {
public:
AllBitTestPolicy() {}
+
+ AllBitTestPolicy(const AllBitTestPolicy&) = delete;
+ AllBitTestPolicy& operator=(const AllBitTestPolicy&) = delete;
+
~AllBitTestPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override;
@@ -1246,8 +1275,6 @@
private:
static ResultExpr HasAllBits32(uint32_t bits);
static ResultExpr HasAllBits64(uint64_t bits);
-
- DISALLOW_COPY_AND_ASSIGN(AllBitTestPolicy);
};
ResultExpr AllBitTestPolicy::HasAllBits32(uint32_t bits) {
@@ -1425,6 +1452,10 @@
class AnyBitTestPolicy : public Policy {
public:
AnyBitTestPolicy() {}
+
+ AnyBitTestPolicy(const AnyBitTestPolicy&) = delete;
+ AnyBitTestPolicy& operator=(const AnyBitTestPolicy&) = delete;
+
~AnyBitTestPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override;
@@ -1432,8 +1463,6 @@
private:
static ResultExpr HasAnyBits32(uint32_t);
static ResultExpr HasAnyBits64(uint64_t);
-
- DISALLOW_COPY_AND_ASSIGN(AnyBitTestPolicy);
};
ResultExpr AnyBitTestPolicy::HasAnyBits32(uint32_t bits) {
@@ -1589,6 +1618,10 @@
class MaskedEqualTestPolicy : public Policy {
public:
MaskedEqualTestPolicy() {}
+
+ MaskedEqualTestPolicy(const MaskedEqualTestPolicy&) = delete;
+ MaskedEqualTestPolicy& operator=(const MaskedEqualTestPolicy&) = delete;
+
~MaskedEqualTestPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override;
@@ -1596,8 +1629,6 @@
private:
static ResultExpr MaskedEqual32(uint32_t mask, uint32_t value);
static ResultExpr MaskedEqual64(uint64_t mask, uint64_t value);
-
- DISALLOW_COPY_AND_ASSIGN(MaskedEqualTestPolicy);
};
ResultExpr MaskedEqualTestPolicy::MaskedEqual32(uint32_t mask, uint32_t value) {
@@ -1716,12 +1747,13 @@
class PthreadPolicyEquality : public Policy {
public:
PthreadPolicyEquality() {}
+
+ PthreadPolicyEquality(const PthreadPolicyEquality&) = delete;
+ PthreadPolicyEquality& operator=(const PthreadPolicyEquality&) = delete;
+
~PthreadPolicyEquality() override {}
ResultExpr EvaluateSyscall(int sysno) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PthreadPolicyEquality);
};
ResultExpr PthreadPolicyEquality::EvaluateSyscall(int sysno) const {
@@ -1761,6 +1793,10 @@
class PthreadPolicyBitMask : public Policy {
public:
PthreadPolicyBitMask() {}
+
+ PthreadPolicyBitMask(const PthreadPolicyBitMask&) = delete;
+ PthreadPolicyBitMask& operator=(const PthreadPolicyBitMask&) = delete;
+
~PthreadPolicyBitMask() override {}
ResultExpr EvaluateSyscall(int sysno) const override;
@@ -1768,8 +1804,6 @@
private:
static BoolExpr HasAnyBits(const Arg<unsigned long>& arg, unsigned long bits);
static BoolExpr HasAllBits(const Arg<unsigned long>& arg, unsigned long bits);
-
- DISALLOW_COPY_AND_ASSIGN(PthreadPolicyBitMask);
};
BoolExpr PthreadPolicyBitMask::HasAnyBits(const Arg<unsigned long>& arg,
@@ -1942,14 +1976,15 @@
class TraceAllPolicy : public Policy {
public:
TraceAllPolicy() {}
+
+ TraceAllPolicy(const TraceAllPolicy&) = delete;
+ TraceAllPolicy& operator=(const TraceAllPolicy&) = delete;
+
~TraceAllPolicy() override {}
ResultExpr EvaluateSyscall(int system_call_number) const override {
return Trace(kTraceData);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TraceAllPolicy);
};
SANDBOX_TEST(SandboxBPF, DISABLE_ON_TSAN(SeccompRetTrace)) {
@@ -2083,6 +2118,10 @@
class TrapPread64Policy : public Policy {
public:
TrapPread64Policy() {}
+
+ TrapPread64Policy(const TrapPread64Policy&) = delete;
+ TrapPread64Policy& operator=(const TrapPread64Policy&) = delete;
+
~TrapPread64Policy() override {}
ResultExpr EvaluateSyscall(int system_call_number) const override {
@@ -2105,8 +2144,6 @@
return SandboxBPF::ForwardSyscall(args);
}
-
- DISALLOW_COPY_AND_ASSIGN(TrapPread64Policy);
};
// pread(2) takes a 64 bits offset. On 32 bits systems, it will be split
@@ -2189,12 +2226,13 @@
class AllowAllPolicy : public Policy {
public:
AllowAllPolicy() {}
+
+ AllowAllPolicy(const AllowAllPolicy&) = delete;
+ AllowAllPolicy& operator=(const AllowAllPolicy&) = delete;
+
~AllowAllPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override { return Allow(); }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AllowAllPolicy);
};
SANDBOX_DEATH_TEST(
@@ -2217,6 +2255,10 @@
class UnsafeTrapWithCondPolicy : public Policy {
public:
UnsafeTrapWithCondPolicy() {}
+
+ UnsafeTrapWithCondPolicy(const UnsafeTrapWithCondPolicy&) = delete;
+ UnsafeTrapWithCondPolicy& operator=(const UnsafeTrapWithCondPolicy&) = delete;
+
~UnsafeTrapWithCondPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -2250,9 +2292,6 @@
return Error(EPERM);
}
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UnsafeTrapWithCondPolicy);
};
BPF_TEST_C(SandboxBPF, UnsafeTrapWithCond, UnsafeTrapWithCondPolicy) {
diff --git a/sandbox/linux/integration_tests/seccomp_broker_process_unittest.cc b/sandbox/linux/integration_tests/seccomp_broker_process_unittest.cc
index cda331f4..e8619d70 100644
--- a/sandbox/linux/integration_tests/seccomp_broker_process_unittest.cc
+++ b/sandbox/linux/integration_tests/seccomp_broker_process_unittest.cc
@@ -116,6 +116,10 @@
class DenyOpenPolicy : public bpf_dsl::Policy {
public:
explicit DenyOpenPolicy(InitializedOpenBroker* iob) : iob_(iob) {}
+
+ DenyOpenPolicy(const DenyOpenPolicy&) = delete;
+ DenyOpenPolicy& operator=(const DenyOpenPolicy&) = delete;
+
~DenyOpenPolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -141,8 +145,6 @@
private:
InitializedOpenBroker* iob_;
-
- DISALLOW_COPY_AND_ASSIGN(DenyOpenPolicy);
};
// We use a InitializedOpenBroker class, so that we can run unsandboxed
@@ -493,6 +495,12 @@
explicit HandleFilesystemViaBrokerPolicy(BrokerProcess* broker_process,
int denied_errno)
: broker_process_(broker_process), denied_errno_(denied_errno) {}
+
+ HandleFilesystemViaBrokerPolicy(const HandleFilesystemViaBrokerPolicy&) =
+ delete;
+ HandleFilesystemViaBrokerPolicy& operator=(
+ const HandleFilesystemViaBrokerPolicy&) = delete;
+
~HandleFilesystemViaBrokerPolicy() override = default;
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -518,8 +526,6 @@
private:
BrokerProcess* broker_process_;
int denied_errno_;
-
- DISALLOW_COPY_AND_ASSIGN(HandleFilesystemViaBrokerPolicy);
};
} // namespace syscall_broker
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.h b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.h
index fa40e72..6559546 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.h
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.h
@@ -31,6 +31,10 @@
// |fs_denied_errno| is the errno returned when a filesystem access system
// call is denied.
explicit BaselinePolicy(int fs_denied_errno);
+
+ BaselinePolicy(const BaselinePolicy&) = delete;
+ BaselinePolicy& operator=(const BaselinePolicy&) = delete;
+
~BaselinePolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
@@ -42,8 +46,6 @@
// The PID that the policy applies to (should be equal to the current pid).
pid_t policy_pid_;
-
- DISALLOW_COPY_AND_ASSIGN(BaselinePolicy);
};
} // namespace sandbox.
diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.h b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.h
index 77fdedf..863ddb3 100644
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.h
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_android.h
@@ -26,14 +26,15 @@
class SANDBOX_EXPORT BaselinePolicyAndroid : public BaselinePolicy {
public:
BaselinePolicyAndroid();
+
+ BaselinePolicyAndroid(const BaselinePolicyAndroid&) = delete;
+ BaselinePolicyAndroid& operator=(const BaselinePolicyAndroid&) = delete;
+
~BaselinePolicyAndroid() override;
// sandbox::BaselinePolicy:
sandbox::bpf_dsl::ResultExpr EvaluateSyscall(
int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BaselinePolicyAndroid);
};
} // namespace sandbox
diff --git a/sandbox/linux/seccomp-bpf-helpers/seccomp_starter_android.h b/sandbox/linux/seccomp-bpf-helpers/seccomp_starter_android.h
index 8c3f842..32498ea 100644
--- a/sandbox/linux/seccomp-bpf-helpers/seccomp_starter_android.h
+++ b/sandbox/linux/seccomp-bpf-helpers/seccomp_starter_android.h
@@ -39,6 +39,10 @@
// Constructs a sandbox starter helper. The |build_sdk_int| and |device| are
// used to detect whether Seccomp is supported.
SeccompStarterAndroid(int build_sdk_int, const char* device);
+
+ SeccompStarterAndroid(const SeccompStarterAndroid&) = delete;
+ SeccompStarterAndroid& operator=(const SeccompStarterAndroid&) = delete;
+
~SeccompStarterAndroid();
// Sets the BPF policy to apply. This must be called before StartSandbox()
@@ -64,8 +68,6 @@
const char* const device_;
SeccompSandboxStatus status_ = SeccompSandboxStatus::NOT_SUPPORTED;
std::unique_ptr<bpf_dsl::Policy> policy_;
-
- DISALLOW_COPY_AND_ASSIGN(SeccompStarterAndroid);
};
} // namespace sandbox
diff --git a/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h b/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
index a4315ba..7c05148 100644
--- a/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
+++ b/sandbox/linux/seccomp-bpf/bpf_tester_compatibility_delegate.h
@@ -27,6 +27,11 @@
explicit BPFTesterCompatibilityDelegate(TestFunction test_function)
: aux_(), test_function_(test_function) {}
+ BPFTesterCompatibilityDelegate(const BPFTesterCompatibilityDelegate&) =
+ delete;
+ BPFTesterCompatibilityDelegate& operator=(
+ const BPFTesterCompatibilityDelegate&) = delete;
+
~BPFTesterCompatibilityDelegate() override {}
std::unique_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
@@ -47,8 +52,6 @@
private:
Aux aux_;
TestFunction test_function_;
-
- DISALLOW_COPY_AND_ASSIGN(BPFTesterCompatibilityDelegate);
};
} // namespace sandbox
diff --git a/sandbox/linux/seccomp-bpf/bpf_tests.h b/sandbox/linux/seccomp-bpf/bpf_tests.h
index 5e35e99..b6a6e09 100644
--- a/sandbox/linux/seccomp-bpf/bpf_tests.h
+++ b/sandbox/linux/seccomp-bpf/bpf_tests.h
@@ -104,6 +104,10 @@
public:
explicit BPFTesterSimpleDelegate(void (*test_function)(void))
: test_function_(test_function) {}
+
+ BPFTesterSimpleDelegate(const BPFTesterSimpleDelegate&) = delete;
+ BPFTesterSimpleDelegate& operator=(const BPFTesterSimpleDelegate&) = delete;
+
~BPFTesterSimpleDelegate() override {}
std::unique_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
@@ -116,7 +120,6 @@
private:
void (*test_function_)(void);
- DISALLOW_COPY_AND_ASSIGN(BPFTesterSimpleDelegate);
};
} // namespace sandbox
diff --git a/sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc b/sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc
index d45bc87..d0f1c5c 100644
--- a/sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc
+++ b/sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc
@@ -86,6 +86,10 @@
class EnosysPtracePolicy : public bpf_dsl::Policy {
public:
EnosysPtracePolicy() { my_pid_ = sys_getpid(); }
+
+ EnosysPtracePolicy(const EnosysPtracePolicy&) = delete;
+ EnosysPtracePolicy& operator=(const EnosysPtracePolicy&) = delete;
+
~EnosysPtracePolicy() override {
// Policies should be able to bind with the process on which they are
// created. They should never be created in a parent process.
@@ -106,12 +110,15 @@
private:
pid_t my_pid_;
- DISALLOW_COPY_AND_ASSIGN(EnosysPtracePolicy);
};
class BasicBPFTesterDelegate : public BPFTesterDelegate {
public:
BasicBPFTesterDelegate() {}
+
+ BasicBPFTesterDelegate(const BasicBPFTesterDelegate&) = delete;
+ BasicBPFTesterDelegate& operator=(const BasicBPFTesterDelegate&) = delete;
+
~BasicBPFTesterDelegate() override {}
std::unique_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
@@ -123,9 +130,6 @@
BPF_ASSERT(-1 == ret);
BPF_ASSERT(ENOSYS == errno);
}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BasicBPFTesterDelegate);
};
// This is the most powerful and complex way to create a BPF test, but it
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.h b/sandbox/linux/seccomp-bpf/sandbox_bpf.h
index f62e37f..89da151 100644
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf.h
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.h
@@ -33,6 +33,10 @@
// Ownership of |policy| is transfered here to the sandbox object.
// nullptr is allowed for unit tests.
explicit SandboxBPF(std::unique_ptr<bpf_dsl::Policy> policy);
+
+ SandboxBPF(const SandboxBPF&) = delete;
+ SandboxBPF& operator=(const SandboxBPF&) = delete;
+
// NOTE: Setting a policy and starting the sandbox is a one-way operation.
// The kernel does not provide any option for unloading a loaded sandbox. The
// sandbox remains engaged even when the object is destructed.
@@ -116,8 +120,6 @@
base::ScopedFD proc_fd_;
bool sandbox_has_started_;
std::unique_ptr<bpf_dsl::Policy> policy_;
-
- DISALLOW_COPY_AND_ASSIGN(SandboxBPF);
};
} // namespace sandbox
diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.h b/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.h
index 4fc3c5d1..88e2784 100644
--- a/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.h
+++ b/sandbox/linux/seccomp-bpf/sandbox_bpf_test_runner.h
@@ -22,6 +22,10 @@
class BPFTesterDelegate {
public:
BPFTesterDelegate() {}
+
+ BPFTesterDelegate(const BPFTesterDelegate&) = delete;
+ BPFTesterDelegate& operator=(const BPFTesterDelegate&) = delete;
+
virtual ~BPFTesterDelegate() {}
// This will instanciate a policy suitable for the test we want to run. It is
@@ -30,9 +34,6 @@
virtual std::unique_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() = 0;
// This will be called from a child process with the BPF sandbox turned on.
virtual void RunTestFunction() = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BPFTesterDelegate);
};
// This class implements the SandboxTestRunner interface and Run() will
@@ -46,6 +47,10 @@
// This constructor takes ownership of the |bpf_tester_delegate| object.
// (It doesn't take a std::unique_ptr since they make polymorphism verbose).
explicit SandboxBPFTestRunner(BPFTesterDelegate* bpf_tester_delegate);
+
+ SandboxBPFTestRunner(const SandboxBPFTestRunner&) = delete;
+ SandboxBPFTestRunner& operator=(const SandboxBPFTestRunner&) = delete;
+
~SandboxBPFTestRunner() override;
void Run() override;
@@ -54,7 +59,6 @@
private:
std::unique_ptr<BPFTesterDelegate> bpf_tester_delegate_;
- DISALLOW_COPY_AND_ASSIGN(SandboxBPFTestRunner);
};
} // namespace sandbox
diff --git a/sandbox/linux/seccomp-bpf/syscall_unittest.cc b/sandbox/linux/seccomp-bpf/syscall_unittest.cc
index 39774c4..448d9ab 100644
--- a/sandbox/linux/seccomp-bpf/syscall_unittest.cc
+++ b/sandbox/linux/seccomp-bpf/syscall_unittest.cc
@@ -104,6 +104,10 @@
class CopyAllArgsOnUnamePolicy : public bpf_dsl::Policy {
public:
explicit CopyAllArgsOnUnamePolicy(std::vector<uint64_t>* aux) : aux_(aux) {}
+
+ CopyAllArgsOnUnamePolicy(const CopyAllArgsOnUnamePolicy&) = delete;
+ CopyAllArgsOnUnamePolicy& operator=(const CopyAllArgsOnUnamePolicy&) = delete;
+
~CopyAllArgsOnUnamePolicy() override {}
ResultExpr EvaluateSyscall(int sysno) const override {
@@ -117,8 +121,6 @@
private:
std::vector<uint64_t>* aux_;
-
- DISALLOW_COPY_AND_ASSIGN(CopyAllArgsOnUnamePolicy);
};
// We are testing Syscall::Call() by making use of a BPF filter that
diff --git a/sandbox/linux/services/namespace_sandbox.cc b/sandbox/linux/services/namespace_sandbox.cc
index 3ae2265..2a056af 100644
--- a/sandbox/linux/services/namespace_sandbox.cc
+++ b/sandbox/linux/services/namespace_sandbox.cc
@@ -46,6 +46,9 @@
supports_deny_setgroups_(
NamespaceUtils::KernelSupportsDenySetgroups()) {}
+ WriteUidGidMapDelegate(const WriteUidGidMapDelegate&) = delete;
+ WriteUidGidMapDelegate& operator=(const WriteUidGidMapDelegate&) = delete;
+
~WriteUidGidMapDelegate() override {}
void RunAsyncSafe() override {
@@ -60,7 +63,6 @@
const uid_t uid_;
const gid_t gid_;
const bool supports_deny_setgroups_;
- DISALLOW_COPY_AND_ASSIGN(WriteUidGidMapDelegate);
};
void SetEnvironForNamespaceType(base::EnvironmentMap* environ,
diff --git a/sandbox/linux/services/scoped_process.h b/sandbox/linux/services/scoped_process.h
index d0f8954d..a0fb431 100644
--- a/sandbox/linux/services/scoped_process.h
+++ b/sandbox/linux/services/scoped_process.h
@@ -25,6 +25,10 @@
// process. This callback is allowed to terminate the process or to simply
// return. If the callback returns, the process will wait forever.
explicit ScopedProcess(base::OnceClosure child_callback);
+
+ ScopedProcess(const ScopedProcess&) = delete;
+ ScopedProcess& operator=(const ScopedProcess&) = delete;
+
~ScopedProcess();
// Wait for the process to exit.
@@ -47,7 +51,6 @@
base::ProcessId child_process_id_;
base::ProcessId process_id_;
int pipe_fds_[2];
- DISALLOW_COPY_AND_ASSIGN(ScopedProcess);
};
} // namespace sandbox
diff --git a/sandbox/linux/services/thread_helpers_unittests.cc b/sandbox/linux/services/thread_helpers_unittests.cc
index f36b0c5..c5b75d1 100644
--- a/sandbox/linux/services/thread_helpers_unittests.cc
+++ b/sandbox/linux/services/thread_helpers_unittests.cc
@@ -38,13 +38,15 @@
CHECK_LE(0, fd_);
}
+ ScopedProc(const ScopedProc&) = delete;
+ ScopedProc& operator=(const ScopedProc&) = delete;
+
~ScopedProc() { PCHECK(0 == IGNORE_EINTR(close(fd_))); }
int fd() { return fd_; }
private:
int fd_;
- DISALLOW_COPY_AND_ASSIGN(ScopedProc);
};
TEST(ThreadHelpers, IsSingleThreadedBasic) {
diff --git a/sandbox/linux/suid/client/setuid_sandbox_client.h b/sandbox/linux/suid/client/setuid_sandbox_client.h
index 21ddab6..bbb1dfd 100644
--- a/sandbox/linux/suid/client/setuid_sandbox_client.h
+++ b/sandbox/linux/suid/client/setuid_sandbox_client.h
@@ -37,6 +37,10 @@
public:
// All instantation should go through this factory method.
static SetuidSandboxClient* Create();
+
+ SetuidSandboxClient(const SetuidSandboxClient&) = delete;
+ SetuidSandboxClient& operator=(const SetuidSandboxClient&) = delete;
+
~SetuidSandboxClient();
// Close the dummy file descriptor leftover from the sandbox ABI.
@@ -63,8 +67,6 @@
// Holds the environment. Will never be NULL.
std::unique_ptr<base::Environment> env_;
bool sandboxed_;
-
- DISALLOW_COPY_AND_ASSIGN(SetuidSandboxClient);
};
} // namespace sandbox
diff --git a/sandbox/linux/suid/client/setuid_sandbox_host.h b/sandbox/linux/suid/client/setuid_sandbox_host.h
index afa43de..da5b392 100644
--- a/sandbox/linux/suid/client/setuid_sandbox_host.h
+++ b/sandbox/linux/suid/client/setuid_sandbox_host.h
@@ -33,6 +33,10 @@
public:
// All instantation should go through this factory method.
static SetuidSandboxHost* Create();
+
+ SetuidSandboxHost(const SetuidSandboxHost&) = delete;
+ SetuidSandboxHost& operator=(const SetuidSandboxHost&) = delete;
+
~SetuidSandboxHost();
// The setuid sandbox may still be disabled via the environment.
@@ -67,8 +71,6 @@
// Holds the environment. Will never be NULL.
std::unique_ptr<base::Environment> env_;
-
- DISALLOW_COPY_AND_ASSIGN(SetuidSandboxHost);
};
} // namespace sandbox
diff --git a/sandbox/linux/syscall_broker/broker_client.h b/sandbox/linux/syscall_broker/broker_client.h
index 26ca781..c265555 100644
--- a/sandbox/linux/syscall_broker/broker_client.h
+++ b/sandbox/linux/syscall_broker/broker_client.h
@@ -43,6 +43,10 @@
BrokerChannel::EndPoint ipc_channel,
const BrokerCommandSet& allowed_command_set,
bool fast_check_in_client);
+
+ BrokerClient(const BrokerClient&) = delete;
+ BrokerClient& operator=(const BrokerClient&) = delete;
+
~BrokerClient() override;
// Get the file descriptor used for IPC.
@@ -90,8 +94,6 @@
const bool fast_check_in_client_; // Whether to forward a request that we
// know will be denied to the broker. (Used
// for tests).
-
- DISALLOW_COPY_AND_ASSIGN(BrokerClient);
};
} // namespace syscall_broker
diff --git a/sandbox/linux/syscall_broker/broker_host.h b/sandbox/linux/syscall_broker/broker_host.h
index 4b0f3e3..675e7e6 100644
--- a/sandbox/linux/syscall_broker/broker_host.h
+++ b/sandbox/linux/syscall_broker/broker_host.h
@@ -23,6 +23,10 @@
BrokerHost(const BrokerPermissionList& broker_permission_list,
const BrokerCommandSet& allowed_command_set,
BrokerChannel::EndPoint ipc_channel);
+
+ BrokerHost(const BrokerHost&) = delete;
+ BrokerHost& operator=(const BrokerHost&) = delete;
+
~BrokerHost();
// Receive system call requests and handle them forevermore.
@@ -32,8 +36,6 @@
const BrokerPermissionList& broker_permission_list_;
const BrokerCommandSet allowed_command_set_;
const BrokerChannel::EndPoint ipc_channel_;
-
- DISALLOW_COPY_AND_ASSIGN(BrokerHost);
};
} // namespace syscall_broker
diff --git a/sandbox/linux/syscall_broker/broker_permission_list.h b/sandbox/linux/syscall_broker/broker_permission_list.h
index 0b2e2f0..dd70413b 100644
--- a/sandbox/linux/syscall_broker/broker_permission_list.h
+++ b/sandbox/linux/syscall_broker/broker_permission_list.h
@@ -31,6 +31,9 @@
BrokerPermissionList(int denied_errno,
const std::vector<BrokerFilePermission>& permissions);
+ BrokerPermissionList(const BrokerPermissionList&) = delete;
+ BrokerPermissionList& operator=(const BrokerPermissionList&) = delete;
+
~BrokerPermissionList();
// Check if calling access() should be allowed on |requested_filename| with
@@ -88,8 +91,6 @@
// permissions_ and is used in async signal safe methods.
const BrokerFilePermission* permissions_array_;
const size_t num_of_permissions_;
-
- DISALLOW_COPY_AND_ASSIGN(BrokerPermissionList);
};
} // namespace syscall_broker
diff --git a/sandbox/linux/syscall_broker/broker_process.h b/sandbox/linux/syscall_broker/broker_process.h
index 3cd01bc..30464dd5 100644
--- a/sandbox/linux/syscall_broker/broker_process.h
+++ b/sandbox/linux/syscall_broker/broker_process.h
@@ -62,6 +62,9 @@
bool fast_check_in_client = true,
bool quiet_failures_for_tests = false);
+ BrokerProcess(const BrokerProcess&) = delete;
+ BrokerProcess& operator=(const BrokerProcess&) = delete;
+
~BrokerProcess();
// Will initialize the broker process. There should be no threads at this
@@ -115,8 +118,6 @@
syscall_broker::BrokerPermissionList
broker_permission_list_; // File access allowlist.
std::unique_ptr<syscall_broker::BrokerClient> broker_client_;
-
- DISALLOW_COPY_AND_ASSIGN(BrokerProcess);
};
} // namespace syscall_broker
diff --git a/sandbox/linux/tests/sandbox_test_runner.h b/sandbox/linux/tests/sandbox_test_runner.h
index 3155b74..a2d76e6 100644
--- a/sandbox/linux/tests/sandbox_test_runner.h
+++ b/sandbox/linux/tests/sandbox_test_runner.h
@@ -13,6 +13,10 @@
class SandboxTestRunner {
public:
SandboxTestRunner();
+
+ SandboxTestRunner(const SandboxTestRunner&) = delete;
+ SandboxTestRunner& operator=(const SandboxTestRunner&) = delete;
+
virtual ~SandboxTestRunner();
virtual void Run() = 0;
@@ -20,9 +24,6 @@
// Override to decide whether or not to check for leaks with LSAN
// (if built with LSAN and LSAN is enabled).
virtual bool ShouldCheckForLeaks() const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SandboxTestRunner);
};
} // namespace sandbox
diff --git a/sandbox/linux/tests/sandbox_test_runner_function_pointer.h b/sandbox/linux/tests/sandbox_test_runner_function_pointer.h
index 968e787a..76ec792 100644
--- a/sandbox/linux/tests/sandbox_test_runner_function_pointer.h
+++ b/sandbox/linux/tests/sandbox_test_runner_function_pointer.h
@@ -13,12 +13,17 @@
class SandboxTestRunnerFunctionPointer : public SandboxTestRunner {
public:
explicit SandboxTestRunnerFunctionPointer(void (*function_to_run)());
+
+ SandboxTestRunnerFunctionPointer(const SandboxTestRunnerFunctionPointer&) =
+ delete;
+ SandboxTestRunnerFunctionPointer& operator=(
+ const SandboxTestRunnerFunctionPointer&) = delete;
+
~SandboxTestRunnerFunctionPointer() override;
void Run() override;
private:
void (*function_to_run_)(void);
- DISALLOW_COPY_AND_ASSIGN(SandboxTestRunnerFunctionPointer);
};
} // namespace sandbox
diff --git a/sandbox/linux/tests/scoped_temporary_file.h b/sandbox/linux/tests/scoped_temporary_file.h
index 07341300..9f3715e 100644
--- a/sandbox/linux/tests/scoped_temporary_file.h
+++ b/sandbox/linux/tests/scoped_temporary_file.h
@@ -14,6 +14,10 @@
class ScopedTemporaryFile {
public:
ScopedTemporaryFile();
+
+ ScopedTemporaryFile(const ScopedTemporaryFile&) = delete;
+ ScopedTemporaryFile& operator=(const ScopedTemporaryFile&) = delete;
+
~ScopedTemporaryFile();
int fd() const { return fd_; }
@@ -22,7 +26,6 @@
private:
int fd_;
char full_file_name_[128];
- DISALLOW_COPY_AND_ASSIGN(ScopedTemporaryFile);
};
} // namespace sandbox
diff --git a/sandbox/mac/seatbelt_extension.h b/sandbox/mac/seatbelt_extension.h
index 2d1f061..00b25a1c 100644
--- a/sandbox/mac/seatbelt_extension.h
+++ b/sandbox/mac/seatbelt_extension.h
@@ -35,6 +35,9 @@
// TODO(rsesek): Potentially support MACH and GENERIC extension types.
};
+ SeatbeltExtension(const SeatbeltExtension&) = delete;
+ SeatbeltExtension& operator=(const SeatbeltExtension&) = delete;
+
// Before an extension is destroyed, it must be consumed or explicitly
// revoked.
~SeatbeltExtension();
@@ -82,8 +85,6 @@
// An opaque reference to a consumed extension, 0 if revoked or not consumed.
int64_t handle_;
-
- DISALLOW_COPY_AND_ASSIGN(SeatbeltExtension);
};
} // namespace sandbox
diff --git a/sandbox/mac/seatbelt_extension_token.h b/sandbox/mac/seatbelt_extension_token.h
index 733b004..a49694b3 100644
--- a/sandbox/mac/seatbelt_extension_token.h
+++ b/sandbox/mac/seatbelt_extension_token.h
@@ -33,6 +33,10 @@
class SEATBELT_EXPORT SeatbeltExtensionToken {
public:
SeatbeltExtensionToken();
+
+ SeatbeltExtensionToken(const SeatbeltExtensionToken&) = delete;
+ SeatbeltExtensionToken& operator=(const SeatbeltExtensionToken&) = delete;
+
~SeatbeltExtensionToken();
// Token objects are move-only types.
@@ -55,8 +59,6 @@
private:
std::string token_;
-
- DISALLOW_COPY_AND_ASSIGN(SeatbeltExtensionToken);
};
} // namespace sandbox
diff --git a/sandbox/policy/linux/bpf_audio_policy_linux.h b/sandbox/policy/linux/bpf_audio_policy_linux.h
index 56067e8..cf2942c5 100644
--- a/sandbox/policy/linux/bpf_audio_policy_linux.h
+++ b/sandbox/policy/linux/bpf_audio_policy_linux.h
@@ -15,12 +15,13 @@
class SANDBOX_POLICY_EXPORT AudioProcessPolicy : public BPFBasePolicy {
public:
AudioProcessPolicy();
+
+ AudioProcessPolicy(const AudioProcessPolicy&) = delete;
+ AudioProcessPolicy& operator=(const AudioProcessPolicy&) = delete;
+
~AudioProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(AudioProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_base_policy_linux.h b/sandbox/policy/linux/bpf_base_policy_linux.h
index 57152a0a..4698abaa 100644
--- a/sandbox/policy/linux/bpf_base_policy_linux.h
+++ b/sandbox/policy/linux/bpf_base_policy_linux.h
@@ -23,6 +23,10 @@
class SANDBOX_POLICY_EXPORT BPFBasePolicy : public bpf_dsl::Policy {
public:
BPFBasePolicy();
+
+ BPFBasePolicy(const BPFBasePolicy&) = delete;
+ BPFBasePolicy& operator=(const BPFBasePolicy&) = delete;
+
~BPFBasePolicy() override;
// bpf_dsl::Policy:
@@ -37,7 +41,6 @@
private:
// Compose the BaselinePolicy from sandbox/.
std::unique_ptr<BaselinePolicy> baseline_policy_;
- DISALLOW_COPY_AND_ASSIGN(BPFBasePolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_broker_policy_linux.h b/sandbox/policy/linux/bpf_broker_policy_linux.h
index 1d394c5..a0d9f253 100644
--- a/sandbox/policy/linux/bpf_broker_policy_linux.h
+++ b/sandbox/policy/linux/bpf_broker_policy_linux.h
@@ -19,14 +19,16 @@
public:
explicit BrokerProcessPolicy(
const syscall_broker::BrokerCommandSet& allowed_command_set);
+
+ BrokerProcessPolicy(const BrokerProcessPolicy&) = delete;
+ BrokerProcessPolicy& operator=(const BrokerProcessPolicy&) = delete;
+
~BrokerProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
private:
const syscall_broker::BrokerCommandSet allowed_command_set_;
-
- DISALLOW_COPY_AND_ASSIGN(BrokerProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_cdm_policy_linux.h b/sandbox/policy/linux/bpf_cdm_policy_linux.h
index ebf7de5..3e4c15b9 100644
--- a/sandbox/policy/linux/bpf_cdm_policy_linux.h
+++ b/sandbox/policy/linux/bpf_cdm_policy_linux.h
@@ -15,12 +15,13 @@
class CdmProcessPolicy : public BPFBasePolicy {
public:
CdmProcessPolicy();
+
+ CdmProcessPolicy(const CdmProcessPolicy&) = delete;
+ CdmProcessPolicy& operator=(const CdmProcessPolicy&) = delete;
+
~CdmProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CdmProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.h b/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.h
index 305128c..7b0e231 100644
--- a/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.h
+++ b/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.h
@@ -16,12 +16,13 @@
class SANDBOX_POLICY_EXPORT CrosAmdGpuProcessPolicy : public GpuProcessPolicy {
public:
CrosAmdGpuProcessPolicy();
+
+ CrosAmdGpuProcessPolicy(const CrosAmdGpuProcessPolicy&) = delete;
+ CrosAmdGpuProcessPolicy& operator=(const CrosAmdGpuProcessPolicy&) = delete;
+
~CrosAmdGpuProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(CrosAmdGpuProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_cros_arm_gpu_policy_linux.h b/sandbox/policy/linux/bpf_cros_arm_gpu_policy_linux.h
index 2b7ad40..e49565c 100644
--- a/sandbox/policy/linux/bpf_cros_arm_gpu_policy_linux.h
+++ b/sandbox/policy/linux/bpf_cros_arm_gpu_policy_linux.h
@@ -16,6 +16,10 @@
class SANDBOX_POLICY_EXPORT CrosArmGpuProcessPolicy : public GpuProcessPolicy {
public:
explicit CrosArmGpuProcessPolicy(bool allow_shmat);
+
+ CrosArmGpuProcessPolicy(const CrosArmGpuProcessPolicy&) = delete;
+ CrosArmGpuProcessPolicy& operator=(const CrosArmGpuProcessPolicy&) = delete;
+
~CrosArmGpuProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
@@ -24,7 +28,6 @@
#if defined(__arm__) || defined(__aarch64__)
const bool allow_shmat_; // Allow shmat(2).
#endif
- DISALLOW_COPY_AND_ASSIGN(CrosArmGpuProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_gpu_policy_linux.h b/sandbox/policy/linux/bpf_gpu_policy_linux.h
index a76a6362..b7fec793 100644
--- a/sandbox/policy/linux/bpf_gpu_policy_linux.h
+++ b/sandbox/policy/linux/bpf_gpu_policy_linux.h
@@ -15,12 +15,13 @@
class SANDBOX_POLICY_EXPORT GpuProcessPolicy : public BPFBasePolicy {
public:
GpuProcessPolicy();
+
+ GpuProcessPolicy(const GpuProcessPolicy&) = delete;
+ GpuProcessPolicy& operator=(const GpuProcessPolicy&) = delete;
+
~GpuProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GpuProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_ime_policy_linux.h b/sandbox/policy/linux/bpf_ime_policy_linux.h
index 2ecb90b..afeb51c 100644
--- a/sandbox/policy/linux/bpf_ime_policy_linux.h
+++ b/sandbox/policy/linux/bpf_ime_policy_linux.h
@@ -15,12 +15,13 @@
class SANDBOX_POLICY_EXPORT ImeProcessPolicy : public BPFBasePolicy {
public:
ImeProcessPolicy();
+
+ ImeProcessPolicy(const ImeProcessPolicy&) = delete;
+ ImeProcessPolicy& operator=(const ImeProcessPolicy&) = delete;
+
~ImeProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int sysno) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ImeProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_network_policy_linux.h b/sandbox/policy/linux/bpf_network_policy_linux.h
index 09d25c0..eea3569 100644
--- a/sandbox/policy/linux/bpf_network_policy_linux.h
+++ b/sandbox/policy/linux/bpf_network_policy_linux.h
@@ -15,12 +15,13 @@
class SANDBOX_POLICY_EXPORT NetworkProcessPolicy : public BPFBasePolicy {
public:
NetworkProcessPolicy();
+
+ NetworkProcessPolicy(const NetworkProcessPolicy&) = delete;
+ NetworkProcessPolicy& operator=(const NetworkProcessPolicy&) = delete;
+
~NetworkProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(NetworkProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_ppapi_policy_linux.h b/sandbox/policy/linux/bpf_ppapi_policy_linux.h
index f905534..196c113f 100644
--- a/sandbox/policy/linux/bpf_ppapi_policy_linux.h
+++ b/sandbox/policy/linux/bpf_ppapi_policy_linux.h
@@ -15,12 +15,13 @@
class PpapiProcessPolicy : public BPFBasePolicy {
public:
PpapiProcessPolicy();
+
+ PpapiProcessPolicy(const PpapiProcessPolicy&) = delete;
+ PpapiProcessPolicy& operator=(const PpapiProcessPolicy&) = delete;
+
~PpapiProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PpapiProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_print_compositor_policy_linux.h b/sandbox/policy/linux/bpf_print_compositor_policy_linux.h
index 4d082c37..a5c81ad 100644
--- a/sandbox/policy/linux/bpf_print_compositor_policy_linux.h
+++ b/sandbox/policy/linux/bpf_print_compositor_policy_linux.h
@@ -15,12 +15,14 @@
class PrintCompositorProcessPolicy : public BPFBasePolicy {
public:
PrintCompositorProcessPolicy();
+
+ PrintCompositorProcessPolicy(const PrintCompositorProcessPolicy&) = delete;
+ PrintCompositorProcessPolicy& operator=(const PrintCompositorProcessPolicy&) =
+ delete;
+
~PrintCompositorProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(PrintCompositorProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_renderer_policy_linux.h b/sandbox/policy/linux/bpf_renderer_policy_linux.h
index 01351e3..c05e304 100644
--- a/sandbox/policy/linux/bpf_renderer_policy_linux.h
+++ b/sandbox/policy/linux/bpf_renderer_policy_linux.h
@@ -15,12 +15,13 @@
class RendererProcessPolicy : public BPFBasePolicy {
public:
RendererProcessPolicy();
+
+ RendererProcessPolicy(const RendererProcessPolicy&) = delete;
+ RendererProcessPolicy& operator=(const RendererProcessPolicy&) = delete;
+
~RendererProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(RendererProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_speech_recognition_policy_linux.h b/sandbox/policy/linux/bpf_speech_recognition_policy_linux.h
index f31e852..71aa03e 100644
--- a/sandbox/policy/linux/bpf_speech_recognition_policy_linux.h
+++ b/sandbox/policy/linux/bpf_speech_recognition_policy_linux.h
@@ -18,12 +18,15 @@
: public BPFBasePolicy {
public:
SpeechRecognitionProcessPolicy();
+
+ SpeechRecognitionProcessPolicy(const SpeechRecognitionProcessPolicy&) =
+ delete;
+ SpeechRecognitionProcessPolicy& operator=(
+ const SpeechRecognitionProcessPolicy&) = delete;
+
~SpeechRecognitionProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SpeechRecognitionProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_tts_policy_linux.h b/sandbox/policy/linux/bpf_tts_policy_linux.h
index 9e4dd927..95fb79c 100644
--- a/sandbox/policy/linux/bpf_tts_policy_linux.h
+++ b/sandbox/policy/linux/bpf_tts_policy_linux.h
@@ -15,12 +15,13 @@
class SANDBOX_POLICY_EXPORT TtsProcessPolicy : public BPFBasePolicy {
public:
TtsProcessPolicy();
+
+ TtsProcessPolicy(const TtsProcessPolicy&) = delete;
+ TtsProcessPolicy& operator=(const TtsProcessPolicy&) = delete;
+
~TtsProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int sysno) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TtsProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/policy/linux/bpf_utility_policy_linux.h b/sandbox/policy/linux/bpf_utility_policy_linux.h
index fea3ea43..ef1d6ed 100644
--- a/sandbox/policy/linux/bpf_utility_policy_linux.h
+++ b/sandbox/policy/linux/bpf_utility_policy_linux.h
@@ -15,12 +15,13 @@
class UtilityProcessPolicy : public BPFBasePolicy {
public:
UtilityProcessPolicy();
+
+ UtilityProcessPolicy(const UtilityProcessPolicy&) = delete;
+ UtilityProcessPolicy& operator=(const UtilityProcessPolicy&) = delete;
+
~UtilityProcessPolicy() override;
bpf_dsl::ResultExpr EvaluateSyscall(int system_call_number) const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(UtilityProcessPolicy);
};
} // namespace policy
diff --git a/sandbox/win/sandbox_poc/main_ui_window.h b/sandbox/win/sandbox_poc/main_ui_window.h
index 2287128..b69f848 100644
--- a/sandbox/win/sandbox_poc/main_ui_window.h
+++ b/sandbox/win/sandbox_poc/main_ui_window.h
@@ -45,6 +45,10 @@
class MainUIWindow {
public:
MainUIWindow();
+
+ MainUIWindow(const MainUIWindow&) = delete;
+ MainUIWindow& operator=(const MainUIWindow&) = delete;
+
~MainUIWindow();
// Creates the main window, displays it and starts the message pump. This
@@ -187,8 +191,6 @@
// Pipe used to communicate the logs between the target and the broker.
HANDLE pipe_handle_;
-
- DISALLOW_COPY_AND_ASSIGN(MainUIWindow);
};
#endif // SANDBOX_WIN_SANDBOX_POC_MAIN_UI_WINDOW_H_
diff --git a/sandbox/win/sandbox_poc/pocdll/utils.h b/sandbox/win/sandbox_poc/pocdll/utils.h
index 09c4d2e6..1e0a82d 100644
--- a/sandbox/win/sandbox_poc/pocdll/utils.h
+++ b/sandbox/win/sandbox_poc/pocdll/utils.h
@@ -16,6 +16,9 @@
public:
HandleToFile() { file_ = nullptr; }
+ HandleToFile(const HandleToFile&) = delete;
+ HandleToFile& operator=(const HandleToFile&) = delete;
+
// Note: c_file_handle_ does not need to be closed because fclose does it.
~HandleToFile() {
if (file_) {
@@ -57,8 +60,6 @@
private:
// the FILE* returned. We need to closed it at the end.
FILE* file_;
-
- DISALLOW_COPY_AND_ASSIGN(HandleToFile);
};
#endif // SANDBOX_WIN_SANDBOX_POC_POCDLL_UTILS_H_
diff --git a/sandbox/win/src/broker_services.h b/sandbox/win/src/broker_services.h
index 2053a1f6..ea5edb3 100644
--- a/sandbox/win/src/broker_services.h
+++ b/sandbox/win/src/broker_services.h
@@ -36,6 +36,9 @@
public:
BrokerServicesBase();
+ BrokerServicesBase(const BrokerServicesBase&) = delete;
+ BrokerServicesBase& operator=(const BrokerServicesBase&) = delete;
+
~BrokerServicesBase();
// BrokerServices interface.
@@ -66,8 +69,6 @@
// Provides a pool of threads that are used to wait on the IPC calls.
// Owned by TargetEventsThread which is alive until our destructor.
ThreadPool* thread_pool_ = nullptr;
-
- DISALLOW_COPY_AND_ASSIGN(BrokerServicesBase);
};
} // namespace sandbox
diff --git a/sandbox/win/src/eat_resolver.h b/sandbox/win/src/eat_resolver.h
index a8df0b44..10c8fb13 100644
--- a/sandbox/win/src/eat_resolver.h
+++ b/sandbox/win/src/eat_resolver.h
@@ -17,6 +17,10 @@
class EatResolverThunk : public ResolverThunk {
public:
EatResolverThunk() : eat_entry_(nullptr) {}
+
+ EatResolverThunk(const EatResolverThunk&) = delete;
+ EatResolverThunk& operator=(const EatResolverThunk&) = delete;
+
~EatResolverThunk() override {}
// Implementation of Resolver::Setup.
@@ -40,8 +44,6 @@
private:
// The entry to patch.
DWORD* eat_entry_;
-
- DISALLOW_COPY_AND_ASSIGN(EatResolverThunk);
};
} // namespace sandbox
diff --git a/sandbox/win/src/filesystem_dispatcher.h b/sandbox/win/src/filesystem_dispatcher.h
index 5ebe0fb..4c935ad 100644
--- a/sandbox/win/src/filesystem_dispatcher.h
+++ b/sandbox/win/src/filesystem_dispatcher.h
@@ -20,6 +20,10 @@
class FilesystemDispatcher : public Dispatcher {
public:
explicit FilesystemDispatcher(PolicyBase* policy_base);
+
+ FilesystemDispatcher(const FilesystemDispatcher&) = delete;
+ FilesystemDispatcher& operator=(const FilesystemDispatcher&) = delete;
+
~FilesystemDispatcher() override {}
// Dispatcher interface.
@@ -68,7 +72,6 @@
uint32_t info_class);
PolicyBase* policy_base_;
- DISALLOW_COPY_AND_ASSIGN(FilesystemDispatcher);
};
} // namespace sandbox
diff --git a/sandbox/win/src/handle_closer.h b/sandbox/win/src/handle_closer.h
index d00a13f..7f66f6f 100644
--- a/sandbox/win/src/handle_closer.h
+++ b/sandbox/win/src/handle_closer.h
@@ -45,6 +45,10 @@
class HandleCloser {
public:
HandleCloser();
+
+ HandleCloser(const HandleCloser&) = delete;
+ HandleCloser& operator=(const HandleCloser&) = delete;
+
~HandleCloser();
// Adds a handle that will be closed in the target process after lockdown.
@@ -67,8 +71,6 @@
bool SetupHandleList(void* buffer, size_t buffer_bytes);
HandleMap handles_to_close_;
-
- DISALLOW_COPY_AND_ASSIGN(HandleCloser);
};
// Returns the object manager's name associated with a handle
diff --git a/sandbox/win/src/handle_closer_agent.h b/sandbox/win/src/handle_closer_agent.h
index fc7a8358..f77c971 100644
--- a/sandbox/win/src/handle_closer_agent.h
+++ b/sandbox/win/src/handle_closer_agent.h
@@ -19,6 +19,10 @@
class HandleCloserAgent {
public:
HandleCloserAgent();
+
+ HandleCloserAgent(const HandleCloserAgent&) = delete;
+ HandleCloserAgent& operator=(const HandleCloserAgent&) = delete;
+
~HandleCloserAgent();
// Reads the serialized list from the broker and creates the lookup map.
@@ -37,8 +41,6 @@
HandleMap handles_to_close_;
base::win::ScopedHandle dummy_handle_;
-
- DISALLOW_COPY_AND_ASSIGN(HandleCloserAgent);
};
} // namespace sandbox
diff --git a/sandbox/win/src/interception.h b/sandbox/win/src/interception.h
index 0f1b341..7bf76cb 100644
--- a/sandbox/win/src/interception.h
+++ b/sandbox/win/src/interception.h
@@ -71,6 +71,10 @@
// else, relaxed should be set to true.
// |child_process| should outlive the manager.
InterceptionManager(TargetProcess& child_process, bool relaxed);
+
+ InterceptionManager(const InterceptionManager&) = delete;
+ InterceptionManager& operator=(const InterceptionManager&) = delete;
+
~InterceptionManager();
// Patches function_name inside dll_name to point to replacement_code_address.
@@ -218,8 +222,6 @@
// true if we are allowed to patch already-patched functions.
bool relaxed_;
-
- DISALLOW_COPY_AND_ASSIGN(InterceptionManager);
};
// This macro simply calls interception_manager.AddToPatchedFunctions with
diff --git a/sandbox/win/src/job.h b/sandbox/win/src/job.h
index 3f57426..7e61875 100644
--- a/sandbox/win/src/job.h
+++ b/sandbox/win/src/job.h
@@ -22,6 +22,9 @@
public:
Job();
+ Job(const Job&) = delete;
+ Job& operator=(const Job&) = delete;
+
~Job();
// Initializes and creates the job object. The security of the job is based
@@ -61,8 +64,6 @@
private:
// Handle to the job referenced by the object.
base::win::ScopedHandle job_handle_;
-
- DISALLOW_COPY_AND_ASSIGN(Job);
};
} // namespace sandbox
diff --git a/sandbox/win/src/named_pipe_dispatcher.h b/sandbox/win/src/named_pipe_dispatcher.h
index 14d15ba..3f950ec3 100644
--- a/sandbox/win/src/named_pipe_dispatcher.h
+++ b/sandbox/win/src/named_pipe_dispatcher.h
@@ -20,6 +20,10 @@
class NamedPipeDispatcher : public Dispatcher {
public:
explicit NamedPipeDispatcher(PolicyBase* policy_base);
+
+ NamedPipeDispatcher(const NamedPipeDispatcher&) = delete;
+ NamedPipeDispatcher& operator=(const NamedPipeDispatcher&) = delete;
+
~NamedPipeDispatcher() override {}
// Dispatcher interface.
@@ -38,7 +42,6 @@
uint32_t default_timeout);
PolicyBase* policy_base_;
- DISALLOW_COPY_AND_ASSIGN(NamedPipeDispatcher);
};
} // namespace sandbox
diff --git a/sandbox/win/src/process_mitigations_dyncode_unittest.cc b/sandbox/win/src/process_mitigations_dyncode_unittest.cc
index cdc1363..07f86f1 100644
--- a/sandbox/win/src/process_mitigations_dyncode_unittest.cc
+++ b/sandbox/win/src/process_mitigations_dyncode_unittest.cc
@@ -169,6 +169,9 @@
file_path_(path),
return_code_(sandbox::SBOX_TEST_NOT_FOUND) {}
+ DynamicCodeOptOutThread(const DynamicCodeOptOutThread&) = delete;
+ DynamicCodeOptOutThread& operator=(const DynamicCodeOptOutThread&) = delete;
+
~DynamicCodeOptOutThread() {
if (thread_) {
::CloseHandle(thread_);
@@ -238,8 +241,6 @@
DynCodeAPI which_api_test_;
wchar_t* file_path_;
int return_code_;
-
- DISALLOW_COPY_AND_ASSIGN(DynamicCodeOptOutThread);
};
//------------------------------------------------------------------------------
diff --git a/sandbox/win/src/process_mitigations_win32k_dispatcher.h b/sandbox/win/src/process_mitigations_win32k_dispatcher.h
index 0892b84..f875fb8 100644
--- a/sandbox/win/src/process_mitigations_win32k_dispatcher.h
+++ b/sandbox/win/src/process_mitigations_win32k_dispatcher.h
@@ -19,6 +19,12 @@
class ProcessMitigationsWin32KDispatcher : public Dispatcher {
public:
explicit ProcessMitigationsWin32KDispatcher(PolicyBase* policy_base);
+
+ ProcessMitigationsWin32KDispatcher(
+ const ProcessMitigationsWin32KDispatcher&) = delete;
+ ProcessMitigationsWin32KDispatcher& operator=(
+ const ProcessMitigationsWin32KDispatcher&) = delete;
+
~ProcessMitigationsWin32KDispatcher() override;
// Dispatcher interface.
@@ -26,8 +32,6 @@
private:
PolicyBase* policy_base_;
-
- DISALLOW_COPY_AND_ASSIGN(ProcessMitigationsWin32KDispatcher);
};
} // namespace sandbox
diff --git a/sandbox/win/src/process_thread_dispatcher.h b/sandbox/win/src/process_thread_dispatcher.h
index 7d193ea..ffef8e1 100644
--- a/sandbox/win/src/process_thread_dispatcher.h
+++ b/sandbox/win/src/process_thread_dispatcher.h
@@ -20,6 +20,10 @@
class ThreadProcessDispatcher : public Dispatcher {
public:
explicit ThreadProcessDispatcher(PolicyBase* policy_base);
+
+ ThreadProcessDispatcher(const ThreadProcessDispatcher&) = delete;
+ ThreadProcessDispatcher& operator=(const ThreadProcessDispatcher&) = delete;
+
~ThreadProcessDispatcher() override {}
// Dispatcher interface.
@@ -61,7 +65,6 @@
DWORD creation_flags);
PolicyBase* policy_base_;
- DISALLOW_COPY_AND_ASSIGN(ThreadProcessDispatcher);
};
} // namespace sandbox
diff --git a/sandbox/win/src/registry_dispatcher.h b/sandbox/win/src/registry_dispatcher.h
index 520837ab..9d27befc 100644
--- a/sandbox/win/src/registry_dispatcher.h
+++ b/sandbox/win/src/registry_dispatcher.h
@@ -20,6 +20,10 @@
class RegistryDispatcher : public Dispatcher {
public:
explicit RegistryDispatcher(PolicyBase* policy_base);
+
+ RegistryDispatcher(const RegistryDispatcher&) = delete;
+ RegistryDispatcher& operator=(const RegistryDispatcher&) = delete;
+
~RegistryDispatcher() override {}
// Dispatcher interface.
@@ -43,7 +47,6 @@
uint32_t desired_access);
PolicyBase* policy_base_;
- DISALLOW_COPY_AND_ASSIGN(RegistryDispatcher);
};
} // namespace sandbox
diff --git a/sandbox/win/src/resolver.h b/sandbox/win/src/resolver.h
index 3ce427b..405a05f 100644
--- a/sandbox/win/src/resolver.h
+++ b/sandbox/win/src/resolver.h
@@ -22,6 +22,10 @@
class ResolverThunk {
public:
ResolverThunk() {}
+
+ ResolverThunk(const ResolverThunk&) = delete;
+ ResolverThunk& operator=(const ResolverThunk&) = delete;
+
virtual ~ResolverThunk() {}
// Performs the actual interception of a function.
@@ -98,8 +102,6 @@
void* target_;
// Holds the resolved interception interceptor.
const void* interceptor_;
-
- DISALLOW_COPY_AND_ASSIGN(ResolverThunk);
};
} // namespace sandbox
diff --git a/sandbox/win/src/restricted_token.h b/sandbox/win/src/restricted_token.h
index 49b4b48..eff6a10f 100644
--- a/sandbox/win/src/restricted_token.h
+++ b/sandbox/win/src/restricted_token.h
@@ -49,6 +49,10 @@
public:
// Init() has to be called before calling any other method in the class.
RestrictedToken();
+
+ RestrictedToken(const RestrictedToken&) = delete;
+ RestrictedToken& operator=(const RestrictedToken&) = delete;
+
~RestrictedToken();
// Initializes the RestrictedToken object with effective_token.
@@ -198,8 +202,6 @@
bool init_;
// Lockdown the default DACL when creating new tokens.
bool lockdown_default_dacl_;
-
- DISALLOW_COPY_AND_ASSIGN(RestrictedToken);
};
} // namespace sandbox
diff --git a/sandbox/win/src/sandbox_nt_util.h b/sandbox/win/src/sandbox_nt_util.h
index 89766f7b..b7763ada 100644
--- a/sandbox/win/src/sandbox_nt_util.h
+++ b/sandbox/win/src/sandbox_nt_util.h
@@ -189,6 +189,9 @@
AutoProtectMemory()
: changed_(false), address_(nullptr), bytes_(0), old_protect_(0) {}
+ AutoProtectMemory(const AutoProtectMemory&) = delete;
+ AutoProtectMemory& operator=(const AutoProtectMemory&) = delete;
+
~AutoProtectMemory() { RevertProtection(); }
// Sets the desired protection of a given memory range.
@@ -202,8 +205,6 @@
void* address_;
size_t bytes_;
ULONG old_protect_;
-
- DISALLOW_COPY_AND_ASSIGN(AutoProtectMemory);
};
// Returns true if the file_rename_information structure is supported by our
diff --git a/sandbox/win/src/sandbox_policy_diagnostic.h b/sandbox/win/src/sandbox_policy_diagnostic.h
index d5ab466..c0426741d 100644
--- a/sandbox/win/src/sandbox_policy_diagnostic.h
+++ b/sandbox/win/src/sandbox_policy_diagnostic.h
@@ -31,6 +31,10 @@
public:
// This should quickly copy what it needs from PolicyBase.
explicit PolicyDiagnostic(PolicyBase* policy);
+
+ PolicyDiagnostic(const PolicyDiagnostic&) = delete;
+ PolicyDiagnostic& operator=(const PolicyDiagnostic&) = delete;
+
~PolicyDiagnostic() override;
const char* JsonString() override;
@@ -51,8 +55,6 @@
std::unique_ptr<PolicyGlobal> policy_rules_;
bool is_csrss_connected_ = false;
HandleMap handles_to_close_;
-
- DISALLOW_COPY_AND_ASSIGN(PolicyDiagnostic);
};
} // namespace sandbox
diff --git a/sandbox/win/src/security_capabilities.h b/sandbox/win/src/security_capabilities.h
index c125b7e4..1e36c2fb 100644
--- a/sandbox/win/src/security_capabilities.h
+++ b/sandbox/win/src/security_capabilities.h
@@ -19,14 +19,16 @@
explicit SecurityCapabilities(const Sid& package_sid);
SecurityCapabilities(const Sid& package_sid,
const std::vector<Sid>& capabilities);
+
+ SecurityCapabilities(const SecurityCapabilities&) = delete;
+ SecurityCapabilities& operator=(const SecurityCapabilities&) = delete;
+
~SecurityCapabilities();
private:
std::vector<Sid> capabilities_;
std::vector<SID_AND_ATTRIBUTES> capability_sids_;
Sid package_sid_;
-
- DISALLOW_COPY_AND_ASSIGN(SecurityCapabilities);
};
} // namespace sandbox
diff --git a/sandbox/win/src/service_resolver.h b/sandbox/win/src/service_resolver.h
index 31cedbeb5..da156df 100644
--- a/sandbox/win/src/service_resolver.h
+++ b/sandbox/win/src/service_resolver.h
@@ -23,6 +23,10 @@
process_(process),
relaxed_(relaxed),
relative_jump_(0) {}
+
+ ServiceResolverThunk(const ServiceResolverThunk&) = delete;
+ ServiceResolverThunk& operator=(const ServiceResolverThunk&) = delete;
+
~ServiceResolverThunk() override {}
// Implementation of Resolver::Setup.
@@ -89,8 +93,6 @@
// true if we are allowed to patch already-patched functions.
bool relaxed_;
ULONG relative_jump_;
-
- DISALLOW_COPY_AND_ASSIGN(ServiceResolverThunk);
};
// This is the concrete resolver used to perform service-call type functions
@@ -100,12 +102,14 @@
// The service resolver needs a child process to write to.
Wow64ResolverThunk(HANDLE process, bool relaxed)
: ServiceResolverThunk(process, relaxed) {}
+
+ Wow64ResolverThunk(const Wow64ResolverThunk&) = delete;
+ Wow64ResolverThunk& operator=(const Wow64ResolverThunk&) = delete;
+
~Wow64ResolverThunk() override {}
private:
bool IsFunctionAService(void* local_thunk) const override;
-
- DISALLOW_COPY_AND_ASSIGN(Wow64ResolverThunk);
};
// This is the concrete resolver used to perform service-call type functions
@@ -115,12 +119,14 @@
// The service resolver needs a child process to write to.
Wow64W8ResolverThunk(HANDLE process, bool relaxed)
: ServiceResolverThunk(process, relaxed) {}
+
+ Wow64W8ResolverThunk(const Wow64W8ResolverThunk&) = delete;
+ Wow64W8ResolverThunk& operator=(const Wow64W8ResolverThunk&) = delete;
+
~Wow64W8ResolverThunk() override {}
private:
bool IsFunctionAService(void* local_thunk) const override;
-
- DISALLOW_COPY_AND_ASSIGN(Wow64W8ResolverThunk);
};
// This is the concrete resolver used to perform service-call type functions
@@ -130,12 +136,14 @@
// The service resolver needs a child process to write to.
Win8ResolverThunk(HANDLE process, bool relaxed)
: ServiceResolverThunk(process, relaxed) {}
+
+ Win8ResolverThunk(const Win8ResolverThunk&) = delete;
+ Win8ResolverThunk& operator=(const Win8ResolverThunk&) = delete;
+
~Win8ResolverThunk() override {}
private:
bool IsFunctionAService(void* local_thunk) const override;
-
- DISALLOW_COPY_AND_ASSIGN(Win8ResolverThunk);
};
// This is the concrete resolver used to perform service-call type functions
@@ -145,12 +153,14 @@
// The service resolver needs a child process to write to.
Wow64W10ResolverThunk(HANDLE process, bool relaxed)
: ServiceResolverThunk(process, relaxed) {}
+
+ Wow64W10ResolverThunk(const Wow64W10ResolverThunk&) = delete;
+ Wow64W10ResolverThunk& operator=(const Wow64W10ResolverThunk&) = delete;
+
~Wow64W10ResolverThunk() override {}
private:
bool IsFunctionAService(void* local_thunk) const override;
-
- DISALLOW_COPY_AND_ASSIGN(Wow64W10ResolverThunk);
};
} // namespace sandbox
diff --git a/sandbox/win/src/sharedmem_ipc_server.h b/sandbox/win/src/sharedmem_ipc_server.h
index 03e87f8..00a9b2a 100644
--- a/sandbox/win/src/sharedmem_ipc_server.h
+++ b/sandbox/win/src/sharedmem_ipc_server.h
@@ -55,6 +55,9 @@
ThreadPool* thread_pool,
Dispatcher* dispatcher);
+ SharedMemIPCServer(const SharedMemIPCServer&) = delete;
+ SharedMemIPCServer& operator=(const SharedMemIPCServer&) = delete;
+
~SharedMemIPCServer();
// Initializes the server structures, shared memory structures and
@@ -129,8 +132,6 @@
// The dispatcher handles 'ready' IPC calls.
Dispatcher* call_dispatcher_;
-
- DISALLOW_COPY_AND_ASSIGN(SharedMemIPCServer);
};
} // namespace sandbox
diff --git a/sandbox/win/src/sidestep_resolver.h b/sandbox/win/src/sidestep_resolver.h
index 3ac5bf9..b4f5bc1 100644
--- a/sandbox/win/src/sidestep_resolver.h
+++ b/sandbox/win/src/sidestep_resolver.h
@@ -17,6 +17,10 @@
class SidestepResolverThunk : public ResolverThunk {
public:
SidestepResolverThunk() {}
+
+ SidestepResolverThunk(const SidestepResolverThunk&) = delete;
+ SidestepResolverThunk& operator=(const SidestepResolverThunk&) = delete;
+
~SidestepResolverThunk() override {}
// Implementation of Resolver::Setup.
@@ -31,9 +35,6 @@
// Implementation of Resolver::GetThunkSize.
size_t GetThunkSize() const override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(SidestepResolverThunk);
};
// This is the concrete resolver used to perform smart sidestep interceptions.
@@ -43,6 +44,11 @@
class SmartSidestepResolverThunk : public SidestepResolverThunk {
public:
SmartSidestepResolverThunk() {}
+
+ SmartSidestepResolverThunk(const SmartSidestepResolverThunk&) = delete;
+ SmartSidestepResolverThunk& operator=(const SmartSidestepResolverThunk&) =
+ delete;
+
~SmartSidestepResolverThunk() override {}
// Implementation of Resolver::Setup.
@@ -65,8 +71,6 @@
// Returns true if return_address is inside the module loaded at base.
static bool IsInternalCall(const void* base, void* return_address);
-
- DISALLOW_COPY_AND_ASSIGN(SmartSidestepResolverThunk);
};
} // namespace sandbox
diff --git a/sandbox/win/src/signed_dispatcher.h b/sandbox/win/src/signed_dispatcher.h
index 3843548..b77f9db 100644
--- a/sandbox/win/src/signed_dispatcher.h
+++ b/sandbox/win/src/signed_dispatcher.h
@@ -19,6 +19,10 @@
class SignedDispatcher : public Dispatcher {
public:
explicit SignedDispatcher(PolicyBase* policy_base);
+
+ SignedDispatcher(const SignedDispatcher&) = delete;
+ SignedDispatcher& operator=(const SignedDispatcher&) = delete;
+
~SignedDispatcher() override {}
// Dispatcher interface.
@@ -29,7 +33,6 @@
bool CreateSection(IPCInfo* ipc, HANDLE file_handle);
PolicyBase* policy_base_;
- DISALLOW_COPY_AND_ASSIGN(SignedDispatcher);
};
} // namespace sandbox
diff --git a/sandbox/win/src/sync_dispatcher.h b/sandbox/win/src/sync_dispatcher.h
index 3f3082a..10ca111 100644
--- a/sandbox/win/src/sync_dispatcher.h
+++ b/sandbox/win/src/sync_dispatcher.h
@@ -20,6 +20,10 @@
class SyncDispatcher : public Dispatcher {
public:
explicit SyncDispatcher(PolicyBase* policy_base);
+
+ SyncDispatcher(const SyncDispatcher&) = delete;
+ SyncDispatcher& operator=(const SyncDispatcher&) = delete;
+
~SyncDispatcher() override {}
// Dispatcher interface.
@@ -36,7 +40,6 @@
bool OpenEvent(IPCInfo* ipc, std::wstring* name, uint32_t desired_access);
PolicyBase* policy_base_;
- DISALLOW_COPY_AND_ASSIGN(SyncDispatcher);
};
} // namespace sandbox
diff --git a/sandbox/win/src/threadpool.h b/sandbox/win/src/threadpool.h
index 9264abe..e1a3ef7 100644
--- a/sandbox/win/src/threadpool.h
+++ b/sandbox/win/src/threadpool.h
@@ -45,6 +45,10 @@
class ThreadPool {
public:
ThreadPool();
+
+ ThreadPool(const ThreadPool&) = delete;
+ ThreadPool& operator=(const ThreadPool&) = delete;
+
~ThreadPool();
// Registers a waitable object with the thread provider.
// client: A number to associate with all the RegisterWait calls, typically
@@ -78,8 +82,6 @@
PoolObjects pool_objects_;
// This lock protects the list of pool wait objects.
CRITICAL_SECTION lock_;
-
- DISALLOW_COPY_AND_ASSIGN(ThreadPool);
};
} // namespace sandbox
diff --git a/sandbox/win/src/top_level_dispatcher.h b/sandbox/win/src/top_level_dispatcher.h
index 897d822..909d70080 100644
--- a/sandbox/win/src/top_level_dispatcher.h
+++ b/sandbox/win/src/top_level_dispatcher.h
@@ -21,6 +21,10 @@
public:
// |policy| must outlive this class.
explicit TopLevelDispatcher(PolicyBase* policy);
+
+ TopLevelDispatcher(const TopLevelDispatcher&) = delete;
+ TopLevelDispatcher& operator=(const TopLevelDispatcher&) = delete;
+
~TopLevelDispatcher() override;
Dispatcher* OnMessageReady(IPCParams* ipc,
@@ -45,8 +49,6 @@
std::unique_ptr<Dispatcher> signed_dispatcher_;
std::unique_ptr<Dispatcher> socket_dispatcher_;
Dispatcher* ipc_targets_[kMaxIpcTag];
-
- DISALLOW_COPY_AND_ASSIGN(TopLevelDispatcher);
};
} // namespace sandbox
diff --git a/skia/ext/skia_trace_memory_dump_impl.h b/skia/ext/skia_trace_memory_dump_impl.h
index 4088d5b..1ce1e83 100644
--- a/skia/ext/skia_trace_memory_dump_impl.h
+++ b/skia/ext/skia_trace_memory_dump_impl.h
@@ -36,6 +36,9 @@
base::trace_event::MemoryDumpLevelOfDetail level_of_detail,
base::trace_event::ProcessMemoryDump* process_memory_dump);
+ SkiaTraceMemoryDumpImpl(const SkiaTraceMemoryDumpImpl&) = delete;
+ SkiaTraceMemoryDumpImpl& operator=(const SkiaTraceMemoryDumpImpl&) = delete;
+
~SkiaTraceMemoryDumpImpl() override;
// SkTraceMemoryDump implementation:
@@ -67,8 +70,6 @@
// Stores the level of detail for the current dump.
LevelOfDetail request_level_;
-
- DISALLOW_COPY_AND_ASSIGN(SkiaTraceMemoryDumpImpl);
};
} // namespace skia
diff --git a/storage/browser/blob/blob_data_builder.h b/storage/browser/blob/blob_data_builder.h
index a4ad251..4d6838d 100644
--- a/storage/browser/blob/blob_data_builder.h
+++ b/storage/browser/blob/blob_data_builder.h
@@ -41,6 +41,10 @@
using ItemCopyEntry = BlobEntry::ItemCopyEntry;
explicit BlobDataBuilder(const std::string& uuid);
+
+ BlobDataBuilder(const BlobDataBuilder&) = delete;
+ BlobDataBuilder& operator=(const BlobDataBuilder&) = delete;
+
~BlobDataBuilder();
const std::string& uuid() const { return uuid_; }
@@ -58,6 +62,10 @@
public:
FutureData(FutureData&&);
FutureData& operator=(FutureData&&);
+
+ FutureData(const FutureData&) = delete;
+ FutureData& operator=(const FutureData&) = delete;
+
~FutureData();
// Populates a part of an item previously allocated with AppendFutureData.
@@ -80,7 +88,6 @@
FutureData(scoped_refptr<BlobDataItem>);
scoped_refptr<BlobDataItem> item_;
- DISALLOW_COPY_AND_ASSIGN(FutureData);
};
// Adds an item that is flagged for future data population. The memory is not
@@ -93,6 +100,10 @@
public:
FutureFile(FutureFile&&);
FutureFile& operator=(FutureFile&&);
+
+ FutureFile(const FutureFile&) = delete;
+ FutureFile& operator=(const FutureFile&) = delete;
+
~FutureFile();
// Populates a part of an item previously allocated with AppendFutureFile.
@@ -106,7 +117,6 @@
FutureFile(scoped_refptr<BlobDataItem>);
scoped_refptr<BlobDataItem> item_;
- DISALLOW_COPY_AND_ASSIGN(FutureFile);
};
// Adds an item that is flagged for future data population. Use
@@ -241,8 +251,6 @@
std::vector<scoped_refptr<ShareableBlobDataItem>> pending_transport_items_;
std::set<std::string> dependent_blob_uuids_;
std::vector<ItemCopyEntry> copies_;
-
- DISALLOW_COPY_AND_ASSIGN(BlobDataBuilder);
};
#if defined(UNIT_TEST)
diff --git a/storage/browser/blob/blob_entry.h b/storage/browser/blob/blob_entry.h
index 51e0e28..9e8f72e 100644
--- a/storage/browser/blob/blob_entry.h
+++ b/storage/browser/blob/blob_entry.h
@@ -35,6 +35,10 @@
ItemCopyEntry(scoped_refptr<ShareableBlobDataItem> source_item,
size_t source_item_offset,
scoped_refptr<ShareableBlobDataItem> dest_item);
+
+ ItemCopyEntry(const ItemCopyEntry&) = delete;
+ ItemCopyEntry& operator=(const ItemCopyEntry&) = delete;
+
~ItemCopyEntry();
ItemCopyEntry(ItemCopyEntry&& other);
BlobEntry::ItemCopyEntry& operator=(BlobEntry::ItemCopyEntry&& rhs);
@@ -42,9 +46,6 @@
scoped_refptr<ShareableBlobDataItem> source_item;
size_t source_item_offset = 0;
scoped_refptr<ShareableBlobDataItem> dest_item;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ItemCopyEntry);
};
// Building state for pending blobs. State can include:
@@ -58,6 +59,10 @@
BuildingState(bool transport_items_present,
TransportAllowedCallback transport_allowed_callback,
size_t num_building_dependent_blobs);
+
+ BuildingState(const BuildingState&) = delete;
+ BuildingState& operator=(const BuildingState&) = delete;
+
~BuildingState();
// Cancels pending memory or file requests, and calls aborted callback if it
@@ -93,13 +98,14 @@
// When our blob is no longer in PENDING_CONSTRUCTION state these callbacks
// are called.
std::vector<BlobStatusCallback> build_started_callbacks;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BuildingState);
};
BlobEntry(const std::string& content_type,
const std::string& content_disposition);
+
+ BlobEntry(const BlobEntry&) = delete;
+ BlobEntry& operator=(const BlobEntry&) = delete;
+
~BlobEntry();
// Appends the given shared blob data item to this object.
@@ -170,8 +176,6 @@
// Only populated if our status is PENDING_*.
std::unique_ptr<BuildingState> building_state_;
-
- DISALLOW_COPY_AND_ASSIGN(BlobEntry);
};
} // namespace storage
diff --git a/storage/browser/blob/blob_memory_controller.cc b/storage/browser/blob/blob_memory_controller.cc
index 928e951..f841876 100644
--- a/storage/browser/blob/blob_memory_controller.cc
+++ b/storage/browser/blob/blob_memory_controller.cc
@@ -336,6 +336,10 @@
done_callback_(std::move(done_callback)),
allocation_size_(quota_request_size) {}
+ MemoryQuotaAllocationTask(const MemoryQuotaAllocationTask&) = delete;
+ MemoryQuotaAllocationTask& operator=(const MemoryQuotaAllocationTask&) =
+ delete;
+
~MemoryQuotaAllocationTask() override = default;
void RunDoneCallback(bool success) {
@@ -375,7 +379,6 @@
PendingMemoryQuotaTaskList::iterator my_list_position_;
base::WeakPtrFactory<MemoryQuotaAllocationTask> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(MemoryQuotaAllocationTask);
};
class BlobMemoryController::FileQuotaAllocationTask
@@ -436,6 +439,10 @@
allocation_size_));
controller_->RecordTracingCounters();
}
+
+ FileQuotaAllocationTask(const FileQuotaAllocationTask&) = delete;
+ FileQuotaAllocationTask& operator=(const FileQuotaAllocationTask&) = delete;
+
~FileQuotaAllocationTask() override = default;
void RunDoneCallback(std::vector<FileCreationInfo> file_info, bool success) {
@@ -532,7 +539,6 @@
PendingFileQuotaTaskList::iterator my_list_position_;
base::WeakPtrFactory<FileQuotaAllocationTask> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(FileQuotaAllocationTask);
};
BlobMemoryController::BlobMemoryController(
diff --git a/storage/browser/blob/blob_memory_controller.h b/storage/browser/blob/blob_memory_controller.h
index 85971d5..3e5db53 100644
--- a/storage/browser/blob/blob_memory_controller.h
+++ b/storage/browser/blob/blob_memory_controller.h
@@ -85,6 +85,10 @@
MemoryAllocation(base::WeakPtr<BlobMemoryController> controller,
uint64_t item_id,
size_t length);
+
+ MemoryAllocation(const MemoryAllocation&) = delete;
+ MemoryAllocation& operator=(const MemoryAllocation&) = delete;
+
~MemoryAllocation();
size_t length() const { return length_; }
@@ -95,8 +99,6 @@
base::WeakPtr<BlobMemoryController> controller_;
uint64_t item_id_;
size_t length_;
-
- DISALLOW_COPY_AND_ASSIGN(MemoryAllocation);
};
class QuotaAllocationTask {
diff --git a/storage/browser/blob/blob_reader.h b/storage/browser/blob/blob_reader.h
index 017f6f2b..5145ecf 100644
--- a/storage/browser/blob/blob_reader.h
+++ b/storage/browser/blob/blob_reader.h
@@ -72,6 +72,10 @@
};
enum class Status { NET_ERROR, IO_PENDING, DONE };
using StatusCallback = base::OnceCallback<void(Status)>;
+
+ BlobReader(const BlobReader&) = delete;
+ BlobReader& operator=(const BlobReader&) = delete;
+
virtual ~BlobReader();
// This calculates the total size of the blob, and initializes the reading
@@ -271,7 +275,6 @@
SEQUENCE_CHECKER(sequence_checker_);
base::WeakPtrFactory<BlobReader> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(BlobReader);
};
} // namespace storage
diff --git a/storage/browser/blob/blob_reader_unittest.cc b/storage/browser/blob/blob_reader_unittest.cc
index 1e63b33..3a6c52e 100644
--- a/storage/browser/blob/blob_reader_unittest.cc
+++ b/storage/browser/blob/blob_reader_unittest.cc
@@ -86,6 +86,9 @@
net_error_(net::OK),
size_(size) {}
+ FakeFileStreamReader(const FakeFileStreamReader&) = delete;
+ FakeFileStreamReader& operator=(const FakeFileStreamReader&) = delete;
+
~FakeFileStreamReader() override = default;
void SetReturnError(int net_error) { net_error_ = net_error; }
@@ -160,8 +163,6 @@
scoped_refptr<base::SingleThreadTaskRunner> async_task_runner_;
int net_error_;
uint64_t size_;
-
- DISALLOW_COPY_AND_ASSIGN(FakeFileStreamReader);
};
class MockFileStreamReaderProvider
@@ -205,6 +206,10 @@
class BlobReaderTest : public ::testing::Test {
public:
BlobReaderTest() = default;
+
+ BlobReaderTest(const BlobReaderTest&) = delete;
+ BlobReaderTest& operator=(const BlobReaderTest&) = delete;
+
~BlobReaderTest() override = default;
void SetUp() override {
@@ -287,9 +292,6 @@
MockFileStreamReaderProvider* provider_ = nullptr;
std::unique_ptr<BlobReader> reader_;
scoped_refptr<FileSystemContext> file_system_context_;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BlobReaderTest);
};
TEST_F(BlobReaderTest, BasicMemory) {
diff --git a/storage/browser/blob/blob_registry_impl.cc b/storage/browser/blob/blob_registry_impl.cc
index ac131af..cdb4946 100644
--- a/storage/browser/blob/blob_registry_impl.cc
+++ b/storage/browser/blob/blob_registry_impl.cc
@@ -76,6 +76,9 @@
// collection in the blob service.
void StartTransportation(base::WeakPtr<BlobImpl> blob_impl);
+ BlobUnderConstruction(const BlobUnderConstruction&) = delete;
+ BlobUnderConstruction& operator=(const BlobUnderConstruction&) = delete;
+
~BlobUnderConstruction() = default;
const std::string& uuid() const { return uuid_; }
@@ -209,7 +212,6 @@
size_t ready_dependent_blob_count_ = 0;
base::WeakPtrFactory<BlobUnderConstruction> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(BlobUnderConstruction);
};
void BlobRegistryImpl::BlobUnderConstruction::StartTransportation(
diff --git a/storage/browser/blob/blob_registry_impl.h b/storage/browser/blob/blob_registry_impl.h
index 5f626f03..09631b09 100644
--- a/storage/browser/blob/blob_registry_impl.h
+++ b/storage/browser/blob/blob_registry_impl.h
@@ -38,6 +38,10 @@
BlobRegistryImpl(base::WeakPtr<BlobStorageContext> context,
base::WeakPtr<BlobUrlRegistry> url_registry,
scoped_refptr<FileSystemContext> file_system_context);
+
+ BlobRegistryImpl(const BlobRegistryImpl&) = delete;
+ BlobRegistryImpl& operator=(const BlobRegistryImpl&) = delete;
+
~BlobRegistryImpl() override;
void Bind(mojo::PendingReceiver<blink::mojom::BlobRegistry> receiver,
@@ -103,7 +107,6 @@
blobs_being_streamed_;
base::WeakPtrFactory<BlobRegistryImpl> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(BlobRegistryImpl);
};
} // namespace storage
diff --git a/storage/browser/blob/blob_storage_context.h b/storage/browser/blob/blob_storage_context.h
index 1f7436ab..8e5440d7 100644
--- a/storage/browser/blob/blob_storage_context.h
+++ b/storage/browser/blob/blob_storage_context.h
@@ -65,6 +65,10 @@
BlobStorageContext(const base::FilePath& profile_directory,
const base::FilePath& blob_storage_directory,
scoped_refptr<base::TaskRunner> file_runner);
+
+ BlobStorageContext(const BlobStorageContext&) = delete;
+ BlobStorageContext& operator=(const BlobStorageContext&) = delete;
+
~BlobStorageContext() override;
// The following three methods all lookup a BlobDataHandle based on some
@@ -259,8 +263,6 @@
BlobMemoryController memory_controller_;
mojo::ReceiverSet<mojom::BlobStorageContext> receivers_;
base::WeakPtrFactory<BlobStorageContext> ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BlobStorageContext);
};
} // namespace storage
diff --git a/storage/browser/blob/blob_storage_registry.h b/storage/browser/blob/blob_storage_registry.h
index dd3963e..6a7656a 100644
--- a/storage/browser/blob/blob_storage_registry.h
+++ b/storage/browser/blob/blob_storage_registry.h
@@ -27,6 +27,10 @@
class COMPONENT_EXPORT(STORAGE_BROWSER) BlobStorageRegistry {
public:
BlobStorageRegistry();
+
+ BlobStorageRegistry(const BlobStorageRegistry&) = delete;
+ BlobStorageRegistry& operator=(const BlobStorageRegistry&) = delete;
+
~BlobStorageRegistry();
// Creates the blob entry with a refcount of 1 and a state of PENDING. If
@@ -52,8 +56,6 @@
friend class ViewBlobInternalsJob;
std::unordered_map<std::string, std::unique_ptr<BlobEntry>> blob_map_;
-
- DISALLOW_COPY_AND_ASSIGN(BlobStorageRegistry);
};
} // namespace storage
diff --git a/storage/browser/blob/blob_url_loader.h b/storage/browser/blob/blob_url_loader.h
index 325d296..0fed3de0 100644
--- a/storage/browser/blob/blob_url_loader.h
+++ b/storage/browser/blob/blob_url_loader.h
@@ -43,6 +43,10 @@
const net::HttpRequestHeaders& headers,
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
std::unique_ptr<BlobDataHandle> blob_handle);
+
+ BlobURLLoader(const BlobURLLoader&) = delete;
+ BlobURLLoader& operator=(const BlobURLLoader&) = delete;
+
~BlobURLLoader() override;
private:
@@ -95,8 +99,6 @@
mojo::ScopedDataPipeConsumerHandle response_body_consumer_handle_;
base::WeakPtrFactory<BlobURLLoader> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(BlobURLLoader);
};
} // namespace storage
diff --git a/storage/browser/blob/blob_url_registry.h b/storage/browser/blob/blob_url_registry.h
index 104cf9c..b30100b 100644
--- a/storage/browser/blob/blob_url_registry.h
+++ b/storage/browser/blob/blob_url_registry.h
@@ -24,6 +24,10 @@
class COMPONENT_EXPORT(STORAGE_BROWSER) BlobUrlRegistry {
public:
explicit BlobUrlRegistry(base::WeakPtr<BlobUrlRegistry> fallback = nullptr);
+
+ BlobUrlRegistry(const BlobUrlRegistry&) = delete;
+ BlobUrlRegistry& operator=(const BlobUrlRegistry&) = delete;
+
~BlobUrlRegistry();
// Creates a url mapping from blob to the given url. Returns false if
@@ -79,7 +83,6 @@
token_to_url_and_blob_;
base::WeakPtrFactory<BlobUrlRegistry> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(BlobUrlRegistry);
};
} // namespace storage
diff --git a/storage/browser/blob/blob_url_store_impl.h b/storage/browser/blob/blob_url_store_impl.h
index 9c6d3bf..f68c5a5 100644
--- a/storage/browser/blob/blob_url_store_impl.h
+++ b/storage/browser/blob/blob_url_store_impl.h
@@ -24,6 +24,10 @@
public:
BlobURLStoreImpl(base::WeakPtr<BlobUrlRegistry> registry,
BlobRegistryImpl::Delegate* delegate);
+
+ BlobURLStoreImpl(const BlobURLStoreImpl&) = delete;
+ BlobURLStoreImpl& operator=(const BlobURLStoreImpl&) = delete;
+
~BlobURLStoreImpl() override;
void Register(
@@ -50,7 +54,6 @@
std::set<GURL> urls_;
base::WeakPtrFactory<BlobURLStoreImpl> weak_ptr_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(BlobURLStoreImpl);
};
} // namespace storage
diff --git a/storage/browser/blob/scoped_file.h b/storage/browser/blob/scoped_file.h
index 73f06ec..35c0adb 100644
--- a/storage/browser/blob/scoped_file.h
+++ b/storage/browser/blob/scoped_file.h
@@ -47,6 +47,9 @@
return *this;
}
+ ScopedFile(const ScopedFile&) = delete;
+ ScopedFile& operator=(const ScopedFile&) = delete;
+
~ScopedFile();
// The |callback| is fired on |callback_runner| when the final reference
@@ -80,8 +83,6 @@
scoped_refptr<base::TaskRunner> file_task_runner_;
std::vector<std::pair<ScopeOutCallback, scoped_refptr<base::TaskRunner>>>
scope_out_callbacks_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedFile);
};
} // namespace storage
diff --git a/storage/browser/blob/shareable_file_reference.cc b/storage/browser/blob/shareable_file_reference.cc
index c126698..9179c24 100644
--- a/storage/browser/blob/shareable_file_reference.cc
+++ b/storage/browser/blob/shareable_file_reference.cc
@@ -27,6 +27,9 @@
ShareableFileMap() = default;
+ ShareableFileMap(const ShareableFileMap&) = delete;
+ ShareableFileMap& operator=(const ShareableFileMap&) = delete;
+
~ShareableFileMap() = default;
iterator Find(key_type key) {
@@ -59,8 +62,6 @@
FileMap file_map_;
SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(ShareableFileMap);
};
base::LazyInstance<ShareableFileMap>::DestructorAtExit g_file_map =
diff --git a/storage/browser/file_system/async_file_util_adapter.h b/storage/browser/file_system/async_file_util_adapter.h
index 441533a0..c04e9b2 100644
--- a/storage/browser/file_system/async_file_util_adapter.h
+++ b/storage/browser/file_system/async_file_util_adapter.h
@@ -34,6 +34,9 @@
explicit AsyncFileUtilAdapter(
std::unique_ptr<FileSystemFileUtil> sync_file_util);
+ AsyncFileUtilAdapter(const AsyncFileUtilAdapter&) = delete;
+ AsyncFileUtilAdapter& operator=(const AsyncFileUtilAdapter&) = delete;
+
~AsyncFileUtilAdapter() override;
FileSystemFileUtil* sync_file_util() { return sync_file_util_.get(); }
@@ -97,8 +100,6 @@
private:
std::unique_ptr<FileSystemFileUtil> sync_file_util_;
-
- DISALLOW_COPY_AND_ASSIGN(AsyncFileUtilAdapter);
};
} // namespace storage
diff --git a/storage/browser/file_system/copy_or_move_file_validator_unittest.cc b/storage/browser/file_system/copy_or_move_file_validator_unittest.cc
index 011d6367..6442b318 100644
--- a/storage/browser/file_system/copy_or_move_file_validator_unittest.cc
+++ b/storage/browser/file_system/copy_or_move_file_validator_unittest.cc
@@ -58,6 +58,11 @@
src_type_(src_type),
dest_type_(dest_type) {}
+ CopyOrMoveFileValidatorTestHelper(const CopyOrMoveFileValidatorTestHelper&) =
+ delete;
+ CopyOrMoveFileValidatorTestHelper& operator=(
+ const CopyOrMoveFileValidatorTestHelper&) = delete;
+
~CopyOrMoveFileValidatorTestHelper() {
file_system_context_ = nullptr;
base::RunLoop().RunUntilIdle();
@@ -189,8 +194,6 @@
FileSystemURL copy_dest_;
FileSystemURL move_src_;
FileSystemURL move_dest_;
-
- DISALLOW_COPY_AND_ASSIGN(CopyOrMoveFileValidatorTestHelper);
};
// For TestCopyOrMoveFileValidatorFactory
@@ -203,6 +206,12 @@
// TODO(gbillock): switch args to enum or something
explicit TestCopyOrMoveFileValidatorFactory(Validity validity)
: validity_(validity) {}
+
+ TestCopyOrMoveFileValidatorFactory(
+ const TestCopyOrMoveFileValidatorFactory&) = delete;
+ TestCopyOrMoveFileValidatorFactory& operator=(
+ const TestCopyOrMoveFileValidatorFactory&) = delete;
+
~TestCopyOrMoveFileValidatorFactory() override = default;
CopyOrMoveFileValidator* CreateCopyOrMoveFileValidator(
@@ -221,6 +230,11 @@
write_result_(validity == VALID || validity == PRE_WRITE_INVALID
? base::File::FILE_OK
: base::File::FILE_ERROR_SECURITY) {}
+
+ TestCopyOrMoveFileValidator(const TestCopyOrMoveFileValidator&) = delete;
+ TestCopyOrMoveFileValidator& operator=(const TestCopyOrMoveFileValidator&) =
+ delete;
+
~TestCopyOrMoveFileValidator() override = default;
void StartPreWriteValidation(ResultCallback result_callback) override {
@@ -239,13 +253,9 @@
private:
base::File::Error result_;
base::File::Error write_result_;
-
- DISALLOW_COPY_AND_ASSIGN(TestCopyOrMoveFileValidator);
};
Validity validity_;
-
- DISALLOW_COPY_AND_ASSIGN(TestCopyOrMoveFileValidatorFactory);
};
} // namespace
diff --git a/storage/browser/file_system/copy_or_move_operation_delegate.cc b/storage/browser/file_system/copy_or_move_operation_delegate.cc
index db41f174..9591d4d 100644
--- a/storage/browser/file_system/copy_or_move_operation_delegate.cc
+++ b/storage/browser/file_system/copy_or_move_operation_delegate.cc
@@ -32,6 +32,9 @@
class CopyOrMoveOperationDelegate::CopyOrMoveImpl {
public:
+ CopyOrMoveImpl(const CopyOrMoveImpl&) = delete;
+ CopyOrMoveImpl& operator=(const CopyOrMoveImpl&) = delete;
+
virtual ~CopyOrMoveImpl() = default;
virtual void Run(CopyOrMoveOperationDelegate::StatusCallback callback) = 0;
virtual void Cancel() = 0;
@@ -129,7 +132,6 @@
private:
const FileSystemOperation::CopyOrMoveProgressCallback progress_callback_;
- DISALLOW_COPY_AND_ASSIGN(CopyOrMoveImpl);
};
namespace {
diff --git a/storage/browser/file_system/copy_or_move_operation_delegate.h b/storage/browser/file_system/copy_or_move_operation_delegate.h
index 3b630d7f..e2501b0 100644
--- a/storage/browser/file_system/copy_or_move_operation_delegate.h
+++ b/storage/browser/file_system/copy_or_move_operation_delegate.h
@@ -49,6 +49,10 @@
int buffer_size,
FileSystemOperation::CopyFileProgressCallback file_progress_callback,
const base::TimeDelta& min_progress_callback_invocation_span);
+
+ StreamCopyHelper(const StreamCopyHelper&) = delete;
+ StreamCopyHelper& operator=(const StreamCopyHelper&) = delete;
+
~StreamCopyHelper();
void Run(StatusCallback callback);
@@ -82,7 +86,6 @@
base::TimeDelta min_progress_callback_invocation_span_;
bool cancel_requested_;
base::WeakPtrFactory<StreamCopyHelper> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(StreamCopyHelper);
};
CopyOrMoveOperationDelegate(
diff --git a/storage/browser/file_system/copy_or_move_operation_delegate_unittest.cc b/storage/browser/file_system/copy_or_move_operation_delegate_unittest.cc
index b666bcd8..0bfe16e 100644
--- a/storage/browser/file_system/copy_or_move_operation_delegate_unittest.cc
+++ b/storage/browser/file_system/copy_or_move_operation_delegate_unittest.cc
@@ -83,6 +83,10 @@
write_result_(post_copy_valid ? base::File::FILE_OK
: base::File::FILE_ERROR_SECURITY),
reject_string_(reject_string) {}
+
+ TestValidator(const TestValidator&) = delete;
+ TestValidator& operator=(const TestValidator&) = delete;
+
~TestValidator() override = default;
void StartPreWriteValidation(ResultCallback result_callback) override {
@@ -107,8 +111,6 @@
base::File::Error result_;
base::File::Error write_result_;
std::string reject_string_;
-
- DISALLOW_COPY_AND_ASSIGN(TestValidator);
};
};
@@ -149,6 +151,9 @@
public:
explicit ScopedThreadStopper(base::Thread* thread) : thread_(thread) {}
+ ScopedThreadStopper(const ScopedThreadStopper&) = delete;
+ ScopedThreadStopper& operator=(const ScopedThreadStopper&) = delete;
+
~ScopedThreadStopper() {
if (thread_) {
// Give another chance for deleted streams to perform Close.
@@ -164,7 +169,6 @@
private:
base::Thread* thread_;
- DISALLOW_COPY_AND_ASSIGN(ScopedThreadStopper);
};
} // namespace
@@ -179,6 +183,10 @@
dest_type_(dest_type),
task_environment_(base::test::TaskEnvironment::MainThreadType::IO) {}
+ CopyOrMoveOperationTestHelper(const CopyOrMoveOperationTestHelper&) = delete;
+ CopyOrMoveOperationTestHelper& operator=(
+ const CopyOrMoveOperationTestHelper&) = delete;
+
~CopyOrMoveOperationTestHelper() {
file_system_context_ = nullptr;
quota_manager_ = nullptr;
@@ -397,8 +405,6 @@
scoped_refptr<FileSystemContext> file_system_context_;
scoped_refptr<MockQuotaManagerProxy> quota_manager_proxy_;
scoped_refptr<MockQuotaManager> quota_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationTestHelper);
};
TEST(LocalFileSystemCopyOrMoveOperationTest, CopySingleFile) {
diff --git a/storage/browser/file_system/dragged_file_util.h b/storage/browser/file_system/dragged_file_util.h
index 0590b90..9440c07 100644
--- a/storage/browser/file_system/dragged_file_util.h
+++ b/storage/browser/file_system/dragged_file_util.h
@@ -21,6 +21,10 @@
class COMPONENT_EXPORT(STORAGE_BROWSER) DraggedFileUtil : public LocalFileUtil {
public:
DraggedFileUtil();
+
+ DraggedFileUtil(const DraggedFileUtil&) = delete;
+ DraggedFileUtil& operator=(const DraggedFileUtil&) = delete;
+
~DraggedFileUtil() override {}
// FileSystemFileUtil overrides.
@@ -32,9 +36,6 @@
FileSystemOperationContext* context,
const FileSystemURL& root_url,
bool recursive) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DraggedFileUtil);
};
} // namespace storage
diff --git a/storage/browser/file_system/external_mount_points.cc b/storage/browser/file_system/external_mount_points.cc
index e43eb8c..2426477f 100644
--- a/storage/browser/file_system/external_mount_points.cc
+++ b/storage/browser/file_system/external_mount_points.cc
@@ -71,6 +71,10 @@
: type_(type),
path_(path.StripTrailingSeparators()),
mount_option_(mount_option) {}
+
+ Instance(const Instance&) = delete;
+ Instance& operator=(const Instance&) = delete;
+
~Instance() = default;
FileSystemType type() const { return type_; }
@@ -81,8 +85,6 @@
const FileSystemType type_;
const base::FilePath path_;
const FileSystemMountOption mount_option_;
-
- DISALLOW_COPY_AND_ASSIGN(Instance);
};
//--------------------------------------------------------------------------
diff --git a/storage/browser/file_system/file_system_operation_context.h b/storage/browser/file_system/file_system_operation_context.h
index b3837f2..2df222e6 100644
--- a/storage/browser/file_system/file_system_operation_context.h
+++ b/storage/browser/file_system/file_system_operation_context.h
@@ -38,6 +38,10 @@
FileSystemOperationContext(FileSystemContext* context,
base::SequencedTaskRunner* task_runner);
+ FileSystemOperationContext(const FileSystemOperationContext&) = delete;
+ FileSystemOperationContext& operator=(const FileSystemOperationContext&) =
+ delete;
+
~FileSystemOperationContext() override;
FileSystemContext* file_system_context() const {
@@ -90,8 +94,6 @@
// Used to check its setters are not called on arbitrary thread.
THREAD_CHECKER(setter_thread_checker_);
-
- DISALLOW_COPY_AND_ASSIGN(FileSystemOperationContext);
};
} // namespace storage
diff --git a/storage/browser/file_system/file_system_operation_impl.h b/storage/browser/file_system/file_system_operation_impl.h
index 9f6a51080..64be697 100644
--- a/storage/browser/file_system/file_system_operation_impl.h
+++ b/storage/browser/file_system/file_system_operation_impl.h
@@ -41,6 +41,9 @@
std::unique_ptr<FileSystemOperationContext> operation_context,
base::PassKey<FileSystemOperation>);
+ FileSystemOperationImpl(const FileSystemOperationImpl&) = delete;
+ FileSystemOperationImpl& operator=(const FileSystemOperationImpl&) = delete;
+
~FileSystemOperationImpl() override;
// FileSystemOperation overrides.
@@ -210,8 +213,6 @@
base::WeakPtr<FileSystemOperationImpl> weak_ptr_;
base::WeakPtrFactory<FileSystemOperationImpl> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImpl);
};
} // namespace storage
diff --git a/storage/browser/file_system/file_system_operation_runner.h b/storage/browser/file_system/file_system_operation_runner.h
index 8dafbc2..0d186ce 100644
--- a/storage/browser/file_system/file_system_operation_runner.h
+++ b/storage/browser/file_system/file_system_operation_runner.h
@@ -59,6 +59,11 @@
const scoped_refptr<FileSystemContext>& file_system_context);
FileSystemOperationRunner(base::PassKey<FileSystemContext>,
FileSystemContext* file_system_context);
+
+ FileSystemOperationRunner(const FileSystemOperationRunner&) = delete;
+ FileSystemOperationRunner& operator=(const FileSystemOperationRunner&) =
+ delete;
+
virtual ~FileSystemOperationRunner();
// Cancels all inflight operations.
@@ -324,8 +329,6 @@
base::WeakPtr<FileSystemOperationRunner> weak_ptr_;
base::WeakPtrFactory<FileSystemOperationRunner> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FileSystemOperationRunner);
};
} // namespace storage
diff --git a/storage/browser/file_system/file_system_usage_cache.h b/storage/browser/file_system/file_system_usage_cache.h
index a0ef4c1..d19a414 100644
--- a/storage/browser/file_system/file_system_usage_cache.h
+++ b/storage/browser/file_system/file_system_usage_cache.h
@@ -22,6 +22,10 @@
class COMPONENT_EXPORT(STORAGE_BROWSER) FileSystemUsageCache {
public:
FileSystemUsageCache(bool is_incognito);
+
+ FileSystemUsageCache(const FileSystemUsageCache&) = delete;
+ FileSystemUsageCache& operator=(const FileSystemUsageCache&) = delete;
+
~FileSystemUsageCache();
// Gets the size described in the .usage file even if dirty > 0 or
@@ -99,8 +103,6 @@
std::map<base::FilePath, std::vector<uint8_t>> incognito_usages_;
std::map<base::FilePath, std::unique_ptr<base::File>> cache_files_;
-
- DISALLOW_COPY_AND_ASSIGN(FileSystemUsageCache);
};
} // namespace storage
diff --git a/storage/browser/file_system/file_writer_delegate.h b/storage/browser/file_system/file_writer_delegate.h
index 70626b3f..d8fa551 100644
--- a/storage/browser/file_system/file_writer_delegate.h
+++ b/storage/browser/file_system/file_writer_delegate.h
@@ -41,6 +41,10 @@
FileWriterDelegate(std::unique_ptr<FileStreamWriter> file_writer,
FlushPolicy flush_policy);
+
+ FileWriterDelegate(const FileWriterDelegate&) = delete;
+ FileWriterDelegate& operator=(const FileWriterDelegate&) = delete;
+
virtual ~FileWriterDelegate();
void Start(std::unique_ptr<BlobReader> blob_reader,
@@ -102,8 +106,6 @@
mojo::SimpleWatcher data_pipe_watcher_;
base::WeakPtrFactory<FileWriterDelegate> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(FileWriterDelegate);
};
} // namespace storage
diff --git a/storage/browser/file_system/isolated_context.cc b/storage/browser/file_system/isolated_context.cc
index b2cf6b0..2871e1c 100644
--- a/storage/browser/file_system/isolated_context.cc
+++ b/storage/browser/file_system/isolated_context.cc
@@ -164,6 +164,9 @@
// could be registered by IsolatedContext::RegisterDraggedFileSystem().
Instance(FileSystemType type, const std::set<MountPointInfo>& files);
+ Instance(const Instance&) = delete;
+ Instance& operator=(const Instance&) = delete;
+
~Instance();
FileSystemType type() const { return type_; }
@@ -194,8 +197,6 @@
// Reference counts. Note that an isolated filesystem is created with ref==0
// and will get deleted when the ref count reaches <=0.
int ref_counts_;
-
- DISALLOW_COPY_AND_ASSIGN(Instance);
};
IsolatedContext::Instance::Instance(FileSystemType type,
diff --git a/storage/browser/file_system/local_file_stream_writer.h b/storage/browser/file_system/local_file_stream_writer.h
index ed51d9c..dc47e71 100644
--- a/storage/browser/file_system/local_file_stream_writer.h
+++ b/storage/browser/file_system/local_file_stream_writer.h
@@ -29,6 +29,9 @@
class COMPONENT_EXPORT(STORAGE_BROWSER) LocalFileStreamWriter
: public FileStreamWriter {
public:
+ LocalFileStreamWriter(const LocalFileStreamWriter&) = delete;
+ LocalFileStreamWriter& operator=(const LocalFileStreamWriter&) = delete;
+
~LocalFileStreamWriter() override;
// FileStreamWriter overrides.
@@ -85,7 +88,6 @@
net::CompletionOnceCallback cancel_callback_;
base::WeakPtrFactory<LocalFileStreamWriter> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(LocalFileStreamWriter);
};
} // namespace storage
diff --git a/storage/browser/file_system/local_file_util.h b/storage/browser/file_system/local_file_util.h
index 4250d250..1450642 100644
--- a/storage/browser/file_system/local_file_util.h
+++ b/storage/browser/file_system/local_file_util.h
@@ -29,6 +29,10 @@
: public FileSystemFileUtil {
public:
LocalFileUtil();
+
+ LocalFileUtil(const LocalFileUtil&) = delete;
+ LocalFileUtil& operator=(const LocalFileUtil&) = delete;
+
~LocalFileUtil() override;
base::File CreateOrOpen(FileSystemOperationContext* context,
@@ -89,8 +93,6 @@
private:
class LocalFileEnumerator;
-
- DISALLOW_COPY_AND_ASSIGN(LocalFileUtil);
};
} // namespace storage
diff --git a/storage/browser/file_system/memory_file_stream_reader.h b/storage/browser/file_system/memory_file_stream_reader.h
index 342fc8e..77eb319 100644
--- a/storage/browser/file_system/memory_file_stream_reader.h
+++ b/storage/browser/file_system/memory_file_stream_reader.h
@@ -35,6 +35,10 @@
const base::FilePath& file_path,
int64_t initial_offset,
const base::Time& expected_modification_time);
+
+ MemoryFileStreamReader(const MemoryFileStreamReader&) = delete;
+ MemoryFileStreamReader& operator=(const MemoryFileStreamReader&) = delete;
+
~MemoryFileStreamReader() override;
// FileStreamReader overrides.
@@ -56,8 +60,6 @@
int64_t offset_;
base::WeakPtrFactory<MemoryFileStreamReader> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MemoryFileStreamReader);
};
} // namespace storage
diff --git a/storage/browser/file_system/memory_file_stream_writer.h b/storage/browser/file_system/memory_file_stream_writer.h
index 83f3c8c..b7f2437 100644
--- a/storage/browser/file_system/memory_file_stream_writer.h
+++ b/storage/browser/file_system/memory_file_stream_writer.h
@@ -23,6 +23,10 @@
base::WeakPtr<ObfuscatedFileUtilMemoryDelegate> memory_file_util,
const base::FilePath& file_path,
int64_t initial_offset);
+
+ MemoryFileStreamWriter(const MemoryFileStreamWriter&) = delete;
+ MemoryFileStreamWriter& operator=(const MemoryFileStreamWriter&) = delete;
+
~MemoryFileStreamWriter() override;
// FileStreamWriter overrides.
@@ -49,7 +53,6 @@
net::CompletionOnceCallback cancel_callback_;
base::WeakPtrFactory<MemoryFileStreamWriter> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(MemoryFileStreamWriter);
};
} // namespace storage
diff --git a/storage/browser/file_system/obfuscated_file_util.h b/storage/browser/file_system/obfuscated_file_util.h
index 6605e83..89aed25 100644
--- a/storage/browser/file_system/obfuscated_file_util.h
+++ b/storage/browser/file_system/obfuscated_file_util.h
@@ -116,6 +116,10 @@
const std::set<std::string>& known_type_strings,
SandboxFileSystemBackendDelegate* sandbox_delegate,
bool is_incognito);
+
+ ObfuscatedFileUtil(const ObfuscatedFileUtil&) = delete;
+ ObfuscatedFileUtil& operator=(const ObfuscatedFileUtil&) = delete;
+
~ObfuscatedFileUtil() override;
// FileSystemFileUtil overrides.
@@ -342,8 +346,6 @@
SandboxFileSystemBackendDelegate* sandbox_delegate_;
std::unique_ptr<ObfuscatedFileUtilDelegate> delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil);
};
} // namespace storage
diff --git a/storage/browser/file_system/obfuscated_file_util_delegate.h b/storage/browser/file_system/obfuscated_file_util_delegate.h
index 17d31f6c..dfb81c8 100644
--- a/storage/browser/file_system/obfuscated_file_util_delegate.h
+++ b/storage/browser/file_system/obfuscated_file_util_delegate.h
@@ -17,6 +17,11 @@
class COMPONENT_EXPORT(STORAGE_BROWSER) ObfuscatedFileUtilDelegate {
public:
ObfuscatedFileUtilDelegate() = default;
+
+ ObfuscatedFileUtilDelegate(const ObfuscatedFileUtilDelegate&) = delete;
+ ObfuscatedFileUtilDelegate& operator=(const ObfuscatedFileUtilDelegate&) =
+ delete;
+
virtual ~ObfuscatedFileUtilDelegate() = default;
virtual bool DirectoryExists(const base::FilePath& path) = 0;
@@ -54,9 +59,6 @@
FileSystemOperation::CopyOrMoveOption option,
NativeFileUtil::CopyOrMoveMode mode) = 0;
virtual base::File::Error DeleteFile(const base::FilePath& path) = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtilDelegate);
};
} // namespace storage
diff --git a/storage/browser/file_system/obfuscated_file_util_memory_delegate.h b/storage/browser/file_system/obfuscated_file_util_memory_delegate.h
index 9242697..733d3bce 100644
--- a/storage/browser/file_system/obfuscated_file_util_memory_delegate.h
+++ b/storage/browser/file_system/obfuscated_file_util_memory_delegate.h
@@ -42,6 +42,12 @@
: public ObfuscatedFileUtilDelegate {
public:
ObfuscatedFileUtilMemoryDelegate(const base::FilePath& file_system_directory);
+
+ ObfuscatedFileUtilMemoryDelegate(const ObfuscatedFileUtilMemoryDelegate&) =
+ delete;
+ ObfuscatedFileUtilMemoryDelegate& operator=(
+ const ObfuscatedFileUtilMemoryDelegate&) = delete;
+
~ObfuscatedFileUtilMemoryDelegate() override;
bool DirectoryExists(const base::FilePath& path) override;
@@ -135,8 +141,6 @@
std::vector<base::FilePath::StringType> root_path_components_;
base::WeakPtrFactory<ObfuscatedFileUtilMemoryDelegate> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtilMemoryDelegate);
};
} // namespace storage
diff --git a/storage/browser/file_system/plugin_private_file_system_backend.h b/storage/browser/file_system/plugin_private_file_system_backend.h
index e2778fbc..5d02bc4 100644
--- a/storage/browser/file_system/plugin_private_file_system_backend.h
+++ b/storage/browser/file_system/plugin_private_file_system_backend.h
@@ -56,6 +56,12 @@
scoped_refptr<SpecialStoragePolicy> special_storage_policy,
const FileSystemOptions& file_system_options,
leveldb::Env* env_override);
+
+ PluginPrivateFileSystemBackend(const PluginPrivateFileSystemBackend&) =
+ delete;
+ PluginPrivateFileSystemBackend& operator=(
+ const PluginPrivateFileSystemBackend&) = delete;
+
~PluginPrivateFileSystemBackend() override;
// This must be used to open 'private' filesystem instead of regular
@@ -151,8 +157,6 @@
std::unique_ptr<AsyncFileUtil> file_util_;
FileSystemIDToPluginMap* plugin_map_; // Owned by file_util_.
base::WeakPtrFactory<PluginPrivateFileSystemBackend> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(PluginPrivateFileSystemBackend);
};
} // namespace storage
diff --git a/storage/browser/file_system/quota/open_file_handle.h b/storage/browser/file_system/quota/open_file_handle.h
index cfbeea32..7a3aa62 100644
--- a/storage/browser/file_system/quota/open_file_handle.h
+++ b/storage/browser/file_system/quota/open_file_handle.h
@@ -27,6 +27,9 @@
// deleted when the plugin closes the file.
class COMPONENT_EXPORT(STORAGE_BROWSER) OpenFileHandle {
public:
+ OpenFileHandle(const OpenFileHandle&) = delete;
+ OpenFileHandle& operator=(const OpenFileHandle&) = delete;
+
~OpenFileHandle();
// Updates cached file size and consumes quota for that.
@@ -62,8 +65,6 @@
scoped_refptr<OpenFileHandleContext> context_;
base::SequenceChecker sequence_checker_;
-
- DISALLOW_COPY_AND_ASSIGN(OpenFileHandle);
};
} // namespace storage
diff --git a/storage/browser/file_system/quota/quota_backend_impl.h b/storage/browser/file_system/quota/quota_backend_impl.h
index 151b4d6..c5a66224 100644
--- a/storage/browser/file_system/quota/quota_backend_impl.h
+++ b/storage/browser/file_system/quota/quota_backend_impl.h
@@ -36,6 +36,10 @@
ObfuscatedFileUtil* obfuscated_file_util,
FileSystemUsageCache* file_system_usage_cache,
scoped_refptr<QuotaManagerProxy> quota_manager_proxy);
+
+ QuotaBackendImpl(const QuotaBackendImpl&) = delete;
+ QuotaBackendImpl& operator=(const QuotaBackendImpl&) = delete;
+
~QuotaBackendImpl() override;
// QuotaReservationManager::QuotaBackend overrides.
@@ -88,8 +92,6 @@
const scoped_refptr<QuotaManagerProxy> quota_manager_proxy_;
base::WeakPtrFactory<QuotaBackendImpl> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(QuotaBackendImpl);
};
} // namespace storage
diff --git a/storage/browser/file_system/quota/quota_reservation_manager.h b/storage/browser/file_system/quota/quota_reservation_manager.h
index 74077e5..2c1463d 100644
--- a/storage/browser/file_system/quota/quota_reservation_manager.h
+++ b/storage/browser/file_system/quota/quota_reservation_manager.h
@@ -39,6 +39,10 @@
class COMPONENT_EXPORT(STORAGE_BROWSER) QuotaBackend {
public:
QuotaBackend() = default;
+
+ QuotaBackend(const QuotaBackend&) = delete;
+ QuotaBackend& operator=(const QuotaBackend&) = delete;
+
virtual ~QuotaBackend() = default;
// Reserves or reclaims |delta| of quota for |origin| and |type| pair.
@@ -67,12 +71,13 @@
FileSystemType type) = 0;
virtual void DecrementDirtyCount(const url::Origin& origin,
FileSystemType type) = 0;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(QuotaBackend);
};
explicit QuotaReservationManager(std::unique_ptr<QuotaBackend> backend);
+
+ QuotaReservationManager(const QuotaReservationManager&) = delete;
+ QuotaReservationManager& operator=(const QuotaReservationManager&) = delete;
+
~QuotaReservationManager();
// The entry point of the quota reservation. Creates new reservation object
@@ -117,8 +122,6 @@
base::SequenceChecker sequence_checker_;
base::WeakPtrFactory<QuotaReservationManager> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager);
};
} // namespace storage
diff --git a/storage/browser/file_system/quota/quota_reservation_manager_unittest.cc b/storage/browser/file_system/quota/quota_reservation_manager_unittest.cc
index f588e18..42b4605 100644
--- a/storage/browser/file_system/quota/quota_reservation_manager_unittest.cc
+++ b/storage/browser/file_system/quota/quota_reservation_manager_unittest.cc
@@ -49,6 +49,10 @@
class FakeBackend : public QuotaReservationManager::QuotaBackend {
public:
FakeBackend() = default;
+
+ FakeBackend(const FakeBackend&) = delete;
+ FakeBackend& operator=(const FakeBackend&) = delete;
+
~FakeBackend() override = default;
void ReserveQuota(const url::Origin& origin,
@@ -94,8 +98,6 @@
const url::Origin origin_ = url::Origin::Create(GURL("http://example.com"));
int64_t on_memory_usage_ = kInitialFileSize;
int64_t on_disk_usage_ = kInitialFileSize;
-
- DISALLOW_COPY_AND_ASSIGN(FakeBackend);
};
class FakeWriter {
@@ -181,6 +183,11 @@
class QuotaReservationManagerTest : public testing::Test {
public:
QuotaReservationManagerTest() = default;
+
+ QuotaReservationManagerTest(const QuotaReservationManagerTest&) = delete;
+ QuotaReservationManagerTest& operator=(const QuotaReservationManagerTest&) =
+ delete;
+
~QuotaReservationManagerTest() override = default;
void SetUp() override {
@@ -215,8 +222,6 @@
base::ScopedTempDir work_dir_;
base::FilePath file_path_;
std::unique_ptr<QuotaReservationManager> reservation_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(QuotaReservationManagerTest);
};
TEST_F(QuotaReservationManagerTest, BasicTest) {
diff --git a/storage/browser/file_system/recursive_operation_delegate.h b/storage/browser/file_system/recursive_operation_delegate.h
index f9c9058..bec65aac 100644
--- a/storage/browser/file_system/recursive_operation_delegate.h
+++ b/storage/browser/file_system/recursive_operation_delegate.h
@@ -31,6 +31,10 @@
using FileEntryList = FileSystemOperation::FileEntryList;
using ErrorBehavior = FileSystemOperation::ErrorBehavior;
+ RecursiveOperationDelegate(const RecursiveOperationDelegate&) = delete;
+ RecursiveOperationDelegate& operator=(const RecursiveOperationDelegate&) =
+ delete;
+
virtual ~RecursiveOperationDelegate();
// This is called when the consumer of this instance starts a non-recursive
@@ -149,8 +153,6 @@
bool canceled_;
ErrorBehavior error_behavior_;
bool failed_some_operations_;
-
- DISALLOW_COPY_AND_ASSIGN(RecursiveOperationDelegate);
};
} // namespace storage
diff --git a/storage/browser/file_system/recursive_operation_delegate_unittest.cc b/storage/browser/file_system/recursive_operation_delegate_unittest.cc
index cd4c1f2e..55f079e 100644
--- a/storage/browser/file_system/recursive_operation_delegate_unittest.cc
+++ b/storage/browser/file_system/recursive_operation_delegate_unittest.cc
@@ -43,6 +43,11 @@
: RecursiveOperationDelegate(file_system_context),
root_(root),
callback_(std::move(callback)) {}
+
+ LoggingRecursiveOperation(const LoggingRecursiveOperation&) = delete;
+ LoggingRecursiveOperation& operator=(const LoggingRecursiveOperation&) =
+ delete;
+
~LoggingRecursiveOperation() override = default;
const std::vector<LogEntry>& log_entries() const { return log_entries_; }
@@ -115,7 +120,6 @@
FileSystemURL error_url_;
base::WeakPtrFactory<LoggingRecursiveOperation> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(LoggingRecursiveOperation);
};
void ReportStatus(base::File::Error* out_error, base::File::Error error) {
diff --git a/storage/browser/file_system/remove_operation_delegate.h b/storage/browser/file_system/remove_operation_delegate.h
index c96eb69..f1a2bbf 100644
--- a/storage/browser/file_system/remove_operation_delegate.h
+++ b/storage/browser/file_system/remove_operation_delegate.h
@@ -15,6 +15,10 @@
RemoveOperationDelegate(FileSystemContext* file_system_context,
const FileSystemURL& url,
StatusCallback callback);
+
+ RemoveOperationDelegate(const RemoveOperationDelegate&) = delete;
+ RemoveOperationDelegate& operator=(const RemoveOperationDelegate&) = delete;
+
~RemoveOperationDelegate() override;
// RecursiveOperationDelegate overrides:
@@ -38,7 +42,6 @@
FileSystemURL url_;
StatusCallback callback_;
base::WeakPtrFactory<RemoveOperationDelegate> weak_factory_{this};
- DISALLOW_COPY_AND_ASSIGN(RemoveOperationDelegate);
};
} // namespace storage
diff --git a/storage/browser/file_system/sandbox_directory_database.h b/storage/browser/file_system/sandbox_directory_database.h
index c8b9de7..5a2d0ba 100644
--- a/storage/browser/file_system/sandbox_directory_database.h
+++ b/storage/browser/file_system/sandbox_directory_database.h
@@ -60,6 +60,10 @@
SandboxDirectoryDatabase(const base::FilePath& filesystem_data_directory,
leveldb::Env* env_override);
+
+ SandboxDirectoryDatabase(const SandboxDirectoryDatabase&) = delete;
+ SandboxDirectoryDatabase& operator=(const SandboxDirectoryDatabase&) = delete;
+
~SandboxDirectoryDatabase();
bool GetChildWithName(FileId parent_id,
@@ -125,7 +129,6 @@
leveldb::Env* env_override_;
std::unique_ptr<leveldb::DB> db_;
base::Time last_reported_time_;
- DISALLOW_COPY_AND_ASSIGN(SandboxDirectoryDatabase);
};
} // namespace storage
diff --git a/storage/browser/file_system/sandbox_file_stream_reader.h b/storage/browser/file_system/sandbox_file_stream_reader.h
index 07fe4597..7e9722b 100644
--- a/storage/browser/file_system/sandbox_file_stream_reader.h
+++ b/storage/browser/file_system/sandbox_file_stream_reader.h
@@ -43,6 +43,10 @@
const FileSystemURL& url,
int64_t initial_offset,
const base::Time& expected_modification_time);
+
+ SandboxFileStreamReader(const SandboxFileStreamReader&) = delete;
+ SandboxFileStreamReader& operator=(const SandboxFileStreamReader&) = delete;
+
~SandboxFileStreamReader() override;
// FileStreamReader overrides.
@@ -74,8 +78,6 @@
scoped_refptr<ShareableFileReference> snapshot_ref_;
bool has_pending_create_snapshot_;
base::WeakPtrFactory<SandboxFileStreamReader> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamReader);
};
} // namespace storage
diff --git a/storage/browser/file_system/sandbox_file_stream_writer.h b/storage/browser/file_system/sandbox_file_stream_writer.h
index ed4414b7..00a1c88 100644
--- a/storage/browser/file_system/sandbox_file_stream_writer.h
+++ b/storage/browser/file_system/sandbox_file_stream_writer.h
@@ -33,6 +33,10 @@
const FileSystemURL& url,
int64_t initial_offset,
const UpdateObserverList& observers);
+
+ SandboxFileStreamWriter(const SandboxFileStreamWriter&) = delete;
+ SandboxFileStreamWriter& operator=(const SandboxFileStreamWriter&) = delete;
+
~SandboxFileStreamWriter() override;
// FileStreamWriter overrides.
@@ -91,8 +95,6 @@
int64_t default_quota_;
base::WeakPtrFactory<SandboxFileStreamWriter> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamWriter);
};
} // namespace storage
diff --git a/storage/browser/file_system/sandbox_file_system_backend.h b/storage/browser/file_system/sandbox_file_system_backend.h
index bd85b972..9518e3eb 100644
--- a/storage/browser/file_system/sandbox_file_system_backend.h
+++ b/storage/browser/file_system/sandbox_file_system_backend.h
@@ -31,6 +31,10 @@
: public FileSystemBackend {
public:
explicit SandboxFileSystemBackend(SandboxFileSystemBackendDelegate* delegate);
+
+ SandboxFileSystemBackend(const SandboxFileSystemBackend&) = delete;
+ SandboxFileSystemBackend& operator=(const SandboxFileSystemBackend&) = delete;
+
~SandboxFileSystemBackend() override;
// FileSystemBackend overrides.
@@ -75,8 +79,6 @@
private:
SandboxFileSystemBackendDelegate* delegate_; // Not owned.
-
- DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackend);
};
} // namespace storage
diff --git a/storage/browser/file_system/sandbox_origin_database.h b/storage/browser/file_system/sandbox_origin_database.h
index fa3bd8a..709ac336 100644
--- a/storage/browser/file_system/sandbox_origin_database.h
+++ b/storage/browser/file_system/sandbox_origin_database.h
@@ -35,6 +35,10 @@
// at a given time.
SandboxOriginDatabase(const base::FilePath& file_system_directory,
leveldb::Env* env_override);
+
+ SandboxOriginDatabase(const SandboxOriginDatabase&) = delete;
+ SandboxOriginDatabase& operator=(const SandboxOriginDatabase&) = delete;
+
~SandboxOriginDatabase() override;
// SandboxOriginDatabaseInterface overrides.
@@ -74,7 +78,6 @@
leveldb::Env* env_override_;
std::unique_ptr<leveldb::DB> db_;
base::Time last_reported_time_;
- DISALLOW_COPY_AND_ASSIGN(SandboxOriginDatabase);
};
} // namespace storage
diff --git a/storage/browser/file_system/sandbox_quota_observer.h b/storage/browser/file_system/sandbox_quota_observer.h
index 2be5fe4..ed05a18 100644
--- a/storage/browser/file_system/sandbox_quota_observer.h
+++ b/storage/browser/file_system/sandbox_quota_observer.h
@@ -42,6 +42,10 @@
scoped_refptr<base::SequencedTaskRunner> update_notify_runner,
ObfuscatedFileUtil* sandbox_file_util,
FileSystemUsageCache* file_system_usage_cache_);
+
+ SandboxQuotaObserver(const SandboxQuotaObserver&) = delete;
+ SandboxQuotaObserver& operator=(const SandboxQuotaObserver&) = delete;
+
~SandboxQuotaObserver() override;
// FileUpdateObserver overrides.
@@ -74,8 +78,6 @@
std::map<base::FilePath, int64_t> pending_update_notification_;
base::OneShotTimer delayed_cache_update_helper_;
-
- DISALLOW_COPY_AND_ASSIGN(SandboxQuotaObserver);
};
} // namespace storage
diff --git a/storage/browser/file_system/transient_file_util.h b/storage/browser/file_system/transient_file_util.h
index 0c29ba2..64f6202 100644
--- a/storage/browser/file_system/transient_file_util.h
+++ b/storage/browser/file_system/transient_file_util.h
@@ -17,6 +17,10 @@
: public LocalFileUtil {
public:
TransientFileUtil() = default;
+
+ TransientFileUtil(const TransientFileUtil&) = delete;
+ TransientFileUtil& operator=(const TransientFileUtil&) = delete;
+
~TransientFileUtil() override = default;
// LocalFileUtil overrides.
@@ -25,9 +29,6 @@
base::File::Error* error,
base::File::Info* file_info,
base::FilePath* platform_path) override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TransientFileUtil);
};
} // namespace storage
diff --git a/storage/browser/file_system/transient_file_util_unittest.cc b/storage/browser/file_system/transient_file_util_unittest.cc
index 3d4fa94..a90a401e 100644
--- a/storage/browser/file_system/transient_file_util_unittest.cc
+++ b/storage/browser/file_system/transient_file_util_unittest.cc
@@ -27,6 +27,10 @@
class TransientFileUtilTest : public testing::Test {
public:
TransientFileUtilTest() = default;
+
+ TransientFileUtilTest(const TransientFileUtilTest&) = delete;
+ TransientFileUtilTest& operator=(const TransientFileUtilTest&) = delete;
+
~TransientFileUtilTest() override = default;
void SetUp() override {
@@ -73,8 +77,6 @@
base::ScopedTempDir data_dir_;
scoped_refptr<FileSystemContext> file_system_context_;
std::unique_ptr<TransientFileUtil> transient_file_util_;
-
- DISALLOW_COPY_AND_ASSIGN(TransientFileUtilTest);
};
TEST_F(TransientFileUtilTest, TransientFile) {
diff --git a/storage/browser/quota/quota_database.h b/storage/browser/quota/quota_database.h
index f276aa6..30747157 100644
--- a/storage/browser/quota/quota_database.h
+++ b/storage/browser/quota/quota_database.h
@@ -85,6 +85,10 @@
// If 'path' is empty, an in memory database will be used.
explicit QuotaDatabase(const base::FilePath& path);
+
+ QuotaDatabase(const QuotaDatabase&) = delete;
+ QuotaDatabase& operator=(const QuotaDatabase&) = delete;
+
~QuotaDatabase();
// Returns whether the record could be found.
@@ -300,7 +304,6 @@
static const size_t kIndexCount;
SEQUENCE_CHECKER(sequence_checker_);
- DISALLOW_COPY_AND_ASSIGN(QuotaDatabase);
};
} // namespace storage
diff --git a/storage/browser/quota/quota_device_info_helper.h b/storage/browser/quota/quota_device_info_helper.h
index c55220f..bedb8344 100644
--- a/storage/browser/quota/quota_device_info_helper.h
+++ b/storage/browser/quota/quota_device_info_helper.h
@@ -18,14 +18,15 @@
class COMPONENT_EXPORT(STORAGE_BROWSER) QuotaDeviceInfoHelper {
public:
QuotaDeviceInfoHelper() = default;
+
+ QuotaDeviceInfoHelper(const QuotaDeviceInfoHelper&) = delete;
+ QuotaDeviceInfoHelper& operator=(const QuotaDeviceInfoHelper&) = delete;
+
virtual ~QuotaDeviceInfoHelper();
virtual int64_t AmountOfTotalDiskSpace(const base::FilePath& path) const;
virtual int64_t AmountOfPhysicalMemory() const;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(QuotaDeviceInfoHelper);
}; // class QuotaDeviceInfoHelper
} // namespace storage
diff --git a/storage/browser/quota/quota_temporary_storage_evictor.h b/storage/browser/quota/quota_temporary_storage_evictor.h
index 7eecc08f..fb536df 100644
--- a/storage/browser/quota/quota_temporary_storage_evictor.h
+++ b/storage/browser/quota/quota_temporary_storage_evictor.h
@@ -56,6 +56,11 @@
QuotaTemporaryStorageEvictor(QuotaEvictionHandler* quota_eviction_handler,
int64_t interval_ms);
+
+ QuotaTemporaryStorageEvictor(const QuotaTemporaryStorageEvictor&) = delete;
+ QuotaTemporaryStorageEvictor& operator=(const QuotaTemporaryStorageEvictor&) =
+ delete;
+
~QuotaTemporaryStorageEvictor();
void GetStatistics(std::map<std::string, int64_t>* statistics);
@@ -98,8 +103,6 @@
SEQUENCE_CHECKER(sequence_checker_);
base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor);
};
} // namespace storage
diff --git a/storage/browser/quota/usage_tracker_unittest.cc b/storage/browser/quota/usage_tracker_unittest.cc
index 92bd171..b71773b 100644
--- a/storage/browser/quota/usage_tracker_unittest.cc
+++ b/storage/browser/quota/usage_tracker_unittest.cc
@@ -125,6 +125,9 @@
StorageType::kTemporary,
storage_policy_.get()) {}
+ UsageTrackerTest(const UsageTrackerTest&) = delete;
+ UsageTrackerTest& operator=(const UsageTrackerTest&) = delete;
+
~UsageTrackerTest() override = default;
UsageTracker* usage_tracker() {
@@ -212,8 +215,6 @@
scoped_refptr<MockSpecialStoragePolicy> storage_policy_;
std::unique_ptr<UsageTrackerTestQuotaClient> quota_client_;
UsageTracker usage_tracker_;
-
- DISALLOW_COPY_AND_ASSIGN(UsageTrackerTest);
};
TEST_F(UsageTrackerTest, GrantAndRevokeUnlimitedStorage) {
diff --git a/storage/browser/test/mock_blob_util.h b/storage/browser/test/mock_blob_util.h
index 8c3adb7..f5dfcd5c 100644
--- a/storage/browser/test/mock_blob_util.h
+++ b/storage/browser/test/mock_blob_util.h
@@ -21,6 +21,10 @@
ScopedTextBlob(BlobStorageContext* context,
const std::string& blob_id,
const std::string& data);
+
+ ScopedTextBlob(const ScopedTextBlob&) = delete;
+ ScopedTextBlob& operator=(const ScopedTextBlob&) = delete;
+
~ScopedTextBlob();
// Returns a BlobDataHandle referring to the scoped blob.
@@ -30,8 +34,6 @@
const std::string blob_id_;
BlobStorageContext* context_;
std::unique_ptr<BlobDataHandle> handle_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedTextBlob);
};
} // namespace storage
diff --git a/storage/browser/test/mock_file_change_observer.h b/storage/browser/test/mock_file_change_observer.h
index a875c22..12159d20 100644
--- a/storage/browser/test/mock_file_change_observer.h
+++ b/storage/browser/test/mock_file_change_observer.h
@@ -17,6 +17,10 @@
class MockFileChangeObserver : public FileChangeObserver {
public:
MockFileChangeObserver();
+
+ MockFileChangeObserver(const MockFileChangeObserver&) = delete;
+ MockFileChangeObserver& operator=(const MockFileChangeObserver&) = delete;
+
~MockFileChangeObserver() override;
// Creates a ChangeObserverList which only contains given |observer|.
@@ -94,8 +98,6 @@
int modify_file_count_;
int create_directory_count_;
int remove_directory_count_;
-
- DISALLOW_COPY_AND_ASSIGN(MockFileChangeObserver);
};
} // namespace storage
diff --git a/storage/browser/test/mock_file_update_observer.h b/storage/browser/test/mock_file_update_observer.h
index a3081a79..0a60121 100644
--- a/storage/browser/test/mock_file_update_observer.h
+++ b/storage/browser/test/mock_file_update_observer.h
@@ -21,6 +21,10 @@
class MockFileUpdateObserver : public FileUpdateObserver {
public:
MockFileUpdateObserver();
+
+ MockFileUpdateObserver(const MockFileUpdateObserver&) = delete;
+ MockFileUpdateObserver& operator=(const MockFileUpdateObserver&) = delete;
+
~MockFileUpdateObserver() override;
// Creates a ChangeObserverList which only contains given |observer|.
@@ -43,8 +47,6 @@
std::map<FileSystemURL, int, FileSystemURL::Comparator> start_update_count_;
std::map<FileSystemURL, int, FileSystemURL::Comparator> end_update_count_;
bool is_ready_;
-
- DISALLOW_COPY_AND_ASSIGN(MockFileUpdateObserver);
};
} // namespace storage
diff --git a/storage/browser/test/mock_quota_client.h b/storage/browser/test/mock_quota_client.h
index c5e158c..ced13d3 100644
--- a/storage/browser/test/mock_quota_client.h
+++ b/storage/browser/test/mock_quota_client.h
@@ -41,6 +41,9 @@
base::span<const MockStorageKeyData> mock_data,
QuotaClientType client_type);
+ MockQuotaClient(const MockQuotaClient&) = delete;
+ MockQuotaClient& operator=(const MockQuotaClient&) = delete;
+
~MockQuotaClient() override;
// To add or modify mock data in this client.
@@ -96,8 +99,6 @@
int mock_time_counter_;
base::WeakPtrFactory<MockQuotaClient> weak_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(MockQuotaClient);
};
} // namespace storage
diff --git a/storage/browser/test/test_file_system_backend.cc b/storage/browser/test/test_file_system_backend.cc
index 1b9885ac..3891a89 100644
--- a/storage/browser/test/test_file_system_backend.cc
+++ b/storage/browser/test/test_file_system_backend.cc
@@ -63,6 +63,10 @@
public FileUpdateObserver {
public:
QuotaUtil() : usage_(0) {}
+
+ QuotaUtil(const QuotaUtil&) = delete;
+ QuotaUtil& operator=(const QuotaUtil&) = delete;
+
~QuotaUtil() override = default;
// FileSystemQuotaUtil overrides.
@@ -115,7 +119,6 @@
private:
int64_t usage_;
- DISALLOW_COPY_AND_ASSIGN(QuotaUtil);
};
TestFileSystemBackend::TestFileSystemBackend(
diff --git a/storage/browser/test/test_file_system_backend.h b/storage/browser/test/test_file_system_backend.h
index ad38605..e310466 100644
--- a/storage/browser/test/test_file_system_backend.h
+++ b/storage/browser/test/test_file_system_backend.h
@@ -34,6 +34,10 @@
public:
TestFileSystemBackend(base::SequencedTaskRunner* task_runner,
const base::FilePath& base_path);
+
+ TestFileSystemBackend(const TestFileSystemBackend&) = delete;
+ TestFileSystemBackend& operator=(const TestFileSystemBackend&) = delete;
+
~TestFileSystemBackend() override;
// FileSystemBackend implementation.
@@ -98,8 +102,6 @@
bool require_copy_or_move_validator_;
std::unique_ptr<CopyOrMoveFileValidatorFactory>
copy_or_move_file_validator_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(TestFileSystemBackend);
};
} // namespace storage
diff --git a/testing/perf/luci_test_result_unittest.cc b/testing/perf/luci_test_result_unittest.cc
index fc605e8..731d0d3 100644
--- a/testing/perf/luci_test_result_unittest.cc
+++ b/testing/perf/luci_test_result_unittest.cc
@@ -18,6 +18,10 @@
class LuciTestResultTest : public testing::Test {
public:
LuciTestResultTest() = default;
+
+ LuciTestResultTest(const LuciTestResultTest&) = delete;
+ LuciTestResultTest& operator=(const LuciTestResultTest&) = delete;
+
~LuciTestResultTest() override = default;
// testing::Test:
@@ -53,8 +57,6 @@
private:
base::ScopedTempDir temp_dir_;
-
- DISALLOW_COPY_AND_ASSIGN(LuciTestResultTest);
};
TEST_F(LuciTestResultTest, Basic) {
diff --git a/tools/accessibility/inspect/ax_event_server.h b/tools/accessibility/inspect/ax_event_server.h
index 996a3ae..8c7b02e3 100644
--- a/tools/accessibility/inspect/ax_event_server.h
+++ b/tools/accessibility/inspect/ax_event_server.h
@@ -22,6 +22,10 @@
// or tree selector.
explicit AXEventServer(base::ProcessId pid,
const ui::AXTreeSelector& selector);
+
+ AXEventServer(const AXEventServer&) = delete;
+ AXEventServer& operator=(const AXEventServer&) = delete;
+
~AXEventServer();
private:
@@ -32,8 +36,6 @@
base::win::ScopedCOMInitializer com_initializer_;
#endif
std::unique_ptr<ui::AXEventRecorder> recorder_;
-
- DISALLOW_COPY_AND_ASSIGN(AXEventServer);
};
} // namespace tools
diff --git a/tools/android/forwarder2/daemon.h b/tools/android/forwarder2/daemon.h
index 54285df..e7eba8e 100644
--- a/tools/android/forwarder2/daemon.h
+++ b/tools/android/forwarder2/daemon.h
@@ -50,6 +50,9 @@
ServerDelegate* server_delegate,
GetExitNotifierFDCallback get_exit_fd_callback);
+ Daemon(const Daemon&) = delete;
+ Daemon& operator=(const Daemon&) = delete;
+
~Daemon();
// Returns whether the daemon was successfully spawned. Note that this does
@@ -66,8 +69,6 @@
ClientDelegate* const client_delegate_;
ServerDelegate* const server_delegate_;
const GetExitNotifierFDCallback get_exit_fd_callback_;
-
- DISALLOW_COPY_AND_ASSIGN(Daemon);
};
} // namespace forwarder2
diff --git a/tools/android/forwarder2/device_controller.h b/tools/android/forwarder2/device_controller.h
index 2a7f739..077b44b 100644
--- a/tools/android/forwarder2/device_controller.h
+++ b/tools/android/forwarder2/device_controller.h
@@ -30,6 +30,10 @@
static std::unique_ptr<DeviceController> Create(
const std::string& adb_unix_socket,
int exit_notifier_fd);
+
+ DeviceController(const DeviceController&) = delete;
+ DeviceController& operator=(const DeviceController&) = delete;
+
~DeviceController();
void Start();
@@ -60,8 +64,6 @@
// that any WeakPtrs to Controller are invalidated before its members
// variable's destructors are executed, rendering them invalid.
base::WeakPtrFactory<DeviceController> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(DeviceController);
};
} // namespace forwarder
diff --git a/tools/android/forwarder2/device_listener.h b/tools/android/forwarder2/device_listener.h
index 7a6a85b..b62520c 100644
--- a/tools/android/forwarder2/device_listener.h
+++ b/tools/android/forwarder2/device_listener.h
@@ -53,6 +53,9 @@
int port,
ErrorCallback error_callback);
+ DeviceListener(const DeviceListener&) = delete;
+ DeviceListener& operator=(const DeviceListener&) = delete;
+
~DeviceListener();
void Start();
@@ -99,8 +102,6 @@
scoped_refptr<base::SingleThreadTaskRunner> deletion_task_runner_;
base::Thread thread_;
ForwardersManager forwarders_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(DeviceListener);
};
} // namespace forwarder
diff --git a/tools/android/forwarder2/host_controller.h b/tools/android/forwarder2/host_controller.h
index 35c7c8e4..a6efb52 100644
--- a/tools/android/forwarder2/host_controller.h
+++ b/tools/android/forwarder2/host_controller.h
@@ -47,6 +47,9 @@
int exit_notifier_fd,
ErrorCallback error_callback);
+ HostController(const HostController&) = delete;
+ HostController& operator=(const HostController&) = delete;
+
~HostController();
// Starts the internal controller thread.
@@ -89,8 +92,6 @@
const scoped_refptr<base::SingleThreadTaskRunner> deletion_task_runner_;
base::Thread thread_;
ForwardersManager forwarders_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(HostController);
};
} // namespace forwarder2
diff --git a/tools/android/forwarder2/pipe_notifier.h b/tools/android/forwarder2/pipe_notifier.h
index 58de607..8f69c083 100644
--- a/tools/android/forwarder2/pipe_notifier.h
+++ b/tools/android/forwarder2/pipe_notifier.h
@@ -17,6 +17,10 @@
class PipeNotifier {
public:
PipeNotifier();
+
+ PipeNotifier(const PipeNotifier&) = delete;
+ PipeNotifier& operator=(const PipeNotifier&) = delete;
+
~PipeNotifier();
bool Notify();
@@ -28,8 +32,6 @@
private:
int sender_fd_;
int receiver_fd_;
-
- DISALLOW_COPY_AND_ASSIGN(PipeNotifier);
};
} // namespace forwarder
diff --git a/tools/android/forwarder2/self_deleter_helper.h b/tools/android/forwarder2/self_deleter_helper.h
index 868eefa3..593bafda 100644
--- a/tools/android/forwarder2/self_deleter_helper.h
+++ b/tools/android/forwarder2/self_deleter_helper.h
@@ -104,6 +104,9 @@
self_deleting_object_(self_deleting_object),
deletion_callback_(std::move(deletion_callback)) {}
+ SelfDeleterHelper(const SelfDeleterHelper&) = delete;
+ SelfDeleterHelper& operator=(const SelfDeleterHelper&) = delete;
+
~SelfDeleterHelper() {
DCHECK(construction_runner_->RunsTasksInCurrentSequence());
}
@@ -130,8 +133,6 @@
// that any WeakPtrs to Controller are invalidated before its members
// variable's destructors are executed, rendering them invalid.
base::WeakPtrFactory<SelfDeleterHelper<T>> weak_ptr_factory_{this};
-
- DISALLOW_COPY_AND_ASSIGN(SelfDeleterHelper);
};
} // namespace forwarder2
diff --git a/tools/android/forwarder2/socket.h b/tools/android/forwarder2/socket.h
index 55a3a3c1..e342f863 100644
--- a/tools/android/forwarder2/socket.h
+++ b/tools/android/forwarder2/socket.h
@@ -24,6 +24,10 @@
class Socket {
public:
Socket();
+
+ Socket(const Socket&) = delete;
+ Socket& operator=(const Socket&) = delete;
+
~Socket();
bool BindUnix(const std::string& path);
@@ -149,8 +153,6 @@
// Used to listen for external events (e.g. process received a SIGTERM) while
// blocking on I/O operations.
std::vector<Event> events_;
-
- DISALLOW_COPY_AND_ASSIGN(Socket);
};
} // namespace forwarder
diff --git a/tools/ipc_fuzzer/message_lib/message_file_writer.cc b/tools/ipc_fuzzer/message_lib/message_file_writer.cc
index 2c1f23d..b2343a37 100644
--- a/tools/ipc_fuzzer/message_lib/message_file_writer.cc
+++ b/tools/ipc_fuzzer/message_lib/message_file_writer.cc
@@ -22,6 +22,10 @@
class Writer {
public:
Writer(const base::FilePath& path);
+
+ Writer(const Writer&) = delete;
+ Writer& operator=(const Writer&) = delete;
+
~Writer() {}
bool Write(const MessageVector& messages);
@@ -49,8 +53,6 @@
base::File file_;
const MessageVector* messages_;
TypesSet types_;
-
- DISALLOW_COPY_AND_ASSIGN(Writer);
};
Writer::Writer(const base::FilePath& path) : path_(path), messages_(NULL) {
diff --git a/tools/ipc_fuzzer/message_lib/message_names.h b/tools/ipc_fuzzer/message_lib/message_names.h
index 094118f..5f76bebd 100644
--- a/tools/ipc_fuzzer/message_lib/message_names.h
+++ b/tools/ipc_fuzzer/message_lib/message_names.h
@@ -17,6 +17,10 @@
class MessageNames {
public:
MessageNames();
+
+ MessageNames(const MessageNames&) = delete;
+ MessageNames& operator=(const MessageNames&) = delete;
+
~MessageNames();
static MessageNames* GetInstance();
@@ -52,8 +56,6 @@
NameToTypeMap type_map_;
static MessageNames* all_names_;
-
- DISALLOW_COPY_AND_ASSIGN(MessageNames);
};
} // namespace ipc_fuzzer
diff --git a/tools/ipc_fuzzer/message_replay/replay_process.h b/tools/ipc_fuzzer/message_replay/replay_process.h
index 7f855cc..b48ad7a 100644
--- a/tools/ipc_fuzzer/message_replay/replay_process.h
+++ b/tools/ipc_fuzzer/message_replay/replay_process.h
@@ -31,6 +31,10 @@
class ReplayProcess : public IPC::Listener {
public:
ReplayProcess();
+
+ ReplayProcess(const ReplayProcess&) = delete;
+ ReplayProcess& operator=(const ReplayProcess&) = delete;
+
~ReplayProcess() override;
// Set up command line, logging, IO thread. Returns true on success, false
@@ -62,8 +66,6 @@
base::WaitableEvent shutdown_event_;
MessageVector messages_;
size_t message_index_;
-
- DISALLOW_COPY_AND_ASSIGN(ReplayProcess);
};
} // namespace ipc_fuzzer
diff --git a/tools/win/chromeexts/chrome_exts_command.h b/tools/win/chromeexts/chrome_exts_command.h
index 0c484eb..7750bd1 100644
--- a/tools/win/chromeexts/chrome_exts_command.h
+++ b/tools/win/chromeexts/chrome_exts_command.h
@@ -43,6 +43,9 @@
return hr;
}
+ ChromeExtsCommand(const ChromeExtsCommand&) = delete;
+ ChromeExtsCommand& operator=(const ChromeExtsCommand&) = delete;
+
virtual ~ChromeExtsCommand();
protected:
@@ -72,8 +75,6 @@
base::CommandLine command_line_{base::CommandLine::NO_PROGRAM};
ComPtr<IDebugClient> debug_client_;
ComPtr<IDebugControl> debug_control_;
-
- DISALLOW_COPY_AND_ASSIGN(ChromeExtsCommand);
};
} // namespace chromeexts
diff --git a/tools/win/chromeexts/commands/hwnd_command.h b/tools/win/chromeexts/commands/hwnd_command.h
index b25fc3f..1a474a6 100644
--- a/tools/win/chromeexts/commands/hwnd_command.h
+++ b/tools/win/chromeexts/commands/hwnd_command.h
@@ -14,13 +14,14 @@
class HwndCommand : public ChromeExtsCommand {
public:
HwndCommand();
+
+ HwndCommand(const HwndCommand&) = delete;
+ HwndCommand& operator=(const HwndCommand&) = delete;
+
~HwndCommand() override;
protected:
HRESULT Execute() override;
-
- private:
- DISALLOW_COPY_AND_ASSIGN(HwndCommand);
};
} // namespace chromeexts
diff --git a/url/scheme_host_port_unittest.cc b/url/scheme_host_port_unittest.cc
index a88438c..b7804ee 100644
--- a/url/scheme_host_port_unittest.cc
+++ b/url/scheme_host_port_unittest.cc
@@ -16,12 +16,14 @@
class SchemeHostPortTest : public testing::Test {
public:
SchemeHostPortTest() = default;
+
+ SchemeHostPortTest(const SchemeHostPortTest&) = delete;
+ SchemeHostPortTest& operator=(const SchemeHostPortTest&) = delete;
+
~SchemeHostPortTest() override = default;
private:
url::ScopedSchemeRegistryForTests scoped_registry_;
-
- DISALLOW_COPY_AND_ASSIGN(SchemeHostPortTest);
};
void ExpectParsedUrlsEqual(const GURL& a, const GURL& b) {
diff --git a/url/url_canon_stdstring.h b/url/url_canon_stdstring.h
index 44edab7f..3c6b835 100644
--- a/url/url_canon_stdstring.h
+++ b/url/url_canon_stdstring.h
@@ -37,6 +37,10 @@
class COMPONENT_EXPORT(URL) StdStringCanonOutput : public CanonOutput {
public:
StdStringCanonOutput(std::string* str);
+
+ StdStringCanonOutput(const StdStringCanonOutput&) = delete;
+ StdStringCanonOutput& operator=(const StdStringCanonOutput&) = delete;
+
~StdStringCanonOutput() override;
// Must be called after writing has completed but before the string is used.
@@ -46,7 +50,6 @@
protected:
std::string* str_;
- DISALLOW_COPY_AND_ASSIGN(StdStringCanonOutput);
};
// An extension of the Replacements class that allows the setters to use
diff --git a/url/url_util_unittest.cc b/url/url_util_unittest.cc
index 0f0948a..e30380e 100644
--- a/url/url_util_unittest.cc
+++ b/url/url_util_unittest.cc
@@ -20,12 +20,14 @@
class URLUtilTest : public testing::Test {
public:
URLUtilTest() = default;
+
+ URLUtilTest(const URLUtilTest&) = delete;
+ URLUtilTest& operator=(const URLUtilTest&) = delete;
+
~URLUtilTest() override = default;
private:
ScopedSchemeRegistryForTests scoped_registry_;
-
- DISALLOW_COPY_AND_ASSIGN(URLUtilTest);
};
TEST_F(URLUtilTest, FindAndCompareScheme) {