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

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

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 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_ 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_ 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/task/cancelable_task_tracker.h" 9 #include "base/task/cancelable_task_tracker.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // TODO(sky): Consider adding last visit time here, it'll greatly simplify 116 // TODO(sky): Consider adding last visit time here, it'll greatly simplify
117 // HistoryContentsProvider. 117 // HistoryContentsProvider.
118 118
119 private: 119 private:
120 friend class BookmarkModel; 120 friend class BookmarkModel;
121 121
122 // A helper function to initialize various fields during construction. 122 // A helper function to initialize various fields during construction.
123 void Initialize(int64 id); 123 void Initialize(int64 id);
124 124
125 // Called when the favicon becomes invalid.
126 void InvalidateFavicon();
127
128 // Sets the favicon's URL. 125 // Sets the favicon's URL.
129 void set_icon_url(const GURL& icon_url) { 126 void set_icon_url(const GURL& icon_url) {
130 icon_url_ = icon_url; 127 icon_url_ = icon_url;
131 } 128 }
132 129
133 // Returns the favicon. In nearly all cases you should use the method 130 // Returns the favicon. In nearly all cases you should use the method
134 // BookmarkModel::GetFavicon rather than this one as it takes care of 131 // BookmarkModel::GetFavicon rather than this one as it takes care of
135 // loading the favicon if it isn't already loaded. 132 // loading the favicon if it isn't already loaded.
136 const gfx::Image& favicon() const { return favicon_; } 133 const gfx::Image& favicon() const { return favicon_; }
137 void set_favicon(const gfx::Image& icon) { favicon_ = icon; } 134 void set_favicon(const gfx::Image& icon) { favicon_ = icon; }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 204
208 private: 205 private:
209 bool visible_; 206 bool visible_;
210 207
211 DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNode); 208 DISALLOW_COPY_AND_ASSIGN(BookmarkPermanentNode);
212 }; 209 };
213 210
214 } // namespace bookmarks 211 } // namespace bookmarks
215 212
216 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_ 213 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698