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 26 matching lines...) Expand all Loading... |
37 using base::Time; | 37 using base::Time; |
38 | 38 |
39 namespace { | 39 namespace { |
40 | 40 |
41 // Helper to get a mutable bookmark node. | 41 // Helper to get a mutable bookmark node. |
42 BookmarkNode* AsMutable(const BookmarkNode* node) { | 42 BookmarkNode* AsMutable(const BookmarkNode* node) { |
43 return const_cast<BookmarkNode*>(node); | 43 return const_cast<BookmarkNode*>(node); |
44 } | 44 } |
45 | 45 |
46 // Whitespace characters to strip from bookmark titles. | 46 // Whitespace characters to strip from bookmark titles. |
47 const char16 kInvalidChars[] = { | 47 const base::char16 kInvalidChars[] = { |
48 '\n', '\r', '\t', | 48 '\n', '\r', '\t', |
49 0x2028, // Line separator | 49 0x2028, // Line separator |
50 0x2029, // Paragraph separator | 50 0x2029, // Paragraph separator |
51 0 | 51 0 |
52 }; | 52 }; |
53 | 53 |
54 } // namespace | 54 } // namespace |
55 | 55 |
56 // BookmarkNode --------------------------------------------------------------- | 56 // BookmarkNode --------------------------------------------------------------- |
57 | 57 |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 BookmarkPermanentNode* bb_node = | 1073 BookmarkPermanentNode* bb_node = |
1074 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); | 1074 CreatePermanentNode(BookmarkNode::BOOKMARK_BAR); |
1075 BookmarkPermanentNode* other_node = | 1075 BookmarkPermanentNode* other_node = |
1076 CreatePermanentNode(BookmarkNode::OTHER_NODE); | 1076 CreatePermanentNode(BookmarkNode::OTHER_NODE); |
1077 BookmarkPermanentNode* mobile_node = | 1077 BookmarkPermanentNode* mobile_node = |
1078 CreatePermanentNode(BookmarkNode::MOBILE); | 1078 CreatePermanentNode(BookmarkNode::MOBILE); |
1079 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, | 1079 return new BookmarkLoadDetails(bb_node, other_node, mobile_node, |
1080 new BookmarkIndex(profile_), | 1080 new BookmarkIndex(profile_), |
1081 next_node_id_); | 1081 next_node_id_); |
1082 } | 1082 } |
OLD | NEW |