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

Side by Side Diff: chrome/browser/sync/test/integration/bookmarks_helper.h

Issue 11428004: Sync the bookmark's icon URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_TEST_INTEGRATION_BOOKMARKS_HELPER_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_ 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 const BookmarkNode* parent, 81 const BookmarkNode* parent,
82 int index, 82 int index,
83 const std::wstring& title) WARN_UNUSED_RESULT; 83 const std::wstring& title) WARN_UNUSED_RESULT;
84 84
85 // Changes the title of the node |node| in the bookmark model of profile 85 // Changes the title of the node |node| in the bookmark model of profile
86 // |profile| to |new_title|. 86 // |profile| to |new_title|.
87 void SetTitle(int profile, 87 void SetTitle(int profile,
88 const BookmarkNode* node, 88 const BookmarkNode* node,
89 const std::wstring& new_title); 89 const std::wstring& new_title);
90 90
91 // Sets the favicon of the node |node| (of type BookmarkNode::URL) in the 91 // Sets the |icon_url| and |image| data for the favicon for |node| in the
92 // bookmark model of profile |profile| using the data in |icon_bytes_vector|. 92 // bookmark model for |profile|.
93 void SetFavicon( 93 // |node|'s type should be BookmarkNode::URL.
Nicolas Zea 2012/11/28 02:00:33 actually, the comment in the last line doesn't rea
94 int profile, 94 void SetFavicon(int profile,
95 const BookmarkNode* node, 95 const BookmarkNode* node,
96 const std::vector<unsigned char>& icon_bytes_vector); 96 const GURL& icon_url,
97 const gfx::Image& image);
97 98
98 // Changes the url of the node |node| in the bookmark model of profile 99 // Changes the url of the node |node| in the bookmark model of profile
99 // |profile| to |new_url|. Returns a pointer to the node with the changed url. 100 // |profile| to |new_url|. Returns a pointer to the node with the changed url.
100 const BookmarkNode* SetURL( 101 const BookmarkNode* SetURL(
101 int profile, 102 int profile,
102 const BookmarkNode* node, 103 const BookmarkNode* node,
103 const GURL& new_url) WARN_UNUSED_RESULT; 104 const GURL& new_url) WARN_UNUSED_RESULT;
104 105
105 // Moves the node |node| in the bookmark model of profile |profile| so it ends 106 // Moves the node |node| in the bookmark model of profile |profile| so it ends
106 // up under the node |new_parent| at position |index|. 107 // up under the node |new_parent| at position |index|.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 int CountBookmarksWithTitlesMatching( 159 int CountBookmarksWithTitlesMatching(
159 int profile, 160 int profile,
160 const std::wstring& title) WARN_UNUSED_RESULT; 161 const std::wstring& title) WARN_UNUSED_RESULT;
161 162
162 // Returns the number of bookmark folders in the bookmark model of profile 163 // Returns the number of bookmark folders in the bookmark model of profile
163 // |profile| whose titles contain the query string |title|. 164 // |profile| whose titles contain the query string |title|.
164 int CountFoldersWithTitlesMatching( 165 int CountFoldersWithTitlesMatching(
165 int profile, 166 int profile,
166 const std::wstring& title) WARN_UNUSED_RESULT; 167 const std::wstring& title) WARN_UNUSED_RESULT;
167 168
168 // Creates a unique favicon using |seed|. 169 // Creates a favicon of |color| with image reps of the platform's supported
169 std::vector<unsigned char> CreateFavicon(int seed); 170 // scale factors (eg MacOS) in addition to 1x.
171 gfx::Image CreateFavicon(SkColor color);
170 172
171 // Returns a URL identifiable by |i|. 173 // Returns a URL identifiable by |i|.
172 std::string IndexedURL(int i); 174 std::string IndexedURL(int i);
173 175
174 // Returns a URL title identifiable by |i|. 176 // Returns a URL title identifiable by |i|.
175 std::wstring IndexedURLTitle(int i); 177 std::wstring IndexedURLTitle(int i);
176 178
177 // Returns a folder name identifiable by |i|. 179 // Returns a folder name identifiable by |i|.
178 std::wstring IndexedFolderName(int i); 180 std::wstring IndexedFolderName(int i);
179 181
180 // Returns a subfolder name identifiable by |i|. 182 // Returns a subfolder name identifiable by |i|.
181 std::wstring IndexedSubfolderName(int i); 183 std::wstring IndexedSubfolderName(int i);
182 184
183 // Returns a subsubfolder name identifiable by |i|. 185 // Returns a subsubfolder name identifiable by |i|.
184 std::wstring IndexedSubsubfolderName(int i); 186 std::wstring IndexedSubsubfolderName(int i);
185 187
186 } // namespace bookmarks_helper 188 } // namespace bookmarks_helper
187 189
188 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_ 190 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/bookmark_change_processor.cc ('k') | chrome/browser/sync/test/integration/bookmarks_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698