OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ |
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <vector> | 11 #include <vector> |
9 | 12 |
10 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
11 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
12 #include "base/time/time.h" | 15 #include "base/time/time.h" |
13 #include "components/bookmarks/browser/bookmark_node.h" | 16 #include "components/bookmarks/browser/bookmark_node.h" |
14 #include "ui/base/clipboard/clipboard_types.h" | 17 #include "ui/base/clipboard/clipboard_types.h" |
15 #include "url/gurl.h" | 18 #include "url/gurl.h" |
16 | 19 |
17 #if defined(TOOLKIT_VIEWS) | 20 #if defined(TOOLKIT_VIEWS) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 75 |
73 // Date of the last modification. Only used for folders. | 76 // Date of the last modification. Only used for folders. |
74 base::Time date_folder_modified; | 77 base::Time date_folder_modified; |
75 | 78 |
76 // Children, only used for non-URL nodes. | 79 // Children, only used for non-URL nodes. |
77 std::vector<Element> children; | 80 std::vector<Element> children; |
78 | 81 |
79 // Meta info for the bookmark node. | 82 // Meta info for the bookmark node. |
80 BookmarkNode::MetaInfoMap meta_info_map; | 83 BookmarkNode::MetaInfoMap meta_info_map; |
81 | 84 |
82 int64 id() const { return id_; } | 85 int64_t id() const { return id_; } |
83 | 86 |
84 private: | 87 private: |
85 friend struct BookmarkNodeData; | 88 friend struct BookmarkNodeData; |
86 | 89 |
87 // For reading/writing this Element. | 90 // For reading/writing this Element. |
88 void WriteToPickle(base::Pickle* pickle) const; | 91 void WriteToPickle(base::Pickle* pickle) const; |
89 bool ReadFromPickle(base::PickleIterator* iterator); | 92 bool ReadFromPickle(base::PickleIterator* iterator); |
90 | 93 |
91 // ID of the node. | 94 // ID of the node. |
92 int64 id_; | 95 int64_t id_; |
93 }; | 96 }; |
94 | 97 |
95 // The MIME type for the clipboard format for BookmarkNodeData. | 98 // The MIME type for the clipboard format for BookmarkNodeData. |
96 static const char kClipboardFormatString[]; | 99 static const char kClipboardFormatString[]; |
97 | 100 |
98 BookmarkNodeData(); | 101 BookmarkNodeData(); |
99 | 102 |
100 // Created a BookmarkNodeData populated from the arguments. | 103 // Created a BookmarkNodeData populated from the arguments. |
101 explicit BookmarkNodeData(const BookmarkNode* node); | 104 explicit BookmarkNodeData(const BookmarkNode* node); |
102 explicit BookmarkNodeData(const std::vector<const BookmarkNode*>& nodes); | 105 explicit BookmarkNodeData(const std::vector<const BookmarkNode*>& nodes); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 std::vector<Element> elements; | 182 std::vector<Element> elements; |
180 | 183 |
181 private: | 184 private: |
182 // Path of the profile we originated from. | 185 // Path of the profile we originated from. |
183 base::FilePath profile_path_; | 186 base::FilePath profile_path_; |
184 }; | 187 }; |
185 | 188 |
186 } // namespace bookmarks | 189 } // namespace bookmarks |
187 | 190 |
188 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ | 191 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_DATA_H_ |
OLD | NEW |