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

Unified Diff: chrome/browser/sync/glue/bookmark_change_processor.cc

Issue 5149001: Merge 65840 - Provide sync integration tests with a way to set a favicon for ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552d/src/
Patch Set: Created 10 years, 1 month 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
Index: chrome/browser/sync/glue/bookmark_change_processor.cc
===================================================================
--- chrome/browser/sync/glue/bookmark_change_processor.cc (revision 66375)
+++ chrome/browser/sync/glue/bookmark_change_processor.cc (working copy)
@@ -59,8 +59,8 @@
// static
void BookmarkChangeProcessor::EncodeFavicon(const BookmarkNode* src,
- BookmarkModel* model,
- std::vector<unsigned char>* dst) {
+ BookmarkModel* model,
+ std::vector<unsigned char>* dst) {
const SkBitmap& favicon = model->GetFavIcon(src);
dst->clear();
@@ -508,6 +508,17 @@
if (icon_bytes_vector.empty())
return false;
+ ApplyBookmarkFavicon(bookmark_node, profile, icon_bytes_vector);
+
+ return true;
+}
+
+// static
+// Applies the given favicon bytes vector to the given bookmark node.
+void BookmarkChangeProcessor::ApplyBookmarkFavicon(
+ const BookmarkNode* bookmark_node,
+ Profile* profile,
+ const std::vector<unsigned char>& icon_bytes_vector) {
// Registering a favicon requires that we provide a source URL, but we
// don't know where these came from. Currently we just use the
// destination URL, which is not correct, but since the favicon URL
@@ -524,8 +535,6 @@
favicon_service->SetFavicon(bookmark_node->GetURL(),
fake_icon_url,
icon_bytes_vector);
-
- return true;
}
// static
« no previous file with comments | « chrome/browser/sync/glue/bookmark_change_processor.h ('k') | chrome/test/live_sync/bookmark_model_verifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698