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

Unified Diff: chrome/browser/history/android/android_provider_backend.cc

Issue 10857065: Revert 152162 - Change HistoryAndBookmarkRow favicon_ field to be scoped_refptr<base::RefCountedMem… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/android/android_provider_backend.cc
===================================================================
--- chrome/browser/history/android/android_provider_backend.cc (revision 152168)
+++ chrome/browser/history/android/android_provider_backend.cc (working copy)
@@ -385,7 +385,7 @@
scoped_ptr<FaviconChangeDetails> favicon;
if (row.is_value_set_explicitly(HistoryAndBookmarkRow::FAVICON) &&
- row.favicon_valid()) {
+ !row.favicon().empty()) {
favicon.reset(new FaviconChangeDetails);
if (!favicon.get())
return false;
@@ -966,11 +966,10 @@
FaviconID favicon_id = statement->statement()->ColumnInt64(4);
if (favicon_id) {
- scoped_refptr<base::RefCountedBytes> favicon = new base::RefCountedBytes();
- if (!thumbnail_db_->GetFavicon(favicon_id, NULL, &favicon->data(), NULL,
- NULL))
+ std::vector<unsigned char> favicon;
+ if (!thumbnail_db_->GetFavicon(favicon_id, NULL, &favicon, NULL, NULL))
return false;
- if (favicon->size())
+ if (!favicon.empty())
new_row.set_favicon(favicon);
favicon_details->urls.insert(old_url_row.url());
favicon_details->urls.insert(row.url());

Powered by Google App Engine
This is Rietveld 408576698