From 16f09efa2549f812eb758f159fadb893ba1e08dd Mon Sep 17 00:00:00 2001 From: AKalinich-Luxoft Date: Fri, 15 Jun 2018 12:53:28 +0300 Subject: Removed unused code in regular policies --- .../include/policy/policy_regular/policy/policy_manager.h | 6 ------ .../include/test/policy/policy_regular/policy/mock_cache_manager.h | 1 - .../test/policy/policy_regular/policy/mock_policy_manager.h | 1 - .../policy/policy_regular/include/policy/cache_manager.h | 6 ------ .../policy/policy_regular/include/policy/cache_manager_interface.h | 7 ------- .../policy/policy_regular/include/policy/policy_manager_impl.h | 2 -- src/components/policy/policy_regular/src/cache_manager.cc | 7 ------- src/components/policy/policy_regular/src/policy_manager_impl.cc | 7 ------- 8 files changed, 37 deletions(-) diff --git a/src/components/include/policy/policy_regular/policy/policy_manager.h b/src/components/include/policy/policy_regular/policy/policy_manager.h index 634892ea15..84d48a691e 100644 --- a/src/components/include/policy/policy_regular/policy/policy_manager.h +++ b/src/components/include/policy/policy_regular/policy/policy_manager.h @@ -530,12 +530,6 @@ class PolicyManager : public usage_statistics::StatisticsManager { */ virtual bool HasCertificate() const = 0; - /** - * @brief Sets decrypted certificate in policy table - * @param certificate content of certificate - */ - virtual void SetDecryptedCertificate(const std::string& certificate) = 0; - /** * @brief Getter for policy settings * @return policy settings instance diff --git a/src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h b/src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h index e68c0ba0c3..d216957eb0 100644 --- a/src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h +++ b/src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h @@ -206,7 +206,6 @@ class MockCacheManagerInterface : public CacheManagerInterface { MOCK_METHOD1(GetHMITypes, const policy_table::AppHMITypes*(const std::string& app_id)); MOCK_CONST_METHOD0(GetCertificate, std::string()); - MOCK_CONST_METHOD1(SetDecryptedCertificate, void(const std::string&)); MOCK_METHOD1(GetGroups, const policy_table::Strings&(const PTString& app_id)); MOCK_CONST_METHOD2(AppHasHMIType, bool(const std::string& application_id, diff --git a/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h b/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h index 0b8823d307..e0214934ee 100644 --- a/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h +++ b/src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h @@ -186,7 +186,6 @@ class MockPolicyManager : public PolicyManager { MOCK_CONST_METHOD0(GetMetaInfo, const policy::MetaInfo()); MOCK_CONST_METHOD0(RetrieveCertificate, std::string()); MOCK_CONST_METHOD0(HasCertificate, bool()); - MOCK_METHOD1(SetDecryptedCertificate, void(const std::string&)); MOCK_METHOD0(ExceededIgnitionCycles, bool()); MOCK_METHOD0(ExceededDays, bool()); MOCK_METHOD0(StartPTExchange, void()); diff --git a/src/components/policy/policy_regular/include/policy/cache_manager.h b/src/components/policy/policy_regular/include/policy/cache_manager.h index 47ab0d4298..4a0a09db83 100644 --- a/src/components/policy/policy_regular/include/policy/cache_manager.h +++ b/src/components/policy/policy_regular/include/policy/cache_manager.h @@ -295,12 +295,6 @@ class CacheManager : public CacheManagerInterface { */ bool IsDefaultPolicy(const std::string& app_id) const OVERRIDE; - /** - * @brief Sets decrypted certificate in policy table - * @param certificate content of certificate - */ - void SetDecryptedCertificate(const std::string& certificate) const OVERRIDE; - /** * @brief SetIsDefault Sets is_default flag for application * @param app_id app specific application diff --git a/src/components/policy/policy_regular/include/policy/cache_manager_interface.h b/src/components/policy/policy_regular/include/policy/cache_manager_interface.h index 477ad6b3ca..3dd2953865 100644 --- a/src/components/policy/policy_regular/include/policy/cache_manager_interface.h +++ b/src/components/policy/policy_regular/include/policy/cache_manager_interface.h @@ -302,13 +302,6 @@ class CacheManagerInterface { */ virtual bool IsDefaultPolicy(const std::string& app_id) const = 0; - /** - * @brief Sets decrypted certificate in policy table - * @param certificate content of certificate - */ - virtual void SetDecryptedCertificate( - const std::string& certificate) const = 0; - /** * @brief SetIsDefault Sets is_default flag for application * @param app_id app specific application diff --git a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h index d768e7acdc..8379cf4d82 100644 --- a/src/components/policy/policy_regular/include/policy/policy_manager_impl.h +++ b/src/components/policy/policy_regular/include/policy/policy_manager_impl.h @@ -594,8 +594,6 @@ class PolicyManagerImpl : public PolicyManager { */ bool HasCertificate() const OVERRIDE; - void SetDecryptedCertificate(const std::string& certificate) OVERRIDE; - /** * @brief Finds the next URL that must be sent on OnSystemRequest retry * @param urls vector of vectors that contain urls for each application diff --git a/src/components/policy/policy_regular/src/cache_manager.cc b/src/components/policy/policy_regular/src/cache_manager.cc index 5cefbe2c17..1d51b81af4 100644 --- a/src/components/policy/policy_regular/src/cache_manager.cc +++ b/src/components/policy/policy_regular/src/cache_manager.cc @@ -1291,13 +1291,6 @@ bool CacheManager::IsDefaultPolicy(const std::string& app_id) const { return result; } -void CacheManager::SetDecryptedCertificate( - const std::string& certificate) const { - CACHE_MANAGER_CHECK_VOID(); - sync_primitives::AutoLock auto_lock(cache_lock_); - *pt_->policy_table.module_config.certificate = certificate; -} - bool CacheManager::SetIsDefault(const std::string& app_id) { CACHE_MANAGER_CHECK(false); sync_primitives::AutoLock auto_lock(cache_lock_); diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc index 62a2b1e7b7..915965f569 100644 --- a/src/components/policy/policy_regular/src/policy_manager_impl.cc +++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc @@ -1044,13 +1044,6 @@ bool PolicyManagerImpl::HasCertificate() const { return !cache_->GetCertificate().empty(); } -void PolicyManagerImpl::SetDecryptedCertificate( - const std::string& certificate) { - LOG4CXX_AUTO_TRACE(logger_); - cache_->SetDecryptedCertificate(certificate); - cache_->Backup(); -} - class CallStatusChange : public utils::Callable { public: CallStatusChange(UpdateStatusManager& upd_manager, -- cgit v1.2.1