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

Unified Diff: chrome/browser/sync/glue/favicon_cache.h

Issue 13666003: [Sync] Fix favicon updates to handle orphan nodes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/sync/glue/favicon_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/favicon_cache.h
diff --git a/chrome/browser/sync/glue/favicon_cache.h b/chrome/browser/sync/glue/favicon_cache.h
index eaa44ae994e3f068ab8af7c9da806ae490dacafe..8675fa010c45114d4fb35c218b8dce09c2dcabf6 100644
--- a/chrome/browser/sync/glue/favicon_cache.h
+++ b/chrome/browser/sync/glue/favicon_cache.h
@@ -134,13 +134,6 @@ class FaviconCache : public syncer::SyncableService,
// Map of page url to favicon url.
typedef std::map<GURL, GURL> PageFaviconMap;
- // Enum used to decide which sync datatypes to update on a favicon change.
- enum SyncState {
- SYNC_IMAGE,
- SYNC_TRACKING,
- SYNC_BOTH
- };
-
// Helper method to perform OnReceivedSyncFavicon work without worrying about
// whether caller holds a sync transaction.
void OnReceivedSyncFaviconImpl(const GURL& icon_url,
@@ -153,12 +146,14 @@ class FaviconCache : public syncer::SyncableService,
const GURL& page_url,
const std::vector<history::FaviconBitmapResult>& bitmap_result);
- // Helper method to update the sync state of the favicon at |icon_url|.
+ // Helper method to update the sync state of the favicon at |icon_url|. If
+ // either |image_change_type| or |tracking_change_type| is ACTION_INVALID,
+ // the corresponding datatype won't be updated.
// Note: should only be called after both FAVICON_IMAGES and FAVICON_TRACKING
// have been successfully set up.
void UpdateSyncState(const GURL& icon_url,
- SyncState state_to_update,
- syncer::SyncChange::SyncChangeType change_type);
+ syncer::SyncChange::SyncChangeType image_change_type,
+ syncer::SyncChange::SyncChangeType tracking_change_type);
// Helper method to get favicon info from |synced_favicons_|. If no info
// exists for |icon_url|, creates a new SyncedFaviconInfo in both
« no previous file with comments | « no previous file | chrome/browser/sync/glue/favicon_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698