diff options
author | dcherniev <dcherniev@github.com> | 2016-12-09 17:44:28 +0200 |
---|---|---|
committer | dcherniev <dcherniev@github.com> | 2017-01-10 12:44:39 +0200 |
commit | 0292ff17af4f4a0f9f686a8c8ae66c4156197e61 (patch) | |
tree | 17ee1d2bc92b0e132a03c0ca0a432333beab904e /src/components/application_manager/src/app_launch | |
parent | 4ff12fe67f0ed15700fd030690276712ef23659d (diff) | |
download | sdl_core-0292ff17af4f4a0f9f686a8c8ae66c4156197e61.tar.gz |
Create mock for LastState class
Splitted last_state into interface and implementation classes.
Created mock class for last_state interface class.
Updated references to last_state class in other related classes.
Related task : APPLINK-30284
Diffstat (limited to 'src/components/application_manager/src/app_launch')
-rw-r--r-- | src/components/application_manager/src/app_launch/app_launch_data_json.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/components/application_manager/src/app_launch/app_launch_data_json.cc b/src/components/application_manager/src/app_launch/app_launch_data_json.cc index 260dde7205..7599dcccb3 100644 --- a/src/components/application_manager/src/app_launch/app_launch_data_json.cc +++ b/src/components/application_manager/src/app_launch/app_launch_data_json.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Ford Motor Company + * Copyright (c) 2017, Ford Motor Company * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,10 +70,9 @@ Json::Value& AppLaunchDataJson::GetApplicationData() const { using namespace application_manager; LOG4CXX_AUTO_TRACE(logger_); sync_primitives::AutoLock autolock(app_launch_json_lock_); - Json::Value& dictionary = last_state().dictionary; + Json::Value& dictionary = last_state().get_dictionary(); if (!dictionary.isMember(strings::app_launch)) { - last_state().dictionary[strings::app_launch] = - Json::Value(Json::objectValue); + dictionary[strings::app_launch] = Json::Value(Json::objectValue); LOG4CXX_WARN(logger_, "app_launch section is missed"); } Json::Value& app_launch = dictionary[strings::app_launch]; @@ -276,7 +275,7 @@ bool AppLaunchDataJson::DeleteOldestAppData() { bool AppLaunchDataJson::Persist() { LOG4CXX_AUTO_TRACE(logger_); sync_primitives::AutoLock autolock(app_launch_json_lock_); - last_state().SaveToFileSystem(); + last_state().SaveStateToFileSystem(); return true; } |