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

Unified Diff: chrome/browser/ui/views/frame/taskbar_decorator_win.cc

Issue 1406403007: Eliminate HICON leaks caused by creating icons from bitmap image. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ScopedGeneric to define ScopedGDIObject. Created 5 years, 1 month 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/ui/views/frame/taskbar_decorator_win.cc
diff --git a/chrome/browser/ui/views/frame/taskbar_decorator_win.cc b/chrome/browser/ui/views/frame/taskbar_decorator_win.cc
index 8772dce1f62d7c5f483db74da348841290021ff4..5c9a58a58943ce0e922d2368dbf4416c437c3167 100644
--- a/chrome/browser/ui/views/frame/taskbar_decorator_win.cc
+++ b/chrome/browser/ui/views/frame/taskbar_decorator_win.cc
@@ -59,11 +59,11 @@ void SetOverlayIcon(HWND hwnd, scoped_ptr<SkBitmap> bitmap) {
SkCanvas offscreen_canvas(offscreen_bitmap);
offscreen_canvas.clear(SK_ColorTRANSPARENT);
offscreen_canvas.drawBitmap(sk_icon, 0, kOverlayIconSize - resized_height);
- icon.Set(IconUtil::CreateHICONFromSkBitmap(offscreen_bitmap));
- if (!icon.Get())
+ icon.reset(IconUtil::CreateHICONFromSkBitmap(offscreen_bitmap));
+ if (!icon.is_valid())
return;
}
- taskbar->SetOverlayIcon(hwnd, icon, L"");
+ taskbar->SetOverlayIcon(hwnd, icon.get(), L"");
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698