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

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

Issue 2537223008: Add TitledUrlIndex for indexing arbitrary title/URL pairs (Closed)
Patch Set: refactor in-place to preserve history Created 4 years 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/browser/bookmark_model.h" 5 #include "components/bookmarks/browser/bookmark_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 } 723 }
724 724
725 void BookmarkModel::GetBookmarksMatching( 725 void BookmarkModel::GetBookmarksMatching(
726 const base::string16& text, 726 const base::string16& text,
727 size_t max_count, 727 size_t max_count,
728 query_parser::MatchingAlgorithm matching_algorithm, 728 query_parser::MatchingAlgorithm matching_algorithm,
729 std::vector<BookmarkMatch>* matches) { 729 std::vector<BookmarkMatch>* matches) {
730 if (!loaded_) 730 if (!loaded_)
731 return; 731 return;
732 732
733 index_->GetBookmarksMatching(text, max_count, matching_algorithm, matches); 733 index_->GetResultsMatching(text, max_count, matching_algorithm, matches);
734 } 734 }
735 735
736 void BookmarkModel::ClearStore() { 736 void BookmarkModel::ClearStore() {
737 store_.reset(); 737 store_.reset();
738 } 738 }
739 739
740 void BookmarkModel::SetPermanentNodeVisible(BookmarkNode::Type type, 740 void BookmarkModel::SetPermanentNodeVisible(BookmarkNode::Type type,
741 bool value) { 741 bool value) {
742 BookmarkPermanentNode* node = AsMutable(PermanentNode(type)); 742 BookmarkPermanentNode* node = AsMutable(PermanentNode(type));
743 node->set_visible(value || client_->IsPermanentNodeVisible(node)); 743 node->set_visible(value || client_->IsPermanentNodeVisible(node));
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 undo_delegate_ = undo_delegate; 1120 undo_delegate_ = undo_delegate;
1121 if (undo_delegate_) 1121 if (undo_delegate_)
1122 undo_delegate_->SetUndoProvider(this); 1122 undo_delegate_->SetUndoProvider(this);
1123 } 1123 }
1124 1124
1125 BookmarkUndoDelegate* BookmarkModel::undo_delegate() const { 1125 BookmarkUndoDelegate* BookmarkModel::undo_delegate() const {
1126 return undo_delegate_ ? undo_delegate_ : empty_undo_delegate_.get(); 1126 return undo_delegate_ ? undo_delegate_ : empty_undo_delegate_.get();
1127 } 1127 }
1128 1128
1129 } // namespace bookmarks 1129 } // namespace bookmarks
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698