Enable building with configuration_policy==1 on ios.

BUG=275292

Review URL: https://codereview.chromium.org/140823002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245521 0039d316-1c4b-4281-b951-d872f2087c98
parent 43bb82c2
...@@ -693,6 +693,47 @@ IDS_PDF_INFOBAR_ALWAYS_USE_READER_BUTTON ...@@ -693,6 +693,47 @@ IDS_PDF_INFOBAR_ALWAYS_USE_READER_BUTTON
IDS_PLATFORM_LABEL IDS_PLATFORM_LABEL
IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_ACCEPT_BUTTON IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_ACCEPT_BUTTON
IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_TITLE IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_TITLE
IDS_POLICY_DEPRECATED
IDS_POLICY_DM_STATUS_HTTP_STATUS_ERROR
IDS_POLICY_DM_STATUS_REQUEST_FAILED
IDS_POLICY_DM_STATUS_REQUEST_INVALID
IDS_POLICY_DM_STATUS_RESPONSE_DECODING_ERROR
IDS_POLICY_DM_STATUS_SERVICE_ACTIVATION_PENDING
IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED
IDS_POLICY_DM_STATUS_SERVICE_DEVICE_ID_CONFLICT
IDS_POLICY_DM_STATUS_SERVICE_DEVICE_NOT_FOUND
IDS_POLICY_DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER
IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED
IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID
IDS_POLICY_DM_STATUS_SERVICE_MISSING_LICENSES
IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND
IDS_POLICY_DM_STATUS_SUCCESS
IDS_POLICY_DM_STATUS_TEMPORARY_UNAVAILABLE
IDS_POLICY_DM_STATUS_UNKNOWN_ERROR
IDS_POLICY_LIST_ENTRY_ERROR
IDS_POLICY_OUT_OF_RANGE_ERROR
IDS_POLICY_STORE_STATUS_BAD_STATE
IDS_POLICY_STORE_STATUS_LOAD_ERROR
IDS_POLICY_STORE_STATUS_OK
IDS_POLICY_STORE_STATUS_PARSE_ERROR
IDS_POLICY_STORE_STATUS_SERIALIZE_ERROR
IDS_POLICY_STORE_STATUS_STORE_ERROR
IDS_POLICY_STORE_STATUS_UNKNOWN_ERROR
IDS_POLICY_STORE_STATUS_VALIDATION_ERROR
IDS_POLICY_SUBKEY_ERROR
IDS_POLICY_TYPE_ERROR
IDS_POLICY_VALIDATION_BAD_INITIAL_SIGNATURE
IDS_POLICY_VALIDATION_BAD_SIGNATURE
IDS_POLICY_VALIDATION_BAD_TIMESTAMP
IDS_POLICY_VALIDATION_BAD_USERNAME
IDS_POLICY_VALIDATION_ERROR_CODE_PRESENT
IDS_POLICY_VALIDATION_OK
IDS_POLICY_VALIDATION_PAYLOAD_PARSE_ERROR
IDS_POLICY_VALIDATION_POLICY_PARSE_ERROR
IDS_POLICY_VALIDATION_UNKNOWN_ERROR
IDS_POLICY_VALIDATION_WRONG_POLICY_TYPE
IDS_POLICY_VALIDATION_WRONG_SETTINGS_ENTITY_ID
IDS_POLICY_VALIDATION_WRONG_TOKEN
IDS_PREFERENCES_CORRUPT_ERROR IDS_PREFERENCES_CORRUPT_ERROR
IDS_PREFERENCES_UNREADABLE_ERROR IDS_PREFERENCES_UNREADABLE_ERROR
IDS_PRINT IDS_PRINT
......
...@@ -1015,7 +1015,7 @@ ...@@ -1015,7 +1015,7 @@
'chrome_android.gypi', 'chrome_android.gypi',
]}, # 'includes' ]}, # 'includes'
], # OS=="android" ], # OS=="android"
['configuration_policy==1 and OS!="android"', { ['configuration_policy==1 and OS!="android" and OS!="ios"', {
'includes': [ 'policy.gypi', ], 'includes': [ 'policy.gypi', ],
}], }],
['enable_printing==1', { ['enable_printing==1', {
......
...@@ -2790,7 +2790,7 @@ ...@@ -2790,7 +2790,7 @@
'../components/components.gyp:policy', '../components/components.gyp:policy',
], ],
'conditions': [ 'conditions': [
['OS!="android"', { ['OS!="android" and OS!="ios"', {
'dependencies': [ 'dependencies': [
'policy_path_parser', 'policy_path_parser',
], ],
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# platforms to include source files on (e.g. files ending in # platforms to include source files on (e.g. files ending in
# _mac.h or _mac.cc are only compiled on MacOSX). # _mac.h or _mac.cc are only compiled on MacOSX).
'chromium_code': 1, 'chromium_code': 1,
}, },
'includes': [ 'includes': [
'autofill.gypi', 'autofill.gypi',
'auto_login_parser.gypi', 'auto_login_parser.gypi',
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
'signin.gypi', 'signin.gypi',
'startup_metric_utils.gypi', 'startup_metric_utils.gypi',
'translate.gypi', 'translate.gypi',
'url_matcher.gypi',
'user_prefs.gypi', 'user_prefs.gypi',
'variations.gypi', 'variations.gypi',
'webdata.gypi', 'webdata.gypi',
...@@ -34,7 +35,6 @@ ...@@ -34,7 +35,6 @@
'navigation_interception.gypi', 'navigation_interception.gypi',
'plugins.gypi', 'plugins.gypi',
'sessions.gypi', 'sessions.gypi',
'url_matcher.gypi',
'visitedlink.gypi', 'visitedlink.gypi',
'web_contents_delegate_android.gypi', 'web_contents_delegate_android.gypi',
'web_modal.gypi', 'web_modal.gypi',
......
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
'policy/core/common/schema_unittest.cc', 'policy/core/common/schema_unittest.cc',
], ],
'conditions': [ 'conditions': [
['OS=="android"', { ['OS=="android" or OS=="ios"', {
'sources!': [ 'sources!': [
'policy/core/common/async_policy_provider_unittest.cc', 'policy/core/common/async_policy_provider_unittest.cc',
'policy/core/common/cloud/component_cloud_policy_service_unittest.cc', 'policy/core/common/cloud/component_cloud_policy_service_unittest.cc',
......
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
'../build/protoc.gypi', '../build/protoc.gypi',
], ],
'conditions': [ 'conditions': [
['OS=="android"', { ['OS=="android" or OS=="ios"', {
'sources!': [ 'sources!': [
'policy/proto/chrome_extension_policy.proto', 'policy/proto/chrome_extension_policy.proto',
], ],
......
...@@ -30,7 +30,7 @@ const int kWaitForInvalidationsTimeoutSeconds = 5; ...@@ -30,7 +30,7 @@ const int kWaitForInvalidationsTimeoutSeconds = 5;
} // namespace } // namespace
#if defined(OS_ANDROID) #if defined(OS_ANDROID) || defined(OS_IOS)
const int64 CloudPolicyRefreshScheduler::kDefaultRefreshDelayMs = const int64 CloudPolicyRefreshScheduler::kDefaultRefreshDelayMs =
24 * 60 * 60 * 1000; // 1 day. 24 * 60 * 60 * 1000; // 1 day.
...@@ -214,8 +214,8 @@ void CloudPolicyRefreshScheduler::UpdateLastRefreshFromPolicy() { ...@@ -214,8 +214,8 @@ void CloudPolicyRefreshScheduler::UpdateLastRefreshFromPolicy() {
return; return;
} }
#if defined(OS_ANDROID) #if defined(OS_ANDROID) || defined(OS_IOS)
// Refreshing on Android: // Refreshing on mobile platforms:
// - if no user is signed-in then the |client_| is never registered and // - if no user is signed-in then the |client_| is never registered and
// nothing happens here. // nothing happens here.
// - if the user is signed-in but isn't enterprise then the |client_| is // - if the user is signed-in but isn't enterprise then the |client_| is
......
...@@ -124,10 +124,10 @@ class CloudPolicyRefreshSchedulerTest : public testing::Test { ...@@ -124,10 +124,10 @@ class CloudPolicyRefreshSchedulerTest : public testing::Test {
} }
void CheckInitialRefresh(bool with_invalidations) const { void CheckInitialRefresh(bool with_invalidations) const {
#if defined(OS_ANDROID) #if defined(OS_ANDROID) || defined(OS_IOS)
// Android takes the cache age into account for the initial fetch. // The mobile platforms take the cache age into account for the initial
// Usually the cache age is ignored for the initial refresh, but Android // fetch. Usually the cache age is ignored for the initial refresh, but on
// uses it to restrain from refreshing on every startup. // mobile it's used to restrain from refreshing on every startup.
base::TimeDelta rate = base::TimeDelta::FromMilliseconds( base::TimeDelta rate = base::TimeDelta::FromMilliseconds(
with_invalidations with_invalidations
? CloudPolicyRefreshScheduler::kWithInvalidationsRefreshDelayMs ? CloudPolicyRefreshScheduler::kWithInvalidationsRefreshDelayMs
......
...@@ -378,7 +378,7 @@ bool CloudPolicyValidatorBase::VerifySignature(const std::string& data, ...@@ -378,7 +378,7 @@ bool CloudPolicyValidatorBase::VerifySignature(const std::string& data,
template class CloudPolicyValidator<em::CloudPolicySettings>; template class CloudPolicyValidator<em::CloudPolicySettings>;
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID) && !defined(OS_IOS)
template class CloudPolicyValidator<em::ExternalPolicyData>; template class CloudPolicyValidator<em::ExternalPolicyData>;
#endif #endif
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "components/policy/policy_export.h" #include "components/policy/policy_export.h"
#include "policy/proto/cloud_policy.pb.h" #include "policy/proto/cloud_policy.pb.h"
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID) && !defined(OS_IOS)
#include "policy/proto/chrome_extension_policy.pb.h" #include "policy/proto/chrome_extension_policy.pb.h"
#endif #endif
...@@ -300,7 +300,7 @@ class POLICY_EXPORT CloudPolicyValidator : public CloudPolicyValidatorBase { ...@@ -300,7 +300,7 @@ class POLICY_EXPORT CloudPolicyValidator : public CloudPolicyValidatorBase {
typedef CloudPolicyValidator<enterprise_management::CloudPolicySettings> typedef CloudPolicyValidator<enterprise_management::CloudPolicySettings>
UserCloudPolicyValidator; UserCloudPolicyValidator;
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID) && !defined(OS_IOS)
typedef CloudPolicyValidator<enterprise_management::ExternalPolicyData> typedef CloudPolicyValidator<enterprise_management::ExternalPolicyData>
ComponentCloudPolicyValidator; ComponentCloudPolicyValidator;
#endif #endif
......
...@@ -228,7 +228,7 @@ TypedPolicyBuilder<em::CloudPolicySettings>::TypedPolicyBuilder() ...@@ -228,7 +228,7 @@ TypedPolicyBuilder<em::CloudPolicySettings>::TypedPolicyBuilder()
// Have the instantiation compiled into the module. // Have the instantiation compiled into the module.
template class TypedPolicyBuilder<em::CloudPolicySettings>; template class TypedPolicyBuilder<em::CloudPolicySettings>;
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID) && !defined(OS_IOS)
template<> template<>
TypedPolicyBuilder<em::ExternalPolicyData>::TypedPolicyBuilder() TypedPolicyBuilder<em::ExternalPolicyData>::TypedPolicyBuilder()
: payload_(new em::ExternalPolicyData()) { : payload_(new em::ExternalPolicyData()) {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "policy/proto/cloud_policy.pb.h" #include "policy/proto/cloud_policy.pb.h"
#include "policy/proto/device_management_backend.pb.h" #include "policy/proto/device_management_backend.pb.h"
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID) && !defined(OS_IOS)
#include "policy/proto/chrome_extension_policy.pb.h" #include "policy/proto/chrome_extension_policy.pb.h"
#endif #endif
...@@ -136,7 +136,7 @@ class TypedPolicyBuilder : public PolicyBuilder { ...@@ -136,7 +136,7 @@ class TypedPolicyBuilder : public PolicyBuilder {
typedef TypedPolicyBuilder<enterprise_management::CloudPolicySettings> typedef TypedPolicyBuilder<enterprise_management::CloudPolicySettings>
UserPolicyBuilder; UserPolicyBuilder;
#if !defined(OS_ANDROID) #if !defined(OS_ANDROID) && !defined(OS_IOS)
typedef TypedPolicyBuilder<enterprise_management::ExternalPolicyData> typedef TypedPolicyBuilder<enterprise_management::ExternalPolicyData>
ComponentPolicyBuilder; ComponentPolicyBuilder;
#endif #endif
......
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
'policy_export.h', 'policy_export.h',
], ],
'conditions': [ 'conditions': [
['OS=="android"', { ['OS=="android" or OS=="ios"', {
'sources': [ 'sources': [
'core/common/cloud/component_cloud_policy_service_stub.cc', 'core/common/cloud/component_cloud_policy_service_stub.cc',
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment