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

Side by Side Diff: components/query_parser/query_parser.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/query_parser/query_parser.h" 5 #include "components/query_parser/query_parser.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/i18n/break_iterator.h" 10 #include "base/i18n/break_iterator.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 QueryNodeStarVector children_; 178 QueryNodeStarVector children_;
179 179
180 private: 180 private:
181 DISALLOW_COPY_AND_ASSIGN(QueryNodeList); 181 DISALLOW_COPY_AND_ASSIGN(QueryNodeList);
182 }; 182 };
183 183
184 QueryNodeList::QueryNodeList() {} 184 QueryNodeList::QueryNodeList() {}
185 185
186 QueryNodeList::~QueryNodeList() { 186 QueryNodeList::~QueryNodeList() {
187 STLDeleteElements(&children_); 187 base::STLDeleteElements(&children_);
188 } 188 }
189 189
190 void QueryNodeList::AddChild(QueryNode* node) { 190 void QueryNodeList::AddChild(QueryNode* node) {
191 children_.push_back(node); 191 children_.push_back(node);
192 } 192 }
193 193
194 void QueryNodeList::RemoveEmptySubnodes() { 194 void QueryNodeList::RemoveEmptySubnodes() {
195 for (size_t i = 0; i < children_.size(); ++i) { 195 for (size_t i = 0; i < children_.size(); ++i) {
196 if (children_[i]->IsWord()) 196 if (children_[i]->IsWord())
197 continue; 197 continue;
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 void QueryParser::SortAndCoalesceMatchPositions( 476 void QueryParser::SortAndCoalesceMatchPositions(
477 Snippet::MatchPositions* matches) { 477 Snippet::MatchPositions* matches) {
478 std::sort(matches->begin(), matches->end(), &CompareMatchPosition); 478 std::sort(matches->begin(), matches->end(), &CompareMatchPosition);
479 // WARNING: we don't use iterator here as CoalesceMatchesFrom may remove 479 // WARNING: we don't use iterator here as CoalesceMatchesFrom may remove
480 // from matches. 480 // from matches.
481 for (size_t i = 0; i < matches->size(); ++i) 481 for (size_t i = 0; i < matches->size(); ++i)
482 CoalesceMatchesFrom(i, matches); 482 CoalesceMatchesFrom(i, matches);
483 } 483 }
484 484
485 } // namespace query_parser 485 } // namespace query_parser
OLDNEW
« no previous file with comments | « components/proximity_auth/bluetooth_throttler_impl.cc ('k') | components/rappor/rappor_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698