From a0e2b902f8e3692a84c14d7e42765d387b1eff9d Mon Sep 17 00:00:00 2001
From: Piotr Ganicz
Date: Fri, 13 Jan 2017 13:12:32 +0100
Subject: [PATCH 1/1] Styel check
Change-Id: I102408c0f7ff520be398dbf102f5711954c283c5
---
src/hybrid/step/pkgmgr/step_generate_xml.cc | 1 +
src/unit_tests/smoke_test.cc | 7 +-
src/wgt/extension_config_parser.cc | 3 +
src/wgt/extension_config_parser.h | 2 +
src/wgt/step/configuration/step_parse.cc | 3 +-
src/wgt/step/configuration/step_parse_recovery.cc | 2 +-
src/wgt/step/encryption/step_encrypt_resources.cc | 1 +
.../step/encryption/step_remove_encryption_data.h | 1 +
.../security/step_check_extension_privileges.cc | 4 +-
.../security/step_check_wgt_background_category.cc | 2 +
.../step/security/step_check_wgt_ime_privilege.cc | 5 +-
.../step/security/step_check_wgt_ime_privilege.h | 1 +
.../step_check_wgt_notification_category.cc | 4 +-
.../step_check_wgt_notification_category.h | 1 +
src/wgt/wgt_app_query_interface.cc | 2 +-
src/wgt/wgt_installer.cc | 197 +++++++++++++++------
src/wgt/wgt_installer.h | 22 +++
17 files changed, 190 insertions(+), 68 deletions(-)
diff --git a/src/hybrid/step/pkgmgr/step_generate_xml.cc b/src/hybrid/step/pkgmgr/step_generate_xml.cc
index df049ff..2004179 100644
--- a/src/hybrid/step/pkgmgr/step_generate_xml.cc
+++ b/src/hybrid/step/pkgmgr/step_generate_xml.cc
@@ -16,6 +16,7 @@
#include
#include
+#include
#include
#include
diff --git a/src/unit_tests/smoke_test.cc b/src/unit_tests/smoke_test.cc
index 66ca801..38193da 100644
--- a/src/unit_tests/smoke_test.cc
+++ b/src/unit_tests/smoke_test.cc
@@ -50,9 +50,9 @@ const uid_t kDefaultUserUid = tzplatform_getuid(TZ_SYS_DEFAULT_USER);
const uid_t kTestUserId = kGlobalUserUid;
const gid_t kTestGroupId = kGlobalUserGid;
const char kSystemShareGroupName[] = "system_share";
-const std::string kTestUserIdStr =
+const std::string& kTestUserIdStr =
std::to_string(kTestUserId);
-const std::string kDefaultUserIdStr = std::to_string(kDefaultUserUid);
+const std::string& kDefaultUserIdStr = std::to_string(kDefaultUserUid);
const char kLegacyExtImageDir[] = "legacy_extimage_dir";
const char kMigrateTestDBName[] = "app2sd_migrate.db";
@@ -1153,7 +1153,8 @@ TEST_F(SmokeTest, InstallExternalMode) {
TEST_F(SmokeTest, MigrateLegacyExternalImageMode) {
ASSERT_TRUE(CheckAvailableExternalPath());
- bf::path path = kSmokePackagesDirectory / "MigrateLegacyExternalImageMode.wgt";
+ bf::path path =
+ kSmokePackagesDirectory / "MigrateLegacyExternalImageMode.wgt";
std::string pkgid = "smokeapp36";
std::string appid = "smokeapp36.web";
bf::path legacy_path = kSmokePackagesDirectory / kLegacyExtImageDir;
diff --git a/src/wgt/extension_config_parser.cc b/src/wgt/extension_config_parser.cc
index 1a1258d..2409389 100755
--- a/src/wgt/extension_config_parser.cc
+++ b/src/wgt/extension_config_parser.cc
@@ -12,6 +12,7 @@
namespace wgt {
namespace {
+
const xmlChar kExtensionNodeKey[] = "extension";
const xmlChar kNamePrivilegeKey[] = "privilege";
const xmlChar kPrivigeNameAttributeKey[] = "name";
@@ -21,6 +22,7 @@ const char kXmlTextKey[] = "#text";
const char kNamespaceKey[] = "@namespace";
const char kExtensionPath[] = "extension.privilege";
const char kExtensionNameKey[] = "@name";
+
} // namespace
ExtensionConfigParser::ExtensionConfigParser(std::string config_xml)
@@ -186,4 +188,5 @@ std::vector ExtensionConfigParser::GetExtensionPrivilegeList() {
}
return privilege_list;
}
+
} // namespace wgt
diff --git a/src/wgt/extension_config_parser.h b/src/wgt/extension_config_parser.h
index c5cd454..915497e 100755
--- a/src/wgt/extension_config_parser.h
+++ b/src/wgt/extension_config_parser.h
@@ -10,6 +10,7 @@
#include
#include
+#include
#include
#include