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

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 of the favicon of the node |node|
92 // bookmark model of profile |profile| using the data in |icon_bytes_vector|. 92 // (of type BookmarkNode::URL) in the bookmark model of profile |profile|.
Nicolas Zea 2012/11/27 18:56:09 move "(of type BookmarkNode::URL) to right after |
93 void SetFavicon( 93 void SetFavicon(int profile,
94 int profile, 94 const BookmarkNode* node,
95 const BookmarkNode* node, 95 const GURL& icon_url,
96 const std::vector<unsigned char>& icon_bytes_vector); 96 const gfx::Image& image);
97 97
98 // Changes the url of the node |node| in the bookmark model of profile 98 // 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. 99 // |profile| to |new_url|. Returns a pointer to the node with the changed url.
100 const BookmarkNode* SetURL( 100 const BookmarkNode* SetURL(
101 int profile, 101 int profile,
102 const BookmarkNode* node, 102 const BookmarkNode* node,
103 const GURL& new_url) WARN_UNUSED_RESULT; 103 const GURL& new_url) WARN_UNUSED_RESULT;
104 104
105 // Moves the node |node| in the bookmark model of profile |profile| so it ends 105 // Moves the node |node| in the bookmark model of profile |profile| so it ends
106 // up under the node |new_parent| at position |index|. 106 // up under the node |new_parent| at position |index|.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 int CountBookmarksWithTitlesMatching( 158 int CountBookmarksWithTitlesMatching(
159 int profile, 159 int profile,
160 const std::wstring& title) WARN_UNUSED_RESULT; 160 const std::wstring& title) WARN_UNUSED_RESULT;
161 161
162 // Returns the number of bookmark folders in the bookmark model of profile 162 // Returns the number of bookmark folders in the bookmark model of profile
163 // |profile| whose titles contain the query string |title|. 163 // |profile| whose titles contain the query string |title|.
164 int CountFoldersWithTitlesMatching( 164 int CountFoldersWithTitlesMatching(
165 int profile, 165 int profile,
166 const std::wstring& title) WARN_UNUSED_RESULT; 166 const std::wstring& title) WARN_UNUSED_RESULT;
167 167
168 // Creates a unique favicon using |seed|. 168 // Creates a favicon of |color| with image reps of the platform's supported
169 std::vector<unsigned char> CreateFavicon(int seed); 169 // scale factors (eg MacOS) in addition to 1x.
170 gfx::Image CreateFavicon(SkColor color);
170 171
171 // Returns a URL identifiable by |i|. 172 // Returns a URL identifiable by |i|.
172 std::string IndexedURL(int i); 173 std::string IndexedURL(int i);
173 174
174 // Returns a URL title identifiable by |i|. 175 // Returns a URL title identifiable by |i|.
175 std::wstring IndexedURLTitle(int i); 176 std::wstring IndexedURLTitle(int i);
176 177
177 // Returns a folder name identifiable by |i|. 178 // Returns a folder name identifiable by |i|.
178 std::wstring IndexedFolderName(int i); 179 std::wstring IndexedFolderName(int i);
179 180
180 // Returns a subfolder name identifiable by |i|. 181 // Returns a subfolder name identifiable by |i|.
181 std::wstring IndexedSubfolderName(int i); 182 std::wstring IndexedSubfolderName(int i);
182 183
183 // Returns a subsubfolder name identifiable by |i|. 184 // Returns a subsubfolder name identifiable by |i|.
184 std::wstring IndexedSubsubfolderName(int i); 185 std::wstring IndexedSubsubfolderName(int i);
185 186
186 } // namespace bookmarks_helper 187 } // namespace bookmarks_helper
187 188
188 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_ 189 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_BOOKMARKS_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698