| 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_CODEC_H_ | 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CODEC_H_ |
| 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CODEC_H_ | 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CODEC_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> |
| 10 #include <memory> | 11 #include <memory> |
| 11 #include <set> | 12 #include <set> |
| 12 #include <string> | 13 #include <string> |
| 13 | 14 |
| 14 #include "base/macros.h" | 15 #include "base/macros.h" |
| 15 #include "base/md5.h" | 16 #include "base/md5.h" |
| 16 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
| 17 #include "components/bookmarks/browser/bookmark_node.h" | 18 #include "components/bookmarks/browser/bookmark_node.h" |
| 18 | 19 |
| 19 namespace base { | 20 namespace base { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 81 |
| 81 // Return the sync transaction version of the bookmark model root. | 82 // Return the sync transaction version of the bookmark model root. |
| 82 int64_t model_sync_transaction_version() const { | 83 int64_t model_sync_transaction_version() const { |
| 83 return model_sync_transaction_version_; | 84 return model_sync_transaction_version_; |
| 84 } | 85 } |
| 85 | 86 |
| 86 // Returns whether the IDs were reassigned during decoding. Always returns | 87 // Returns whether the IDs were reassigned during decoding. Always returns |
| 87 // false after encoding. | 88 // false after encoding. |
| 88 bool ids_reassigned() const { return ids_reassigned_; } | 89 bool ids_reassigned() const { return ids_reassigned_; } |
| 89 | 90 |
| 91 void set_excluded_meta_info_keys(const std::list<const char*>& keys) { |
| 92 excluded_meta_info_keys_ = keys; |
| 93 } |
| 94 |
| 90 // Names of the various keys written to the Value. | 95 // Names of the various keys written to the Value. |
| 91 static const char kRootsKey[]; | 96 static const char kRootsKey[]; |
| 92 static const char kRootFolderNameKey[]; | 97 static const char kRootFolderNameKey[]; |
| 93 static const char kOtherBookmarkFolderNameKey[]; | 98 static const char kOtherBookmarkFolderNameKey[]; |
| 94 static const char kMobileBookmarkFolderNameKey[]; | 99 static const char kMobileBookmarkFolderNameKey[]; |
| 95 static const char kVersionKey[]; | 100 static const char kVersionKey[]; |
| 96 static const char kChecksumKey[]; | 101 static const char kChecksumKey[]; |
| 97 static const char kIdKey[]; | 102 static const char kIdKey[]; |
| 98 static const char kTypeKey[]; | 103 static const char kTypeKey[]; |
| 99 static const char kNameKey[]; | 104 static const char kNameKey[]; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 203 |
| 199 // Maximum ID assigned when decoding data. | 204 // Maximum ID assigned when decoding data. |
| 200 int64_t maximum_id_; | 205 int64_t maximum_id_; |
| 201 | 206 |
| 202 // Meta info set on bookmark model root. | 207 // Meta info set on bookmark model root. |
| 203 BookmarkNode::MetaInfoMap model_meta_info_map_; | 208 BookmarkNode::MetaInfoMap model_meta_info_map_; |
| 204 | 209 |
| 205 // Sync transaction version set on bookmark model root. | 210 // Sync transaction version set on bookmark model root. |
| 206 int64_t model_sync_transaction_version_; | 211 int64_t model_sync_transaction_version_; |
| 207 | 212 |
| 213 std::list<const char*> excluded_meta_info_keys_; |
| 214 |
| 208 DISALLOW_COPY_AND_ASSIGN(BookmarkCodec); | 215 DISALLOW_COPY_AND_ASSIGN(BookmarkCodec); |
| 209 }; | 216 }; |
| 210 | 217 |
| 211 } // namespace bookmarks | 218 } // namespace bookmarks |
| 212 | 219 |
| 213 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CODEC_H_ | 220 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CODEC_H_ |
| OLD | NEW |