RESOLVED FIXED 126813
[SOUP] Add SoupNetworkSession class to wrap a SoupSession
https://bugs.webkit.org/show_bug.cgi?id=126813
Summary [SOUP] Add SoupNetworkSession class to wrap a SoupSession
Carlos Garcia Campos
Reported 2014-01-11 06:14:52 PST
It would simplify the code that uses SoupSession directly and would avoid duplicated code.
Attachments
Patch (56.60 KB, patch)
2014-01-11 06:45 PST, Carlos Garcia Campos
eflews.bot: commit-queue-
Try to fix EFL build (56.61 KB, patch)
2014-01-11 06:52 PST, Carlos Garcia Campos
eflews.bot: commit-queue-
Try to fix EFL build (56.61 KB, patch)
2014-01-11 07:02 PST, Carlos Garcia Campos
eflews.bot: commit-queue-
Try to fix EFL build (56.94 KB, patch)
2014-01-11 07:12 PST, Carlos Garcia Campos
gustavo: review+
Carlos Garcia Campos
Comment 1 2014-01-11 06:45:08 PST
EFL EWS Bot
Comment 2 2014-01-11 06:48:32 PST
EFL EWS Bot
Comment 3 2014-01-11 06:51:28 PST
Carlos Garcia Campos
Comment 4 2014-01-11 06:52:36 PST
Created attachment 220930 [details] Try to fix EFL build
EFL EWS Bot
Comment 5 2014-01-11 06:57:55 PST
Carlos Garcia Campos
Comment 6 2014-01-11 07:02:09 PST
Created attachment 220932 [details] Try to fix EFL build
EFL EWS Bot
Comment 7 2014-01-11 07:06:52 PST
Carlos Garcia Campos
Comment 8 2014-01-11 07:12:08 PST
Created attachment 220933 [details] Try to fix EFL build
Gustavo Noronha (kov)
Comment 9 2014-01-12 07:59:11 PST
Comment on attachment 220933 [details] Try to fix EFL build Why not use NetworkStorageSessionSoup as the wrapper class? It feels like adding a new class just adds churn in this case, although I may be missing some life-cycle related issues?
Gustavo Noronha (kov)
Comment 10 2014-01-12 08:07:28 PST
Comment on attachment 220933 [details] Try to fix EFL build View in context: https://bugs.webkit.org/attachment.cgi?id=220933&action=review LGTM! Just wondering about the new class being required or if using the NetworkStorage would do it. > Source/WebKit/efl/ewk/ewk_cookies.cpp:47 > + g_object_unref(cookieJar); Any reason not use GRefPtr for this?
Carlos Garcia Campos
Comment 11 2014-01-12 08:46:24 PST
(In reply to comment #10) > (From update of attachment 220933 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=220933&action=review > > LGTM! Just wondering about the new class being required or if using the NetworkStorage would do it. Well, NetworkStorage is a cross-platform class in the end, this is just to wrap a SoupSession, with very specific soup code. > > Source/WebKit/efl/ewk/ewk_cookies.cpp:47 > > + g_object_unref(cookieJar); > > Any reason not use GRefPtr for this? I noticed that GRefPtr was not used anywhere in Source/WebKit/efl/ewk, and I thought it could be for some reason, so I used the explicit unref.
Gustavo Noronha (kov)
Comment 12 2014-01-13 09:11:41 PST
(In reply to comment #11) > > LGTM! Just wondering about the new class being required or if using the NetworkStorage would do it. > > Well, NetworkStorage is a cross-platform class in the end, this is just to wrap a SoupSession, with very specific soup code. But it already has a soup-specific implementation, and soup-specific assessors, so we could use it, do you think there would be a downside? > > > Source/WebKit/efl/ewk/ewk_cookies.cpp:47 > > > + g_object_unref(cookieJar); > > > > Any reason not use GRefPtr for this? > > I noticed that GRefPtr was not used anywhere in Source/WebKit/efl/ewk, and I thought it could be for some reason, so I used the explicit unref. Makes sense.
Gustavo Noronha (kov)
Comment 13 2014-01-13 09:47:31 PST
Comment on attachment 220933 [details] Try to fix EFL build OK, after our quick chat on IRC I think you're right about the NetworkStorageSession not being conceptually analog to the session, using NetworkingContext would make it more conceptually correct but it's per-frame, so I think your idea of a separate class makes sense. Thanks!
Carlos Garcia Campos
Comment 14 2014-01-13 10:21:46 PST
Note You need to log in before you can comment on or make changes to this bug.