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

Side by Side Diff: components/bookmarks/browser/bookmark_model.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, 5 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
« no previous file with comments | « components/bookmarks/browser/BUILD.gn ('k') | components/bookmarks/browser/bookmark_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_MODEL_H_ 5 #ifndef COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_
6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ 6 #define COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 // Returns the set of meta info keys that should not be copied when a node is 290 // Returns the set of meta info keys that should not be copied when a node is
291 // cloned. 291 // cloned.
292 const std::set<std::string>& non_cloned_keys() const { 292 const std::set<std::string>& non_cloned_keys() const {
293 return non_cloned_keys_; 293 return non_cloned_keys_;
294 } 294 }
295 295
296 // Sets the sync transaction version of |node|. 296 // Sets the sync transaction version of |node|.
297 void SetNodeSyncTransactionVersion(const BookmarkNode* node, 297 void SetNodeSyncTransactionVersion(const BookmarkNode* node,
298 int64_t sync_transaction_version); 298 int64_t sync_transaction_version);
299 299
300 // Notify BookmarkModel that the favicons for |urls| have changed and have to 300 // Notify BookmarkModel that the favicons for the given page URLs (e.g.
301 // be refetched. This notification is sent by BookmarkClient. 301 // http://www.google.com) and the given icon URL (e.g.
302 void OnFaviconChanged(const std::set<GURL>& urls); 302 // http://www.google.com/favicon.ico) have changed. It is valid to call
303 // OnFaviconsChanged() with non-empty |page_urls| and an empty |icon_url| and
304 // vice versa.
305 void OnFaviconsChanged(const std::set<GURL>& page_urls,
306 const GURL& icon_url);
303 307
304 // Returns the client used by this BookmarkModel. 308 // Returns the client used by this BookmarkModel.
305 BookmarkClient* client() const { return client_; } 309 BookmarkClient* client() const { return client_; }
306 310
307 private: 311 private:
308 friend class BookmarkCodecTest; 312 friend class BookmarkCodecTest;
313 friend class BookmarkModelFaviconTest;
309 friend class BookmarkStorage; 314 friend class BookmarkStorage;
310 friend class ScopedGroupBookmarkActions; 315 friend class ScopedGroupBookmarkActions;
311 friend class TestBookmarkClient; 316 friend class TestBookmarkClient;
312 317
313 // Used to order BookmarkNodes by URL. 318 // Used to order BookmarkNodes by URL.
314 class NodeURLComparator { 319 class NodeURLComparator {
315 public: 320 public:
316 bool operator()(const BookmarkNode* n1, const BookmarkNode* n2) const { 321 bool operator()(const BookmarkNode* n1, const BookmarkNode* n2) const {
317 return n1->url() < n2->url(); 322 return n1->url() < n2->url();
318 } 323 }
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_; 448 scoped_ptr<BookmarkExpandedStateTracker> expanded_state_tracker_;
444 449
445 std::set<std::string> non_cloned_keys_; 450 std::set<std::string> non_cloned_keys_;
446 451
447 DISALLOW_COPY_AND_ASSIGN(BookmarkModel); 452 DISALLOW_COPY_AND_ASSIGN(BookmarkModel);
448 }; 453 };
449 454
450 } // namespace bookmarks 455 } // namespace bookmarks
451 456
452 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_ 457 #endif // COMPONENTS_BOOKMARKS_BROWSER_BOOKMARK_MODEL_H_
OLDNEW
« no previous file with comments | « components/bookmarks/browser/BUILD.gn ('k') | components/bookmarks/browser/bookmark_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698