[gnome-software/wip/hughsie/AsProfile-removal: 2/2] Remove AsProfile
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/hughsie/AsProfile-removal: 2/2] Remove AsProfile
- Date: Wed, 26 Sep 2018 09:35:19 +0000 (UTC)
commit 125db716cf51079c90b3fa69816590475a331cb5
Author: Richard Hughes <richard hughsie com>
Date: Wed Sep 26 10:05:29 2018 +0100
Remove AsProfile
This isn't hugely helpful, and outputs a lot of noise to the console. It also
complicates things considerably when actual profile tools like callgrind
actually do a better job.
lib/gs-cmd.c | 27 ++-----
lib/gs-plugin-loader.c | 46 ------------
lib/gs-plugin-loader.h | 1 -
lib/gs-plugin-private.h | 2 -
lib/gs-plugin.c | 38 ----------
lib/gs-plugin.h | 1 -
plugins/core/gs-appstream.c | 54 +-------------
plugins/core/gs-plugin-appstream.c | 32 ++-------
plugins/flatpak/gs-flatpak.c | 83 ----------------------
plugins/flatpak/gs-plugin-flatpak.c | 5 --
plugins/modalias/gs-plugin-modalias.c | 15 +---
plugins/odrs/gs-plugin-odrs.c | 15 +---
plugins/packagekit/gs-packagekit-helper.c | 13 +---
.../packagekit/gs-plugin-packagekit-refine-repos.c | 4 --
plugins/packagekit/gs-plugin-packagekit-refine.c | 34 ++-------
plugins/packagekit/gs-plugin-packagekit.c | 4 --
src/gs-application.c | 28 --------
src/gs-category-page.c | 3 -
src/gs-details-page.c | 3 -
src/gs-extras-page.c | 3 -
src/gs-installed-page.c | 3 -
src/gs-main.c | 7 --
src/gs-moderate-page.c | 3 -
src/gs-overview-page.c | 3 -
src/gs-search-page.c | 3 -
src/gs-shell.c | 19 -----
src/gs-shell.h | 3 -
src/gs-updates-page.c | 3 -
src/gs-updates-section.c | 3 -
29 files changed, 22 insertions(+), 436 deletions(-)
---
diff --git a/lib/gs-cmd.c b/lib/gs-cmd.c
index 34cfc36d..abdfc3bb 100644
--- a/lib/gs-cmd.c
+++ b/lib/gs-cmd.c
@@ -284,17 +284,14 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GsCmdSelf, gs_cmd_self_free)
int
main (int argc, char **argv)
{
- AsProfile *profile = NULL;
- GOptionContext *context;
+ g_autoptr(GOptionContext) context = NULL;
gboolean prefer_local = FALSE;
- gboolean profile_enable = FALSE;
gboolean ret;
gboolean show_results = FALSE;
gboolean verbose = FALSE;
gint i;
guint cache_age = 0;
gint repeat = 1;
- int status = 0;
g_auto(GStrv) plugin_blacklist = NULL;
g_auto(GStrv) plugin_whitelist = NULL;
g_autoptr(GError) error = NULL;
@@ -307,7 +304,6 @@ main (int argc, char **argv)
g_autoptr(GsApp) app = NULL;
g_autoptr(GFile) file = NULL;
g_autoptr(GsCmdSelf) self = g_new0 (GsCmdSelf, 1);
- g_autoptr(AsProfileTask) ptask = NULL;
const GOptionEntry options[] = {
{ "show-results", '\0', 0, G_OPTION_ARG_NONE, &show_results,
"Show the results for the action", NULL },
@@ -327,8 +323,6 @@ main (int argc, char **argv)
"Only load specific plugins", NULL },
{ "verbose", '\0', 0, G_OPTION_ARG_NONE, &verbose,
"Show verbose debugging information", NULL },
- { "profile", '\0', 0, G_OPTION_ARG_NONE, &profile_enable,
- "Show profiling information", NULL },
{ NULL}
};
@@ -348,7 +342,7 @@ main (int argc, char **argv)
ret = g_option_context_parse (context, &argc, &argv, &error);
if (!ret) {
g_print ("Failed to parse options: %s\n", error->message);
- goto out;
+ return EXIT_FAILURE;
}
if (verbose)
g_setenv ("GS_DEBUG", "1", TRUE);
@@ -361,14 +355,11 @@ main (int argc, char **argv)
self->refine_flags = gs_cmd_parse_refine_flags (refine_flags_str, &error);
if (self->refine_flags == G_MAXUINT64) {
g_print ("Flag unknown: %s\n", error->message);
- goto out;
+ return EXIT_FAILURE;
}
/* load plugins */
self->plugin_loader = gs_plugin_loader_new ();
- profile = gs_plugin_loader_get_profile (self->plugin_loader);
- ptask = as_profile_start_literal (profile, "GsCmd");
- g_assert (ptask != NULL);
if (g_file_test (LOCALPLUGINDIR, G_FILE_TEST_EXISTS))
gs_plugin_loader_add_location (self->plugin_loader, LOCALPLUGINDIR);
if (plugin_whitelist_str != NULL)
@@ -382,7 +373,7 @@ main (int argc, char **argv)
&error);
if (!ret) {
g_print ("Failed to setup plugins: %s\n", error->message);
- goto out;
+ return EXIT_FAILURE;
}
gs_plugin_loader_dump_state (self->plugin_loader);
@@ -397,7 +388,7 @@ main (int argc, char **argv)
NULL, &error);
if (!ret) {
g_print ("Failed to refresh plugins: %s\n", error->message);
- goto out;
+ return EXIT_FAILURE;
}
}
@@ -697,7 +688,7 @@ main (int argc, char **argv)
}
if (!ret) {
g_print ("Failed: %s\n", error->message);
- goto out;
+ return EXIT_FAILURE;
}
if (show_results) {
@@ -706,11 +697,7 @@ main (int argc, char **argv)
if (categories != NULL)
gs_cmd_show_results_categories (categories);
}
-out:
- if (profile_enable)
- as_profile_dump (profile);
- g_option_context_free (context);
- return status;
+ return EXIT_SUCCESS;
}
/* vim: set noexpandtab: */
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 996467c0..1fa3131c 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -48,7 +48,6 @@ typedef struct
GPtrArray *locations;
gchar *locale;
gchar *language;
- AsProfile *profile;
SoupSession *soup_session;
GPtrArray *auth_array;
GPtrArray *file_monitors;
@@ -526,30 +525,12 @@ gs_plugin_loader_call_vfunc (GsPluginLoaderHelper *helper,
gpointer func = NULL;
g_autoptr(GError) error_local = NULL;
g_autoptr(GTimer) timer = g_timer_new ();
- g_autoptr(AsProfileTask) ptask = NULL;
/* load the possible symbol */
func = gs_plugin_get_symbol (plugin, helper->function_name);
if (func == NULL)
return TRUE;
- /* profile */
- if (g_strcmp0 (helper->function_name, "gs_plugin_refine_app") != 0) {
- if (helper->function_name_parent == NULL) {
- ptask = as_profile_start (priv->profile,
- "GsPlugin::%s(%s)",
- gs_plugin_get_name (plugin),
- helper->function_name);
- } else {
- ptask = as_profile_start (priv->profile,
- "GsPlugin::%s(%s;%s)",
- gs_plugin_get_name (plugin),
- helper->function_name_parent,
- helper->function_name);
- }
- g_assert (ptask != NULL);
- }
-
/* fallback if unset */
if (app == NULL)
app = gs_plugin_job_get_app (helper->plugin_job);
@@ -832,7 +813,6 @@ gs_plugin_loader_run_refine_filter (GsPluginLoaderHelper *helper,
/* run each plugin */
for (guint i = 0; i < priv->plugins->len; i++) {
- g_autoptr(AsProfileTask) ptask = NULL;
GsPlugin *plugin = g_ptr_array_index (priv->plugins, i);
g_autoptr(GsAppList) app_list = NULL;
@@ -1141,12 +1121,6 @@ gs_plugin_loader_run_results (GsPluginLoaderHelper *helper,
GError **error)
{
GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (helper->plugin_loader);
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* profile */
- ptask = as_profile_start (priv->profile, "GsPlugin::*(%s)",
- helper->function_name);
- g_assert (ptask != NULL);
/* run each plugin */
for (guint i = 0; i < priv->plugins->len; i++) {
@@ -2188,7 +2162,6 @@ gs_plugin_loader_open_plugin (GsPluginLoader *plugin_loader,
plugin_loader);
gs_plugin_set_soup_session (plugin, priv->soup_session);
gs_plugin_set_auth_array (plugin, priv->auth_array);
- gs_plugin_set_profile (plugin, priv->profile);
gs_plugin_set_locale (plugin, priv->locale);
gs_plugin_set_language (plugin, priv->language);
gs_plugin_set_scale (plugin, gs_plugin_loader_get_scale (plugin_loader));
@@ -2406,7 +2379,6 @@ gs_plugin_loader_setup (GsPluginLoader *plugin_loader,
guint dep_loop_check = 0;
guint i;
guint j;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GsPluginLoaderHelper) helper = NULL;
g_autoptr(GsPluginJob) plugin_job = NULL;
@@ -2433,8 +2405,6 @@ gs_plugin_loader_setup (GsPluginLoader *plugin_loader,
}
/* search for plugins */
- ptask = as_profile_start_literal (priv->profile, "GsPlugin::setup");
- g_assert (ptask != NULL);
for (i = 0; i < priv->locations->len; i++) {
const gchar *location = g_ptr_array_index (priv->locations, i);
g_autoptr(GPtrArray) fns = NULL;
@@ -2739,7 +2709,6 @@ gs_plugin_loader_dispose (GObject *object)
}
g_clear_object (&priv->network_monitor);
g_clear_object (&priv->soup_session);
- g_clear_object (&priv->profile);
g_clear_object (&priv->settings);
g_clear_pointer (&priv->auth_array, g_ptr_array_unref);
g_clear_pointer (&priv->pending_apps, g_ptr_array_unref);
@@ -2868,7 +2837,6 @@ gs_plugin_loader_init (GsPluginLoader *plugin_loader)
priv->auth_array = g_ptr_array_new_with_free_func ((GFreeFunc) g_object_unref);
priv->file_monitors = g_ptr_array_new_with_free_func ((GFreeFunc) g_object_unref);
priv->locations = g_ptr_array_new_with_free_func (g_free);
- priv->profile = as_profile_new ();
priv->settings = g_settings_new ("org.gnome.software");
g_signal_connect (priv->settings, "changed",
G_CALLBACK (gs_plugin_loader_settings_changed_cb), plugin_loader);
@@ -3088,7 +3056,6 @@ gs_plugin_loader_generic_update (GsPluginLoader *plugin_loader,
GCancellable *app_cancellable;
GsApp *app = gs_app_list_index (list, j);
gboolean ret;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GError) error_local = NULL;
/* if the whole operation should be cancelled */
@@ -3103,12 +3070,6 @@ gs_plugin_loader_generic_update (GsPluginLoader *plugin_loader,
g_object_unref);
gs_plugin_job_set_app (helper->plugin_job, app);
- ptask = as_profile_start (priv->profile,
- "GsPlugin::%s(%s){%s}",
- gs_plugin_get_name (plugin),
- helper->function_name,
- gs_app_get_id (app));
- g_assert (ptask != NULL);
gs_plugin_loader_action_start (plugin_loader, plugin, FALSE);
ret = plugin_app_func (plugin, app, app_cancellable, &error_local);
gs_plugin_loader_action_stop (plugin_loader, plugin);
@@ -3819,13 +3780,6 @@ gs_plugin_loader_get_system_app (GsPluginLoader *plugin_loader)
return gs_plugin_loader_app_create (plugin_loader, "*/*/*/*/system/*");
}
-AsProfile *
-gs_plugin_loader_get_profile (GsPluginLoader *plugin_loader)
-{
- GsPluginLoaderPrivate *priv = gs_plugin_loader_get_instance_private (plugin_loader);
- return priv->profile;
-}
-
/**
* gs_plugin_loader_set_max_parallel_ops:
* @plugin_loader: a #GsPluginLoader
diff --git a/lib/gs-plugin-loader.h b/lib/gs-plugin-loader.h
index 1b5b754e..bb013826 100644
--- a/lib/gs-plugin-loader.h
+++ b/lib/gs-plugin-loader.h
@@ -96,7 +96,6 @@ GPtrArray *gs_plugin_loader_get_events (GsPluginLoader *plugin_loader);
GsPluginEvent *gs_plugin_loader_get_event_default (GsPluginLoader *plugin_loader);
void gs_plugin_loader_remove_events (GsPluginLoader *plugin_loader);
-AsProfile *gs_plugin_loader_get_profile (GsPluginLoader *plugin_loader);
GsApp *gs_plugin_loader_app_create (GsPluginLoader *plugin_loader,
const gchar *unique_id);
GsApp *gs_plugin_loader_get_system_app (GsPluginLoader *plugin_loader);
diff --git a/lib/gs-plugin-private.h b/lib/gs-plugin-private.h
index dbfcf7c9..24907278 100644
--- a/lib/gs-plugin-private.h
+++ b/lib/gs-plugin-private.h
@@ -57,8 +57,6 @@ void gs_plugin_set_locale (GsPlugin *plugin,
const gchar *locale);
void gs_plugin_set_language (GsPlugin *plugin,
const gchar *language);
-void gs_plugin_set_profile (GsPlugin *plugin,
- AsProfile *profile);
void gs_plugin_set_auth_array (GsPlugin *plugin,
GPtrArray *auth_array);
void gs_plugin_set_running_other (GsPlugin *plugin,
diff --git a/lib/gs-plugin.c b/lib/gs-plugin.c
index 8543aade..a9f5585d 100644
--- a/lib/gs-plugin.c
+++ b/lib/gs-plugin.c
@@ -61,7 +61,6 @@
typedef struct
{
- AsProfile *profile;
GPtrArray *auth_array;
GHashTable *cache;
GMutex cache_mutex;
@@ -226,7 +225,6 @@ gs_plugin_finalize (GObject *object)
g_free (priv->locale);
g_free (priv->language);
g_rw_lock_clear (&priv->rwlock);
- g_object_unref (priv->profile);
if (priv->auth_array != NULL)
g_ptr_array_unref (priv->auth_array);
if (priv->soup_session != NULL)
@@ -745,41 +743,6 @@ gs_plugin_get_auth_by_id (GsPlugin *plugin, const gchar *provider_id)
return NULL;
}
-/**
- * gs_plugin_get_profile:
- * @plugin: a #GsPlugin
- *
- * Gets the profile object to be used for the plugin.
- * This can be used to make plugin actions appear in the global profile
- * output.
- *
- * Returns: the #AsProfile
- *
- * Since: 3.22
- **/
-AsProfile *
-gs_plugin_get_profile (GsPlugin *plugin)
-{
- GsPluginPrivate *priv = gs_plugin_get_instance_private (plugin);
- return priv->profile;
-}
-
-/**
- * gs_plugin_set_profile:
- * @plugin: a #GsPlugin
- * @profile: a #AsProfile
- *
- * Sets the profile object to be used for the plugin.
- *
- * Since: 3.22
- **/
-void
-gs_plugin_set_profile (GsPlugin *plugin, AsProfile *profile)
-{
- GsPluginPrivate *priv = gs_plugin_get_instance_private (plugin);
- g_set_object (&priv->profile, profile);
-}
-
/**
* gs_plugin_get_soup_session:
* @plugin: a #GsPlugin
@@ -2176,7 +2139,6 @@ gs_plugin_init (GsPlugin *plugin)
priv->enabled = TRUE;
priv->scale = 1;
- priv->profile = as_profile_new ();
priv->cache = g_hash_table_new_full ((GHashFunc) as_utils_unique_id_hash,
(GEqualFunc) as_utils_unique_id_equal,
g_free,
diff --git a/lib/gs-plugin.h b/lib/gs-plugin.h
index 3fcc44d7..692fa85e 100644
--- a/lib/gs-plugin.h
+++ b/lib/gs-plugin.h
@@ -83,7 +83,6 @@ void gs_plugin_remove_flags (GsPlugin *plugin,
guint gs_plugin_get_scale (GsPlugin *plugin);
const gchar *gs_plugin_get_locale (GsPlugin *plugin);
const gchar *gs_plugin_get_language (GsPlugin *plugin);
-AsProfile *gs_plugin_get_profile (GsPlugin *plugin);
SoupSession *gs_plugin_get_soup_session (GsPlugin *plugin);
void gs_plugin_set_soup_session (GsPlugin *plugin,
SoupSession *soup_session);
diff --git a/plugins/core/gs-appstream.c b/plugins/core/gs-appstream.c
index 55bdad59..0ce2d9a9 100644
--- a/plugins/core/gs-appstream.c
+++ b/plugins/core/gs-appstream.c
@@ -141,18 +141,11 @@ gs_appstream_refine_add_addons (GsPlugin *plugin,
GError **error)
{
GPtrArray *addons;
- g_autoptr(AsProfileTask) ptask = NULL;
/* we only care about addons to desktop apps */
if (gs_app_get_kind (app) != AS_APP_KIND_DESKTOP)
return TRUE;
- /* search categories for the search term */
- ptask = as_profile_start (gs_plugin_get_profile (plugin),
- "appstream::refine-addons{%s}",
- gs_app_get_unique_id (app));
- g_assert (ptask != NULL);
-
addons = as_app_get_addons (item);
if (addons == NULL)
return TRUE;
@@ -488,13 +481,6 @@ gs_appstream_refine_app (GsPlugin *plugin,
GPtrArray *kudos;
const gchar *current_desktop;
const gchar *tmp;
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* search categories for the search term */
- ptask = as_profile_start (gs_plugin_get_profile (plugin),
- "appstream::refine-app{%s}",
- gs_app_get_unique_id (app));
- g_assert (ptask != NULL);
/* set the kind to be more precise */
if (gs_app_get_kind (app) == AS_APP_KIND_UNKNOWN ||
@@ -873,12 +859,7 @@ gs_appstream_store_search (GsPlugin *plugin,
{
GPtrArray *array;
gboolean ret = TRUE;
- g_autoptr(AsProfileTask) ptask = NULL;
- /* search categories for the search term */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "appstream::search");
- g_assert (ptask != NULL);
array = as_store_get_apps (store);
for (guint i = 0; i < array->len; i++) {
AsApp *item = g_ptr_array_index (array, i);
@@ -950,12 +931,8 @@ gs_appstream_store_add_category_apps (GsPlugin *plugin,
{
GPtrArray *array;
GPtrArray *desktop_groups;
- g_autoptr(AsProfileTask) ptask = NULL;
/* just look at each app in turn */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "appstream::add-category-apps");
- g_assert (ptask != NULL);
array = as_store_get_apps (store);
desktop_groups = gs_category_get_desktop_groups (category);
if (desktop_groups->len == 0) {
@@ -998,12 +975,8 @@ gs_appstream_store_add_categories (GsPlugin *plugin,
GError **error)
{
GPtrArray *array;
- g_autoptr(AsProfileTask) ptask = NULL;
/* find out how many packages are in each category */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "appstream::add-categories");
- g_assert (ptask != NULL);
array = as_store_get_apps (store);
for (guint i = 0; i < array->len; i++) {
AsApp *app = g_ptr_array_index (array, i);
@@ -1026,14 +999,7 @@ gs_appstream_add_popular (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- GPtrArray *array;
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* find out how many packages are in each category */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "appstream::add-popular");
- g_assert (ptask != NULL);
- array = as_store_get_apps (store);
+ GPtrArray *array = as_store_get_apps (store);
for (guint i = 0; i < array->len; i++) {
g_autoptr(GsApp) app = NULL;
AsApp *item = g_ptr_array_index (array, i);
@@ -1073,14 +1039,7 @@ gs_appstream_add_recent (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- GPtrArray *array;
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* find out how many packages are in each category */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "appstream::add-recent");
- g_assert (ptask != NULL);
- array = as_store_get_apps (store);
+ GPtrArray *array = as_store_get_apps (store);
for (guint i = 0; i < array->len; i++) {
g_autoptr(GsApp) app = NULL;
AsApp *item = g_ptr_array_index (array, i);
@@ -1144,14 +1103,7 @@ gs_appstream_add_featured (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- GPtrArray *array;
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* find out how many packages are in each category */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "appstream::add-featured");
- g_assert (ptask != NULL);
- array = as_store_get_apps (store);
+ GPtrArray *array = as_store_get_apps (store);
for (guint i = 0; i < array->len; i++) {
g_autoptr(GsApp) app = NULL;
AsApp *item = g_ptr_array_index (array, i);
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index 79c833a1..90c927f9 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -365,13 +365,6 @@ gs_plugin_refine_from_id (GsPlugin *plugin,
GsPluginData *priv = gs_plugin_get_data (plugin);
const gchar *unique_id;
AsApp *item;
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* search categories for the search term */
- ptask = as_profile_start (gs_plugin_get_profile (plugin),
- "appstream::refine-from-id{%s}",
- gs_app_get_unique_id (app));
- g_assert (ptask != NULL);
/* unfound */
*found = FALSE;
@@ -424,21 +417,12 @@ gs_plugin_refine_from_pkgname (GsPlugin *plugin,
GsPluginData *priv = gs_plugin_get_data (plugin);
AsApp *item = NULL;
GPtrArray *sources;
- const gchar *pkgname;
- guint i;
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* search categories for the search term */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "appstream::refine-from-pkgname");
- g_assert (ptask != NULL);
/* find anything that matches the ID */
sources = gs_app_get_sources (app);
- for (i = 0; i < sources->len && item == NULL; i++) {
- pkgname = g_ptr_array_index (sources, i);
- item = as_store_get_app_by_pkgname (priv->store,
- pkgname);
+ for (guint i = 0; i < sources->len && item == NULL; i++) {
+ const gchar *pkgname = g_ptr_array_index (sources, i);
+ item = as_store_get_app_by_pkgname (priv->store, pkgname);
if (item == NULL)
g_debug ("no AppStream match for {pkgname} %s", pkgname);
}
@@ -603,18 +587,12 @@ gs_plugin_add_installed (GsPlugin *plugin,
GError **error)
{
GsPluginData *priv = gs_plugin_get_data (plugin);
- AsApp *item;
GPtrArray *array;
- guint i;
- g_autoptr(AsProfileTask) ptask = NULL;
/* search categories for the search term */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "appstream::add_installed");
- g_assert (ptask != NULL);
array = as_store_get_apps (priv->store);
- for (i = 0; i < array->len; i++) {
- item = g_ptr_array_index (array, i);
+ for (guint i = 0; i < array->len; i++) {
+ AsApp *item = g_ptr_array_index (array, i);
if (as_app_get_state (item) == AS_APP_STATE_INSTALLED) {
g_autoptr(GsApp) app = NULL;
app = gs_appstream_create_app (plugin, item, error);
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index b03d8ac8..90526b22 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -246,20 +246,12 @@ gs_flatpak_add_apps_from_xremote (GsFlatpak *self,
g_autofree gchar *appstream_fn = NULL;
g_autofree gchar *default_branch = NULL;
g_autofree gchar *only_app_id = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(AsStore) store = NULL;
g_autoptr(GFile) appstream_dir = NULL;
g_autoptr(GFile) file = NULL;
g_autoptr(GSettings) settings = NULL;
g_autoptr(GPtrArray) app_filtered = NULL;
- /* profile */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::add-apps-from-remote{%s}",
- gs_flatpak_get_id (self),
- flatpak_remote_get_name (xremote));
- g_assert (ptask != NULL);
-
/* get the AppStream data location */
appstream_dir = flatpak_remote_get_appstream_dir (xremote, NULL);
if (appstream_dir == NULL) {
@@ -376,19 +368,12 @@ gs_flatpak_rescan_installed (GsFlatpak *self,
{
GPtrArray *icons;
const gchar *fn;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GFile) path = NULL;
g_autoptr(GDir) dir = NULL;
g_autofree gchar *path_str = NULL;
g_autofree gchar *path_exports = NULL;
g_autofree gchar *path_apps = NULL;
- /* profile */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::rescan-installed",
- gs_flatpak_get_id (self));
- g_assert (ptask != NULL);
-
/* add all installed desktop files */
path = flatpak_installation_get_path (self->installation);
path_str = g_file_get_path (path);
@@ -461,15 +446,8 @@ gs_flatpak_rescan_appstream_store (GsFlatpak *self,
GCancellable *cancellable,
GError **error)
{
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GPtrArray) xremotes = NULL;
- /* profile */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::rescan-appstream",
- gs_flatpak_get_id (self));
- g_assert (ptask != NULL);
-
/* remove all components */
as_store_remove_all (self->store);
@@ -585,17 +563,10 @@ gs_flatpak_refresh_appstream_remote (GsFlatpak *self,
GError **error)
{
g_autofree gchar *str = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GsApp) app_dl = gs_app_new (gs_plugin_get_name (self->plugin));
g_autoptr(GsFlatpakProgressHelper) phelper = NULL;
g_autoptr(GError) local_error = NULL;
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::refresh-appstream{%s}",
- gs_flatpak_get_id (self),
- remote_name);
- g_assert (ptask != NULL);
-
/* TRANSLATORS: status text when downloading new metadata */
str = g_strdup_printf (_("Getting flatpak metadata for %s…"), remote_name);
gs_app_set_summary_missing (app_dl, str);
@@ -635,15 +606,8 @@ gs_flatpak_refresh_appstream (GsFlatpak *self, guint cache_age,
{
gboolean ret;
gboolean something_changed = FALSE;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GPtrArray) xremotes = NULL;
- /* profile */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::refresh-appstream",
- gs_flatpak_get_id (self));
- g_assert (ptask != NULL);
-
/* get remotes */
xremotes = flatpak_installation_list_remotes (self->installation,
cancellable,
@@ -1282,16 +1246,8 @@ gs_plugin_refine_item_origin_hostname (GsFlatpak *self, GsApp *app,
{
g_autoptr(FlatpakRemote) xremote = NULL;
g_autofree gchar *url = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GError) error_local = NULL;
- /* profile */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::refine-origin-hostname{%s}",
- gs_flatpak_get_id (self),
- gs_app_get_id (app));
- g_assert (ptask != NULL);
-
/* already set */
if (gs_app_get_origin_hostname (app) != NULL)
return TRUE;
@@ -1377,7 +1333,6 @@ gs_plugin_refine_item_origin (GsFlatpak *self,
GError **error)
{
g_autofree gchar *ref_display = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GError) local_error = NULL;
g_autoptr(GPtrArray) xremotes = NULL;
@@ -1390,10 +1345,6 @@ gs_plugin_refine_item_origin (GsFlatpak *self,
return TRUE;
/* ensure metadata exists */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::refine-origin",
- gs_flatpak_get_id (self));
- g_assert (ptask != NULL);
if (!gs_refine_item_metadata (self, app, cancellable, error))
return FALSE;
@@ -1472,7 +1423,6 @@ gs_flatpak_refine_app_state (GsFlatpak *self,
GError **error)
{
g_autoptr(GPtrArray) xrefs = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(FlatpakInstalledRef) ref = NULL;
g_autoptr(GError) error_local = NULL;
@@ -1485,10 +1435,6 @@ gs_flatpak_refine_app_state (GsFlatpak *self,
return FALSE;
/* get apps and runtimes */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::refine-action",
- gs_flatpak_get_id (self));
- g_assert (ptask != NULL);
ref = flatpak_installation_get_installed_ref (self->installation,
gs_flatpak_app_get_ref_kind (app),
gs_flatpak_app_get_ref_name (app),
@@ -1703,17 +1649,9 @@ gs_plugin_refine_item_metadata (GsFlatpak *self,
g_autofree gchar *contents = NULL;
g_autofree gchar *installation_path_str = NULL;
g_autofree gchar *install_path = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GBytes) data = NULL;
g_autoptr(GFile) installation_path = NULL;
- /* profile */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::refine-metadata{%s}",
- gs_flatpak_get_id (self),
- gs_app_get_id (app));
- g_assert (ptask != NULL);
-
/* not applicable */
if (gs_app_get_kind (app) == AS_APP_KIND_SOURCE)
return TRUE;
@@ -1783,7 +1721,6 @@ gs_plugin_refine_item_size (GsFlatpak *self,
gboolean ret;
guint64 download_size = GS_APP_SIZE_UNKNOWABLE;
guint64 installed_size = GS_APP_SIZE_UNKNOWABLE;
- g_autoptr(AsProfileTask) ptask = NULL;
/* not applicable */
if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL)
@@ -1831,10 +1768,6 @@ gs_plugin_refine_item_size (GsFlatpak *self,
}
/* just get the size of the app */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::refine-size",
- gs_flatpak_get_id (self));
- g_assert (ptask != NULL);
if (!gs_plugin_refine_item_origin (self, app,
cancellable, error))
return FALSE;
@@ -1911,14 +1844,6 @@ gs_flatpak_refine_appstream (GsFlatpak *self, GsApp *app, GError **error)
{
AsApp *item;
const gchar *unique_id = gs_app_get_unique_id (app);
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* profile */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::refine-appstream{%s}",
- gs_flatpak_get_id (self),
- gs_app_get_id (app));
- g_assert (ptask != NULL);
if (unique_id == NULL)
return TRUE;
@@ -1955,14 +1880,6 @@ gs_flatpak_refine_app (GsFlatpak *self,
GError **error)
{
AsAppState old_state = gs_app_get_state (app);
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* profile */
- ptask = as_profile_start (gs_plugin_get_profile (self->plugin),
- "%s::refine{%s}",
- gs_flatpak_get_id (self),
- gs_app_get_id (app));
- g_assert (ptask != NULL);
/* always do AppStream properties */
if (!gs_flatpak_refine_appstream (self, app, error))
diff --git a/plugins/flatpak/gs-plugin-flatpak.c b/plugins/flatpak/gs-plugin-flatpak.c
index af74f910..6beabc73 100644
--- a/plugins/flatpak/gs-plugin-flatpak.c
+++ b/plugins/flatpak/gs-plugin-flatpak.c
@@ -109,13 +109,8 @@ gs_plugin_flatpak_add_installation (GsPlugin *plugin,
GError **error)
{
GsPluginData *priv = gs_plugin_get_data (plugin);
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GsFlatpak) flatpak = NULL;
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "flatpak::add-installation");
- g_assert (ptask != NULL);
-
/* create and set up */
flatpak = gs_flatpak_new (plugin, installation, GS_FLATPAK_FLAG_NONE);
if (!gs_flatpak_setup (flatpak, cancellable, error))
diff --git a/plugins/modalias/gs-plugin-modalias.c b/plugins/modalias/gs-plugin-modalias.c
index b630a34d..09338a24 100644
--- a/plugins/modalias/gs-plugin-modalias.c
+++ b/plugins/modalias/gs-plugin-modalias.c
@@ -72,17 +72,11 @@ gs_plugin_modalias_ensure_devices (GsPlugin *plugin)
{
GsPluginData *priv = gs_plugin_get_data (plugin);
g_autoptr(GList) list = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
/* already set */
if (priv->devices->len > 0)
return;
- /* profile */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "modalias::ensure{%s}");
- g_assert (ptask != NULL);
-
/* get the devices, and assume ownership of each */
list = g_udev_client_query_by_subsystem (priv->client, NULL);
for (GList *l = list; l != NULL; l = l->next) {
@@ -100,16 +94,9 @@ static gboolean
gs_plugin_modalias_matches (GsPlugin *plugin, const gchar *modalias)
{
GsPluginData *priv = gs_plugin_get_data (plugin);
- guint i;
- g_autoptr(AsProfileTask) ptask = NULL;
-
- /* profile */
- ptask = as_profile_start (gs_plugin_get_profile (plugin),
- "modalias::matches{%s}", modalias);
- g_assert (ptask != NULL);
gs_plugin_modalias_ensure_devices (plugin);
- for (i = 0; i < priv->devices->len; i++) {
+ for (guint i = 0; i < priv->devices->len; i++) {
GUdevDevice *device = g_ptr_array_index (priv->devices, i);
const gchar *modalias_tmp;
diff --git a/plugins/odrs/gs-plugin-odrs.c b/plugins/odrs/gs-plugin-odrs.c
index c174a36b..505adfba 100644
--- a/plugins/odrs/gs-plugin-odrs.c
+++ b/plugins/odrs/gs-plugin-odrs.c
@@ -490,15 +490,9 @@ gs_plugin_odrs_refine_ratings (GsPlugin *plugin,
gint rating;
guint32 ratings_raw[6] = { 0, 0, 0, 0, 0, 0 };
guint cnt = 0;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GArray) review_ratings = NULL;
g_autoptr(GPtrArray) reviewable_ids = NULL;
- /* profile */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "odrs::refine-ratings");
- g_assert (ptask != NULL);
-
/* get ratings for each reviewable ID */
reviewable_ids = _gs_app_get_reviewable_ids (app);
for (guint i = 0; i < reviewable_ids->len; i++) {
@@ -672,20 +666,13 @@ gs_plugin_odrs_refine_reviews (GsPlugin *plugin,
{
GsPluginData *priv = gs_plugin_get_data (plugin);
AsReview *review;
- guint i;
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(GPtrArray) reviews = NULL;
- /* profile */
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "odrs::refine-reviews");
- g_assert (ptask != NULL);
-
/* get from server */
reviews = gs_plugin_odrs_fetch_for_app (plugin, app, error);
if (reviews == NULL)
return FALSE;
- for (i = 0; i < reviews->len; i++) {
+ for (guint i = 0; i < reviews->len; i++) {
review = g_ptr_array_index (reviews, i);
/* save this on the application object so we can use it for
diff --git a/plugins/packagekit/gs-packagekit-helper.c b/plugins/packagekit/gs-packagekit-helper.c
index 421b8b56..a292e006 100644
--- a/plugins/packagekit/gs-packagekit-helper.c
+++ b/plugins/packagekit/gs-packagekit-helper.c
@@ -30,7 +30,6 @@ struct _GsPackagekitHelper {
GObject parent_instance;
GHashTable *apps;
GsPlugin *plugin;
- AsProfileTask *ptask;
};
G_DEFINE_TYPE (GsPackagekitHelper, gs_packagekit_helper, G_TYPE_OBJECT)
@@ -48,18 +47,8 @@ gs_packagekit_helper_cb (PkProgress *progress, PkProgressType type, gpointer use
app = gs_packagekit_helper_get_app_by_id (self, package_id);
if (type == PK_PROGRESS_TYPE_STATUS) {
- GsPluginStatus plugin_status;
PkStatusEnum status = pk_progress_get_status (progress);
-
- /* profile */
- if (status == PK_STATUS_ENUM_SETUP) {
- self->ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "packagekit-refine::transaction");
- } else if (status == PK_STATUS_ENUM_FINISHED) {
- g_clear_pointer (&self->ptask, as_profile_task_free);
- }
-
- plugin_status = packagekit_status_enum_to_plugin_status (status);
+ GsPluginStatus plugin_status = packagekit_status_enum_to_plugin_status (status);
if (plugin_status != GS_PLUGIN_STATUS_UNKNOWN)
gs_plugin_status_update (plugin, app, plugin_status);
} else if (type == PK_PROGRESS_TYPE_PERCENTAGE) {
diff --git a/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
b/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
index b3812495..22f32553 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refine-repos.c
@@ -104,10 +104,6 @@ gs_plugin_refine (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- g_autoptr(AsProfileTask) ptask = NULL;
-
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "packagekit-refine-repos[repo-filename->id]");
for (guint i = 0; i < gs_app_list_length (list); i++) {
GsApp *app = gs_app_list_index (list, i);
const gchar *fn;
diff --git a/plugins/packagekit/gs-plugin-packagekit-refine.c
b/plugins/packagekit/gs-plugin-packagekit-refine.c
index 13d2296a..5c0695a6 100644
--- a/plugins/packagekit/gs-plugin-packagekit-refine.c
+++ b/plugins/packagekit/gs-plugin-packagekit-refine.c
@@ -390,13 +390,9 @@ gs_plugin_packagekit_refine_update_urgency (GsPlugin *plugin,
const gchar *package_id;
PkBitfield filter;
g_autoptr(GsPackagekitHelper) helper = gs_packagekit_helper_new (plugin);
- g_autoptr(AsProfileTask) ptask = NULL;
g_autoptr(PkPackageSack) sack = NULL;
g_autoptr(PkResults) results = NULL;
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "packagekit-refine[update-urgency]");
-
/* not required */
if ((flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_UPDATE_SEVERITY) == 0)
return TRUE;
@@ -477,18 +473,12 @@ gs_plugin_packagekit_refine_details (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- guint i;
- GsApp *app;
gboolean ret = TRUE;
g_autoptr(GsAppList) list_tmp = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "packagekit-refine[source->license]");
- g_assert (ptask != NULL);
list_tmp = gs_app_list_new ();
- for (i = 0; i < gs_app_list_length (list); i++) {
- app = gs_app_list_index (list, i);
+ for (guint i = 0; i < gs_app_list_length (list); i++) {
+ GsApp *app = gs_app_list_index (list, i);
if (gs_app_has_quirk (app, AS_APP_QUIRK_MATCH_ANY_PREFIX))
continue;
if (gs_app_get_kind (app) == AS_APP_KIND_WEB_APP)
@@ -632,12 +622,7 @@ gs_plugin_packagekit_refine_name_to_id (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- g_autoptr(AsProfileTask) ptask = NULL;
- g_autoptr(GsAppList) resolve_all = NULL;
-
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "packagekit-refine[name->id]");
- resolve_all = gs_app_list_new ();
+ g_autoptr(GsAppList) resolve_all = gs_app_list_new ();
for (guint i = 0; i < gs_app_list_length (list); i++) {
GPtrArray *sources;
GsApp *app = gs_app_list_index (list, i);
@@ -679,14 +664,10 @@ gs_plugin_packagekit_refine_filename_to_id (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- g_autoptr(AsProfileTask) ptask = NULL;
-
/* not now */
if ((flags & GS_PLUGIN_REFINE_FLAGS_REQUIRE_SETUP_ACTION) == 0)
return TRUE;
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "packagekit-refine[installed-filename->id]");
for (guint i = 0; i < gs_app_list_length (list); i++) {
g_autofree gchar *fn = NULL;
GsApp *app = gs_app_list_index (list, i);
@@ -738,12 +719,7 @@ gs_plugin_packagekit_refine_update_details (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- g_autoptr(AsProfileTask) ptask = NULL;
- g_autoptr(GsAppList) updatedetails_all = NULL;
-
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "packagekit-refine[id->update-details]");
- updatedetails_all = gs_app_list_new ();
+ g_autoptr(GsAppList) updatedetails_all = gs_app_list_new ();
for (guint i = 0; i < gs_app_list_length (list); i++) {
GsApp *app = gs_app_list_index (list, i);
const gchar *tmp;
@@ -823,8 +799,6 @@ gs_plugin_refine_app (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
- g_autoptr(AsProfileTask) ptask = NULL;
-
/* only process this app if was created by this plugin */
if (g_strcmp0 (gs_app_get_management_plugin (app), "packagekit") != 0)
return TRUE;
diff --git a/plugins/packagekit/gs-plugin-packagekit.c b/plugins/packagekit/gs-plugin-packagekit.c
index 594541a7..8d7eb551 100644
--- a/plugins/packagekit/gs-plugin-packagekit.c
+++ b/plugins/packagekit/gs-plugin-packagekit.c
@@ -74,11 +74,7 @@ gs_plugin_add_sources_related (GsPlugin *plugin,
gboolean ret = TRUE;
g_autoptr(GsAppList) installed = gs_app_list_new ();
g_autoptr(PkResults) results = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
- ptask = as_profile_start_literal (gs_plugin_get_profile (plugin),
- "packagekit::add-sources-related");
- g_assert (ptask != NULL);
filter = pk_bitfield_from_enums (PK_FILTER_ENUM_INSTALLED,
PK_FILTER_ENUM_NEWEST,
PK_FILTER_ENUM_ARCH,
diff --git a/src/gs-application.c b/src/gs-application.c
index 45e22e33..707b0d9a 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -52,7 +52,6 @@
struct _GsApplication {
GtkApplication parent;
- gboolean enable_profile_mode;
GCancellable *cancellable;
GtkCssProvider *provider;
GsPluginLoader *plugin_loader;
@@ -137,8 +136,6 @@ gs_application_init (GsApplication *application)
"‘none’, ‘notify’, or ‘full’"), NULL },
{ "verbose", '\0', 0, G_OPTION_ARG_NONE, NULL,
_("Show verbose debugging information"), NULL },
- { "profile", 0, 0, G_OPTION_ARG_NONE, NULL,
- _("Show profiling information for the service"), NULL },
{ "autoupdate", 0, 0, G_OPTION_ARG_NONE, NULL,
_("Installs any pending updates in the background"), NULL },
{ "prefs", 0, 0, G_OPTION_ARG_NONE, NULL,
@@ -278,10 +275,6 @@ gs_application_initialize_ui (GsApplication *app)
/* setup UI */
app->shell = gs_shell_new ();
-
- /* this lets gs_shell_profile_dump() work from shells */
- gs_shell_set_profile_mode (app->shell, app->enable_profile_mode);
-
app->cancellable = g_cancellable_new ();
gs_shell_setup (app->shell, app->plugin_loader, app->cancellable);
@@ -371,21 +364,6 @@ about_activated (GSimpleAction *action,
G_CALLBACK (gtk_widget_destroy), dialog);
}
-static void
-profile_activated (GSimpleAction *action,
- GVariant *parameter,
- gpointer data)
-{
- GsApplication *app = GS_APPLICATION (data);
- app->enable_profile_mode = TRUE;
-
- /* dump right now as well */
- if (app->plugin_loader != NULL) {
- AsProfile *profile = gs_plugin_loader_get_profile (app->plugin_loader);
- as_profile_dump (profile);
- }
-}
-
static void
cancel_trigger_failed_cb (GObject *source, GAsyncResult *res, gpointer user_data)
{
@@ -821,7 +799,6 @@ install_resources_activated (GSimpleAction *action,
static GActionEntry actions[] = {
{ "about", about_activated, NULL, NULL, NULL },
{ "quit", quit_activated, NULL, NULL, NULL },
- { "profile", profile_activated, NULL, NULL, NULL },
{ "reboot-and-install", reboot_and_install, NULL, NULL, NULL },
{ "reboot", reboot_activated, NULL, NULL, NULL },
{ "shutdown", shutdown_activated, NULL, NULL, NULL },
@@ -1036,11 +1013,6 @@ gs_application_handle_local_options (GApplication *app, GVariantDict *options)
return 1;
}
- if (g_variant_dict_contains (options, "profile")) {
- g_action_group_activate_action (G_ACTION_GROUP (app),
- "profile",
- NULL);
- }
if (g_variant_dict_contains (options, "autoupdate")) {
g_action_group_activate_action (G_ACTION_GROUP (app),
"autoupdate",
diff --git a/src/gs-category-page.c b/src/gs-category-page.c
index e3811c9f..037f3275 100644
--- a/src/gs-category-page.c
+++ b/src/gs-category-page.c
@@ -183,9 +183,6 @@ gs_category_page_get_apps_cb (GObject *source_object,
"clicked",
G_CALLBACK (sort_button_clicked),
self);
-
- /* seems a good place */
- gs_shell_profile_dump (self->shell);
}
static gboolean
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index d091f172..82f70b6f 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1451,9 +1451,6 @@ gs_details_page_app_refine2_cb (GObject *source,
}
gs_details_page_refresh_size (self);
gs_details_page_refresh_reviews (self);
-
- /* seems a good place */
- gs_shell_profile_dump (self->shell);
}
static void
diff --git a/src/gs-extras-page.c b/src/gs-extras-page.c
index f856bf20..14b25b63 100644
--- a/src/gs-extras-page.c
+++ b/src/gs-extras-page.c
@@ -511,9 +511,6 @@ show_search_results (GsExtrasPage *self)
g_debug ("extras: got %u search results, showing", n_children);
gs_extras_page_set_state (self, GS_EXTRAS_PAGE_STATE_READY);
}
-
- /* seems a good place */
- gs_shell_profile_dump (self->shell);
}
static void
diff --git a/src/gs-installed-page.c b/src/gs-installed-page.c
index 6c5e8ef6..a411e574 100644
--- a/src/gs-installed-page.c
+++ b/src/gs-installed-page.c
@@ -248,9 +248,6 @@ gs_installed_page_get_installed_cb (GObject *source_object,
}
out:
gs_installed_page_pending_apps_changed_cb (plugin_loader, self);
-
- /* seems a good place */
- gs_shell_profile_dump (self->shell);
}
static void
diff --git a/src/gs-main.c b/src/gs-main.c
index bc8919b9..d5e4b504 100644
--- a/src/gs-main.c
+++ b/src/gs-main.c
@@ -39,8 +39,6 @@ main (int argc, char **argv)
g_autoptr(GDesktopAppInfo) appinfo = NULL;
g_autoptr(GsApplication) application = NULL;
g_autoptr(GsDebug) debug = gs_debug_new ();
- g_autoptr(AsProfile) profile = NULL;
- g_autoptr(AsProfileTask) ptask = NULL;
setlocale (LC_ALL, "");
@@ -48,11 +46,6 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- profile = as_profile_new ();
- as_profile_set_duration_min (profile, 1);
- ptask = as_profile_start_literal (profile, "GsMain");
- g_assert (ptask != NULL);
-
/* redirect logs */
application = gs_application_new ();
appinfo = g_desktop_app_info_new ("org.gnome.Software.desktop");
diff --git a/src/gs-moderate-page.c b/src/gs-moderate-page.c
index 532cabbc..aa3e283d 100644
--- a/src/gs-moderate-page.c
+++ b/src/gs-moderate-page.c
@@ -207,9 +207,6 @@ gs_moderate_page_get_unvoted_reviews_cb (GObject *source_object,
app = gs_app_list_index (list, i);
gs_moderate_page_add_app (self, app);
}
-
- /* seems a good place */
- gs_shell_profile_dump (self->shell);
}
static void
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index 088ae7ab..ded50c1c 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -154,9 +154,6 @@ gs_overview_page_decrement_action_cnt (GsOverviewPage *self)
priv->loading_popular = FALSE;
priv->loading_recent = FALSE;
priv->loading_popular_rotating = FALSE;
-
- /* seems a good place */
- gs_shell_profile_dump (priv->shell);
}
static void
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index 11c214f1..e5fe2405 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -184,9 +184,6 @@ gs_search_page_get_search_cb (GObject *source_object,
gs_shell_show_app (self->shell, a);
g_clear_pointer (&self->appid_to_show, g_free);
}
-
- /* seems a good place */
- gs_shell_profile_dump (self->shell);
}
static gboolean
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 0c80a27c..27f2018e 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -79,7 +79,6 @@ typedef struct
GPtrArray *modal_dialogs;
gulong search_changed_id;
gchar *events_info_uri;
- gboolean profile_mode;
gboolean in_mode_change;
GsPage *page_last;
} GsShellPrivate;
@@ -150,24 +149,6 @@ gs_shell_activate (GsShell *shell)
gtk_window_present (priv->main_window);
}
-void
-gs_shell_profile_dump (GsShell *shell)
-{
- GsShellPrivate *priv = gs_shell_get_instance_private (shell);
- if (priv->profile_mode) {
- AsProfile *profile = gs_plugin_loader_get_profile (priv->plugin_loader);
- as_profile_prune (profile, 5000);
- as_profile_dump (profile);
- }
-}
-
-void
-gs_shell_set_profile_mode (GsShell *shell, gboolean profile_mode)
-{
- GsShellPrivate *priv = gs_shell_get_instance_private (shell);
- priv->profile_mode = profile_mode;
-}
-
static void
gs_shell_set_header_start_widget (GsShell *shell, GtkWidget *widget)
{
diff --git a/src/gs-shell.h b/src/gs-shell.h
index 8817fe16..a08d46ee 100644
--- a/src/gs-shell.h
+++ b/src/gs-shell.h
@@ -63,7 +63,6 @@ typedef enum {
GsShell *gs_shell_new (void);
void gs_shell_activate (GsShell *shell);
-void gs_shell_profile_dump (GsShell *shell);
void gs_shell_refresh (GsShell *shell,
GCancellable *cancellable);
void gs_shell_change_mode (GsShell *shell,
@@ -72,8 +71,6 @@ void gs_shell_change_mode (GsShell *shell,
gboolean scroll_up);
void gs_shell_set_mode (GsShell *shell,
GsShellMode mode);
-void gs_shell_set_profile_mode (GsShell *shell,
- gboolean profile_mode);
void gs_shell_modal_dialog_present (GsShell *shell,
GtkDialog *dialog);
GsShellMode gs_shell_get_mode (GsShell *shell);
diff --git a/src/gs-updates-page.c b/src/gs-updates-page.c
index c936a8f3..0f419e8c 100644
--- a/src/gs-updates-page.c
+++ b/src/gs-updates-page.c
@@ -499,9 +499,6 @@ gs_updates_page_decrement_refresh_count (GsUpdatesPage *self)
/* all done */
gs_updates_page_set_state (self, GS_UPDATES_PAGE_STATE_IDLE);
-
- /* seems a good place */
- gs_shell_profile_dump (self->shell);
}
static void
diff --git a/src/gs-updates-section.c b/src/gs-updates-section.c
index 40ea5cc5..1228f2e1 100644
--- a/src/gs-updates-section.c
+++ b/src/gs-updates-section.c
@@ -274,9 +274,6 @@ _perform_update_cb (GsPluginLoader *plugin_loader, GAsyncResult *res, gpointer u
g_autoptr(GsUpdatesSectionUpdateHelper) helper = (GsUpdatesSectionUpdateHelper *) user_data;
GsUpdatesSection *self = helper->self;
- /* a good place */
- gs_shell_profile_dump (gs_page_get_shell (self->page));
-
/* get the results */
if (!gs_plugin_loader_job_action_finish (plugin_loader, res, &error)) {
g_warning ("failed to perform update: %s", error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]