diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2012-09-03 22:41:25 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-09-04 02:37:15 +0800 |
commit | 95eb18e603accc3dd23c32c9dfbdf79b1723d391 (patch) | |
tree | faad294b055bdff5766a16aeda58a0fda228a688 | |
parent | 1afb0171665b4234ceb57f073a0834b6dc3e005d (diff) | |
download | gsoc2013-epiphany-95eb18e603accc3dd23c32c9dfbdf79b1723d391.tar.gz gsoc2013-epiphany-95eb18e603accc3dd23c32c9dfbdf79b1723d391.tar.zst gsoc2013-epiphany-95eb18e603accc3dd23c32c9dfbdf79b1723d391.zip |
ephy-profile-utils: add a profile_dir parameter to ephy_profile_utils_do_migration()
This is passed further on to the migrator process. Right now this is
unused.
https://bugzilla.gnome.org/show_bug.cgi?id=681679
-rw-r--r-- | lib/ephy-profile-utils.c | 7 | ||||
-rw-r--r-- | lib/ephy-profile-utils.h | 2 | ||||
-rw-r--r-- | src/ephy-main.c | 2 | ||||
-rw-r--r-- | tests/ephy-migration-test.c | 4 |
4 files changed, 10 insertions, 5 deletions
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c index 58abfff61..51dd7e1b8 100644 --- a/lib/ephy-profile-utils.c +++ b/lib/ephy-profile-utils.c @@ -200,7 +200,7 @@ _ephy_profile_utils_query_form_auth_data (const char *uri, #define EPHY_PROFILE_MIGRATOR "ephy-profile-migrator" gboolean -ephy_profile_utils_do_migration (int test_to_run, gboolean debug) +ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, gboolean debug) { gboolean ret; GError *error = NULL; @@ -219,6 +219,11 @@ ephy_profile_utils_do_migration (int test_to_run, gboolean debug) argv[i++] = index; } + if (profile_directory != NULL) { + argv[i++] = "-p"; + argv[i++] = (char *)profile_directory; + } + argv[i++] = NULL; if (debug) diff --git a/lib/ephy-profile-utils.h b/lib/ephy-profile-utils.h index 8f50922c6..5a9b84433 100644 --- a/lib/ephy-profile-utils.h +++ b/lib/ephy-profile-utils.h @@ -32,7 +32,7 @@ int ephy_profile_utils_get_migration_version (void); gboolean ephy_profile_utils_set_migration_version (int version); -gboolean ephy_profile_utils_do_migration (int test_to_run, gboolean debug); +gboolean ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run, gboolean debug); void _ephy_profile_utils_store_form_auth_data (const char *uri, const char *form_username, diff --git a/src/ephy-main.c b/src/ephy-main.c index 60a0e616f..4ea621afe 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -392,7 +392,7 @@ main (int argc, /* TODO: we want to migrate each WebApp profile too. */ if (!private_instance && !application_mode) { /* If the migration fails we don't really want to continue. */ - if (!ephy_profile_utils_do_migration (-1, FALSE)) { + if (!ephy_profile_utils_do_migration ((const char *)profile_directory, -1, FALSE)) { g_print ("Failed to run the migrator process, Web will now abort."); exit (1); } diff --git a/tests/ephy-migration-test.c b/tests/ephy-migration-test.c index 3051f2d59..983e8ce48 100644 --- a/tests/ephy-migration-test.c +++ b/tests/ephy-migration-test.c @@ -36,7 +36,7 @@ test_do_migration_simple (void) { gboolean ret; - ret = ephy_profile_utils_do_migration (-1, TRUE); + ret = ephy_profile_utils_do_migration (NULL, -1, TRUE); g_assert (ret); } @@ -45,7 +45,7 @@ test_do_migration_invalid (void) { gboolean ret; - ret = ephy_profile_utils_do_migration (EPHY_PROFILE_MIGRATION_VERSION + 1, TRUE); + ret = ephy_profile_utils_do_migration (NULL, EPHY_PROFILE_MIGRATION_VERSION + 1, TRUE); g_assert (ret == FALSE); } |