diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-30 07:40:54 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-30 07:40:54 +0000 |
commit | 4514d4ed0303ca25eb184e842567f61ed8812823 (patch) | |
tree | 6318274985c32dbc7856d52e1e8600cfc7dfb783 | |
parent | 876ba22e2898771c466e2bb84c3c7c83aa9c61cd (diff) | |
download | chromium_src-4514d4ed0303ca25eb184e842567f61ed8812823.zip chromium_src-4514d4ed0303ca25eb184e842567f61ed8812823.tar.gz chromium_src-4514d4ed0303ca25eb184e842567f61ed8812823.tar.bz2 |
Cleanups to enable clang warning about protected non-virtual RefCounted destructor
This makes refcounted classes that do not have derived types have private
destructors instead of protected. If they did have derived classes, they would
need protected *virtual* destructors.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11896117
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179555 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/picture.h | 2 | ||||
-rw-r--r-- | cc/picture_layer_impl_unittest.cc | 26 | ||||
-rw-r--r-- | content/browser/geolocation/core_location_data_provider_mac.h | 3 | ||||
-rw-r--r-- | gpu/command_buffer/service/memory_program_cache.h | 3 | ||||
-rw-r--r-- | media/tools/player_x11/gl_video_renderer.h | 3 | ||||
-rw-r--r-- | media/tools/player_x11/x11_video_renderer.h | 3 |
6 files changed, 9 insertions, 31 deletions
diff --git a/cc/picture.h b/cc/picture.h index c49d74a5..a6ed449 100644 --- a/cc/picture.h +++ b/cc/picture.h @@ -46,7 +46,7 @@ class CC_EXPORT Picture const gfx::Rect& layer_rect, std::list<skia::LazyPixelRef*>& pixel_ref_list); - protected: + private: Picture(gfx::Rect layer_rect); // This constructor assumes SkPicture is already ref'd and transfers // ownership to this picture. diff --git a/cc/picture_layer_impl_unittest.cc b/cc/picture_layer_impl_unittest.cc index 720b2be4..56fc0e8 100644 --- a/cc/picture_layer_impl_unittest.cc +++ b/cc/picture_layer_impl_unittest.cc @@ -15,27 +15,6 @@ namespace cc { namespace { -class FakePicture : public Picture { - public: - static scoped_refptr<Picture> Create(gfx::Rect layer_rect) { - scoped_refptr<FakePicture> picture(new FakePicture(layer_rect)); - - FakeContentLayerClient client; - RenderingStats stats; - picture->Record(&client, stats); - - return picture; - } - - protected: - FakePicture(gfx::Rect layer_rect) - : Picture(layer_rect) { - } - - ~FakePicture() { - } -}; - class TestablePictureLayerImpl : public PictureLayerImpl { public: static scoped_ptr<TestablePictureLayerImpl> create( @@ -100,7 +79,10 @@ class TestablePicturePileImpl : public PicturePileImpl { if (HasRecordingAt(x, y)) return; gfx::Rect bounds(tiling().TileBounds(x, y)); - scoped_refptr<Picture> picture(FakePicture::Create(bounds)); + scoped_refptr<Picture> picture(Picture::Create(bounds)); + FakeContentLayerClient client; + RenderingStats stats; + picture->Record(&client, stats); picture_list_map_[std::pair<int, int>(x, y)].push_back(picture); EXPECT_TRUE(HasRecordingAt(x, y)); } diff --git a/content/browser/geolocation/core_location_data_provider_mac.h b/content/browser/geolocation/core_location_data_provider_mac.h index eab0e88..269e86a 100644 --- a/content/browser/geolocation/core_location_data_provider_mac.h +++ b/content/browser/geolocation/core_location_data_provider_mac.h @@ -33,11 +33,10 @@ class CoreLocationDataProviderMac void UpdatePosition(Geoposition* position); - protected: + private: friend class base::RefCountedThreadSafe<CoreLocationDataProviderMac>; ~CoreLocationDataProviderMac(); - private: // These must execute in BrowserThread::UI void StartUpdatingTask(); void StopUpdatingTask(); diff --git a/gpu/command_buffer/service/memory_program_cache.h b/gpu/command_buffer/service/memory_program_cache.h index 222e61e..24c28a0 100644 --- a/gpu/command_buffer/service/memory_program_cache.h +++ b/gpu/command_buffer/service/memory_program_cache.h @@ -62,12 +62,11 @@ class GPU_EXPORT MemoryProgramCache : public ProgramCache { const ShaderTranslator::VariableMap attrib_map_1; const ShaderTranslator::VariableMap uniform_map_1; - protected: + private: friend class base::RefCounted<ProgramCacheValue>; ~ProgramCacheValue(); - private: DISALLOW_COPY_AND_ASSIGN(ProgramCacheValue); }; diff --git a/media/tools/player_x11/gl_video_renderer.h b/media/tools/player_x11/gl_video_renderer.h index b8818a1..dcda343 100644 --- a/media/tools/player_x11/gl_video_renderer.h +++ b/media/tools/player_x11/gl_video_renderer.h @@ -23,11 +23,10 @@ class GlVideoRenderer : public base::RefCountedThreadSafe<GlVideoRenderer> { void Paint(media::VideoFrame* video_frame); - protected: + private: friend class base::RefCountedThreadSafe<GlVideoRenderer>; ~GlVideoRenderer(); - private: // Initializes GL rendering for the given dimensions. void Initialize(gfx::Size coded_size, gfx::Rect visible_rect); diff --git a/media/tools/player_x11/x11_video_renderer.h b/media/tools/player_x11/x11_video_renderer.h index 05c624c..18b76ba 100644 --- a/media/tools/player_x11/x11_video_renderer.h +++ b/media/tools/player_x11/x11_video_renderer.h @@ -24,11 +24,10 @@ class X11VideoRenderer : public base::RefCountedThreadSafe<X11VideoRenderer> { void Paint(media::VideoFrame* video_frame); - protected: + private: friend class base::RefCountedThreadSafe<X11VideoRenderer>; ~X11VideoRenderer(); - private: // Initializes X11 rendering for the given dimensions. void Initialize(gfx::Size coded_size, gfx::Rect visible_rect); |