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

Side by Side Diff: components/bookmarks/browser/bookmark_node.cc

Issue 2883523002: Reduce the memory usage of bookmarks storage (Closed)
Patch Set: MakeUnique Created 3 years, 6 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 #include "components/bookmarks/browser/bookmark_node.h" 5 #include "components/bookmarks/browser/bookmark_node.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 type_ = url_.is_empty() ? FOLDER : URL; 116 type_ = url_.is_empty() ? FOLDER : URL;
117 date_added_ = base::Time::Now(); 117 date_added_ = base::Time::Now();
118 favicon_type_ = favicon_base::INVALID_ICON; 118 favicon_type_ = favicon_base::INVALID_ICON;
119 favicon_state_ = INVALID_FAVICON; 119 favicon_state_ = INVALID_FAVICON;
120 favicon_load_task_id_ = base::CancelableTaskTracker::kBadTaskId; 120 favicon_load_task_id_ = base::CancelableTaskTracker::kBadTaskId;
121 meta_info_map_.reset(); 121 meta_info_map_.reset();
122 sync_transaction_version_ = kInvalidSyncTransactionVersion; 122 sync_transaction_version_ = kInvalidSyncTransactionVersion;
123 } 123 }
124 124
125 void BookmarkNode::InvalidateFavicon() { 125 void BookmarkNode::InvalidateFavicon() {
126 icon_url_ = GURL(); 126 icon_url_.reset();
127 favicon_ = gfx::Image(); 127 favicon_ = gfx::Image();
128 favicon_type_ = favicon_base::INVALID_ICON; 128 favicon_type_ = favicon_base::INVALID_ICON;
129 favicon_state_ = INVALID_FAVICON; 129 favicon_state_ = INVALID_FAVICON;
130 } 130 }
131 131
132 // BookmarkPermanentNode ------------------------------------------------------- 132 // BookmarkPermanentNode -------------------------------------------------------
133 133
134 BookmarkPermanentNode::BookmarkPermanentNode(int64_t id) 134 BookmarkPermanentNode::BookmarkPermanentNode(int64_t id)
135 : BookmarkNode(id, GURL()), visible_(true) {} 135 : BookmarkNode(id, GURL()), visible_(true) {}
136 136
137 BookmarkPermanentNode::~BookmarkPermanentNode() { 137 BookmarkPermanentNode::~BookmarkPermanentNode() {
138 } 138 }
139 139
140 bool BookmarkPermanentNode::IsVisible() const { 140 bool BookmarkPermanentNode::IsVisible() const {
141 return visible_ || !empty(); 141 return visible_ || !empty();
142 } 142 }
143 143
144 } // namespace bookmarks 144 } // namespace bookmarks
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_node.h ('k') | components/bookmarks/browser/titled_url_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698