Bug TT-71 Remove private ewk_auth_* and ewk_ceritifcate_* API calls 22/44022/6
authork.lis2 <k.lis2@samsung.com>
Fri, 31 Jul 2015 09:29:59 +0000 (11:29 +0200)
committerk.lis2 <k.lis2@samsung.com>
Fri, 31 Jul 2015 10:01:34 +0000 (12:01 +0200)
    [Issue#]   https://bugs.tizen.org/jira/browse/TT-71
    [Problem]  Private api calls within browser code
    [Cause]    -
    [Solution] Remove auth and certificate api calls from browser code.
    [Verify]   Auth and Certificate functionality is not expected
               to work after this change.

Change-Id: I60167ea847bc535e292681542b5d9af04c5d3817
Signed-off-by: k.lis2 <k.lis2@samsung.com>
services/SimpleUI/SimpleUI.cpp
services/WebKitEngineService/WebView.cpp

index e61b5787e7d31c0f58c49fcf802829803bb59bb1..b3d5929d3469bb565d2e3337f56048e841758032 100644 (file)
@@ -900,7 +900,6 @@ void SimpleUI::handleConfirmationRequest(basic_webengine::WebConfirmationPtr web
         popup->show();
         break;
         }
-
         case basic_webengine::WebConfirmation::ConfirmationType::CertificateConfirmation:
         case basic_webengine::WebConfirmation::ConfirmationType::Geolocation:
         case basic_webengine::WebConfirmation::ConfirmationType::UserMedia:
index 2a5f237f5e6a3e43e03cb2f82d2d7d9e60fe97c7..16daf9b6c4a08c7a0027d6b701302c0e897b103a 100644 (file)
@@ -280,7 +280,6 @@ bool WebView::isLoadError() const
     return m_loadError;
 }
 
-
 void WebView::setPrivateMode(bool state)
 {
     BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
@@ -391,22 +390,19 @@ void WebView::confirmationResult(WebConfirmationPtr confirmation)
         }
 
         // set certificate confirmation
-        ewk_certificate_policy_decision_allowed_set(request, result);
+        BROWSER_LOGE("NOT IMPLEMENTED: Certificate Confirmation handling!");
 
         // remove from map
         m_confirmationCertificatenMap.erase(cert);
         break;
     }
-        case WebConfirmation::ConfirmationType::Authentication: {
+    case WebConfirmation::ConfirmationType::Authentication: {
         AuthenticationConfirmationPtr auth = std::dynamic_pointer_cast<AuthenticationConfirmation, WebConfirmation>(confirmation);
         Ewk_Auth_Request *request = m_confirmationAuthenticationMap[auth];
         if (auth->getResult() == WebConfirmation::ConfirmationResult::Confirmed) {
-            // set auth challange credential
-            ewk_auth_request_authenticate(request, const_cast<char*>(auth->getLogin().c_str()), const_cast<char*>(auth->getPassword().c_str()));
-//            ewk_object_unref(request);
+            BROWSER_LOGE("NOT IMPLEMENTED: Autenthication Request Confirmation handling!");
         } else if (auth->getResult() == WebConfirmation::ConfirmationResult::Rejected) {
-            ewk_auth_request_cancel(request);
-//            ewk_object_unref(request);
+            BROWSER_LOGE("NOT IMPLEMENTED: Autenthication Request Rejection handling!");
         } else {
             BROWSER_LOGE("Wrong ConfirmationResult");
             break;
@@ -733,20 +729,14 @@ void WebView::__authenticationRequest(void * data, Evas_Object * /* obj */, void
     Ewk_Auth_Request *request = reinterpret_cast<Ewk_Auth_Request *>(event_info);
     EINA_SAFETY_ON_NULL_RETURN(request);
 
-    std::string realm = tizen_browser::tools::fromChar(ewk_auth_request_realm_get(request));
-//    std::string url = tizen_browser::tools::fromChar(ewk_auth_request_host_get(request));
-
-//    ewk_object_ref(request);
-
-    ///\todo add translations
-//    std::string message = (boost::format("A username and password are being requested by %1%. The site says: \"%2%\"") % url % realm).str();
+    std::string url = self->getURI();
+    std::string message = (boost::format("A username and password are being requested by %1%.") % url).str();
 
-//    AuthenticationConfirmationPtr c = std::make_shared<AuthenticationConfirmation>(self->m_tabId, url, message);
+    AuthenticationConfirmationPtr c = std::make_shared<AuthenticationConfirmation>(self->m_tabId, url, message);
 
-    // store
-//    self->m_confirmationAuthenticationMap[c] = request;
+    self->m_confirmationAuthenticationMap[c] = request;
 
-//    self->cofirmationRequest(c);
+    self->cofirmationRequest(c);
 #endif
 }
 
@@ -761,9 +751,9 @@ void WebView::__requestCertificationConfirm(void * data , Evas_Object * /* obj *
         return;
 
     // suspend webview
-    ewk_certificate_policy_decision_suspend(request);
+    ewk_view_suspend(self->m_ewkView);
 
-    std::string url = tizen_browser::tools::fromChar(ewk_certificate_policy_decision_url_get(request));
+    std::string url = self->getURI();
 
     ///\todo add translations
     std::string message = (boost::format("There are problems with the security certificate for this site.<br>%1%") % url).str();
@@ -889,3 +879,4 @@ void WebView::searchOnWebsite(const std::string & searchString, int flags)
 } /* namespace webkitengine_service */
 } /* end of basic_webengine */
 } /* end of tizen_browser */
+