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

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

Issue 10831341: Change HistoryAndBookmarkRow favicon_ field to be scoped_refptr<base::RefCountedMemory> (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
diff --git a/chrome/browser/history/android/android_provider_backend.cc b/chrome/browser/history/android/android_provider_backend.cc
index fec1cdbcb2a341d4964d7c954483ef25976afc9b..8957be6f77fd07d065ee17a11e414030d4e443a3 100644
--- a/chrome/browser/history/android/android_provider_backend.cc
+++ b/chrome/browser/history/android/android_provider_backend.cc
@@ -385,7 +385,7 @@ AndroidURLID AndroidProviderBackend::InsertHistoryAndBookmark(
scoped_ptr<FaviconChangeDetails> favicon;
if (row.is_value_set_explicitly(HistoryAndBookmarkRow::FAVICON) &&
- !row.favicon().empty()) {
+ row.favicon_valid()) {
favicon.reset(new FaviconChangeDetails);
if (!favicon.get())
return false;
@@ -966,10 +966,11 @@ bool AndroidProviderBackend::SimulateUpdateURL(
FaviconID favicon_id = statement->statement()->ColumnInt64(4);
if (favicon_id) {
- std::vector<unsigned char> favicon;
- if (!thumbnail_db_->GetFavicon(favicon_id, NULL, &favicon, NULL, NULL))
+ scoped_refptr<base::RefCountedBytes> favicon = new base::RefCountedBytes();
+ if (!thumbnail_db_->GetFavicon(favicon_id, NULL, &favicon->data(), NULL,
+ NULL))
return false;
- if (!favicon.empty())
+ if (favicon->size())
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