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

Side by Side Diff: components/bookmarks/browser/bookmark_codec.h

Issue 2287733002: Switch //components away from base::ListValue::Append(Value*) overload. (Closed)
Patch Set: Test fix Created 4 years, 3 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 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
10 #include <memory>
9 #include <set> 11 #include <set>
10 #include <string> 12 #include <string>
11 13
12 #include "base/macros.h" 14 #include "base/macros.h"
13 #include "base/md5.h" 15 #include "base/md5.h"
14 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
15 #include "components/bookmarks/browser/bookmark_node.h" 17 #include "components/bookmarks/browser/bookmark_node.h"
16 18
17 namespace base { 19 namespace base {
18 class DictionaryValue; 20 class DictionaryValue;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 static const char kChildrenKey[]; 103 static const char kChildrenKey[];
102 static const char kMetaInfo[]; 104 static const char kMetaInfo[];
103 static const char kSyncTransactionVersion[]; 105 static const char kSyncTransactionVersion[];
104 106
105 // Possible values for kTypeKey. 107 // Possible values for kTypeKey.
106 static const char kTypeURL[]; 108 static const char kTypeURL[];
107 static const char kTypeFolder[]; 109 static const char kTypeFolder[];
108 110
109 private: 111 private:
110 // Encodes node and all its children into a Value object and returns it. 112 // Encodes node and all its children into a Value object and returns it.
111 // The caller takes ownership of the returned object. 113 std::unique_ptr<base::Value> EncodeNode(const BookmarkNode* node);
112 base::Value* EncodeNode(const BookmarkNode* node);
113 114
114 // Encodes the given meta info into a Value object and returns it. The caller 115 // Encodes the given meta info into a Value object and returns it. The caller
115 // takes ownership of the returned object. 116 // takes ownership of the returned object.
116 base::Value* EncodeMetaInfo(const BookmarkNode::MetaInfoMap& meta_info_map); 117 base::Value* EncodeMetaInfo(const BookmarkNode::MetaInfoMap& meta_info_map);
117 118
118 // Helper to perform decoding. 119 // Helper to perform decoding.
119 bool DecodeHelper(BookmarkNode* bb_node, 120 bool DecodeHelper(BookmarkNode* bb_node,
120 BookmarkNode* other_folder_node, 121 BookmarkNode* other_folder_node,
121 BookmarkNode* mobile_folder_node, 122 BookmarkNode* mobile_folder_node,
122 const base::Value& value); 123 const base::Value& value);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 204
204 // Sync transaction version set on bookmark model root. 205 // Sync transaction version set on bookmark model root.
205 int64_t model_sync_transaction_version_; 206 int64_t model_sync_transaction_version_;
206 207
207 DISALLOW_COPY_AND_ASSIGN(BookmarkCodec); 208 DISALLOW_COPY_AND_ASSIGN(BookmarkCodec);
208 }; 209 };
209 210
210 } // namespace bookmarks 211 } // namespace bookmarks
211 212
212 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CODEC_H_ 213 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_CODEC_H_
OLDNEW
« no previous file with comments | « no previous file | components/bookmarks/browser/bookmark_codec.cc » ('j') | components/bookmarks/browser/bookmark_codec.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698