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

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

Issue 1133463005: Update all bookmarks which use an icon URL when a favicon's bitmap is updated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startup_do_not_unexpire
Patch Set: Created 5 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 id_ = id; 108 id_ = id;
109 type_ = url_.is_empty() ? FOLDER : URL; 109 type_ = url_.is_empty() ? FOLDER : URL;
110 date_added_ = base::Time::Now(); 110 date_added_ = base::Time::Now();
111 favicon_type_ = favicon_base::INVALID_ICON; 111 favicon_type_ = favicon_base::INVALID_ICON;
112 favicon_state_ = INVALID_FAVICON; 112 favicon_state_ = INVALID_FAVICON;
113 favicon_load_task_id_ = base::CancelableTaskTracker::kBadTaskId; 113 favicon_load_task_id_ = base::CancelableTaskTracker::kBadTaskId;
114 meta_info_map_.reset(); 114 meta_info_map_.reset();
115 sync_transaction_version_ = kInvalidSyncTransactionVersion; 115 sync_transaction_version_ = kInvalidSyncTransactionVersion;
116 } 116 }
117 117
118 void BookmarkNode::InvalidateFavicon() {
119 icon_url_ = GURL();
120 favicon_ = gfx::Image();
121 favicon_type_ = favicon_base::INVALID_ICON;
122 favicon_state_ = INVALID_FAVICON;
123 }
124
125 // BookmarkPermanentNode ------------------------------------------------------- 118 // BookmarkPermanentNode -------------------------------------------------------
126 119
127 BookmarkPermanentNode::BookmarkPermanentNode(int64 id) 120 BookmarkPermanentNode::BookmarkPermanentNode(int64 id)
128 : BookmarkNode(id, GURL()), 121 : BookmarkNode(id, GURL()),
129 visible_(true) { 122 visible_(true) {
130 } 123 }
131 124
132 BookmarkPermanentNode::~BookmarkPermanentNode() { 125 BookmarkPermanentNode::~BookmarkPermanentNode() {
133 } 126 }
134 127
135 bool BookmarkPermanentNode::IsVisible() const { 128 bool BookmarkPermanentNode::IsVisible() const {
136 return visible_ || !empty(); 129 return visible_ || !empty();
137 } 130 }
138 131
139 } // namespace bookmarks 132 } // namespace bookmarks
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698