| OLD | NEW |
| 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/bookmarks/browser/bookmark_index.h" | 5 #include "components/bookmarks/browser/bookmark_index.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <functional> | 10 #include <functional> |
| 11 #include <iterator> | 11 #include <iterator> |
| 12 #include <list> | 12 #include <list> |
| 13 | 13 |
| 14 #include "base/i18n/case_conversion.h" | 14 #include "base/i18n/case_conversion.h" |
| 15 #include "base/logging.h" | 15 #include "base/logging.h" |
| 16 #include "base/memory/scoped_vector.h" |
| 16 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
| 17 #include "base/strings/utf_offset_string_conversions.h" | 18 #include "base/strings/utf_offset_string_conversions.h" |
| 18 #include "build/build_config.h" | 19 #include "build/build_config.h" |
| 19 #include "components/bookmarks/browser/bookmark_client.h" | 20 #include "components/bookmarks/browser/bookmark_client.h" |
| 20 #include "components/bookmarks/browser/bookmark_match.h" | 21 #include "components/bookmarks/browser/bookmark_match.h" |
| 21 #include "components/bookmarks/browser/bookmark_node.h" | 22 #include "components/bookmarks/browser/bookmark_node.h" |
| 22 #include "components/bookmarks/browser/bookmark_utils.h" | 23 #include "components/bookmarks/browser/bookmark_utils.h" |
| 23 #include "components/query_parser/snippet.h" | 24 #include "components/query_parser/snippet.h" |
| 24 #include "third_party/icu/source/common/unicode/normalizer2.h" | 25 #include "third_party/icu/source/common/unicode/normalizer2.h" |
| 25 #include "third_party/icu/source/common/unicode/utypes.h" | 26 #include "third_party/icu/source/common/unicode/utypes.h" |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 // We can get here if the node has the same term more than once. For | 285 // We can get here if the node has the same term more than once. For |
| 285 // example, a bookmark with the title 'foo foo' would end up here. | 286 // example, a bookmark with the title 'foo foo' would end up here. |
| 286 return; | 287 return; |
| 287 } | 288 } |
| 288 i->second.erase(node); | 289 i->second.erase(node); |
| 289 if (i->second.empty()) | 290 if (i->second.empty()) |
| 290 index_.erase(i); | 291 index_.erase(i); |
| 291 } | 292 } |
| 292 | 293 |
| 293 } // namespace bookmarks | 294 } // namespace bookmarks |
| OLD | NEW |