summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-08 18:22:53 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-08 18:22:53 +0000
commit8d88b6d25de93cb5c1684f63d7c43eaccd3fde62 (patch)
tree5b115deb43cd24462abc43584cba9dd02c6c49f6 /ui
parent06b5c2d9584f04cc78b3b46f3828d89ed3f9c76d (diff)
downloadchromium_src-8d88b6d25de93cb5c1684f63d7c43eaccd3fde62.zip
chromium_src-8d88b6d25de93cb5c1684f63d7c43eaccd3fde62.tar.gz
chromium_src-8d88b6d25de93cb5c1684f63d7c43eaccd3fde62.tar.bz2
Use unique name for property deallocator.
Move type completeness check into functino. anonymous namespaces within the same namespace are treated as the same namespace. This is to avoid duplicated definitions. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10533063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141243 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/aura/window_property.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/aura/window_property.h b/ui/aura/window_property.h
index 796aa08..118df4c 100644
--- a/ui/aura/window_property.h
+++ b/ui/aura/window_property.h
@@ -129,14 +129,14 @@ void Window::ClearProperty(const WindowProperty<T>* property) {
}
#define DEFINE_OWNED_WINDOW_PROPERTY_KEY(TYPE, NAME, DEFAULT) \
- namespace { \
- enum { type_must_be_complete = sizeof(TYPE) }; \
- void Deallocator(intptr_t p) { \
+ namespace { \
+ void Deallocator ## NAME (intptr_t p) { \
+ enum { type_must_be_complete = sizeof(TYPE) }; \
delete aura::WindowPropertyCaster<TYPE*>::FromIntptrT(p); \
- } \
- const aura::WindowProperty<TYPE*> NAME ## _Value = \
- {DEFAULT,#NAME,&Deallocator}; \
- } \
+ } \
+ const aura::WindowProperty<TYPE*> NAME ## _Value = \
+ {DEFAULT,#NAME,&Deallocator ## NAME}; \
+ } \
const aura::WindowProperty<TYPE*>* const NAME = & NAME ## _Value;
#endif // UI_AURA_WINDOW_PROPERTY_H_