diff options
author | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 14:55:40 +0000 |
---|---|---|
committer | joaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 14:55:40 +0000 |
commit | 278c74bcc17019f92a3bd51d9cbf282cd1d00eea (patch) | |
tree | 32b2353da3e9858b56aceab51a5c4a61e3637aa4 | |
parent | 43bb82c26dde313a801028590d5d673ad923473b (diff) | |
download | chromium_src-278c74bcc17019f92a3bd51d9cbf282cd1d00eea.zip chromium_src-278c74bcc17019f92a3bd51d9cbf282cd1d00eea.tar.gz chromium_src-278c74bcc17019f92a3bd51d9cbf282cd1d00eea.tar.bz2 |
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
-rw-r--r-- | build/ios/grit_whitelist.txt | 41 | ||||
-rw-r--r-- | chrome/chrome.gyp | 2 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 2 | ||||
-rw-r--r-- | components/components.gyp | 4 | ||||
-rw-r--r-- | components/components_tests.gyp | 2 | ||||
-rw-r--r-- | components/policy.gypi | 2 | ||||
-rw-r--r-- | components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc | 6 | ||||
-rw-r--r-- | components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc | 8 | ||||
-rw-r--r-- | components/policy/core/common/cloud/cloud_policy_validator.cc | 2 | ||||
-rw-r--r-- | components/policy/core/common/cloud/cloud_policy_validator.h | 4 | ||||
-rw-r--r-- | components/policy/core/common/cloud/policy_builder.cc | 2 | ||||
-rw-r--r-- | components/policy/core/common/cloud/policy_builder.h | 4 | ||||
-rw-r--r-- | components/policy/policy_common.gypi | 2 |
13 files changed, 61 insertions, 20 deletions
diff --git a/build/ios/grit_whitelist.txt b/build/ios/grit_whitelist.txt index 4e43c24..2311b0e 100644 --- a/build/ios/grit_whitelist.txt +++ b/build/ios/grit_whitelist.txt @@ -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 diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index eca03ae..67b1b30 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -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', { diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 99615c0..982f229 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2790,7 +2790,7 @@ '../components/components.gyp:policy', ], 'conditions': [ - ['OS!="android"', { + ['OS!="android" and OS!="ios"', { 'dependencies': [ 'policy_path_parser', ], diff --git a/components/components.gyp b/components/components.gyp index 341d120..52984ad 100644 --- a/components/components.gyp +++ b/components/components.gyp @@ -8,7 +8,7 @@ # platforms to include source files on (e.g. files ending in # _mac.h or _mac.cc are only compiled on MacOSX). 'chromium_code': 1, - }, + }, 'includes': [ 'autofill.gypi', 'auto_login_parser.gypi', @@ -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', diff --git a/components/components_tests.gyp b/components/components_tests.gyp index 291b548..8c19433 100644 --- a/components/components_tests.gyp +++ b/components/components_tests.gyp @@ -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', diff --git a/components/policy.gypi b/components/policy.gypi index c1afa6d..91d4c4e 100644 --- a/components/policy.gypi +++ b/components/policy.gypi @@ -208,7 +208,7 @@ '../build/protoc.gypi', ], 'conditions': [ - ['OS=="android"', { + ['OS=="android" or OS=="ios"', { 'sources!': [ 'policy/proto/chrome_extension_policy.proto', ], diff --git a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc index f80c24c..c8d4109 100644 --- a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc +++ b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc @@ -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 diff --git a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc index d50d5b9..1750992 100644 --- a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc +++ b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc @@ -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 diff --git a/components/policy/core/common/cloud/cloud_policy_validator.cc b/components/policy/core/common/cloud/cloud_policy_validator.cc index d28924d..5bbc6bc 100644 --- a/components/policy/core/common/cloud/cloud_policy_validator.cc +++ b/components/policy/core/common/cloud/cloud_policy_validator.cc @@ -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 diff --git a/components/policy/core/common/cloud/cloud_policy_validator.h b/components/policy/core/common/cloud/cloud_policy_validator.h index 9f2870d..3d2f2aa 100644 --- a/components/policy/core/common/cloud/cloud_policy_validator.h +++ b/components/policy/core/common/cloud/cloud_policy_validator.h @@ -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 diff --git a/components/policy/core/common/cloud/policy_builder.cc b/components/policy/core/common/cloud/policy_builder.cc index b6727f5..3d00067 100644 --- a/components/policy/core/common/cloud/policy_builder.cc +++ b/components/policy/core/common/cloud/policy_builder.cc @@ -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()) { diff --git a/components/policy/core/common/cloud/policy_builder.h b/components/policy/core/common/cloud/policy_builder.h index b8a1ad5..2298b3a 100644 --- a/components/policy/core/common/cloud/policy_builder.h +++ b/components/policy/core/common/cloud/policy_builder.h @@ -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 diff --git a/components/policy/policy_common.gypi b/components/policy/policy_common.gypi index 2adb75d..fc265a2 100644 --- a/components/policy/policy_common.gypi +++ b/components/policy/policy_common.gypi @@ -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', ], |