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

Unified Diff: chrome/browser/ui/gtk/gtk_theme_service.h

Issue 10451102: fix a memory leak and add a suppression (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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
« no previous file with comments | « chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc ('k') | chrome/browser/ui/gtk/gtk_theme_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/gtk_theme_service.h
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.h b/chrome/browser/ui/gtk/gtk_theme_service.h
index d253aa02de8b42f0a282c143491bbf5ff84921ac..d99cb798082ce930c3ef305ab14ad9cfd549d87c 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.h
+++ b/chrome/browser/ui/gtk/gtk_theme_service.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/prefs/pref_change_registrar.h"
#include "chrome/browser/themes/theme_service.h"
@@ -143,8 +144,8 @@ class GtkThemeService : public ThemeService {
// These functions return an image that is not owned by the caller and should
// not be deleted. If |native| is true, get the GTK_STOCK version of the
// icon.
- static gfx::Image* GetFolderIcon(bool native);
- static gfx::Image* GetDefaultFavicon(bool native);
+ static gfx::Image GetFolderIcon(bool native);
+ static gfx::Image GetDefaultFavicon(bool native);
// Whether we use the GTK theme by default in the current desktop
// environment. Returns true when we GTK defaults to on.
@@ -300,8 +301,8 @@ class GtkThemeService : public ThemeService {
// These are static because the system can only have one theme at a time.
// They are cached when they are requested the first time, and cleared when
// the system theme changes.
- static gfx::Image* default_folder_icon_;
- static gfx::Image* default_bookmark_icon_;
+ static base::LazyInstance<gfx::Image> default_folder_icon_;
+ static base::LazyInstance<gfx::Image> default_bookmark_icon_;
};
#endif // CHROME_BROWSER_UI_GTK_GTK_THEME_SERVICE_H_
« no previous file with comments | « chrome/browser/ui/gtk/bookmarks/bookmark_utils_gtk.cc ('k') | chrome/browser/ui/gtk/gtk_theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698