// Makes .* file extension matches all file types.
if (*file_extension == ".*")
return true;
- return base::EndsWith(file_info->filename, *file_extension, false);
+ return base::EndsWith(
+ file_info->filename,
+ *file_extension, base::CompareCase::INSENSITIVE_ASCII);
}
// Deletes |data| when gtk_file_filter_add_custom() is done with it.
#if defined(OS_WIN)
#include "ui/gfx/color_utils.h"
#elif defined(USE_X11)
-#include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h"
#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
#endif
#if defined(USE_X11)
void GetMenuBarColor(SkColor* enabled, SkColor* disabled, SkColor* highlight,
SkColor* hover, SkColor* background) {
- libgtk2ui::OwnedWidgetGtk fake_menu_bar;
- fake_menu_bar.Own(gtk_menu_bar_new());
+ GtkWidget* menu_bar = gtk_menu_bar_new();
- GtkStyle* style = gtk_rc_get_style(fake_menu_bar.get());
+ GtkStyle* style = gtk_rc_get_style(menu_bar);
*enabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_NORMAL]);
*disabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_INSENSITIVE]);
*highlight = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_SELECTED]);
*hover = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_PRELIGHT]);
*background = libgtk2ui::GdkColorToSkColor(style->bg[GTK_STATE_NORMAL]);
+
+ gtk_widget_destroy(menu_bar);
}
#endif