GNOME Bugzilla – Bug 774031
API to clear cached credentials from SoupAuthManager
Last modified: 2016-11-15 11:42:20 UTC
In WebKit, we need to clear the cached credentials. It's mainly used by tests to ensure that auth tests are independent to each other. See https://bugs.webkit.org/show_bug.cgi?id=158919
Created attachment 339222 [details] [review] Add API to clear cached credentials from SoupAuthManager
Review of attachment 339222 [details] [review]: lgtm. Dan has the final word though ::: libsoup/soup-auth-manager.c @@ -743,0 +743,13 @@ +/** + * soup_auth_manager_clear_cached_credentials: + * @manager: a #SoupAuthManager ... 10 more ... Nit: too many blank lines here. Also I'd prefer the g_return_if_fail to be the first thing in the body of the function as it checks the function preconditions.
(In reply to Sergio Villar from comment #2) > Review of attachment 339222 [details] [review] [review]: > > lgtm. Dan has the final word though > > ::: libsoup/soup-auth-manager.c > @@ -743,0 +743,13 @@ > +/** > + * soup_auth_manager_clear_cached_credentials: > + * @manager: a #SoupAuthManager > ... 10 more ... > > Nit: too many blank lines here. Also I'd prefer the g_return_if_fail to be > the first thing in the body of the function as it checks the function > preconditions. Oh, right, there's an extra line there. g_return is indeed the first line of the body after the declaration variables block.
Comment on attachment 339222 [details] [review] Add API to clear cached credentials from SoupAuthManager >+ session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); Use SOUP_TYPE_SESSION for new tests if you're not explicitly testing something related to the deprecated subclasses. Other than that (and the extra blank line Sergio pointed out) looks good.
Comment on attachment 339222 [details] [review] Add API to clear cached credentials from SoupAuthManager Pushed, thanks for the review.