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

Side by Side Diff: components/bookmarks/browser/bookmark_index.cc

Issue 284893003: Move bookmarks/core/... to bookmarks/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing errors reported by presubmit Created 6 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 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/bookmarks/core/browser/bookmark_index.h" 5 #include "components/bookmarks/browser/bookmark_index.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <iterator> 9 #include <iterator>
10 #include <list> 10 #include <list>
11 11
12 #include "base/i18n/case_conversion.h" 12 #include "base/i18n/case_conversion.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/strings/utf_offset_string_conversions.h" 14 #include "base/strings/utf_offset_string_conversions.h"
15 #include "components/bookmarks/core/browser/bookmark_client.h" 15 #include "components/bookmarks/browser/bookmark_client.h"
16 #include "components/bookmarks/core/browser/bookmark_match.h" 16 #include "components/bookmarks/browser/bookmark_match.h"
17 #include "components/bookmarks/core/browser/bookmark_node.h" 17 #include "components/bookmarks/browser/bookmark_node.h"
18 #include "components/bookmarks/core/browser/bookmark_utils.h" 18 #include "components/bookmarks/browser/bookmark_utils.h"
19 #include "components/query_parser/snippet.h" 19 #include "components/query_parser/snippet.h"
20 #include "third_party/icu/source/common/unicode/normalizer2.h" 20 #include "third_party/icu/source/common/unicode/normalizer2.h"
21 21
22 typedef BookmarkClient::NodeTypedCountPair NodeTypedCountPair; 22 typedef BookmarkClient::NodeTypedCountPair NodeTypedCountPair;
23 typedef BookmarkClient::NodeTypedCountPairs NodeTypedCountPairs; 23 typedef BookmarkClient::NodeTypedCountPairs NodeTypedCountPairs;
24 24
25 namespace { 25 namespace {
26 26
27 // Returns a normalized version of the UTF16 string |text|. If it fails to 27 // Returns a normalized version of the UTF16 string |text|. If it fails to
28 // normalize the string, returns |text| itself as a best-effort. 28 // normalize the string, returns |text| itself as a best-effort.
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 Index::iterator i = index_.find(term); 356 Index::iterator i = index_.find(term);
357 if (i == index_.end()) { 357 if (i == index_.end()) {
358 // We can get here if the node has the same term more than once. For 358 // We can get here if the node has the same term more than once. For
359 // example, a bookmark with the title 'foo foo' would end up here. 359 // example, a bookmark with the title 'foo foo' would end up here.
360 return; 360 return;
361 } 361 }
362 i->second.erase(node); 362 i->second.erase(node);
363 if (i->second.empty()) 363 if (i->second.empty())
364 index_.erase(i); 364 index_.erase(i);
365 } 365 }
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_index.h ('k') | components/bookmarks/browser/bookmark_index_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698