diff options
author | danakj <danakj@chromium.org> | 2015-03-07 15:04:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-07 23:05:13 +0000 |
commit | 71ef42db8b96ccd621e5df2421c375a8725ca872 (patch) | |
tree | 3adcca1ccc4ec2b65dc4a2d1e6a199a1fb87130d | |
parent | f52ea14b61ebdf8ad18814da5166a2b30b7a3f66 (diff) | |
download | chromium_src-71ef42db8b96ccd621e5df2421c375a8725ca872.zip chromium_src-71ef42db8b96ccd621e5df2421c375a8725ca872.tar.gz chromium_src-71ef42db8b96ccd621e5df2421c375a8725ca872.tar.bz2 |
base: Put DISALLOW_COPY_AND_ASSIGN inside private section of classes.
This macro should be private to make the constructors hidden, making
them fail at compile time if called, instead of at link time.
R=Nico
BUG=464816,447156
Review URL: https://codereview.chromium.org/986623004
Cr-Commit-Position: refs/heads/master@{#319568}
-rw-r--r-- | base/containers/stack_container.h | 1 | ||||
-rw-r--r-- | base/files/file_path_watcher_browsertest.cc | 1 | ||||
-rw-r--r-- | base/observer_list_threadsafe.h | 1 | ||||
-rw-r--r-- | base/prefs/pref_member.h | 1 | ||||
-rw-r--r-- | base/system_monitor/system_monitor_unittest.cc | 1 | ||||
-rw-r--r-- | base/test/mock_devices_changed_observer.h | 1 | ||||
-rw-r--r-- | base/threading/thread_local_storage.h | 1 |
7 files changed, 7 insertions, 0 deletions
diff --git a/base/containers/stack_container.h b/base/containers/stack_container.h index 87fa036..54090d3 100644 --- a/base/containers/stack_container.h +++ b/base/containers/stack_container.h @@ -176,6 +176,7 @@ class StackContainer { Allocator allocator_; ContainerType container_; + private: DISALLOW_COPY_AND_ASSIGN(StackContainer); }; diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc index 9081626..bc7e630 100644 --- a/base/files/file_path_watcher_browsertest.cc +++ b/base/files/file_path_watcher_browsertest.cc @@ -192,6 +192,7 @@ class FilePathWatcherTest : public testing::Test { ScopedTempDir temp_dir_; scoped_refptr<NotificationCollector> collector_; + private: DISALLOW_COPY_AND_ASSIGN(FilePathWatcherTest); }; diff --git a/base/observer_list_threadsafe.h b/base/observer_list_threadsafe.h index 1a66333..0830445 100644 --- a/base/observer_list_threadsafe.h +++ b/base/observer_list_threadsafe.h @@ -199,6 +199,7 @@ class ObserverListThreadSafe scoped_refptr<base::MessageLoopProxy> loop; ObserverList<ObserverType> list; + private: DISALLOW_COPY_AND_ASSIGN(ObserverListContext); }; diff --git a/base/prefs/pref_member.h b/base/prefs/pref_member.h index b47cae2..078be95 100644 --- a/base/prefs/pref_member.h +++ b/base/prefs/pref_member.h @@ -273,6 +273,7 @@ class PrefMember : public subtle::PrefMemberBase { // tree. mutable ValueType value_; + private: DISALLOW_COPY_AND_ASSIGN(Internal); }; diff --git a/base/system_monitor/system_monitor_unittest.cc b/base/system_monitor/system_monitor_unittest.cc index d63bc3d..f3db4c7 100644 --- a/base/system_monitor/system_monitor_unittest.cc +++ b/base/system_monitor/system_monitor_unittest.cc @@ -23,6 +23,7 @@ class SystemMonitorTest : public testing::Test { MessageLoop message_loop_; scoped_ptr<SystemMonitor> system_monitor_; + private: DISALLOW_COPY_AND_ASSIGN(SystemMonitorTest); }; diff --git a/base/test/mock_devices_changed_observer.h b/base/test/mock_devices_changed_observer.h index 3ada16b..3255002 100644 --- a/base/test/mock_devices_changed_observer.h +++ b/base/test/mock_devices_changed_observer.h @@ -21,6 +21,7 @@ class MockDevicesChangedObserver MOCK_METHOD1(OnDevicesChanged, void(base::SystemMonitor::DeviceType device_type)); + private: DISALLOW_COPY_AND_ASSIGN(MockDevicesChangedObserver); }; diff --git a/base/threading/thread_local_storage.h b/base/threading/thread_local_storage.h index 53ebe55..ea41b34 100644 --- a/base/threading/thread_local_storage.h +++ b/base/threading/thread_local_storage.h @@ -136,6 +136,7 @@ class BASE_EXPORT ThreadLocalStorage { DISALLOW_COPY_AND_ASSIGN(Slot); }; + private: DISALLOW_COPY_AND_ASSIGN(ThreadLocalStorage); }; |