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

Side by Side Diff: Source/wtf/text/AtomicString.cpp

Issue 110843004: Replaced HTMLIdentifier with an atomized string factory function (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review fixes Created 7 years 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 | « Source/core/html/parser/HTMLTreeBuilderSimulator.cpp ('k') | Source/wtf/text/StringImpl.h » ('j') | 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) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
4 * Copyright (C) 2012 Google Inc. All rights reserved. 4 * Copyright (C) 2012 Google Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 HashSet<StringImpl*>& table() 64 HashSet<StringImpl*>& table()
65 { 65 {
66 return m_table; 66 return m_table;
67 } 67 }
68 68
69 private: 69 private:
70 AtomicStringTable() { } 70 AtomicStringTable() { }
71 71
72 void addStaticStrings() 72 void addStaticStrings()
73 { 73 {
74 const Vector<StringImpl*>& staticStrings = StringImpl::allStaticStrings( ); 74 const StaticStringsTable& staticStrings = StringImpl::allStaticStrings() ;
75 75
76 Vector<StringImpl*>::const_iterator it = staticStrings.begin(); 76 StaticStringsTable::const_iterator it = staticStrings.begin();
77 for (; it != staticStrings.end(); ++it) { 77 for (; it != staticStrings.end(); ++it) {
78 addStringImpl(*it); 78 addStringImpl(it->value);
79 } 79 }
80 } 80 }
81 81
82 static void destroy(AtomicStringTable* table) 82 static void destroy(AtomicStringTable* table)
83 { 83 {
84 HashSet<StringImpl*>::iterator end = table->m_table.end(); 84 HashSet<StringImpl*>::iterator end = table->m_table.end();
85 for (HashSet<StringImpl*>::iterator iter = table->m_table.begin(); iter != end; ++iter) { 85 for (HashSet<StringImpl*>::iterator iter = table->m_table.begin(); iter != end; ++iter) {
86 StringImpl* string = *iter; 86 StringImpl* string = *iter;
87 if (!string->isStatic()) { 87 if (!string->isStatic()) {
88 ASSERT(string->isAtomic()); 88 ASSERT(string->isAtomic());
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 } 526 }
527 527
528 #ifndef NDEBUG 528 #ifndef NDEBUG
529 void AtomicString::show() const 529 void AtomicString::show() const
530 { 530 {
531 m_string.show(); 531 m_string.show();
532 } 532 }
533 #endif 533 #endif
534 534
535 } // namespace WTF 535 } // namespace WTF
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLTreeBuilderSimulator.cpp ('k') | Source/wtf/text/StringImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698