summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAKalinich-Luxoft <AKalinich@luxoft.com>2018-06-15 12:53:28 +0300
committerAKalinich-Luxoft <AKalinich@luxoft.com>2018-06-15 17:09:14 +0300
commit16f09efa2549f812eb758f159fadb893ba1e08dd (patch)
tree495f04f4e19ace651673c47a9e45c58f3b464ccf
parent48140e8cb6483af099fb4344b4ff5773899f1209 (diff)
downloadsdl_core-16f09efa2549f812eb758f159fadb893ba1e08dd.tar.gz
Removed unused code in regular policies
-rw-r--r--src/components/include/policy/policy_regular/policy/policy_manager.h6
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_cache_manager.h1
-rw-r--r--src/components/include/test/policy/policy_regular/policy/mock_policy_manager.h1
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager.h6
-rw-r--r--src/components/policy/policy_regular/include/policy/cache_manager_interface.h7
-rw-r--r--src/components/policy/policy_regular/include/policy/policy_manager_impl.h2
-rw-r--r--src/components/policy/policy_regular/src/cache_manager.cc7
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc7
8 files changed, 0 insertions, 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
@@ -531,12 +531,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
@@ -296,12 +296,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
* @return true in case opperation was done successfully.
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
@@ -303,13 +303,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
* @return true in case opperation was done successfully.
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,