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

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

Powered by Google App Engine
This is Rietveld 408576698