| 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" |
| 11 #include "base/message_loop/message_loop.h" | |
| 12 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 13 #include "base/metrics/histogram_samples.h" | 12 #include "base/metrics/histogram_samples.h" |
| 14 #include "base/metrics/sample_map.h" | 13 #include "base/metrics/sample_map.h" |
| 15 #include "base/metrics/statistics_recorder.h" | 14 #include "base/metrics/statistics_recorder.h" |
| 16 #include "base/run_loop.h" | 15 #include "base/run_loop.h" |
| 17 #include "base/test/simple_test_clock.h" | 16 #include "base/test/simple_test_clock.h" |
| 18 #include "base/test/test_simple_task_runner.h" | 17 #include "base/test/test_simple_task_runner.h" |
| 19 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 20 #include "base/values.h" | 19 #include "base/values.h" |
| 21 #include "chrome/browser/invalidation/fake_invalidation_service.h" | 20 #include "chrome/browser/invalidation/fake_invalidation_service.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 const char* policy_value_b_; | 206 const char* policy_value_b_; |
| 208 | 207 |
| 209 // The currently used policy value. | 208 // The currently used policy value. |
| 210 const char* policy_value_cur_; | 209 const char* policy_value_cur_; |
| 211 }; | 210 }; |
| 212 | 211 |
| 213 CloudPolicyInvalidatorTest::CloudPolicyInvalidatorTest() | 212 CloudPolicyInvalidatorTest::CloudPolicyInvalidatorTest() |
| 214 : core_(dm_protocol::kChromeUserPolicyType, | 213 : core_(dm_protocol::kChromeUserPolicyType, |
| 215 std::string(), | 214 std::string(), |
| 216 &store_, | 215 &store_, |
| 217 loop_.message_loop_proxy()), | 216 loop_.task_runner()), |
| 218 client_(nullptr), | 217 client_(nullptr), |
| 219 task_runner_(new base::TestSimpleTaskRunner()), | 218 task_runner_(new base::TestSimpleTaskRunner()), |
| 220 clock_(new base::SimpleTestClock()), | 219 clock_(new base::SimpleTestClock()), |
| 221 object_id_a_(135, "asdf"), | 220 object_id_a_(135, "asdf"), |
| 222 object_id_b_(246, "zxcv"), | 221 object_id_b_(246, "zxcv"), |
| 223 policy_value_a_("asdf"), | 222 policy_value_a_("asdf"), |
| 224 policy_value_b_("zxcv"), | 223 policy_value_b_("zxcv"), |
| 225 policy_value_cur_(policy_value_a_) { | 224 policy_value_cur_(policy_value_a_) { |
| 226 clock_->SetNow( | 225 clock_->SetNow( |
| 227 base::Time::UnixEpoch() + base::TimeDelta::FromSeconds(987654321)); | 226 base::Time::UnixEpoch() + base::TimeDelta::FromSeconds(987654321)); |
| (...skipping 873 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 |