| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 Initialize(id); | 67 Initialize(id); |
| 68 } | 68 } |
| 69 | 69 |
| 70 BookmarkNode::~BookmarkNode() { | 70 BookmarkNode::~BookmarkNode() { |
| 71 } | 71 } |
| 72 | 72 |
| 73 void BookmarkNode::SetTitle(const string16& title) { | 73 void BookmarkNode::SetTitle(const string16& title) { |
| 74 // Replace newlines and other problematic whitespace characters in | 74 // Replace newlines and other problematic whitespace characters in |
| 75 // folder/bookmark names with spaces. | 75 // folder/bookmark names with spaces. |
| 76 string16 trimmed_title; | 76 string16 trimmed_title; |
| 77 ReplaceChars(title, kInvalidChars, ASCIIToUTF16(" "), &trimmed_title); | 77 base::ReplaceChars(title, kInvalidChars, ASCIIToUTF16(" "), &trimmed_title); |
| 78 ui::TreeNode<BookmarkNode>::SetTitle(trimmed_title); | 78 ui::TreeNode<BookmarkNode>::SetTitle(trimmed_title); |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool BookmarkNode::IsVisible() const { | 81 bool BookmarkNode::IsVisible() const { |
| 82 return true; | 82 return true; |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool BookmarkNode::GetMetaInfo(const std::string& key, | 85 bool BookmarkNode::GetMetaInfo(const std::string& key, |
| 86 std::string* value) const { | 86 std::string* value) const { |
| 87 if (!meta_info_map_) | 87 if (!meta_info_map_) |
| (...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1058 BookmarkPermanentNode* bb_node = | 1058 BookmarkPermanentNode* bb_node = |
| 1059 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); | 1059 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); |
| 1060 BookmarkPermanentNode* other_node = | 1060 BookmarkPermanentNode* other_node = |
| 1061 CreatePermanentNode(BookmarkNode::OTHER_NODE); | 1061 CreatePermanentNode(BookmarkNode::OTHER_NODE); |
| 1062 BookmarkPermanentNode* mobile_node = | 1062 BookmarkPermanentNode* mobile_node = |
| 1063 CreatePermanentNode(BookmarkNode::MOBILE); | 1063 CreatePermanentNode(BookmarkNode::MOBILE); |
| 1064 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, | 1064 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, |
| 1065 new BookmarkIndex(profile_), | 1065 new BookmarkIndex(profile_), |
| 1066 next_node_id_); | 1066 next_node_id_); |
| 1067 } | 1067 } |
| OLD | NEW |