aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-05-08 02:27:05 +0800
committerXan Lopez <xan@igalia.com>2012-05-08 02:28:04 +0800
commit8c65eb746306499465f23057dbd4dea484c953aa (patch)
tree88753f699405faef7194fd9ab1aa8de9d08cccf7 /lib
parent60a504dd7ad9f4b621181994c672344fd694fbde (diff)
downloadgsoc2013-epiphany-8c65eb746306499465f23057dbd4dea484c953aa.tar
gsoc2013-epiphany-8c65eb746306499465f23057dbd4dea484c953aa.tar.gz
gsoc2013-epiphany-8c65eb746306499465f23057dbd4dea484c953aa.tar.bz2
gsoc2013-epiphany-8c65eb746306499465f23057dbd4dea484c953aa.tar.lz
gsoc2013-epiphany-8c65eb746306499465f23057dbd4dea484c953aa.tar.xz
gsoc2013-epiphany-8c65eb746306499465f23057dbd4dea484c953aa.tar.zst
gsoc2013-epiphany-8c65eb746306499465f23057dbd4dea484c953aa.zip
ephy-profile-utils: split profile migration from EphyShell
Call it directly from main, since we want it to happen before the file helpers initialization.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-profile-utils.c17
-rw-r--r--lib/ephy-profile-utils.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c
index fe66b3b6a..a9edd7241 100644
--- a/lib/ephy-profile-utils.c
+++ b/lib/ephy-profile-utils.c
@@ -186,3 +186,20 @@ _ephy_profile_utils_query_form_auth_data (const char *uri,
soup_uri_free (key);
g_free (key_str);
}
+
+void
+ephy_profile_utils_do_migration ()
+{
+ GError *error = NULL;
+ char *argv[1] = { "ephy-profile-migrator" };
+ char *envp[1] = { "EPHY_LOG_MODULES=ephy-profile" };
+
+ g_spawn_sync (NULL, argv, envp, G_SPAWN_SEARCH_PATH,
+ NULL, NULL, NULL, NULL,
+ NULL, &error);
+
+ if (error) {
+ LOG ("Failed to run migrator: %s", error->message);
+ g_error_free (error);
+ }
+}
diff --git a/lib/ephy-profile-utils.h b/lib/ephy-profile-utils.h
index 57837c64a..353a5605b 100644
--- a/lib/ephy-profile-utils.h
+++ b/lib/ephy-profile-utils.h
@@ -32,6 +32,8 @@ int ephy_profile_utils_get_migration_version (void);
gboolean ephy_profile_utils_set_migration_version (int version);
+void ephy_profile_utils_do_migration (void);
+
void _ephy_profile_utils_store_form_auth_data (const char *uri,
const char *form_username,
const char *form_password,