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

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

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/glue/bookmark_change_processor.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_BOOKMARK_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 int index); 70 int index);
71 71
72 // Sets the favicon of the given bookmark node from the given sync node. 72 // Sets the favicon of the given bookmark node from the given sync node.
73 // Returns whether the favicon was set in the bookmark node. 73 // Returns whether the favicon was set in the bookmark node.
74 // |profile| is the profile that contains the HistoryService and BookmarkModel 74 // |profile| is the profile that contains the HistoryService and BookmarkModel
75 // for the bookmark in question. 75 // for the bookmark in question.
76 static bool SetBookmarkFavicon(sync_api::BaseNode* sync_node, 76 static bool SetBookmarkFavicon(sync_api::BaseNode* sync_node,
77 const BookmarkNode* bookmark_node, 77 const BookmarkNode* bookmark_node,
78 Profile* profile); 78 Profile* profile);
79 79
80 // Applies the favicon data in |icon_bytes_vector| to |bookmark_node|.
81 // |profile| is the profile that contains the HistoryService and BookmarkModel
82 // for the bookmark in question.
83 static void ApplyBookmarkFavicon(
84 const BookmarkNode* bookmark_node,
85 Profile* profile,
86 const std::vector<unsigned char>& icon_bytes_vector);
87
80 // Sets the favicon of the given sync node from the given bookmark node. 88 // Sets the favicon of the given sync node from the given bookmark node.
81 static void SetSyncNodeFavicon(const BookmarkNode* bookmark_node, 89 static void SetSyncNodeFavicon(const BookmarkNode* bookmark_node,
82 BookmarkModel* model, 90 BookmarkModel* model,
83 sync_api::WriteNode* sync_node); 91 sync_api::WriteNode* sync_node);
84 92
85 // Treat the |index|th child of |parent| as a newly added node, and create a 93 // Treat the |index|th child of |parent| as a newly added node, and create a
86 // corresponding node in the sync domain using |trans|. All properties 94 // corresponding node in the sync domain using |trans|. All properties
87 // will be transferred to the new node. A node corresponding to |parent| 95 // will be transferred to the new node. A node corresponding to |parent|
88 // must already exist and be associated for this call to succeed. Returns 96 // must already exist and be associated for this call to succeed. Returns
89 // the ID of the just-created node, or if creation fails, kInvalidID. 97 // the ID of the just-created node, or if creation fails, kInvalidID.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 167
160 // The two models should be associated according to this ModelAssociator. 168 // The two models should be associated according to this ModelAssociator.
161 BookmarkModelAssociator* model_associator_; 169 BookmarkModelAssociator* model_associator_;
162 170
163 DISALLOW_COPY_AND_ASSIGN(BookmarkChangeProcessor); 171 DISALLOW_COPY_AND_ASSIGN(BookmarkChangeProcessor);
164 }; 172 };
165 173
166 } // namespace browser_sync 174 } // namespace browser_sync
167 175
168 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_ 176 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_CHANGE_PROCESSOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/glue/bookmark_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698