| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 data->set_policy_value(policy_value_cur_); | 295 data->set_policy_value(policy_value_cur_); |
| 296 store_.invalidation_version_ = invalidation_version; | 296 store_.invalidation_version_ = invalidation_version; |
| 297 store_.policy_.reset(data); | 297 store_.policy_.reset(data); |
| 298 base::DictionaryValue policies; | 298 base::DictionaryValue policies; |
| 299 policies.SetInteger( | 299 policies.SetInteger( |
| 300 key::kMaxInvalidationFetchDelay, | 300 key::kMaxInvalidationFetchDelay, |
| 301 CloudPolicyInvalidator::kMaxFetchDelayMin); | 301 CloudPolicyInvalidator::kMaxFetchDelayMin); |
| 302 store_.policy_map_.LoadFrom( | 302 store_.policy_map_.LoadFrom( |
| 303 &policies, | 303 &policies, |
| 304 POLICY_LEVEL_MANDATORY, | 304 POLICY_LEVEL_MANDATORY, |
| 305 POLICY_SCOPE_MACHINE, | 305 POLICY_SCOPE_MACHINE); |
| 306 POLICY_SOURCE_CLOUD); | |
| 307 store_.NotifyStoreLoaded(); | 306 store_.NotifyStoreLoaded(); |
| 308 } | 307 } |
| 309 | 308 |
| 310 void CloudPolicyInvalidatorTest::DisableInvalidationService() { | 309 void CloudPolicyInvalidatorTest::DisableInvalidationService() { |
| 311 invalidation_service_.SetInvalidatorState( | 310 invalidation_service_.SetInvalidatorState( |
| 312 syncer::TRANSIENT_INVALIDATION_ERROR); | 311 syncer::TRANSIENT_INVALIDATION_ERROR); |
| 313 } | 312 } |
| 314 | 313 |
| 315 void CloudPolicyInvalidatorTest::EnableInvalidationService() { | 314 void CloudPolicyInvalidatorTest::EnableInvalidationService() { |
| 316 invalidation_service_.SetInvalidatorState(syncer::INVALIDATIONS_ENABLED); | 315 invalidation_service_.SetInvalidatorState(syncer::INVALIDATIONS_ENABLED); |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 CloudPolicyInvalidatorUserTypedTest, | 1100 CloudPolicyInvalidatorUserTypedTest, |
| 1102 testing::Values(em::DeviceRegisterRequest::IOS_BROWSER)); | 1101 testing::Values(em::DeviceRegisterRequest::IOS_BROWSER)); |
| 1103 #else | 1102 #else |
| 1104 INSTANTIATE_TEST_CASE_P( | 1103 INSTANTIATE_TEST_CASE_P( |
| 1105 CloudPolicyInvalidatorUserTypedTestInstance, | 1104 CloudPolicyInvalidatorUserTypedTestInstance, |
| 1106 CloudPolicyInvalidatorUserTypedTest, | 1105 CloudPolicyInvalidatorUserTypedTest, |
| 1107 testing::Values(em::DeviceRegisterRequest::BROWSER)); | 1106 testing::Values(em::DeviceRegisterRequest::BROWSER)); |
| 1108 #endif | 1107 #endif |
| 1109 | 1108 |
| 1110 } // namespace policy | 1109 } // namespace policy |
| OLD | NEW |