diff options
Diffstat (limited to 'src/components/resumption/src/last_state.cc')
-rw-r--r-- | src/components/resumption/src/last_state.cc | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/components/resumption/src/last_state.cc b/src/components/resumption/src/last_state.cc index 07bcc0d2a5..c1b8534bfc 100644 --- a/src/components/resumption/src/last_state.cc +++ b/src/components/resumption/src/last_state.cc @@ -40,8 +40,8 @@ CREATE_LOGGERPTR_GLOBAL(logger_, "Resumption") LastState::LastState(const std::string& app_storage_folder, const std::string& app_info_storage) - : app_storage_folder_(app_storage_folder), - app_info_storage_(app_info_storage) { + : app_storage_folder_(app_storage_folder) + , app_info_storage_(app_info_storage) { LoadFromFileSystem(); LOG4CXX_AUTO_TRACE(logger_); } @@ -54,14 +54,12 @@ LastState::~LastState() { void LastState::SaveToFileSystem() { LOG4CXX_AUTO_TRACE(logger_); const std::string& str = dictionary.toStyledString(); - const std::vector<uint8_t> char_vector_pdata( - str.begin(), str.end()); + const std::vector<uint8_t> char_vector_pdata(str.begin(), str.end()); DCHECK(file_system::CreateDirectoryRecursively(app_storage_folder_)); - LOG4CXX_INFO(logger_, "LastState::SaveToFileSystem " - << app_info_storage_ << str); + LOG4CXX_INFO(logger_, + "LastState::SaveToFileSystem " << app_info_storage_ << str); DCHECK(file_system::Write(app_info_storage_, char_vector_pdata)); - } void LastState::LoadFromFileSystem() { @@ -69,12 +67,11 @@ void LastState::LoadFromFileSystem() { bool result = file_system::ReadFile(app_info_storage_, buffer); Json::Reader m_reader; if (result && m_reader.parse(buffer, dictionary)) { - LOG4CXX_INFO(logger_, "Valid last state was found." - << dictionary.toStyledString()); + LOG4CXX_INFO(logger_, + "Valid last state was found." << dictionary.toStyledString()); return; } LOG4CXX_WARN(logger_, "No valid last state was found."); } - -} // resumption +} // resumption |