diff options
Diffstat (limited to 'src/components/application_manager/src/policies/pt_exchange_handler_ext.cc')
-rw-r--r-- | src/components/application_manager/src/policies/pt_exchange_handler_ext.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc b/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc index eba808f406..e1d5199063 100644 --- a/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc +++ b/src/components/application_manager/src/policies/pt_exchange_handler_ext.cc @@ -43,38 +43,38 @@ using application_manager::MessageHelper; using profile::Profile; using std::string; - namespace policy { CREATE_LOGGERPTR_GLOBAL(logger_, "PolicyHandler") PTExchangeHandlerExt::PTExchangeHandlerExt(PolicyHandler* policy_handler) - : PTExchangeHandler(), - policy_handler_(policy_handler) { + : PTExchangeHandler(), policy_handler_(policy_handler) { DCHECK(policy_handler_); } -PTExchangeHandlerExt::~PTExchangeHandlerExt() { -} +PTExchangeHandlerExt::~PTExchangeHandlerExt() {} void PTExchangeHandlerExt::Start() { LOG4CXX_TRACE(logger_, "Start exchange PT"); const string policy_snapshot_file_name = - Profile::instance()->policies_snapshot_file_name(); + policy_handler_->get_settings().policies_snapshot_file_name(); const std::string system_files_path = - Profile::instance()->system_files_path(); - const std::string policy_snapshot_full_path = system_files_path + '/' + - policy_snapshot_file_name; + policy_handler_->get_settings().system_files_path(); + const std::string policy_snapshot_full_path = + system_files_path + '/' + policy_snapshot_file_name; BinaryMessageSptr pt_snapshot = policy_handler_->RequestPTUpdate(); if (pt_snapshot.valid()) { if (file_system::CreateDirectoryRecursively(system_files_path) && file_system::WriteBinaryFile(policy_snapshot_full_path, *pt_snapshot)) { - MessageHelper::SendPolicyUpdate(policy_snapshot_full_path, - policy_handler_->TimeoutExchange(), - policy_handler_->RetrySequenceDelaysSeconds()); + MessageHelper::SendPolicyUpdate( + policy_snapshot_full_path, + policy_handler_->TimeoutExchange(), + policy_handler_->RetrySequenceDelaysSeconds()); } else { - LOG4CXX_ERROR(logger_, "Failed to write snapshot file to " << policy_snapshot_file_name); + LOG4CXX_ERROR(logger_, + "Failed to write snapshot file to " + << policy_snapshot_file_name); } } else { LOG4CXX_ERROR(logger_, "Failed to obtain policy table snapshot"); |