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
IDS_PLATFORM_LABEL
IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_ACCEPT_BUTTON
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_UNREADABLE_ERROR
IDS_PRINT
......
......@@ -1015,7 +1015,7 @@
'chrome_android.gypi',
]}, # 'includes'
], # OS=="android"
['configuration_policy==1 and OS!="android"', {
['configuration_policy==1 and OS!="android" and OS!="ios"', {
'includes': [ 'policy.gypi', ],
}],
['enable_printing==1', {
......
......@@ -2790,7 +2790,7 @@
'../components/components.gyp:policy',
],
'conditions': [
['OS!="android"', {
['OS!="android" and OS!="ios"', {
'dependencies': [
'policy_path_parser',
],
......
......@@ -23,6 +23,7 @@
'signin.gypi',
'startup_metric_utils.gypi',
'translate.gypi',
'url_matcher.gypi',
'user_prefs.gypi',
'variations.gypi',
'webdata.gypi',
......@@ -34,7 +35,6 @@
'navigation_interception.gypi',
'plugins.gypi',
'sessions.gypi',
'url_matcher.gypi',
'visitedlink.gypi',
'web_contents_delegate_android.gypi',
'web_modal.gypi',
......
......@@ -255,7 +255,7 @@
'policy/core/common/schema_unittest.cc',
],
'conditions': [
['OS=="android"', {
['OS=="android" or OS=="ios"', {
'sources!': [
'policy/core/common/async_policy_provider_unittest.cc',
'policy/core/common/cloud/component_cloud_policy_service_unittest.cc',
......
......@@ -208,7 +208,7 @@
'../build/protoc.gypi',
],
'conditions': [
['OS=="android"', {
['OS=="android" or OS=="ios"', {
'sources!': [
'policy/proto/chrome_extension_policy.proto',
],
......
......@@ -30,7 +30,7 @@ const int kWaitForInvalidationsTimeoutSeconds = 5;
} // namespace
#if defined(OS_ANDROID)
#if defined(OS_ANDROID) || defined(OS_IOS)
const int64 CloudPolicyRefreshScheduler::kDefaultRefreshDelayMs =
24 * 60 * 60 * 1000; // 1 day.
......@@ -214,8 +214,8 @@ void CloudPolicyRefreshScheduler::UpdateLastRefreshFromPolicy() {
return;
}
#if defined(OS_ANDROID)
// Refreshing on Android:
#if defined(OS_ANDROID) || defined(OS_IOS)
// Refreshing on mobile platforms:
// - if no user is signed-in then the |client_| is never registered and
// nothing happens here.
// - if the user is signed-in but isn't enterprise then the |client_| is
......
......@@ -124,10 +124,10 @@ class CloudPolicyRefreshSchedulerTest : public testing::Test {
}
void CheckInitialRefresh(bool with_invalidations) const {
#if defined(OS_ANDROID)
// Android takes the cache age into account for the initial fetch.
// Usually the cache age is ignored for the initial refresh, but Android
// uses it to restrain from refreshing on every startup.
#if defined(OS_ANDROID) || defined(OS_IOS)
// The mobile platforms take the cache age into account for the initial
// fetch. Usually the cache age is ignored for the initial refresh, but on
// mobile it's used to restrain from refreshing on every startup.
base::TimeDelta rate = base::TimeDelta::FromMilliseconds(
with_invalidations
? CloudPolicyRefreshScheduler::kWithInvalidationsRefreshDelayMs
......
......@@ -378,7 +378,7 @@ bool CloudPolicyValidatorBase::VerifySignature(const std::string& data,
template class CloudPolicyValidator<em::CloudPolicySettings>;
#if !defined(OS_ANDROID)
#if !defined(OS_ANDROID) && !defined(OS_IOS)
template class CloudPolicyValidator<em::ExternalPolicyData>;
#endif
......
......@@ -18,7 +18,7 @@
#include "components/policy/policy_export.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"
#endif
......@@ -300,7 +300,7 @@ class POLICY_EXPORT CloudPolicyValidator : public CloudPolicyValidatorBase {
typedef CloudPolicyValidator<enterprise_management::CloudPolicySettings>
UserCloudPolicyValidator;
#if !defined(OS_ANDROID)
#if !defined(OS_ANDROID) && !defined(OS_IOS)
typedef CloudPolicyValidator<enterprise_management::ExternalPolicyData>
ComponentCloudPolicyValidator;
#endif
......
......@@ -228,7 +228,7 @@ TypedPolicyBuilder<em::CloudPolicySettings>::TypedPolicyBuilder()
// Have the instantiation compiled into the module.
template class TypedPolicyBuilder<em::CloudPolicySettings>;
#if !defined(OS_ANDROID)
#if !defined(OS_ANDROID) && !defined(OS_IOS)
template<>
TypedPolicyBuilder<em::ExternalPolicyData>::TypedPolicyBuilder()
: payload_(new em::ExternalPolicyData()) {
......
......@@ -15,7 +15,7 @@
#include "policy/proto/cloud_policy.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"
#endif
......@@ -136,7 +136,7 @@ class TypedPolicyBuilder : public PolicyBuilder {
typedef TypedPolicyBuilder<enterprise_management::CloudPolicySettings>
UserPolicyBuilder;
#if !defined(OS_ANDROID)
#if !defined(OS_ANDROID) && !defined(OS_IOS)
typedef TypedPolicyBuilder<enterprise_management::ExternalPolicyData>
ComponentPolicyBuilder;
#endif
......
......@@ -132,7 +132,7 @@
'policy_export.h',
],
'conditions': [
['OS=="android"', {
['OS=="android" or OS=="ios"', {
'sources': [
'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