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

Side by Side Diff: Source/core/dom/DocumentParser.cpp

Issue 645443003: Move parts of core/dom to C++11 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed nit 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/DocumentOrderedMap.h ('k') | Source/core/dom/DocumentStyleSheetCollection.cpp » ('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) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 #endif 59 #endif
60 } 60 }
61 61
62 void DocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder>) 62 void DocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder>)
63 { 63 {
64 ASSERT_NOT_REACHED(); 64 ASSERT_NOT_REACHED();
65 } 65 }
66 66
67 TextResourceDecoder* DocumentParser::decoder() 67 TextResourceDecoder* DocumentParser::decoder()
68 { 68 {
69 return 0; 69 return nullptr;
70 } 70 }
71 71
72 void DocumentParser::prepareToStopParsing() 72 void DocumentParser::prepareToStopParsing()
73 { 73 {
74 ASSERT(m_state == ParsingState); 74 ASSERT(m_state == ParsingState);
75 m_state = StoppingState; 75 m_state = StoppingState;
76 } 76 }
77 77
78 void DocumentParser::stopParsing() 78 void DocumentParser::stopParsing()
79 { 79 {
80 m_state = StoppedState; 80 m_state = StoppedState;
81 81
82 // Clients may be removed while in the loop. Make a snapshot for iteration. 82 // Clients may be removed while in the loop. Make a snapshot for iteration.
83 WillBeHeapVector<RawPtrWillBeMember<DocumentParserClient> > clientsSnapshot; 83 WillBeHeapVector<RawPtrWillBeMember<DocumentParserClient>> clientsSnapshot;
84 copyToVector(m_clients, clientsSnapshot); 84 copyToVector(m_clients, clientsSnapshot);
85 85
86 for (WillBeHeapVector<RawPtrWillBeMember<DocumentParserClient> >::const_iter ator it = clientsSnapshot.begin(), itEnd = clientsSnapshot.end(); it != itEnd; + +it) { 86 for (DocumentParserClient* client : clientsSnapshot) {
87 DocumentParserClient* client = *it;
88 if (!m_clients.contains(client)) 87 if (!m_clients.contains(client))
89 continue; 88 continue;
90 89
91 client->notifyParserStopped(); 90 client->notifyParserStopped();
92 } 91 }
93 } 92 }
94 93
95 void DocumentParser::detach() 94 void DocumentParser::detach()
96 { 95 {
97 m_state = DetachedState; 96 m_state = DetachedState;
(...skipping 13 matching lines...) Expand all
111 m_clients.add(client); 110 m_clients.add(client);
112 } 111 }
113 112
114 void DocumentParser::removeClient(DocumentParserClient* client) 113 void DocumentParser::removeClient(DocumentParserClient* client)
115 { 114 {
116 m_clients.remove(client); 115 m_clients.remove(client);
117 } 116 }
118 117
119 }; 118 };
120 119
OLDNEW
« no previous file with comments | « Source/core/dom/DocumentOrderedMap.h ('k') | Source/core/dom/DocumentStyleSheetCollection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698