From: Jihoon Chung Date: Thu, 17 Oct 2013 03:00:05 +0000 (+0900) Subject: Clean-up GlobalDAO (SecureByDefault) X-Git-Tag: 2.2.1_release~3^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49e35a9f2f44a2035af6f7d12e4d2bfe1e98f444;p=framework%2Fweb%2Fwrt-commons.git Clean-up GlobalDAO (SecureByDefault) [Issue#] LINUXWRT-1028 [Problem] GlobalDAO has unnecessary API. [Cause] N/A [Solution] Remove "SecureByDefault" API - "SecureByDefault" setting uses for WAC(SP-2067). As current Tizen WRT haven't consider supporting WAC, remove code regarding "SecureByDefault". - SP-2067 The WRT MUST provide a user-configurable 'secure-by-default' preference to enable installation of widgets that are not distributor-signed, with the default value set to "No". If the user selects "Yes", they MUST be shown a warning explaining the potential dangers of installing unsigned widgets. [Verification] Checking API usage - No usage [SCMRequest] N/A Change-Id: Ic444ef99d7c09b7d2d5159c7e95b4465dad00012 --- diff --git a/modules/widget_dao/dao/global_dao.cpp b/modules/widget_dao/dao/global_dao.cpp index d32ca71..ff82212 100644 --- a/modules/widget_dao/dao/global_dao.cpp +++ b/modules/widget_dao/dao/global_dao.cpp @@ -29,24 +29,6 @@ #include namespace WrtDB { -void GlobalDAO::SetSecureByDefault(bool secure) -{ - //If secure == true -> widget does not need to be signed - Try { - using namespace DPL::DB::ORM; - using namespace DPL::DB::ORM::wrt; - GlobalProperties::Row row; - row.Set_secure_by_default(secure); - WRT_DB_UPDATE(update, GlobalProperties, &WrtDatabase::interface()) - update->Values(row); - update->Execute(); - } - Catch(DPL::DB::SqlConnection::Exception::Base) { - ReThrowMsg(GlobalDAO::Exception::DatabaseError, - "Failed to update secureByDefault"); - } -} - void GlobalDAO::SetRoamingDataUsage(GlobalDAO::NetworkAccessMode newMode) { LogDebug("updating roaming network data usage to:" << newMode); diff --git a/modules/widget_dao/dao/global_dao_read_only.cpp b/modules/widget_dao/dao/global_dao_read_only.cpp index 786e749..cb6c9fb 100644 --- a/modules/widget_dao/dao/global_dao_read_only.cpp +++ b/modules/widget_dao/dao/global_dao_read_only.cpp @@ -32,15 +32,6 @@ #include namespace WrtDB { - -bool GlobalDAOReadOnly::GetSecureByDefault() -{ - using namespace DPL::DB::ORM; - using namespace DPL::DB::ORM::wrt; - WRT_DB_SELECT(select, GlobalProperties, &WrtDatabase::interface()) - return select->GetSingleValue(); -} - GlobalDAOReadOnly::NetworkAccessMode GlobalDAOReadOnly::GetRoamingDataUsage() { LogDebug("Getting roaming network data usage"); diff --git a/modules/widget_dao/include/dpl/wrt-dao-ro/global_dao_read_only.h b/modules/widget_dao/include/dpl/wrt-dao-ro/global_dao_read_only.h index 246ee96..eee3870 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-ro/global_dao_read_only.h +++ b/modules/widget_dao/include/dpl/wrt-dao-ro/global_dao_read_only.h @@ -52,7 +52,6 @@ class GlobalDAOReadOnly public: - static bool GetSecureByDefault() DPL_DEPRECATED; static bool GetCookieSharingMode() DPL_DEPRECATED; diff --git a/modules/widget_dao/include/dpl/wrt-dao-rw/global_dao.h b/modules/widget_dao/include/dpl/wrt-dao-rw/global_dao.h index ba5e0a1..fb0923e 100644 --- a/modules/widget_dao/include/dpl/wrt-dao-rw/global_dao.h +++ b/modules/widget_dao/include/dpl/wrt-dao-rw/global_dao.h @@ -30,8 +30,6 @@ namespace WrtDB { class GlobalDAO : public GlobalDAOReadOnly { public: - static void SetSecureByDefault(bool secureByDefault) DPL_DEPRECATED; - /** * This method changes network access mode while roaming is enabled. * diff --git a/modules/widget_dao/orm/wrt_db b/modules/widget_dao/orm/wrt_db index 53a74d0..e76a48a 100644 --- a/modules/widget_dao/orm/wrt_db +++ b/modules/widget_dao/orm/wrt_db @@ -2,9 +2,7 @@ SQL( PRAGMA foreign_keys = ON; BEGIN TRANSACTION; ) -/*TODO: secure_by_default should be 0 by default*/ CREATE_TABLE(GlobalProperties) - COLUMN_NOT_NULL(secure_by_default, INT, DEFAULT 1) COLUMN_NOT_NULL(roaming_data_usage, TINYINT, DEFAULT 1) COLUMN_NOT_NULL(cookie_sharing_mode, INT, DEFAULT 0) CREATE_TABLE_END()