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

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 10837215: exhibit 1: explicit null checks Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 6133e45715c52918198fc2d6094e374107683ec0..b67ea07d1a0755fba1aa05df5caf4130f874ac63 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -290,11 +290,11 @@ TabContents* InstantController::ReleasePreviewContents(InstantCommitType type) {
FaviconService* favicon_service =
preview->profile()->GetFaviconService(Profile::EXPLICIT_ACCESS);
if (favicon_service && entry->GetFavicon().valid &&
- entry->GetFavicon().image.IsEmpty()) {
+ !entry->GetFavicon().image.IsEmpty()) {
std::vector<unsigned char> image_data;
// TODO: Add all variants once the history service supports it.
gfx::PNGCodec::EncodeBGRASkBitmap(
- entry->GetFavicon().image.AsBitmap(), false, &image_data);
+ *entry->GetFavicon().image.ToSkBitmap(), false, &image_data);
favicon_service->SetFavicon(entry->GetURL(),
entry->GetFavicon().url,
image_data,
« no previous file with comments | « chrome/browser/favicon/favicon_tab_helper.cc ('k') | chrome/browser/task_manager/task_manager_resource_providers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698