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); |
306 store_.NotifyStoreLoaded(); | 307 store_.NotifyStoreLoaded(); |
307 } | 308 } |
308 | 309 |
309 void CloudPolicyInvalidatorTest::DisableInvalidationService() { | 310 void CloudPolicyInvalidatorTest::DisableInvalidationService() { |
310 invalidation_service_.SetInvalidatorState( | 311 invalidation_service_.SetInvalidatorState( |
311 syncer::TRANSIENT_INVALIDATION_ERROR); | 312 syncer::TRANSIENT_INVALIDATION_ERROR); |
312 } | 313 } |
313 | 314 |
314 void CloudPolicyInvalidatorTest::EnableInvalidationService() { | 315 void CloudPolicyInvalidatorTest::EnableInvalidationService() { |
315 invalidation_service_.SetInvalidatorState(syncer::INVALIDATIONS_ENABLED); | 316 invalidation_service_.SetInvalidatorState(syncer::INVALIDATIONS_ENABLED); |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 CloudPolicyInvalidatorUserTypedTest, | 1101 CloudPolicyInvalidatorUserTypedTest, |
1101 testing::Values(em::DeviceRegisterRequest::IOS_BROWSER)); | 1102 testing::Values(em::DeviceRegisterRequest::IOS_BROWSER)); |
1102 #else | 1103 #else |
1103 INSTANTIATE_TEST_CASE_P( | 1104 INSTANTIATE_TEST_CASE_P( |
1104 CloudPolicyInvalidatorUserTypedTestInstance, | 1105 CloudPolicyInvalidatorUserTypedTestInstance, |
1105 CloudPolicyInvalidatorUserTypedTest, | 1106 CloudPolicyInvalidatorUserTypedTest, |
1106 testing::Values(em::DeviceRegisterRequest::BROWSER)); | 1107 testing::Values(em::DeviceRegisterRequest::BROWSER)); |
1107 #endif | 1108 #endif |
1108 | 1109 |
1109 } // namespace policy | 1110 } // namespace policy |
OLD | NEW |