diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-15 04:56:52 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-15 04:56:52 +0000 |
commit | e6337c04312f67e9229a73f55ef7da1f4c0e0d45 (patch) | |
tree | f5abad80bf116eec765ad20bfd7744275a11dd11 /chrome/browser/sync/glue/session_model_associator.cc | |
parent | 2ecd26eab5a8276544c37787d1a206d64479e339 (diff) | |
download | chromium_src-e6337c04312f67e9229a73f55ef7da1f4c0e0d45.zip chromium_src-e6337c04312f67e9229a73f55ef7da1f4c0e0d45.tar.gz chromium_src-e6337c04312f67e9229a73f55ef7da1f4c0e0d45.tar.bz2 |
[Sync] Add sync logic to FaviconCache
This enables syncing favicons behind the --enable-sync-favicons switch.
No expiration of favicons is performed yet, and only low resolutions favicons
are currently synced.
BUG=154886
Review URL: https://chromiumcodereview.appspot.com/12509004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188260 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/glue/session_model_associator.cc')
-rw-r--r-- | chrome/browser/sync/glue/session_model_associator.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc index 5b74fda..7904aca 100644 --- a/chrome/browser/sync/glue/session_model_associator.cc +++ b/chrome/browser/sync/glue/session_model_associator.cc @@ -900,7 +900,9 @@ void SessionModelAssociator::LoadForeignTabFavicon( const std::string& favicon_url = tab.navigation(i).favicon_url(); favicon_cache_.OnReceivedSyncFavicon(GURL(page_url), GURL(favicon_url), - std::string()); + std::string(), + syncer::TimeToProtoTime( + base::Time::Now())); } } @@ -929,7 +931,11 @@ void SessionModelAssociator::LoadForeignTabFavicon( const std::string& favicon = tab.favicon(); DVLOG(1) << "Storing synced favicon for url " << navigation_url.spec() << " with size " << favicon.size() << " bytes."; - favicon_cache_.OnReceivedSyncFavicon(navigation_url, favicon_source, favicon); + favicon_cache_.OnReceivedSyncFavicon(navigation_url, + favicon_source, + favicon, + syncer::TimeToProtoTime( + base::Time::Now())); } bool SessionModelAssociator::UpdateSyncModelDataFromClient( @@ -1113,7 +1119,7 @@ void SessionModelAssociator::QuitLoopForSubtleTesting() { } } -FaviconCache* SessionModelAssociator::GetFaviconCacheForTesting() { +FaviconCache* SessionModelAssociator::GetFaviconCache() { return &favicon_cache_; } |