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

Side by Side Diff: chrome/browser/history/thumbnail_database.h

Issue 26563004: Find Favicon in priority of icon_type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a new method Created 7 years, 2 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
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_HISTORY_THUMBNAIL_DATABASE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
6 #define CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ 6 #define CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // If |required_icon_types| contains multiple icon types and there is more 170 // If |required_icon_types| contains multiple icon types and there is more
171 // than one matched icon type in the database, icons of only a single type 171 // than one matched icon type in the database, icons of only a single type
172 // will be returned in the priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON, 172 // will be returned in the priority of TOUCH_PRECOMPOSED_ICON, TOUCH_ICON,
173 // and FAVICON. 173 // and FAVICON.
174 // The matched icon mappings are returned in the |mapping_data| parameter if 174 // The matched icon mappings are returned in the |mapping_data| parameter if
175 // it is not NULL. 175 // it is not NULL.
176 bool GetIconMappingsForPageURL(const GURL& page_url, 176 bool GetIconMappingsForPageURL(const GURL& page_url,
177 int required_icon_types, 177 int required_icon_types,
178 std::vector<IconMapping>* mapping_data); 178 std::vector<IconMapping>* mapping_data);
179 179
180 // Returns true if there are icon mappings for the given |page_url| and
181 // |required_icon_types|.
182 // The matched icon mappings are returned in the |mapping_data| parameter if
183 // it is not NULL.
184 bool GetAllIconMappingsForPageURL(const GURL& page_url,
185 int required_icon_types,
186 std::vector<IconMapping>* mapping_data);
187
180 // Returns true if there is any matched icon mapping for the given page. 188 // Returns true if there is any matched icon mapping for the given page.
181 // All matched icon mappings are returned in descent order of IconType if 189 // All matched icon mappings are returned in descent order of IconType if
182 // mapping_data is not NULL. 190 // mapping_data is not NULL.
183 bool GetIconMappingsForPageURL(const GURL& page_url, 191 bool GetIconMappingsForPageURL(const GURL& page_url,
184 std::vector<IconMapping>* mapping_data); 192 std::vector<IconMapping>* mapping_data);
185 193
186 // Adds a mapping between the given page_url and icon_id. 194 // Adds a mapping between the given page_url and icon_id.
187 // Returns the new mapping id if the adding succeeds, otherwise 0 is returned. 195 // Returns the new mapping id if the adding succeeds, otherwise 0 is returned.
188 IconMappingID AddIconMapping(const GURL& page_url, chrome::FaviconID icon_id); 196 IconMappingID AddIconMapping(const GURL& page_url, chrome::FaviconID icon_id);
189 197
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // Returns True if the current database is latest. 271 // Returns True if the current database is latest.
264 bool IsLatestVersion(); 272 bool IsLatestVersion();
265 273
266 sql::Connection db_; 274 sql::Connection db_;
267 sql::MetaTable meta_table_; 275 sql::MetaTable meta_table_;
268 }; 276 };
269 277
270 } // namespace history 278 } // namespace history
271 279
272 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_ 280 #endif // CHROME_BROWSER_HISTORY_THUMBNAIL_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698