summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-17 14:55:40 +0000
committerjoaodasilva@chromium.org <joaodasilva@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-17 14:55:40 +0000
commit278c74bcc17019f92a3bd51d9cbf282cd1d00eea (patch)
tree32b2353da3e9858b56aceab51a5c4a61e3637aa4 /components
parent43bb82c26dde313a801028590d5d673ad923473b (diff)
downloadchromium_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
Diffstat (limited to 'components')
-rw-r--r--components/components.gyp4
-rw-r--r--components/components_tests.gyp2
-rw-r--r--components/policy.gypi2
-rw-r--r--components/policy/core/common/cloud/cloud_policy_refresh_scheduler.cc6
-rw-r--r--components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc8
-rw-r--r--components/policy/core/common/cloud/cloud_policy_validator.cc2
-rw-r--r--components/policy/core/common/cloud/cloud_policy_validator.h4
-rw-r--r--components/policy/core/common/cloud/policy_builder.cc2
-rw-r--r--components/policy/core/common/cloud/policy_builder.h4
-rw-r--r--components/policy/policy_common.gypi2
10 files changed, 18 insertions, 18 deletions
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',
],