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

Unified Diff: components/bookmarks/browser/bookmark_codec.h

Issue 2883523002: Reduce the memory usage of bookmarks storage (Closed)
Patch Set: Move to client. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/bookmarks/browser/bookmark_codec.h
diff --git a/components/bookmarks/browser/bookmark_codec.h b/components/bookmarks/browser/bookmark_codec.h
index 7760826e4f61d7769fe907a2b9f639f5e953e211..e6ecee2f369786c7f587b7bdd21bbc3c6e244060 100644
--- a/components/bookmarks/browser/bookmark_codec.h
+++ b/components/bookmarks/browser/bookmark_codec.h
@@ -7,9 +7,11 @@
#include <stdint.h>
+#include <list>
#include <memory>
#include <set>
#include <string>
+#include <vector>
#include "base/macros.h"
#include "base/md5.h"
@@ -87,6 +89,10 @@ class BookmarkCodec {
// false after encoding.
bool ids_reassigned() const { return ids_reassigned_; }
+ void set_excluded_meta_info_keys(const std::vector<std::string>& keys) {
sky 2017/05/26 03:07:38 Wouldn't a set be a better data structure here?
sky 2017/05/26 03:07:39 Be consistent: meta_data_keys_.
ssid 2017/05/30 21:39:14 I think meta_info is consistent with DecodeMetaInf
ssid 2017/05/30 21:39:14 set uses around 4 extra pointers for each element
+ excluded_meta_info_keys_ = keys;
+ }
+
// Names of the various keys written to the Value.
static const char kRootsKey[];
static const char kRootFolderNameKey[];
@@ -205,6 +211,8 @@ class BookmarkCodec {
// Sync transaction version set on bookmark model root.
int64_t model_sync_transaction_version_;
+ std::vector<std::string> excluded_meta_info_keys_;
+
DISALLOW_COPY_AND_ASSIGN(BookmarkCodec);
};

Powered by Google App Engine
This is Rietveld 408576698