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

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

Issue 3152034: Remove wstrings in bookmarks, part 5. (Closed)
Patch Set: yet moar 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
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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 BookmarkNode* new_node = new BookmarkNode(generate_next_node_id(), 370 BookmarkNode* new_node = new BookmarkNode(generate_next_node_id(),
371 GURL()); 371 GURL());
372 new_node->set_date_group_modified(Time::Now()); 372 new_node->set_date_group_modified(Time::Now());
373 new_node->SetTitle(title); 373 new_node->SetTitle(title);
374 new_node->set_type(BookmarkNode::FOLDER); 374 new_node->set_type(BookmarkNode::FOLDER);
375 375
376 return AddNode(AsMutable(parent), index, new_node, false); 376 return AddNode(AsMutable(parent), index, new_node, false);
377 } 377 }
378 378
379 #if !defined(WCHAR_T_IS_UTF16)
380 const BookmarkNode* BookmarkModel::AddURL(const BookmarkNode* parent,
381 int index,
382 const std::wstring& title,
383 const GURL& url) {
384 return AddURL(parent, index, WideToUTF16(title), url);
385 }
386 #endif
387 const BookmarkNode* BookmarkModel::AddURL(const BookmarkNode* parent, 379 const BookmarkNode* BookmarkModel::AddURL(const BookmarkNode* parent,
388 int index, 380 int index,
389 const string16& title, 381 const string16& title,
390 const GURL& url) { 382 const GURL& url) {
391 return AddURLWithCreationTime(parent, index, title, url, Time::Now()); 383 return AddURLWithCreationTime(parent, index, title, url, Time::Now());
392 } 384 }
393 385
394 const BookmarkNode* BookmarkModel::AddURLWithCreationTime( 386 const BookmarkNode* BookmarkModel::AddURLWithCreationTime(
395 const BookmarkNode* parent, 387 const BookmarkNode* parent,
396 int index, 388 int index,
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 void BookmarkModel::SetFileChanged() { 808 void BookmarkModel::SetFileChanged() {
817 file_changed_ = true; 809 file_changed_ = true;
818 } 810 }
819 811
820 BookmarkLoadDetails* BookmarkModel::CreateLoadDetails() { 812 BookmarkLoadDetails* BookmarkModel::CreateLoadDetails() {
821 BookmarkNode* bb_node = CreateBookmarkNode(); 813 BookmarkNode* bb_node = CreateBookmarkNode();
822 BookmarkNode* other_folder_node = CreateOtherBookmarksNode(); 814 BookmarkNode* other_folder_node = CreateOtherBookmarksNode();
823 return new BookmarkLoadDetails( 815 return new BookmarkLoadDetails(
824 bb_node, other_folder_node, new BookmarkIndex(profile()), next_node_id_); 816 bb_node, other_folder_node, new BookmarkIndex(profile()), next_node_id_);
825 } 817 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_model.h ('k') | chrome/browser/cocoa/applescript/bookmark_folder_applescript.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698