Remove warning from |NavigationPolicyHandlerEfl::DownloadNavigation|
authorGrzegorz Ludwikowski <g.ludwikowsk@samsung.com>
Wed, 27 Jan 2016 10:16:22 +0000 (11:16 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 07:55:23 +0000 (07:55 +0000)
|NavigationPolicyHandlerEfl::DownloadNavigation| contains '#pragma
message', which results in a warning during compilation. The message
warns about code commented out because of change in s-chromium around
M37.

The code was commented out so long ago, that 'git blame' wouldn't point
to actual change. Despite this, no bug was filed for broken
functionallity. This suggests that the code wasn't used anyway.

The code is called through ewk_policy_decision_download, when used on
Ewk_Policy_Decision object of policy type POLICY_NAVIGATION (recevied
from "policy,navigation,decide" callback). Assuming that we call
ewk_policy_decision_download only for Ewk_Policy_Decision objects which
return EWK_POLICY_DECISION_DOWNLOAD decision type from
ewk_policy_decision_type_get, the code isn't used, because objects with
this decision type don't appear in the callback.

Both browser and crosswalk do not use ewk_policy_decision_download API
at the moment.

This change removes the compile time warning, and adds
'NOTIMPLEMENTED()' macro instead, so we will see at runtime that not
implemented code path is used.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=15638

Reviewed by: sns.park

Change-Id: Ie07171f41c8c45ba70699ed42b8956b5de0deece
Signed-off-by: Grzegorz Ludwikowski <g.ludwikowsk@samsung.com>
tizen_src/ewk/efl_integration/browser/navigation_policy_handler_efl.cc

index 7dde2b8..ded3e67 100644 (file)
@@ -24,10 +24,13 @@ NavigationPolicyHandlerEfl::~NavigationPolicyHandlerEfl() {
 void NavigationPolicyHandlerEfl::DownloadNavigation() {
   // indicate that we handle it
   if (SetDecision(Handled)) {
-#pragma message "[M37] RequestOpenURL was moved to WebContentsImpl, how to access it from here?"
-    //WindowOpenDisposition disposition = SAVE_TO_DISK;
-    //rvh_->GetDelegate()->RequestOpenURL(rvh_, params_.url, params_.referrer,
-    //    disposition, params_.frame_id, params_.is_redirect, false);
+    NOTIMPLEMENTED() << "[M37] RequestOpenURL was moved to WebContentsImpl, "
+                     << "how to access it from here?";
+#if !defined(EWK_BRINGUP)
+    WindowOpenDisposition disposition = SAVE_TO_DISK;
+    rvh_->GetDelegate()->RequestOpenURL(rvh_, params_.url, params_.referrer,
+      disposition, params_.frame_id, params_.is_redirect, false);
+#endif
   }
 }