Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2267)

Unified Diff: chrome/browser/policy/configuration_policy_handler_list_factory.cc

Issue 138163015: More fixes to enable ios build with policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed obsolete files from gyp Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_process_platform_part_base.cc ('k') | chrome/browser/policy/policy_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/configuration_policy_handler_list_factory.cc
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
index 37a75dfbf448b503213378b05d5aecf2c73c4ddb..409bbcd727e3254e85dc07e76d84b650a18aa7dd 100644
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -7,6 +7,16 @@
#include "base/basictypes.h"
#include "base/bind.h"
#include "base/values.h"
+#include "chrome/common/pref_names.h"
+#include "components/policy/core/browser/configuration_policy_handler.h"
+#include "components/policy/core/browser/configuration_policy_handler_list.h"
+#include "components/policy/core/common/policy_details.h"
+#include "components/policy/core/common/policy_map.h"
+#include "components/policy/core/common/policy_pref_names.h"
+#include "grit/component_strings.h"
+#include "policy/policy_constants.h"
+
+#if !defined(OS_IOS)
#include "chrome/browser/extensions/api/messaging/native_messaging_policy_handler.h"
#include "chrome/browser/extensions/policy_handlers.h"
#include "chrome/browser/net/disk_cache_dir_policy_handler.h"
@@ -17,18 +27,11 @@
#include "chrome/browser/search_engines/default_search_policy_handler.h"
#include "chrome/browser/sessions/restore_on_startup_policy_handler.h"
#include "chrome/browser/sync/sync_policy_handler.h"
-#include "chrome/common/pref_names.h"
#include "components/policy/core/browser/autofill_policy_handler.h"
-#include "components/policy/core/browser/configuration_policy_handler.h"
-#include "components/policy/core/browser/configuration_policy_handler_list.h"
#include "components/policy/core/browser/url_blacklist_policy_handler.h"
-#include "components/policy/core/common/policy_details.h"
-#include "components/policy/core/common/policy_map.h"
-#include "components/policy/core/common/policy_pref_names.h"
#include "extensions/browser/pref_names.h"
#include "extensions/common/manifest.h"
-#include "grit/component_strings.h"
-#include "policy/policy_constants.h"
+#endif
#if defined(OS_CHROMEOS)
#include "ash/magnifier/magnifier_constants.h"
@@ -44,7 +47,7 @@
#include "chrome/browser/download/download_dir_policy_handler.h"
#endif
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_IOS)
#include "apps/pref_names.h"
#endif
@@ -350,14 +353,14 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = {
prefs::kForceEphemeralProfiles,
base::Value::TYPE_BOOLEAN },
-#if !defined(OS_MACOSX)
+#if !defined(OS_MACOSX) && !defined(OS_IOS)
{ key::kFullscreenAllowed,
prefs::kFullscreenAllowed,
base::Value::TYPE_BOOLEAN },
{ key::kFullscreenAllowed,
apps::prefs::kAppFullscreenAllowed,
base::Value::TYPE_BOOLEAN },
-#endif // !defined(OS_MACOSX)
+#endif // !defined(OS_MACOSX) && !defined(OS_IOS)
#if defined(OS_CHROMEOS)
{ key::kChromeOsLockOnIdleSuspend,
@@ -450,6 +453,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] = {
#endif // defined(OS_ANDROID)
};
+#if !defined(OS_IOS)
// Mapping from extension type names to Manifest::Type.
StringToIntEnumListPolicyHandler::MappingEntry kExtensionAllowedTypesMap[] = {
{ "extension", extensions::Manifest::TYPE_EXTENSION },
@@ -459,10 +463,10 @@ StringToIntEnumListPolicyHandler::MappingEntry kExtensionAllowedTypesMap[] = {
{ "legacy_packaged_app", extensions::Manifest::TYPE_LEGACY_PACKAGED_APP },
{ "platform_app", extensions::Manifest::TYPE_PLATFORM_APP },
};
+#endif // !defined(OS_IOS)
} // namespace
-#if !defined(OS_IOS)
scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList() {
scoped_ptr<ConfigurationPolicyHandlerList> handlers(
new ConfigurationPolicyHandlerList(base::Bind(&GetChromePolicyDetails)));
@@ -473,6 +477,7 @@ scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList() {
kSimplePolicyMap[i].value_type)));
}
+#if !defined(OS_IOS)
handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
new AutofillPolicyHandler()));
handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
@@ -514,13 +519,7 @@ scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList() {
extensions::pref_names::kAllowedTypes,
kExtensionAllowedTypesMap,
kExtensionAllowedTypesMap + arraysize(kExtensionAllowedTypesMap))));
-#if defined(OS_CHROMEOS)
- handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
- new extensions::ExtensionListPolicyHandler(
- key::kAttestationExtensionWhitelist,
- prefs::kAttestationExtensionWhitelist,
- false)));
-#endif // defined(OS_CHROMEOS)
+#endif // !defined(OS_IOS)
#if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS)
handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
@@ -542,6 +541,11 @@ scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList() {
#if defined(OS_CHROMEOS)
handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
+ new extensions::ExtensionListPolicyHandler(
+ key::kAttestationExtensionWhitelist,
+ prefs::kAttestationExtensionWhitelist,
+ false)));
+ handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
NetworkConfigurationPolicyHandler::CreateForDevicePolicy()));
handlers->AddHandler(make_scoped_ptr<ConfigurationPolicyHandler>(
NetworkConfigurationPolicyHandler::CreateForUserPolicy()));
@@ -666,6 +670,5 @@ scoped_ptr<ConfigurationPolicyHandlerList> BuildHandlerList() {
#endif
return handlers.Pass();
}
-#endif // !defined(OS_IOS)
} // namespace policy
« no previous file with comments | « chrome/browser/browser_process_platform_part_base.cc ('k') | chrome/browser/policy/policy_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698