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