[gnome-online-accounts] flickr: Remove unused is_deny_node implementation



commit 987b2dafdcb76065d1fede66471ea366506b1670
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Nov 20 17:03:09 2017 +0100

    flickr: Remove unused is_deny_node implementation
    
    Historically, Flickr has never returned an error code when the user
    denied access to an account. That meant trying to parse the DOM and
    detect the click on the appropriate UI element. Except, the "click"
    event handler was never invoked. This might have been a WebKit bug, but
    it was never diagnosed. See commit 947b7729f9d1202b.
    
    This has gotten worse recently because attempting to inspect the UI
    element breaks the WebKit inspector. There is now a workaround in place
    based on having the same callback URI as the one listed as GNOME's
    website in Flickr's App Garden. See commit 7f1cb7e1c47d9005.
    
    Long story short, the is_deny_node code has never been used. It is time
    to remove it.

 src/goabackend/goaflickrprovider.c |   23 -----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)
---
diff --git a/src/goabackend/goaflickrprovider.c b/src/goabackend/goaflickrprovider.c
index 7534156..702ed1e 100644
--- a/src/goabackend/goaflickrprovider.c
+++ b/src/goabackend/goaflickrprovider.c
@@ -243,28 +243,6 @@ get_identity_sync (GoaOAuthProvider  *oauth_provider,
 /* ---------------------------------------------------------------------------------------------------- */
 
 static gboolean
-is_deny_node (GoaOAuthProvider *oauth_provider, WebKitDOMNode *node)
-{
-  WebKitDOMElement *element;
-  gboolean ret = FALSE;
-  gchar *id = NULL;
-
-  if (!WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT (node))
-    goto out;
-
-  element = WEBKIT_DOM_ELEMENT (node);
-  id = webkit_dom_element_get_id (element);
-  if (g_strcmp0 (id, "auth-disallow") != 0)
-    goto out;
-
-  ret = TRUE;
-
- out:
-  g_free (id);
-  return ret;
-}
-
-static gboolean
 is_identity_node (GoaOAuthProvider *oauth_provider, WebKitDOMHTMLInputElement *element)
 {
   /* Flickr does not provide a way to query the string used by the
@@ -374,7 +352,6 @@ goa_flickr_provider_class_init (GoaFlickrProviderClass *klass)
 
   oauth_class = GOA_OAUTH_PROVIDER_CLASS (klass);
   oauth_class->get_identity_sync        = get_identity_sync;
-  oauth_class->is_deny_node             = is_deny_node;
   oauth_class->is_identity_node         = is_identity_node;
   oauth_class->get_consumer_key         = get_consumer_key;
   oauth_class->get_consumer_secret      = get_consumer_secret;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]