Commit 71ef42db authored by danakj's avatar danakj Committed by Commit bot

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}
parent f52ea14b
...@@ -176,6 +176,7 @@ class StackContainer { ...@@ -176,6 +176,7 @@ class StackContainer {
Allocator allocator_; Allocator allocator_;
ContainerType container_; ContainerType container_;
private:
DISALLOW_COPY_AND_ASSIGN(StackContainer); DISALLOW_COPY_AND_ASSIGN(StackContainer);
}; };
......
...@@ -192,6 +192,7 @@ class FilePathWatcherTest : public testing::Test { ...@@ -192,6 +192,7 @@ class FilePathWatcherTest : public testing::Test {
ScopedTempDir temp_dir_; ScopedTempDir temp_dir_;
scoped_refptr<NotificationCollector> collector_; scoped_refptr<NotificationCollector> collector_;
private:
DISALLOW_COPY_AND_ASSIGN(FilePathWatcherTest); DISALLOW_COPY_AND_ASSIGN(FilePathWatcherTest);
}; };
......
...@@ -199,6 +199,7 @@ class ObserverListThreadSafe ...@@ -199,6 +199,7 @@ class ObserverListThreadSafe
scoped_refptr<base::MessageLoopProxy> loop; scoped_refptr<base::MessageLoopProxy> loop;
ObserverList<ObserverType> list; ObserverList<ObserverType> list;
private:
DISALLOW_COPY_AND_ASSIGN(ObserverListContext); DISALLOW_COPY_AND_ASSIGN(ObserverListContext);
}; };
......
...@@ -273,6 +273,7 @@ class PrefMember : public subtle::PrefMemberBase { ...@@ -273,6 +273,7 @@ class PrefMember : public subtle::PrefMemberBase {
// tree. // tree.
mutable ValueType value_; mutable ValueType value_;
private:
DISALLOW_COPY_AND_ASSIGN(Internal); DISALLOW_COPY_AND_ASSIGN(Internal);
}; };
......
...@@ -23,6 +23,7 @@ class SystemMonitorTest : public testing::Test { ...@@ -23,6 +23,7 @@ class SystemMonitorTest : public testing::Test {
MessageLoop message_loop_; MessageLoop message_loop_;
scoped_ptr<SystemMonitor> system_monitor_; scoped_ptr<SystemMonitor> system_monitor_;
private:
DISALLOW_COPY_AND_ASSIGN(SystemMonitorTest); DISALLOW_COPY_AND_ASSIGN(SystemMonitorTest);
}; };
......
...@@ -21,6 +21,7 @@ class MockDevicesChangedObserver ...@@ -21,6 +21,7 @@ class MockDevicesChangedObserver
MOCK_METHOD1(OnDevicesChanged, MOCK_METHOD1(OnDevicesChanged,
void(base::SystemMonitor::DeviceType device_type)); void(base::SystemMonitor::DeviceType device_type));
private:
DISALLOW_COPY_AND_ASSIGN(MockDevicesChangedObserver); DISALLOW_COPY_AND_ASSIGN(MockDevicesChangedObserver);
}; };
......
...@@ -136,6 +136,7 @@ class BASE_EXPORT ThreadLocalStorage { ...@@ -136,6 +136,7 @@ class BASE_EXPORT ThreadLocalStorage {
DISALLOW_COPY_AND_ASSIGN(Slot); DISALLOW_COPY_AND_ASSIGN(Slot);
}; };
private:
DISALLOW_COPY_AND_ASSIGN(ThreadLocalStorage); DISALLOW_COPY_AND_ASSIGN(ThreadLocalStorage);
}; };
......
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