From: Soyoung Kim Date: Thu, 4 Apr 2013 05:25:13 +0000 (+0900) Subject: Removed unused code about wac signed. X-Git-Tag: 2.2.1_release~9^2~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cd824f6ddc5bdfeeae947438bd8e7b64c0a8217c;p=framework%2Fweb%2Fwrt-commons.git Removed unused code about wac signed. [Issue#] N/A [Problem] N/A [Cause] N/A [Solution] remove wac signed logic. [SCMRequest] N/A Change-Id: I3805944527c3e5e7be229f6bd07660928027449e --- diff --git a/modules/widget_dao/dao/widget_dao.cpp b/modules/widget_dao/dao/widget_dao.cpp index 2e79ea0..87d39bd 100644 --- a/modules/widget_dao/dao/widget_dao.cpp +++ b/modules/widget_dao/dao/widget_dao.cpp @@ -365,7 +365,6 @@ void WidgetDAO::registerWidgetExtendedInfo(DbWidgetHandle widgetHandle, row.Set_app_id(widgetHandle); // row.Set_share_href (DPL::FromUTF8String(regInfo.shareHref)); row.Set_signature_type(regInfo.signatureType); - row.Set_test_widget(regInfo.isTestWidget); row.Set_install_time(regInfo.installedTime); row.Set_splash_img_src(regInfo.configInfo.splashImgSrc); row.Set_background_page(regInfo.configInfo.backgroundPage); @@ -407,7 +406,6 @@ DbWidgetHandle WidgetDAO::registerWidgetInfo( row.Set_base_folder(DPL::FromUTF8String(regInfo.baseFolder)); row.Set_webkit_plugins_required(widgetConfigurationInfo.flashNeeded); row.Set_recognized(wacSecurity.isRecognized()); - row.Set_wac_signed(wacSecurity.isWacSigned()); row.Set_distributor_signed(wacSecurity.isDistributorSigned()); row.Set_tizen_appid(tzAppId); row.Set_tizen_pkgid(regInfo.tzPkgid); diff --git a/modules/widget_dao/dao/widget_dao_read_only.cpp b/modules/widget_dao/dao/widget_dao_read_only.cpp index 3890603..d7941c5 100644 --- a/modules/widget_dao/dao/widget_dao_read_only.cpp +++ b/modules/widget_dao/dao/widget_dao_read_only.cpp @@ -629,16 +629,6 @@ bool WidgetDAOReadOnly::isRecognized() const return static_cast(*result); } -bool WidgetDAOReadOnly::isWacSigned() const -{ - WidgetInfoRow row = getWidgetInfoRow(m_widgetHandle); - DPL::OptionalInt result = row.Get_wac_signed(); - if (result.IsNull()) { - return false; - } - return static_cast(*result); -} - bool WidgetDAOReadOnly::isDistributorSigned() const { WidgetInfoRow row = getWidgetInfoRow(m_widgetHandle); @@ -656,26 +646,6 @@ bool WidgetDAOReadOnly::isTrusted() const return isDistributorSigned(); } -bool WidgetDAOReadOnly::isTestWidget() const -{ - Try { - WRT_DB_SELECT(select, WidgetExtendedInfo, &WrtDatabase::interface()) - select->Where(Equals(m_widgetHandle)); - - WidgetExtendedInfo::Select::RowList rows = select->GetRowList(); - if (rows.empty()) { - ThrowMsg(WidgetDAOReadOnly::Exception::WidgetNotExist, - "Cannot find widget. Handle: " << m_widgetHandle); - } - - return static_cast(rows.front().Get_test_widget()); - } - Catch(DPL::DB::SqlConnection::Exception::Base){ - ReThrowMsg(WidgetDAOReadOnly::Exception::DatabaseError, - "Failed to check IsTestWidget"); - } -} - DPL::OptionalString WidgetDAOReadOnly::getCspPolicy() const { WidgetInfoRow row = getWidgetInfoRow(m_widgetHandle); @@ -1270,4 +1240,4 @@ WidgetSecurityModelVersion WidgetDAOReadOnly::getSecurityModelVersion() const #undef SQL_CONNECTION_EXCEPTION_HANDLER_BEGIN #undef SQL_CONNECTION_EXCEPTION_HANDLER_END #undef CHECK_WIDGET_EXISTENCE -} // namespace WrtDB \ No newline at end of file +} // namespace WrtDB diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h index f265281..d502b55 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/widget_dao_read_only.h @@ -157,7 +157,6 @@ struct WidgetRegisterInfo WidgetRegisterInfo() : webAppType(APP_TYPE_UNKNOWN), signatureType(SIGNATURE_TYPE_UNIDENTIFIED), - isTestWidget(0), configInfo(), packagingType(PKG_TYPE_UNKNOWN) {} @@ -169,7 +168,6 @@ struct WidgetRegisterInfo std::string shareHref; std::string baseFolder; WidgetSignatureType signatureType; - int isTestWidget; ConfigParserData configInfo; LocalizationData localizationData; @@ -195,8 +193,6 @@ class IWacSecurity virtual bool isDistributorSigned() const = 0; - virtual bool isWacSigned() const = 0; - virtual void getCertificateChainList(CertificateChainList& list, CertificateSource source) const = 0; }; @@ -456,12 +452,6 @@ class WidgetDAOReadOnly * WAC 2.0 extension * @return */ - bool isWacSigned() const; - - /** - * WAC 2.0 extension - * @return - */ bool isDistributorSigned() const; /** @@ -471,12 +461,6 @@ class WidgetDAOReadOnly bool isTrusted() const; /** - * WAC 2.0 extension - * @return is WAC test widget - */ - bool isTestWidget() const; - - /** * This method returns window mode of widget. * * @return window modes of widget diff --git a/tests/dao/TestCases_WidgetDAO.cpp b/tests/dao/TestCases_WidgetDAO.cpp index 204bc3e..b675d6a 100644 --- a/tests/dao/TestCases_WidgetDAO.cpp +++ b/tests/dao/TestCases_WidgetDAO.cpp @@ -41,8 +41,7 @@ class WacSecurityMock : public WrtDB::IWacSecurity public: WacSecurityMock() : mRecognized(false), - mDistributorSigned(false), - mWacSigned(false) + mDistributorSigned(false) {} virtual const WidgetCertificateDataList& getCertificateList() const @@ -58,10 +57,6 @@ class WacSecurityMock : public WrtDB::IWacSecurity { return mDistributorSigned; } - virtual bool isWacSigned() const - { - return mWacSigned; - } virtual void getCertificateChainList(CertificateChainList& /*lst*/) const {} virtual void getCertificateChainList(CertificateChainList& /*lst*/, CertificateSource /*source*/) const {} @@ -79,10 +74,6 @@ class WacSecurityMock : public WrtDB::IWacSecurity { mDistributorSigned = distributorSigned; } - void setWacSigned(bool wacSigned) - { - mWacSigned = wacSigned; - } private: WrtDB::WidgetCertificateDataList mList; @@ -91,7 +82,6 @@ class WacSecurityMock : public WrtDB::IWacSecurity // known distribuor bool mDistributorSigned; // distributor is wac - bool mWacSigned; }; TizenAppId _registerWidget(const WidgetRegisterInfo& regInfo, @@ -1086,11 +1076,9 @@ RUNNER_TEST(widget_dao_test_wac_security) RUNNER_ASSERT(!dao.isDistributorSigned()); RUNNER_ASSERT(!dao.isRecognized()); - RUNNER_ASSERT(!dao.isWacSigned()); } sec.setDistributorSigned(true); sec.setRecognized(true); - sec.setWacSigned(true); { // register widget TizenAppId tizenAppId = REGISTER_WIDGET(regInfo, sec); @@ -1098,7 +1086,6 @@ RUNNER_TEST(widget_dao_test_wac_security) RUNNER_ASSERT(dao.isDistributorSigned()); RUNNER_ASSERT(dao.isRecognized()); - RUNNER_ASSERT(dao.isWacSigned()); } } @@ -1142,4 +1129,4 @@ RUNNER_TEST(widget_dao_test_register_csp_empty) RUNNER_ASSERT_MSG(dao.getCspPolicy().IsNull(), "Policy is not null"); } } -#undef RUNNER_ASSERT_WHAT_EQUALS \ No newline at end of file +#undef RUNNER_ASSERT_WHAT_EQUALS