Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Side by Side Diff: Source/core/dom/QualifiedName.h

Issue 608593004: Remove QualifiedName::hasOneRef (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 public: 48 public:
49 static PassRefPtr<QualifiedNameImpl> create(const AtomicString& prefix, const AtomicString& localName, const AtomicString& namespaceURI, bool isStatic) 49 static PassRefPtr<QualifiedNameImpl> create(const AtomicString& prefix, const AtomicString& localName, const AtomicString& namespaceURI, bool isStatic)
50 { 50 {
51 return adoptRef(new QualifiedNameImpl(prefix, localName, namespaceUR I, isStatic)); 51 return adoptRef(new QualifiedNameImpl(prefix, localName, namespaceUR I, isStatic));
52 } 52 }
53 53
54 ~QualifiedNameImpl(); 54 ~QualifiedNameImpl();
55 55
56 unsigned computeHash() const; 56 unsigned computeHash() const;
57 57
58 bool hasOneRef() const
59 {
60 return m_isStatic || RefCounted<QualifiedNameImpl>::hasOneRef();
61 }
62
63 void ref() 58 void ref()
64 { 59 {
65 if (m_isStatic) 60 if (m_isStatic)
66 return; 61 return;
67 RefCounted<QualifiedNameImpl>::ref(); 62 RefCounted<QualifiedNameImpl>::ref();
68 } 63 }
69 64
70 void deref() 65 void deref()
71 { 66 {
72 if (m_isStatic) 67 if (m_isStatic)
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 typedef blink::QualifiedNameHash Hash; 177 typedef blink::QualifiedNameHash Hash;
183 }; 178 };
184 179
185 template<> struct HashTraits<blink::QualifiedName> : SimpleClassHashTraits<b link::QualifiedName> { 180 template<> struct HashTraits<blink::QualifiedName> : SimpleClassHashTraits<b link::QualifiedName> {
186 static const bool emptyValueIsZero = false; 181 static const bool emptyValueIsZero = false;
187 static blink::QualifiedName emptyValue() { return blink::QualifiedName:: null(); } 182 static blink::QualifiedName emptyValue() { return blink::QualifiedName:: null(); }
188 }; 183 };
189 } 184 }
190 185
191 #endif 186 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698