9eba913c11fb857cce0c5dda027e7f0ba6850fbd
[platform/core/appfw/app-installers.git] / src / common / step / filesystem / step_remove_per_user_storage_directories.cc
1 // Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by a apache 2.0 license that can be
3 // found in the LICENSE file.
4
5 #include "common/step/filesystem/step_remove_per_user_storage_directories.h"
6
7 #include <string>
8 #include <vector>
9
10 #include "common/installer_context.h"
11 #include "common/shared_dirs.h"
12
13 namespace common_installer {
14 namespace filesystem {
15
16 Step::Status StepRemovePerUserStorageDirectories::process() {
17   if (context_->request_mode.get() != RequestMode::GLOBAL)
18     return Step::Status::OK;
19
20   if (!common_installer::DeletePerUserStorageDirectories(context_->pkgid.get(),
21           context_->keep_rwdata.get()))
22     return Status::APP_DIR_ERROR;
23
24   return Step::Status::OK;
25 }
26
27 }  // namespace filesystem
28 }  // namespace common_installer
29