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

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

Issue 3112027: Remove wstrings from bookmarks, part 11. (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « chrome/browser/bookmarks/bookmark_index_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/bookmarks/bookmark_model.h" 5 #include "chrome/browser/bookmarks/bookmark_model.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/l10n_util_collator.h" 8 #include "app/l10n_util_collator.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/scoped_vector.h" 10 #include "base/scoped_vector.h"
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 SetDateGroupModified(node, Time()); 467 SetDateGroupModified(node, Time());
468 } 468 }
469 469
470 void BookmarkModel::GetBookmarksWithTitlesMatching( 470 void BookmarkModel::GetBookmarksWithTitlesMatching(
471 const string16& text, 471 const string16& text,
472 size_t max_count, 472 size_t max_count,
473 std::vector<bookmark_utils::TitleMatch>* matches) { 473 std::vector<bookmark_utils::TitleMatch>* matches) {
474 if (!loaded_) 474 if (!loaded_)
475 return; 475 return;
476 476
477 index_->GetBookmarksWithTitlesMatching(UTF16ToWideHack(text), max_count, 477 index_->GetBookmarksWithTitlesMatching(text, max_count, matches);
478 matches);
479 } 478 }
480 479
481 void BookmarkModel::ClearStore() { 480 void BookmarkModel::ClearStore() {
482 registrar_.RemoveAll(); 481 registrar_.RemoveAll();
483 store_ = NULL; 482 store_ = NULL;
484 } 483 }
485 484
486 bool BookmarkModel::IsBookmarkedNoLock(const GURL& url) { 485 bool BookmarkModel::IsBookmarkedNoLock(const GURL& url) {
487 BookmarkNode tmp_node(url); 486 BookmarkNode tmp_node(url);
488 return (nodes_ordered_by_url_set_.find(&tmp_node) != 487 return (nodes_ordered_by_url_set_.find(&tmp_node) !=
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 void BookmarkModel::SetFileChanged() { 803 void BookmarkModel::SetFileChanged() {
805 file_changed_ = true; 804 file_changed_ = true;
806 } 805 }
807 806
808 BookmarkLoadDetails* BookmarkModel::CreateLoadDetails() { 807 BookmarkLoadDetails* BookmarkModel::CreateLoadDetails() {
809 BookmarkNode* bb_node = CreateBookmarkNode(); 808 BookmarkNode* bb_node = CreateBookmarkNode();
810 BookmarkNode* other_folder_node = CreateOtherBookmarksNode(); 809 BookmarkNode* other_folder_node = CreateOtherBookmarksNode();
811 return new BookmarkLoadDetails( 810 return new BookmarkLoadDetails(
812 bb_node, other_folder_node, new BookmarkIndex(profile()), next_node_id_); 811 bb_node, other_folder_node, new BookmarkIndex(profile()), next_node_id_);
813 } 812 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_index_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698