Commit dd7f5a69 authored by ckitagawa's avatar ckitagawa Committed by Commit Bot

[Paint Preview] Replace DISALLOW_COPY_AND_ASSIGN macros

The macros are deprecated. I wrote a script to go through the paint
preview code and replace them.

Bug: 1010217
Change-Id: Ib5385757de4ad94cb7afe63287256548ef979c94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918096
Commit-Queue: Calder Kitagawa <ckitagawa@chromium.org>
Reviewed-by: default avatarIan Vollick <vollick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715713}
parent 770f4dd9
...@@ -2,4 +2,4 @@ ckitagawa@chromium.org ...@@ -2,4 +2,4 @@ ckitagawa@chromium.org
mahmoudi@chromium.org mahmoudi@chromium.org
vollick@chromium.org vollick@chromium.org
yfriedman@chromium.org yfriedman@chromium.org
# Component: Internals>FreezeDriedTabs # COMPONENT: Internals>FreezeDriedTabs
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#define COMPONENTS_PAINT_PREVIEW_BROWSER_FILE_MANAGER_H_ #define COMPONENTS_PAINT_PREVIEW_BROWSER_FILE_MANAGER_H_
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/macros.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -55,7 +54,8 @@ class FileManager { ...@@ -55,7 +54,8 @@ class FileManager {
base::FilePath root_directory_; base::FilePath root_directory_;
DISALLOW_COPY_AND_ASSIGN(FileManager); FileManager(const FileManager&) = delete;
FileManager& operator=(const FileManager&) = delete;
}; };
} // namespace paint_preview } // namespace paint_preview
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <vector> #include <vector>
#include "base/macros.h"
#include "cc/base/rtree.h" #include "cc/base/rtree.h"
#include "components/paint_preview/common/proto/paint_preview.pb.h" #include "components/paint_preview/common/proto/paint_preview.pb.h"
#include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect.h"
...@@ -45,7 +44,8 @@ class HitTester { ...@@ -45,7 +44,8 @@ class HitTester {
private: private:
cc::RTree<GURL> rtree_; cc::RTree<GURL> rtree_;
DISALLOW_COPY_AND_ASSIGN(HitTester); HitTester(const HitTester&) = delete;
HitTester& operator=(const HitTester&) = delete;
}; };
} // namespace paint_preview } // namespace paint_preview
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "base/containers/flat_map.h" #include "base/containers/flat_map.h"
#include "base/containers/flat_set.h" #include "base/containers/flat_set.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/macros.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
#include "components/paint_preview/common/mojom/paint_preview_recorder.mojom.h" #include "components/paint_preview/common/mojom/paint_preview_recorder.mojom.h"
#include "components/paint_preview/common/proto/paint_preview.pb.h" #include "components/paint_preview/common/proto/paint_preview.pb.h"
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h" #include "base/files/scoped_temp_dir.h"
#include "base/macros.h"
#include "base/strings/strcat.h" #include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
...@@ -77,7 +76,8 @@ class MockPaintPreviewRecorder : public mojom::PaintPreviewRecorder { ...@@ -77,7 +76,8 @@ class MockPaintPreviewRecorder : public mojom::PaintPreviewRecorder {
mojom::PaintPreviewCaptureResponsePtr response_; mojom::PaintPreviewCaptureResponsePtr response_;
mojo::AssociatedReceiver<mojom::PaintPreviewRecorder> binding_{this}; mojo::AssociatedReceiver<mojom::PaintPreviewRecorder> binding_{this};
DISALLOW_COPY_AND_ASSIGN(MockPaintPreviewRecorder); MockPaintPreviewRecorder(const MockPaintPreviewRecorder&) = delete;
MockPaintPreviewRecorder& operator=(const MockPaintPreviewRecorder&) = delete;
}; };
// Returns the GUID corresponding to |rfh|. // Returns the GUID corresponding to |rfh|.
...@@ -127,7 +127,10 @@ class PaintPreviewClientRenderViewHostTest ...@@ -127,7 +127,10 @@ class PaintPreviewClientRenderViewHostTest
base::ScopedTempDir temp_dir_; base::ScopedTempDir temp_dir_;
private: private:
DISALLOW_COPY_AND_ASSIGN(PaintPreviewClientRenderViewHostTest); PaintPreviewClientRenderViewHostTest(
const PaintPreviewClientRenderViewHostTest&) = delete;
PaintPreviewClientRenderViewHostTest& operator=(
const PaintPreviewClientRenderViewHostTest&) = delete;
}; };
TEST_F(PaintPreviewClientRenderViewHostTest, CaptureMainFrameMock) { TEST_F(PaintPreviewClientRenderViewHostTest, CaptureMainFrameMock) {
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#define COMPONENTS_PAINT_PREVIEW_COMMON_FILE_STREAM_H_ #define COMPONENTS_PAINT_PREVIEW_COMMON_FILE_STREAM_H_
#include "base/files/file.h" #include "base/files/file.h"
#include "base/macros.h"
#include "third_party/skia/include/core/SkStream.h" #include "third_party/skia/include/core/SkStream.h"
namespace paint_preview { namespace paint_preview {
...@@ -29,7 +28,8 @@ class FileWStream : public SkWStream { ...@@ -29,7 +28,8 @@ class FileWStream : public SkWStream {
base::File file_; base::File file_;
size_t bytes_written_; size_t bytes_written_;
DISALLOW_COPY_AND_ASSIGN(FileWStream); FileWStream(const FileWStream&) = delete;
FileWStream& operator=(const FileWStream&) = delete;
}; };
// An implementation of the SkWStream interface backed by base::File. Only // An implementation of the SkWStream interface backed by base::File. Only
...@@ -52,7 +52,8 @@ class FileRStream : public SkStream { ...@@ -52,7 +52,8 @@ class FileRStream : public SkStream {
const size_t length_; const size_t length_;
size_t bytes_read_; size_t bytes_read_;
DISALLOW_COPY_AND_ASSIGN(FileRStream); FileRStream(const FileRStream&) = delete;
FileRStream& operator=(const FileRStream&) = delete;
}; };
} // namespace paint_preview } // namespace paint_preview
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include "base/callback_forward.h" #include "base/callback_forward.h"
#include "base/containers/flat_set.h" #include "base/containers/flat_set.h"
#include "base/macros.h"
namespace paint_preview { namespace paint_preview {
...@@ -42,7 +41,8 @@ class GlyphUsage { ...@@ -42,7 +41,8 @@ class GlyphUsage {
uint16_t first_; uint16_t first_;
uint16_t last_; uint16_t last_;
DISALLOW_COPY_AND_ASSIGN(GlyphUsage); GlyphUsage(const GlyphUsage&) = delete;
GlyphUsage& operator=(const GlyphUsage&) = delete;
}; };
// An implementation of GlyphUsage that works well for densely set glyphs. // An implementation of GlyphUsage that works well for densely set glyphs.
...@@ -66,7 +66,8 @@ class DenseGlyphUsage : public GlyphUsage { ...@@ -66,7 +66,8 @@ class DenseGlyphUsage : public GlyphUsage {
private: private:
std::vector<bool> bitset_; std::vector<bool> bitset_;
DISALLOW_COPY_AND_ASSIGN(DenseGlyphUsage); DenseGlyphUsage(const DenseGlyphUsage&) = delete;
DenseGlyphUsage& operator=(const DenseGlyphUsage&) = delete;
}; };
// An implementation of GlyphUsage that works well for sparsely set glyphs. // An implementation of GlyphUsage that works well for sparsely set glyphs.
...@@ -92,7 +93,8 @@ class SparseGlyphUsage : public GlyphUsage { ...@@ -92,7 +93,8 @@ class SparseGlyphUsage : public GlyphUsage {
private: private:
base::flat_set<uint16_t> glyph_ids_; base::flat_set<uint16_t> glyph_ids_;
DISALLOW_COPY_AND_ASSIGN(SparseGlyphUsage); SparseGlyphUsage(const SparseGlyphUsage&) = delete;
SparseGlyphUsage& operator=(const SparseGlyphUsage&) = delete;
}; };
} // namespace paint_preview } // namespace paint_preview
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <vector> #include <vector>
#include "base/containers/flat_map.h" #include "base/containers/flat_map.h"
#include "base/macros.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
#include "components/paint_preview/common/glyph_usage.h" #include "components/paint_preview/common/glyph_usage.h"
#include "components/paint_preview/common/mojom/paint_preview_recorder.mojom.h" #include "components/paint_preview/common/mojom/paint_preview_recorder.mojom.h"
...@@ -81,7 +80,8 @@ class PaintPreviewTracker { ...@@ -81,7 +80,8 @@ class PaintPreviewTracker {
TypefaceUsageMap typeface_glyph_usage_; TypefaceUsageMap typeface_glyph_usage_;
base::flat_map<uint32_t, sk_sp<SkPicture>> subframe_pics_; base::flat_map<uint32_t, sk_sp<SkPicture>> subframe_pics_;
DISALLOW_COPY_AND_ASSIGN(PaintPreviewTracker); PaintPreviewTracker(const PaintPreviewTracker&) = delete;
PaintPreviewTracker& operator=(const PaintPreviewTracker&) = delete;
}; };
} // namespace paint_preview } // namespace paint_preview
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/callback.h" #include "base/callback.h"
#include "base/macros.h"
#include "third_party/skia/include/core/SkStream.h" #include "third_party/skia/include/core/SkStream.h"
#include "third_party/skia/include/core/SkTypeface.h" #include "third_party/skia/include/core/SkTypeface.h"
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <stdint.h> #include <stdint.h>
#include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "components/paint_preview/common/mojom/paint_preview_recorder.mojom.h" #include "components/paint_preview/common/mojom/paint_preview_recorder.mojom.h"
#include "components/paint_preview/common/paint_preview_tracker.h" #include "components/paint_preview/common/paint_preview_tracker.h"
...@@ -56,7 +55,8 @@ class PaintPreviewRecorderImpl : public content::RenderFrameObserver, ...@@ -56,7 +55,8 @@ class PaintPreviewRecorderImpl : public content::RenderFrameObserver,
base::WeakPtrFactory<PaintPreviewRecorderImpl> weak_ptr_factory_{this}; base::WeakPtrFactory<PaintPreviewRecorderImpl> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(PaintPreviewRecorderImpl); PaintPreviewRecorderImpl(const PaintPreviewRecorderImpl&) = delete;
PaintPreviewRecorderImpl& operator=(const PaintPreviewRecorderImpl&) = delete;
}; };
} // namespace paint_preview } // namespace paint_preview
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/containers/flat_map.h" #include "base/containers/flat_map.h"
#include "base/macros.h"
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/unguessable_token.h" #include "base/unguessable_token.h"
...@@ -63,7 +62,10 @@ class PaintPreviewCompositorCollectionImpl ...@@ -63,7 +62,10 @@ class PaintPreviewCompositorCollectionImpl
std::unique_ptr<PaintPreviewCompositorImpl>> std::unique_ptr<PaintPreviewCompositorImpl>>
compositors_; compositors_;
DISALLOW_COPY_AND_ASSIGN(PaintPreviewCompositorCollectionImpl); PaintPreviewCompositorCollectionImpl(
const PaintPreviewCompositorCollectionImpl&) = delete;
PaintPreviewCompositorCollectionImpl& operator=(
const PaintPreviewCompositorCollectionImpl&) = delete;
}; };
} // namespace paint_preview } // namespace paint_preview
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/containers/flat_map.h" #include "base/containers/flat_map.h"
#include "base/macros.h"
#include "components/paint_preview/common/proto/paint_preview.pb.h" #include "components/paint_preview/common/proto/paint_preview.pb.h"
#include "components/services/paint_preview_compositor/paint_preview_frame.h" #include "components/services/paint_preview_compositor/paint_preview_frame.h"
#include "components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom.h" #include "components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom.h"
...@@ -63,7 +62,9 @@ class PaintPreviewCompositorImpl : public mojom::PaintPreviewCompositor { ...@@ -63,7 +62,9 @@ class PaintPreviewCompositorImpl : public mojom::PaintPreviewCompositor {
// A mapping from frame GUID to its associated data. // A mapping from frame GUID to its associated data.
base::flat_map<int64_t, PaintPreviewFrame> frames_; base::flat_map<int64_t, PaintPreviewFrame> frames_;
DISALLOW_COPY_AND_ASSIGN(PaintPreviewCompositorImpl); PaintPreviewCompositorImpl(const PaintPreviewCompositorImpl&) = delete;
PaintPreviewCompositorImpl& operator=(const PaintPreviewCompositorImpl&) =
delete;
}; };
} // namespace paint_preview } // namespace paint_preview
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <vector> #include <vector>
#include "base/macros.h"
#include "components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom.h" #include "components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom.h"
#include "third_party/skia/include/core/SkPicture.h" #include "third_party/skia/include/core/SkPicture.h"
#include "third_party/skia/include/core/SkRefCnt.h" #include "third_party/skia/include/core/SkRefCnt.h"
...@@ -28,7 +27,8 @@ struct PaintPreviewFrame { ...@@ -28,7 +27,8 @@ struct PaintPreviewFrame {
std::vector<mojom::SubframeClipRect> subframe_clip_rects; std::vector<mojom::SubframeClipRect> subframe_clip_rects;
private: private:
DISALLOW_COPY_AND_ASSIGN(PaintPreviewFrame); PaintPreviewFrame(const PaintPreviewFrame&) = delete;
PaintPreviewFrame& operator=(const PaintPreviewFrame&) = delete;
}; };
} // namespace paint_preview } // namespace paint_preview
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment