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

Unified Diff: components/bookmarks/browser/titled_url_index.cc

Issue 2883523002: Reduce the memory usage of bookmarks storage (Closed)
Patch Set: MakeUnique Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/bookmarks/browser/titled_url_index.cc
diff --git a/components/bookmarks/browser/titled_url_index.cc b/components/bookmarks/browser/titled_url_index.cc
index fa9ed7647ebf04c0051a9a18384d8ab559553aa6..eb95ed329bd6a634b6d29e501f33d5b19335c236 100644
--- a/components/bookmarks/browser/titled_url_index.cc
+++ b/components/bookmarks/browser/titled_url_index.cc
@@ -207,16 +207,10 @@ bool TitledUrlIndex::GetResultsMatchingTerm(
while (i != index_.end() &&
i->first.size() >= term.size() &&
term.compare(0, term.size(), i->first, 0, term.size()) == 0) {
-#if !defined(OS_ANDROID)
- prefix_matches->insert(i->second.begin(), i->second.end());
-#else
- // Work around a bug in the implementation of std::set::insert in the STL
- // used on android (http://crbug.com/367050).
for (TitledUrlNodeSet::const_iterator n = i->second.begin();
- n != i->second.end();
- ++n)
+ n != i->second.end(); ++n) {
prefix_matches->insert(prefix_matches->end(), *n);
-#endif
+ }
++i;
}
if (!first_term) {
« no previous file with comments | « components/bookmarks/browser/titled_url_index.h ('k') | components/bookmarks/browser/titled_url_node_sorter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698