diff --git a/chromium_src/library_loaders/libgio.h b/chromium_src/library_loaders/libgio.h index f2ab880b46d9..0e9708c406a3 100644 --- a/chromium_src/library_loaders/libgio.h +++ b/chromium_src/library_loaders/libgio.h @@ -24,9 +24,11 @@ class LibGioLoader { typeof(&::g_settings_get_child) g_settings_get_child; typeof(&::g_settings_get_string) g_settings_get_string; typeof(&::g_settings_get_boolean) g_settings_get_boolean; - typeof(&::g_settings_get_int) g_settings_get_int; + typeof(&::g_settings_get_uint) g_settings_get_uint; typeof(&::g_settings_get_strv) g_settings_get_strv; + typeof(&::g_settings_is_writable) g_settings_is_writable; typeof(&::g_settings_list_schemas) g_settings_list_schemas; + typeof(&::g_settings_list_keys) g_settings_list_keys; private: diff --git a/chromium_src/library_loaders/libgio_loader.cc b/chromium_src/library_loaders/libgio_loader.cc index e7f5085ab975..268f190dcfd6 100644 --- a/chromium_src/library_loaders/libgio_loader.cc +++ b/chromium_src/library_loaders/libgio_loader.cc @@ -85,14 +85,14 @@ bool LibGioLoader::Load(const std::string& library_name) { } #if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN) - g_settings_get_int = - reinterpret_castg_settings_get_int)>( - dlsym(library_, "g_settings_get_int")); + g_settings_get_uint = + reinterpret_castg_settings_get_uint)>( + dlsym(library_, "g_settings_get_uint")); #endif #if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED) - g_settings_get_int = &::g_settings_get_int; + g_settings_get_uint = &::g_settings_get_uint; #endif - if (!g_settings_get_int) { + if (!g_settings_get_uint) { CleanUp(true); return false; } @@ -110,6 +110,19 @@ bool LibGioLoader::Load(const std::string& library_name) { return false; } +#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN) + g_settings_is_writable = + reinterpret_castg_settings_is_writable)>( + dlsym(library_, "g_settings_is_writable")); +#endif +#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED) + g_settings_is_writable = &::g_settings_is_writable; +#endif + if (!g_settings_is_writable) { + CleanUp(true); + return false; + } + #if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN) g_settings_list_schemas = reinterpret_castg_settings_list_schemas)>( @@ -123,6 +136,18 @@ bool LibGioLoader::Load(const std::string& library_name) { return false; } +#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DLOPEN) + g_settings_list_keys = + reinterpret_castg_settings_list_keys)>( + dlsym(library_, "g_settings_list_keys")); +#endif +#if defined(LIBRARY_LOADER_OUT_RELEASE_GEN_LIBRARY_LOADERS_LIBGIO_H_DT_NEEDED) + g_settings_list_keys = &::g_settings_list_keys; +#endif + if (!g_settings_list_keys) { + CleanUp(true); + return false; + } loaded_ = true; return true; @@ -140,8 +165,10 @@ void LibGioLoader::CleanUp(bool unload) { g_settings_get_child = NULL; g_settings_get_string = NULL; g_settings_get_boolean = NULL; - g_settings_get_int = NULL; + g_settings_get_uint = NULL; g_settings_get_strv = NULL; + g_settings_is_writable = NULL; g_settings_list_schemas = NULL; + g_settings_list_keys = NULL; }