refactor: replace deprecated DISALLOW_COPY_AND_ASSIGN (#31633)

This commit is contained in:
Milan Burda 2021-11-03 12:41:45 +01:00 committed by GitHub
parent 2a2a1a834c
commit 65a980c673
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
231 changed files with 918 additions and 576 deletions

View file

@ -21,6 +21,10 @@ class AsarFileValidator : public mojo::FilteredDataSource::Filter {
AsarFileValidator(IntegrityPayload integrity, base::File file);
~AsarFileValidator() override;
// disable copy
AsarFileValidator(const AsarFileValidator&) = delete;
AsarFileValidator& operator=(const AsarFileValidator&) = delete;
void OnRead(base::span<char> buffer,
mojo::FileDataSource::ReadResult* result) override;
@ -52,8 +56,6 @@ class AsarFileValidator : public mojo::FilteredDataSource::Filter {
uint64_t current_hash_byte_count_ = 0;
uint64_t total_hash_byte_count_ = 0;
std::unique_ptr<crypto::SecureHash> current_hash_;
DISALLOW_COPY_AND_ASSIGN(AsarFileValidator);
};
} // namespace asar

View file

@ -85,6 +85,10 @@ class AsarURLLoader : public network::mojom::URLLoader {
void PauseReadingBodyFromNet() override {}
void ResumeReadingBodyFromNet() override {}
// disable copy
AsarURLLoader(const AsarURLLoader&) = delete;
AsarURLLoader& operator=(const AsarURLLoader&) = delete;
private:
AsarURLLoader() = default;
~AsarURLLoader() override = default;
@ -379,8 +383,6 @@ class AsarURLLoader : public network::mojom::URLLoader {
// It is used to set some of the URLLoaderCompletionStatus data passed back
// to the URLLoaderClients (eg SimpleURLLoader).
size_t total_bytes_written_ = 0;
DISALLOW_COPY_AND_ASSIGN(AsarURLLoader);
};
} // namespace