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

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

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.cc
diff --git a/components/bookmarks/browser/bookmark_codec.cc b/components/bookmarks/browser/bookmark_codec.cc
index abbb1cd7b64289eceba9eff25a87872d786d9304..8ee8a6170d2312a6797605b0d378f500869be173 100644
--- a/components/bookmarks/browser/bookmark_codec.cc
+++ b/components/bookmarks/browser/bookmark_codec.cc
@@ -13,6 +13,7 @@
#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
+#include "base/sys_info.h"
sky 2017/05/26 03:07:38 You shouldn't need this key anymore.
ssid 2017/05/30 21:39:14 Done.
#include "base/values.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/strings/grit/components_strings.h"
@@ -433,6 +434,14 @@ void BookmarkCodec::DecodeMetaInfoHelper(
const std::string& prefix,
BookmarkNode::MetaInfoMap* meta_info_map) {
for (base::DictionaryValue::Iterator it(dict); !it.IsAtEnd(); it.Advance()) {
+ bool is_excluded = false;
+ for (const auto& excluded : excluded_meta_info_keys_) {
+ if (it.key().find(excluded) != std::string::npos)
+ is_excluded = true;
+ }
+ if (is_excluded)
+ continue;
+
if (it.value().IsType(base::Value::Type::DICTIONARY)) {
const base::DictionaryValue* subdict;
it.value().GetAsDictionary(&subdict);

Powered by Google App Engine
This is Rietveld 408576698