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

Side by Side Diff: chrome/browser/sync/glue/favicon_cache.h

Issue 13006012: [Sync] Fix double tranaction acquire in favicon code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CHROME_BROWSER_SYNC_GLUE_FAVICON_CACHE_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_FAVICON_CACHE_H_
6 #define CHROME_BROWSER_SYNC_GLUE_FAVICON_CACHE_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_FAVICON_CACHE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // synced. 93 // synced.
94 void OnPageFaviconUpdated(const GURL& page_url); 94 void OnPageFaviconUpdated(const GURL& page_url);
95 95
96 // Update the visit count for the favicon associated with |favicon_url|. 96 // Update the visit count for the favicon associated with |favicon_url|.
97 // If no favicon exists associated with |favicon_url|, triggers a load 97 // If no favicon exists associated with |favicon_url|, triggers a load
98 // for the favicon associated with |page_url|. 98 // for the favicon associated with |page_url|.
99 void OnFaviconVisited(const GURL& page_url, const GURL& favicon_url); 99 void OnFaviconVisited(const GURL& page_url, const GURL& favicon_url);
100 100
101 // Consume Session sync favicon data. Will not overwrite existing favicons. 101 // Consume Session sync favicon data. Will not overwrite existing favicons.
102 // If |icon_bytes| is empty, only updates the page->favicon url mapping. 102 // If |icon_bytes| is empty, only updates the page->favicon url mapping.
103 // Safe to call within a transaction.
103 void OnReceivedSyncFavicon(const GURL& page_url, 104 void OnReceivedSyncFavicon(const GURL& page_url,
104 const GURL& icon_url, 105 const GURL& icon_url,
105 const std::string& icon_bytes, 106 const std::string& icon_bytes,
106 int64 visit_time_ms); 107 int64 visit_time_ms);
107 108
108 // Support for syncing favicons using the legacy format (within tab sync). 109 // Support for syncing favicons using the legacy format (within tab sync).
109 void SetLegacyDelegate(FaviconCacheObserver* observer); 110 void SetLegacyDelegate(FaviconCacheObserver* observer);
110 void RemoveLegacyDelegate(); 111 void RemoveLegacyDelegate();
111 112
112 // NotificationObserver implementation. 113 // NotificationObserver implementation.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 243
243 // Maximum number of favicons to sync. 0 means no limit. 244 // Maximum number of favicons to sync. 0 means no limit.
244 const size_t max_sync_favicon_limit_; 245 const size_t max_sync_favicon_limit_;
245 246
246 DISALLOW_COPY_AND_ASSIGN(FaviconCache); 247 DISALLOW_COPY_AND_ASSIGN(FaviconCache);
247 }; 248 };
248 249
249 } // namespace browser_sync 250 } // namespace browser_sync
250 251
251 #endif // CHROME_BROWSER_SYNC_GLUE_FAVICON_CACHE_H_ 252 #endif // CHROME_BROWSER_SYNC_GLUE_FAVICON_CACHE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/favicon_cache.cc » ('j') | chrome/browser/sync/glue/favicon_cache_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698