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

Unified Diff: chrome/browser/bookmarks/bookmark_model.cc

Issue 184663002: Omnibox: Make URLs of Bookmarks Searchable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tested; works Created 6 years, 8 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: chrome/browser/bookmarks/bookmark_model.cc
diff --git a/chrome/browser/bookmarks/bookmark_model.cc b/chrome/browser/bookmarks/bookmark_model.cc
index 2f28132b76caf3489d609945525456525bde6646..6bbdb72fbd900de0746ca5625cc07007925b1d10 100644
--- a/chrome/browser/bookmarks/bookmark_model.cc
+++ b/chrome/browser/bookmarks/bookmark_model.cc
@@ -10,12 +10,13 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/i18n/string_compare.h"
+#include "base/prefs/pref_service.h"
#include "base/sequenced_task_runner.h"
#include "chrome/browser/bookmarks/bookmark_expanded_state_tracker.h"
#include "chrome/browser/bookmarks/bookmark_index.h"
+#include "chrome/browser/bookmarks/bookmark_match.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
#include "chrome/browser/bookmarks/bookmark_storage.h"
-#include "chrome/browser/bookmarks/bookmark_title_match.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/favicon/favicon_changed_details.h"
@@ -25,6 +26,7 @@
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/favicon/favicon_types.h"
+#include "chrome/common/pref_names.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
#include "grit/generated_resources.h"
@@ -614,14 +616,14 @@ void BookmarkModel::ResetDateFolderModified(const BookmarkNode* node) {
SetDateFolderModified(node, Time());
}
-void BookmarkModel::GetBookmarksWithTitlesMatching(
+void BookmarkModel::GetBookmarksMatching(
const base::string16& text,
size_t max_count,
- std::vector<BookmarkTitleMatch>* matches) {
+ std::vector<BookmarkMatch>* matches) {
if (!loaded_)
return;
- index_->GetBookmarksWithTitlesMatching(text, max_count, matches);
+ index_->GetBookmarksMatching(text, max_count, matches);
}
void BookmarkModel::ClearStore() {
@@ -963,7 +965,11 @@ BookmarkLoadDetails* BookmarkModel::CreateLoadDetails() {
CreatePermanentNode(BookmarkNode::OTHER_NODE);
BookmarkPermanentNode* mobile_node =
CreatePermanentNode(BookmarkNode::MOBILE);
- return new BookmarkLoadDetails(bb_node, other_node, mobile_node,
- new BookmarkIndex(profile_),
- next_node_id_);
+ return new BookmarkLoadDetails(
+ bb_node, other_node, mobile_node,
+ new BookmarkIndex(profile_,
+ profile_ ?
+ profile_->GetPrefs()->GetString(
+ prefs::kAcceptLanguages) : ""),
Peter Kasting 2014/04/16 23:44:25 Nit: "" -> std::string() While it's one line long
Mark P 2014/04/17 20:24:18 Done.
+ next_node_id_);
}

Powered by Google App Engine
This is Rietveld 408576698