~midori/midori/trunk

« back to all changes in this revision

Viewing changes to katze/katze-net.c

  • Committer: Tarmac
  • Author(s): Christian Dywan
  • Date: 2013-06-19 21:00:46 UTC
  • mfrom: (6216.1.10 midori.butcher)
  • Revision ID: tarmac-20130619210046-i3yv8cnkyjuafubb
Bump WebKit requirement to 1.8.3 and drop support for earlier versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    g_slice_free (KatzeNetPriv, priv);
78
78
}
79
79
 
80
 
#if !WEBKIT_CHECK_VERSION (1, 3, 13)
81
 
gchar*
82
 
katze_net_get_cached_path (KatzeNet*    net,
83
 
                           const gchar* uri,
84
 
                           const gchar* subfolder)
85
 
{
86
 
    gchar* checksum;
87
 
    gchar* extension;
88
 
    gchar* cached_filename;
89
 
    gchar* cached_path;
90
 
 
91
 
    if (uri == NULL)
92
 
        return NULL;
93
 
 
94
 
    checksum = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1);
95
 
    extension = g_strrstr (uri, ".");
96
 
    cached_filename = g_strdup_printf ("%s%s", checksum,
97
 
                                       extension ? extension : "");
98
 
    g_free (checksum);
99
 
 
100
 
    if (subfolder)
101
 
    {
102
 
        gchar* cache_path = g_build_filename (midori_paths_get_cache_dir_for_reading (), subfolder, NULL);
103
 
        katze_mkdir_with_parents (cache_path, 0700);
104
 
        cached_path = g_build_filename (cache_path, cached_filename, NULL);
105
 
        g_free (cache_path);
106
 
    }
107
 
    else
108
 
        cached_path = g_build_filename (midori_paths_get_cache_dir (), cached_filename, NULL);
109
 
 
110
 
    g_free (cached_filename);
111
 
    return cached_path;
112
 
}
113
 
#endif
114
 
 
115
80
static void
116
81
katze_net_got_body_cb (SoupMessage*  msg,
117
82
                       KatzeNetPriv* priv);